# HG changeset patch # User Wuzzy # Date 1518462026 -3600 # Node ID 1c38d43709430fdd78b11ce0f0e3972f863a8d07 # Parent add647b0036e239bb3ed187ca8ff0db17e4a48de Battalion (mode=king): Kill the team when the king died instea of dismissing DismissTeam causes a lot of problems and is not suited for multiplayer. The team is not dismissed if the team is still active. It's hard to properly do a tie. And, and, and … diff -r add647b0036e -r 1c38d4370943 ChangeLog.txt --- a/ChangeLog.txt Mon Feb 12 19:38:07 2018 +0100 +++ b/ChangeLog.txt Mon Feb 12 20:00:26 2018 +0100 @@ -27,6 +27,9 @@ + Racer, Tech Racer: First waypoint flashes before the hog starts moving + Racer: Use dark waypoints in bright themes like Bath + Racer, Tech Racer: Various other waypoint appearance improvements + + Battalion: Minor message and visual improvements + + Battalion (King Mode): If the king dies, the hogs die normally instead of disappearing + * Battalion: Some texts in the mission panel were wrong and misleading * Construction Mode: Remove drill strike if added by weapon scheme (it's broken) A Space Adventure: diff -r add647b0036e -r 1c38d4370943 share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua --- a/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua Mon Feb 12 19:38:07 2018 +0100 +++ b/share/hedgewars/Data/Scripts/Multiplayer/Battalion.lua Mon Feb 12 20:00:26 2018 +0100 @@ -1147,19 +1147,21 @@ local msgColor = getHogInfo(KingHog, 'clanColor') AddCaption(string.format(loc("The king of %s has died!"), team), 0xFFFFFFFF, capgrpGameState) - PlaySound(sndByeBye) - DismissTeam(team) - -- for hog, val in pairs(hogInfo) do - -- if getHogInfo(hog, 'team') == team then - -- hp = GetHealth(hog) - -- if hp ~= nil and hp > 0 then - -- SetState(KingHog, gstHHDeath) - -- SetHealth(hog, 0) - -- SetGearValues(hog, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0) - -- end - -- end - -- end + -- Kill the rest of the team normally, just like the official King Mode game modifier + for hog, val in pairs(hogInfo) do + if getHogInfo(hog, 'team') == team then + hp = GetHealth(hog) + if hp ~= nil and hp > 0 then + SetState(KingHog, gstHHDeath) + SetHealth(hog, 0) + SetGearValues(hog, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 0) + end + end + end + + -- We don't use DismissTeam, it causes a lot of problems and nasty side-effects. + end function onPointsKill(gear) @@ -1654,7 +1656,7 @@ elseif mode == 'king' then txt = txt .. " |" txt = txt .. loc("--- King Mode ---").."|" - txt = txt .. loc("Protect the King: When the king dies, the team is vaporized").."|" + txt = txt .. loc("Protect the King: When the king dies, so does the team").."|" txt = txt .. string.format(loc("Turns: King's health is set to %d%% of the team health"), kingLinkPerc).."|" icon = 0 -- Golden Crown elseif mode == 'points' then