181 AddAmmo(minion3.gear, amGrenade, 2) |
181 AddAmmo(minion3.gear, amGrenade, 2) |
182 |
182 |
183 -- check for death has to go first |
183 -- check for death has to go first |
184 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
184 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
185 AddEvent(onProfessorDeath, {professor.gear}, professorDeath, {professor.gear}, 0) |
185 AddEvent(onProfessorDeath, {professor.gear}, professorDeath, {professor.gear}, 0) |
|
186 AddEvent(onMinionsDeath, {professor.gear}, minionsDeath, {professor.gear}, 0) |
186 AddEvent(onBattleZone, {hero.gear}, battleZone, {hero.gear}, 0) |
187 AddEvent(onBattleZone, {hero.gear}, battleZone, {hero.gear}, 0) |
187 AddEvent(onProfessorHit, {professor.gear}, professorHit, {professor.gear}, 1) |
188 AddEvent(onProfessorHit, {professor.gear}, professorHit, {professor.gear}, 1) |
188 |
189 |
189 if checkPointReached == 1 then |
190 if checkPointReached == 1 then |
190 AddAmmo(hero.gear, amRope, 2) |
191 AddAmmo(hero.gear, amRope, 2) |
338 end |
339 end |
339 end |
340 end |
340 |
341 |
341 function professorDeath(gear) |
342 function professorDeath(gear) |
342 -- do stats stuff here |
343 -- do stats stuff here |
|
344 if GetHealth(minion1.gear) then |
|
345 AnimSay(minion1.gear, loc("The boss has fallen! Retreat!"), SAY_SHOUT, 6000) |
|
346 elseif GetHealth(minion2.gear) then |
|
347 AnimSay(minion2.gear, loc("The boss has fallen! Retreat!"), SAY_SHOUT, 6000) |
|
348 elseif GetHealth(minion3.gear) then |
|
349 AnimSay(minion3.gear, loc("The boss has fallen! Retreat!"), SAY_SHOUT, 6000) |
|
350 end |
|
351 ParseCommand("teamgone " .. teamB.name) |
|
352 AnimCaption(hero.gear, loc("Congrats! You made them run away!"), 6000) |
|
353 AnimWait(hero.gear,5000) |
343 EndGame() |
354 EndGame() |
344 end |
355 end |
345 |
356 |
346 function minionsDeath(gear) |
357 function minionsDeath(gear) |
347 -- do staffs here |
358 -- do staffs here |
|
359 AnimSay(professor.gear, loc("I may lost that battle, but I haven't lost the war yet!"), SAY_SHOUT, 6000) |
|
360 ParseCommand("teamgone " .. teamC.name) |
|
361 AnimCaption(hero.gear, loc("Congrats! You won!"), 6000) |
|
362 AnimWait(hero.gear,5000) |
348 EndGame() |
363 EndGame() |
349 end |
364 end |
350 |
365 |
351 -------------- ANIMATIONS ------------------ |
366 -------------- ANIMATIONS ------------------ |
352 |
367 |