14 local timeLeft = 10000 |
14 local timeLeft = 10000 |
15 local lastWeaponUsed = amSniperRifle |
15 local lastWeaponUsed = amSniperRifle |
16 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. |
16 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. |
17 loc("You can only use the Sniper Rifle or the Watermelon bomb").."|".. |
17 loc("You can only use the Sniper Rifle or the Watermelon bomb").."|".. |
18 loc("You'll have only 2 watermelon bombs during the game").."|".. |
18 loc("You'll have only 2 watermelon bombs during the game").."|".. |
19 loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 3 rifles").."|".. |
19 loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles").."|".. |
20 loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports").."|".. |
20 loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports").."|".. |
21 loc("The first turn will last 25 sec and every other turn 15 sec").."|".. |
21 loc("The first turn will last 25 sec and every other turn 15 sec").."|".. |
22 loc("If you skip the game your time left will be added to your next turn").."|".. |
22 loc("If you skip the game your time left will be added to your next turn").."|".. |
23 loc("Some parts of the land are indestructible") |
23 loc("Some parts of the land are indestructible") |
24 -- dialogs |
24 -- dialogs |
154 if CurrentHedgehog == hero.gear and TurnTimeLeft ~= 0 then |
154 if CurrentHedgehog == hero.gear and TurnTimeLeft ~= 0 then |
155 timeLeft = TurnTimeLeft |
155 timeLeft = TurnTimeLeft |
156 end |
156 end |
157 end |
157 end |
158 |
158 |
159 function onGearDelete(gear) |
159 function onGearDelete(gear) |
160 if (gear > hero.gear and gear <= enemiesOdd[table.getn(enemiesOdd)].gear) or |
160 if (isHog(gear)) then |
161 (gear > hero.gear and gear <= enemiesEven[table.getn(enemiesEven)].gear) then |
|
162 local availableTeleports = GetAmmoCount(hero.gear,amTeleport) |
161 local availableTeleports = GetAmmoCount(hero.gear,amTeleport) |
163 local availableSniper = GetAmmoCount(hero.gear,amSniperRifle) |
162 local availableSniper = GetAmmoCount(hero.gear,amSniperRifle) |
164 if availableTeleports < 2 then |
163 if availableTeleports < 2 then |
165 AddAmmo(hero.gear, amTeleport, availableTeleports + 1 ) |
164 AddAmmo(hero.gear, amTeleport, availableTeleports + 1 ) |
166 end |
165 end |
167 if availableSniper < 3 then |
166 if availableSniper < 4 then |
168 AddAmmo(hero.gear, amSniperRifle, availableSniper + 1 ) |
167 AddAmmo(hero.gear, amSniperRifle, availableSniper + 1 ) |
169 end |
168 end |
170 end |
169 end |
171 end |
170 end |
172 |
171 |
236 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Fruit Planet Hog Solo got lost..."), 5000}}) |
235 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Fruit Planet Hog Solo got lost..."), 5000}}) |
237 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...and got ambushed by the Red Strawberies"), 5000}}) |
236 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...and got ambushed by the Red Strawberies"), 5000}}) |
238 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use your available weapons in order to eliminate the enemies"), 5000}}) |
237 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use your available weapons in order to eliminate the enemies"), 5000}}) |
239 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You can only use the Sniper Rifle or the Watermelon bomb"), 5000}}) |
238 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You can only use the Sniper Rifle or the Watermelon bomb"), 5000}}) |
240 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only 2 watermelon bombs during the game"), 5000}}) |
239 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only 2 watermelon bombs during the game"), 5000}}) |
241 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 3 rifles"), 5000}}) |
240 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Sniper Rifle every time you kill an enemy hog with a limit of max 4 rifles"), 5000}}) |
242 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports"), 5000}}) |
241 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll get an extra Teleport every time you kill an enemy hog with a limit of max 2 teleports"), 5000}}) |
243 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("The first turn will last 25 sec and every other turn 15 sec"), 5000}}) |
242 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("The first turn will last 25 sec and every other turn 15 sec"), 5000}}) |
244 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you skip the game your time left will be added to your next turn"), 5000}}) |
243 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you skip the game your time left will be added to your next turn"), 5000}}) |
245 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Some parts of the land are indestructible"), 5000}}) |
244 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Some parts of the land are indestructible"), 5000}}) |
246 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
245 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |