home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 February / maximum-cd-2012-02.iso / DiscContents / TheWagerSetup1.2.exe / Assets / Scripts / GhostShip5.lua < prev    next >
Encoding:
Text File  |  2011-02-27  |  1003 b   |  34 lines

  1. -- GhostShip Events
  2. Starting = 0;
  3. SeaEvent = 1;
  4.  
  5. function KillRandomCrewMember ()
  6.   if CrewCount >= 1 then
  7.  
  8.     CrewID = math.random(0, CrewCount);
  9.   
  10.     CrewName = GetCrewName(CrewID);
  11.  
  12.     KillCrew(CrewID);
  13.  
  14.     return CrewName;
  15.   end
  16. end
  17.  
  18. if CrewPower < 9 then
  19.  
  20.   CrewName = KillRandomCrewMember();
  21.   
  22.   ShowStoryText("Try as they may, your crew simply lacks the experience to deal with such horrors, and are painfully unsteady on their feet as they helplessly flail around, trying to fend off the onslaught. " .. CrewName .. " is the first to fall to their blades but you fear that worse may be to come.");
  23.  
  24. else
  25.  
  26.   ShowStoryText("Your crew are hardly organised enough to take the fight to the enemy, but they can handle themselves at least. The battle appears to be locked in a stalemate for now, but you fear the enemy's worst is yet to come.");
  27.  
  28.   iValue = GetIntFlag(3);
  29.   iValue = iValue + 1;
  30.   SetIntFlag(3, iValue);
  31.  
  32. end
  33.  
  34. AddChoice("Onwards!", "GhostShip6");