93 Explosives = 0 |
93 Explosives = 0 |
94 Delay = 3 |
94 Delay = 3 |
95 Map = "ice01_map" |
95 Map = "ice01_map" |
96 Theme = "Snow" |
96 Theme = "Snow" |
97 |
97 |
|
98 -- get the check point |
|
99 if tonumber(GetCampaignVar("Ice01CheckPoint")) then |
|
100 checkPointReached = tonumber(GetCampaignVar("Ice01CheckPoint")) |
|
101 end |
|
102 -- get hero health |
|
103 local heroHealth = 100 |
|
104 if tonumber(GetCampaignVar("HeroHealth")) then |
|
105 heroHealth = tonumber(GetCampaignVar("HeroHealth")) |
|
106 end |
|
107 |
|
108 if heroHealth ~= 100 then |
|
109 heroHealth = heroHealth + 5 |
|
110 if heroHealth > 100 then |
|
111 heroHealth = 100 |
|
112 end |
|
113 SaveCampaignVar("HeroHealth", heroHealth) |
|
114 end |
|
115 |
98 -- Hog Solo |
116 -- Hog Solo |
99 AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
117 AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy") |
100 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
118 hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1") |
101 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
119 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
102 HogTurnLeft(hero.gear, true) |
120 HogTurnLeft(hero.gear, true) |
103 -- Ally |
121 -- Ally |
104 AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
122 AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy") |
105 ally.gear = AddHog(ally.name, 0, 100, "tophats") |
123 ally.gear = AddHog(ally.name, 0, 100, "tophats") |
118 HogTurnLeft(bandit4.gear, true) |
136 HogTurnLeft(bandit4.gear, true) |
119 bandit5.gear = AddHog(bandit5.name, 1, 40, "tophats") |
137 bandit5.gear = AddHog(bandit5.name, 1, 40, "tophats") |
120 AnimSetGearPosition(bandit5.gear, bandit5.x, bandit5.y) |
138 AnimSetGearPosition(bandit5.gear, bandit5.x, bandit5.y) |
121 HogTurnLeft(bandit5.gear, true) |
139 HogTurnLeft(bandit5.gear, true) |
122 |
140 |
123 -- get the check point |
|
124 if tonumber(GetCampaignVar("Ice01CheckPoint")) then |
|
125 checkPointReached = tonumber(GetCampaignVar("Ice01CheckPoint")) |
|
126 end |
|
127 |
|
128 if checkPointReached == 1 then |
141 if checkPointReached == 1 then |
129 -- Start of the game |
142 -- Start of the game |
130 elseif checkPointReached == 2 then |
143 elseif checkPointReached == 2 then |
131 iceGunTaken = true |
144 iceGunTaken = true |
132 AnimSetGearPosition(hero.gear, 840, 1650) |
145 AnimSetGearPosition(hero.gear, 840, 1650) |
208 AddAmmo(hero.gear, amIceGun, 8) |
221 AddAmmo(hero.gear, amIceGun, 8) |
209 AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) |
222 AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) |
210 elseif checkPointReached == 3 then |
223 elseif checkPointReached == 3 then |
211 AddAmmo(hero.gear, amIceGun, 6) |
224 AddAmmo(hero.gear, amIceGun, 6) |
212 AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) |
225 AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000) |
213 end |
226 end |
214 |
|
215 end |
227 end |
216 |
228 |
217 function onNewTurn() |
229 function onNewTurn() |
218 -- round has to start if hero goes near the column |
230 -- round has to start if hero goes near the column |
219 if not heroVisitedAntiFlyArea and CurrentHedgehog ~= hero.gear then |
231 if not heroVisitedAntiFlyArea and CurrentHedgehog ~= hero.gear then |