equal
deleted
inserted
replaced
1161 |
1161 |
1162 function onKingDeath(KingHog) |
1162 function onKingDeath(KingHog) |
1163 local team = getHogInfo(KingHog, 'team') |
1163 local team = getHogInfo(KingHog, 'team') |
1164 local msgColor = getHogInfo(KingHog, 'clanColor') |
1164 local msgColor = getHogInfo(KingHog, 'clanColor') |
1165 |
1165 |
1166 AddCaption(string.format(loc("The king of %s has died!"), team), 0xFFFFFFFF, capgrpGameState) |
1166 AddCaption(string.format(loc("The king of %s has died!"), team), capcolDefault, capgrpGameState) |
1167 |
1167 |
1168 -- Kill the rest of the team normally, just like the official King Mode game modifier |
1168 -- Kill the rest of the team normally, just like the official King Mode game modifier |
1169 for hog, val in pairs(hogInfo) do |
1169 for hog, val in pairs(hogInfo) do |
1170 if getHogInfo(hog, 'team') == team then |
1170 if getHogInfo(hog, 'team') == team then |
1171 hp = GetHealth(hog) |
1171 hp = GetHealth(hog) |
1446 onSuddenDeathTurn() |
1446 onSuddenDeathTurn() |
1447 else |
1447 else |
1448 local RoundsTillSD = (SuddenDeathTurns+2) - (TotalRounds+1) |
1448 local RoundsTillSD = (SuddenDeathTurns+2) - (TotalRounds+1) |
1449 -- Show SD reminder every couple of turns, and in the first turn |
1449 -- Show SD reminder every couple of turns, and in the first turn |
1450 if (not firstTurnOver) or (RoundsTillSD <= 6) or (RoundsTillSD <= 25 and RoundsTillSD % 5 == 0) or (RoundsTillSD % 10 == 0) then |
1450 if (not firstTurnOver) or (RoundsTillSD <= 6) or (RoundsTillSD <= 25 and RoundsTillSD % 5 == 0) or (RoundsTillSD % 10 == 0) then |
1451 AddCaption(string.format(loc("Rounds until Sudden Death: %d"), RoundsTillSD), 0xFFFFFFFF, capgrpGameState) |
1451 AddCaption(string.format(loc("Rounds until Sudden Death: %d"), RoundsTillSD), capcolDefault, capgrpGameState) |
1452 end |
1452 end |
1453 end |
1453 end |
1454 |
1454 |
1455 -- Generate new weapons for last hog if it's still alive |
1455 -- Generate new weapons for last hog if it's still alive |
1456 if LastHog ~= nil and LastHog ~= CurHog then |
1456 if LastHog ~= nil and LastHog ~= CurHog then |