equal
deleted
inserted
replaced
395 EndGame() |
395 EndGame() |
396 end |
396 end |
397 |
397 |
398 function professorAndMinionsDeath(gear) |
398 function professorAndMinionsDeath(gear) |
399 if gameOver then return end |
399 if gameOver then return end |
400 SendStat(siCustomAchievement, loc("You have eliminated the whole evil team. You're pretty tough!")) |
400 if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end |
|
401 SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil.")) |
|
402 SendStat(siCustomAchievement, loc("You have eliminated the evil minions.")) |
401 |
403 |
402 SaveCampaignVar("ProfDiedOnMoon", "1") |
404 SaveCampaignVar("ProfDiedOnMoon", "1") |
403 victory() |
405 victory() |
404 end |
406 end |
405 |
407 |
406 function professorDeath(gear) |
408 function professorDeath(gear) |
407 if gameOver then return end |
409 if gameOver then return end |
|
410 if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end |
408 local m1h = GetHealth(minion1.gear) |
411 local m1h = GetHealth(minion1.gear) |
409 local m2h = GetHealth(minion2.gear) |
412 local m2h = GetHealth(minion2.gear) |
410 local m3h = GetHealth(minion3.gear) |
413 local m3h = GetHealth(minion3.gear) |
411 if m1h == 0 or m2h == 0 or m3h == 0 then return end |
414 if m1h == 0 or m2h == 0 or m3h == 0 then return end |
412 |
415 |
419 end |
422 end |
420 AddAnim(dialog06) |
423 AddAnim(dialog06) |
421 end |
424 end |
422 |
425 |
423 function afterDialog06() |
426 function afterDialog06() |
|
427 if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end |
424 EndTurn(true) |
428 EndTurn(true) |
425 SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil.")) |
429 SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil.")) |
426 SendStat(siCustomAchievement, loc("You drove the minions away.")) |
430 SendStat(siCustomAchievement, loc("You drove the minions away.")) |
427 SaveCampaignVar("ProfDiedOnMoon", "1") |
431 SaveCampaignVar("ProfDiedOnMoon", "1") |
428 victory() |
432 victory() |
429 end |
433 end |
430 |
434 |
431 function afterDialog05() |
435 function afterDialog05() |
|
436 if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end |
432 EndTurn(true) |
437 EndTurn(true) |
433 HideHog(professor.gear) |
438 HideHog(professor.gear) |
434 SendStat(siCustomAchievement, loc("You have eliminated the evil minions.")) |
439 SendStat(siCustomAchievement, loc("You have eliminated the evil minions.")) |
435 SendStat(siCustomAchievement, loc("You drove Professor Hogevil away.")) |
440 SendStat(siCustomAchievement, loc("You drove Professor Hogevil away.")) |
436 |
441 |
439 end |
444 end |
440 |
445 |
441 function minionsDeath(gear) |
446 function minionsDeath(gear) |
442 if professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0 then return end |
447 if professor.dead or GetHealth(professor.gear) == nil or GetHealth(professor.gear) == 0 then return end |
443 if gameOver then return end |
448 if gameOver then return end |
|
449 if (not IsHogAlive(hero.gear)) or (not StoppedGear(hero.gear)) then return end |
444 AddAnim(dialog05) |
450 AddAnim(dialog05) |
445 end |
451 end |
446 |
452 |
447 -------------- ANIMATIONS ------------------ |
453 -------------- ANIMATIONS ------------------ |
448 |
454 |