share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/family.lua
changeset 7493 f261d6bf76b3
parent 7484 f3a7c4e75815
child 7496 06d8423ddd53
equal deleted inserted replaced
7490:c422845b8d1f 7493:f261d6bf76b3
   184   HideHedge(cyborg)
   184   HideHedge(cyborg)
   185   SetupPlace3()
   185   SetupPlace3()
   186   SetGearMessage(natives[1], 0)
   186   SetGearMessage(natives[1], 0)
   187   AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0)
   187   AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0)
   188   TurnTimeLeft = 0
   188   TurnTimeLeft = 0
   189   ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything."), 1, 7000)
   189   ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000)
       
   190   vCirc = AddVisualGear(0,0,vgtCircle,0,true)
       
   191   SetVisualGearValues(vCirc, 2625, 1500, 100, 255, 1, 10, 0, 120, 3, 0xff00ffff)
   190 end
   192 end
   191   
   193   
   192 function SkipMidAnim()
   194 function SkipMidAnim()
   193   AnimTeleportGear(natives[1], unpack(nativeMidPos2))
   195   AnimTeleportGear(natives[1], unpack(nativeMidPos2))
   194   SkipStartAnim()
   196   SkipStartAnim()
   271 	SpawnUtilityCrate(530, 1747, amPortalGun, 1)
   273 	SpawnUtilityCrate(530, 1747, amPortalGun, 1)
   272 end
   274 end
   273 
   275 
   274 -----------------------------Events------------------------------------
   276 -----------------------------Events------------------------------------
   275 function CheckPrincessFreed()
   277 function CheckPrincessFreed()
   276   return math.abs(GetX(natives[1]) - GetX(princess)) <= 10 and math.abs(GetX(natives[1]) - GetX(princess)) <= 10 and StoppedGear(natives[1]) 
   278   return math.abs(GetX(natives[1]) - GetX(princess)) <= 10 and math.abs(GetY(natives[1]) - GetY(princess)) <= 10 and StoppedGear(natives[1]) 
   277         and GetY(natives[2]) < 1500 and GetY(natives[3]) < 1500 and StoppedGear(natives[2]) and StoppedGear(natives[3])
   279         and GetY(natives[2]) < 1500 and GetY(natives[3]) < 1500 and StoppedGear(natives[2]) and StoppedGear(natives[3])
   278 end
   280 end
   279 
   281 
   280 function DoPrincessFreed()
   282 function DoPrincessFreed()
   281   AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0)
   283   AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0)
   549 function onPrecise()
   551 function onPrecise()
   550   if GameTime > 2500 and AnimInProgress() then
   552   if GameTime > 2500 and AnimInProgress() then
   551     SetAnimSkip(true)
   553     SetAnimSkip(true)
   552     return
   554     return
   553   end
   555   end
   554 --  HideHedge(princess)
   556   HideHedge(princess)
   555 --  for i = 1, 5 do
   557   for i = 1, 5 do
   556 --    DeleteGear(cyborgs[i])
   558     DeleteGear(cyborgs[i])
   557 --  end
   559   end
   558 --  AddAmmo(natives[1], amTeleport, 100)
   560   AddAmmo(natives[1], amTeleport, 100)
   559 end
   561 end