From a42418c0b011109f1018f0aad9e3340fd9b2e054 Mon Sep 17 00:00:00 2001 From: Jones <Jones> Date: Tue, 4 Dec 2018 13:02:38 +0100 Subject: [PATCH] Fixed closing if issue --- src/SecExp/unitsRebellionReport.tw | 62 +++++++++++++++--------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/SecExp/unitsRebellionReport.tw b/src/SecExp/unitsRebellionReport.tw index 6243b92079b..979398ff8e3 100644 --- a/src/SecExp/unitsRebellionReport.tw +++ b/src/SecExp/unitsRebellionReport.tw @@ -301,43 +301,43 @@ <br> <<set _loss = _lossesList.pluck()>> <<if _loss > $ACitizens * 0.95>> - <<set _loss = Math.trunc($ACitizens * 0.95)>> /* this is unlikely to happen, but might as well be safe*/ - The volunteering citizens were quickly organized into an irregular militia unit and deployed in the arcology: - <<if _loss <= 0>> - no casualties - <<elseif _loss <= 10>> - light casualties - <<elseif _loss <= 30>> - moderate casualties - <<elseif _loss <= 60>> - heavy casualties - <<else>> - catastrophic casualties - <</if>> - suffered. - <<if _loss > $lowerClass * 0.95>> /*I suspect only lower class ever get to fight/die, but being safe*/ - <<set $lowerClass = Math.trunc($lowerClass * 0.05), - _loss -= $lowerClass * 0.95>> - <<if _loss > $middleClass * 0.95>> - <<set $middleClass = Math.trunc($middleClass * 0.05), - _loss -= $middleClass *0.95>> - <<if _loss > $upperClass * 0.95>> - <<set $upperClass = Math.trunc($upperClass * 0.05), - _loss -= $upperClass * 0.95>> - <<if _loss > $topClass * 0.95>> - <<set $topClass = Math.trunc($topClass * 0.05)>> - <<else>> - <<set $topClass -= _loss>> - <</if>> + <<set _loss = Math.trunc($ACitizens * 0.95)>> /* this is unlikely to happen, but might as well be safe*/ + <</if>> + The volunteering citizens were quickly organized into an irregular militia unit and deployed in the arcology: + <<if _loss <= 0>> + no casualties + <<elseif _loss <= 10>> + light casualties + <<elseif _loss <= 30>> + moderate casualties + <<elseif _loss <= 60>> + heavy casualties + <<else>> + catastrophic casualties + <</if>> + suffered. + <<if _loss > $lowerClass * 0.95>> /*I suspect only lower class ever get to fight/die, but being safe*/ + <<set $lowerClass = Math.trunc($lowerClass * 0.05), + _loss -= Math.trunc($lowerClass * 0.95)>> + <<if _loss > $middleClass * 0.95>> + <<set $middleClass = Math.trunc($middleClass * 0.05), + _loss -= Math.trunc($middleClass *0.95)>> + <<if _loss > $upperClass * 0.95>> + <<set $upperClass = Math.trunc($upperClass * 0.05), + _loss -= Math.trunc($upperClass * 0.95)>> + <<if _loss > $topClass * 0.95>> + <<set $topClass = Math.trunc($topClass * 0.05)>> <<else>> - <<set $upperClass -= _loss>> + <<set $topClass -= _loss>> <</if>> <<else>> - <<set $middleClass -= _loss>> + <<set $upperClass -= _loss>> <</if>> <<else>> - <<set $lowerClass -= _loss>> + <<set $middleClass -= _loss>> <</if>> + <<else>> + <<set $lowerClass -= _loss>> <</if>> <</if>> <<if $secBots.active == 1>> -- GitLab