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

  1. -- GhostShip Events
  2. Starting = 0;
  3. SeaEvent = 1;
  4.  
  5. if CrewPower < 12 then
  6.  
  7.   CrewID = math.random(0, CrewCount);
  8.   
  9.   CrewName = GetCrewName(CrewID);
  10.  
  11.   KillCrew(CrewID);
  12.  
  13.   ShowStoryText("Not one to argue with good old-fashioned common sense, you nod your head in silent agreement, practically falling over yourself to stand aside and let the ghostly raiders pass through to your lower decks. It is only later that you remember you had assigned " .. CrewName .. " to guard the hull. You suppose that explains why one more skeletal pirate came back onto the upper deck than you counted going below.");
  14.  
  15.   AddChoice("Surrender!", "GhostShip8");
  16.  
  17. else
  18.  
  19.   CrewID = math.random(0, CrewCount);
  20.   
  21.   CrewName = GetCrewName(CrewID);
  22.  
  23.   ShowStoryText("You are quite ready to surrender but just as you are about to do so, you realise that your faithful crew has other ideas. There's a sudden shocked look on the ghost captain's face as " .. CrewName .. " jams a cutlass into his empty ribcage from behind, then with a powerful heave, tosses the bones aside. An unearthly cry accompanies the skeleton as it smashes into the side of the deck, falters, then tumbles overboard. As you see the spectral ship's form begin to dissipate, you realise it is over.");
  24.  
  25.   iValue = GetIntFlag(3);
  26.   iValue = iValue + 1;
  27.   SetIntFlag(3, iValue);
  28.  
  29.   AddChoice("Victory!", "GhostShip9");
  30.  
  31. end
  32.  
  33.