620 |
620 |
621 if #respawnerList >= 1 then |
621 if #respawnerList >= 1 then |
622 local i = GetRandom(#respawnerList)+1 |
622 local i = GetRandom(#respawnerList)+1 |
623 SetGearPosition(gear,GetX(strucGear[respawnerList[i]]),GetY(strucGear[respawnerList[i]])-25) |
623 SetGearPosition(gear,GetX(strucGear[respawnerList[i]]),GetY(strucGear[respawnerList[i]])-25) |
624 AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) |
624 AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) |
|
625 local msgs = { |
|
626 loc("The respawner respawns %s"), |
|
627 loc("%s died … and lives again!"), |
|
628 loc("%s gets an extra life"), |
|
629 loc("%s is now a zombie hedgehog"), |
|
630 loc("%s has been rescued from death"), |
|
631 } |
|
632 local r = math.random(1, #msgs) |
|
633 AddCaption(string.format(msgs[r], GetHogName(gear))) |
625 else -- (this should never happen, but just in case) |
634 else -- (this should never happen, but just in case) |
626 SetEffect(gear, heResurrectable, 0) |
635 SetEffect(gear, heResurrectable, 0) |
627 DeleteGear(gear) |
636 DeleteGear(gear) |
628 end |
637 end |
629 |
638 |
749 end |
758 end |
750 |
759 |
751 local msgs = { |
760 local msgs = { |
752 loc("%s lost all the weapons"), |
761 loc("%s lost all the weapons"), |
753 loc("The ammo of %s has been vaporized"), |
762 loc("The ammo of %s has been vaporized"), |
754 loc("%s to a weapon filter"), |
763 loc("%s fell victim to a weapon filter"), |
755 loc("%s is suddenly low on ammo"), |
764 loc("%s is suddenly low on ammo"), |
756 loc("%s is now as poor as a church mouse"), |
765 loc("%s is now as poor as a church mouse"), |
757 } |
766 } |
758 local r = math.random(1, #msgs) |
767 local r = math.random(1, #msgs) |
759 AddCaption(string.format(msgs[r], GetHogName(gear))) |
768 AddCaption(string.format(msgs[r], GetHogName(gear)), 0xFFFFFFFF, capgrpAmmoinfo) |
760 end |
769 end |
761 |
770 |
762 end |
771 end |
763 end |
772 end |
764 |
773 |
1697 end |
1706 end |
1698 end |
1707 end |
1699 |
1708 |
1700 |
1709 |
1701 function onGearResurrect(gear) |
1710 function onGearResurrect(gear) |
1702 AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) |
1711 if GetGearType(gear) == gtHedgehog then |
1703 FindRespawner(gear) |
1712 AddVisualGear(GetX(gear), GetY(gear), vgtExplosion, 0, false) |
|
1713 FindRespawner(gear) |
|
1714 end |
1704 end |
1715 end |
1705 |
1716 |
1706 -- track hedgehogs and placement gears |
1717 -- track hedgehogs and placement gears |
1707 function onGearAdd(gear) |
1718 function onGearAdd(gear) |
1708 |
1719 |