Skip to content
Snippets Groups Projects
Commit 95ea07b1 authored by hexall90's avatar hexall90
Browse files

handling surrender mismanagement

parent 92ec2b03
No related branches found
No related tags found
1 merge request!1295fixing surrendering issue as reported ITT
......@@ -51,7 +51,7 @@
<</for>>
participated in the battle without taking any casualties. They remained loyal until the end.
<</if>>
<<if $rebellingID.length > 0>>
<<if $rebellingID.length > 0 && $battleResult != -1>>
<br>
<br>
/* militia */
......@@ -213,6 +213,48 @@
<br>//Will positively influence the loyalty of the other units, but no manpower will be refunded.//
</span>
<</if>>
<<elseif $rebellingID.length > 0>>
<<set _militiaRebelledID = []>>
<<for _j = 0; _j < $militiaUnits.length; _j++>>
<<if $militiaUnits[_j].active == 1 && $rebellingID.includes($militiaUnits[_j].ID)>>
<<set _militiaRebelledID.push($militiaUnits[_j].ID)>>
$militiaUnits[_j].platoonName,
<</if>>
<</for>>
<<if _militiaRebelledID.length > 0>>
had the gall to betray you and join your enemies. They participated in the looting following the rebellion, then vanished in the wastes.
<</if>>
<<set $cash -= 1000 * _militiaRebelledID.length>>
<br>
<<removeUnits _militiaRebelledID>>
<<set _slaveRebelledID = []>>
<<for _j = 0; _j < $slaveUnits.length; _j++>>
<<if $slaveUnits[_j].active == 1 && $rebellingID.includes($slaveUnits[_j].ID)>>
<<set _slaveRebelledID.push($slaveUnits[_j].ID)>>
$slaveUnits[_j].platoonName,
<</if>>
<</for>>
<<if _slaveRebelledID.length > 0>>
decided in their blind arrogance to betray you. They participated in the looting following the rebellion, then vanished in the wastes.
<</if>>
<<set $cash -= 1000 * _slaveRebelledID.length>>
<<removeUnits _slaveRebelledID>>
<br>
<<set _mercRebelledID = []>>
<<set _count = 0>>
<<for _j = 0; _j < $mercUnits.length; _j++>>
<<if $mercUnits[_j].active == 1 && $rebellingID.includes($mercUnits[_j].ID)>>
<<set _mercRebelledID.push($mercUnits[_j].ID)>>
<<set _count++>>
$mercUnits[_j].platoonName,
<</if>>
<</for>>
<<if _mercRebelledID.length > 0>>
made the grave mistake of betraying you. They participated in the looting following the rebellion, then vanished in the wastes.
<</if>>
<<set $cash -= 1000 * _mercRebelledID.length>>
<<removeUnits _mercRebelledID>>
<<recalcManpower>>
<</if>>
<<elseif $losses > 0>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment