diff --git a/src/SecExp/attackGenerator.tw b/src/SecExp/attackGenerator.tw index de734b32a90b74a79949db820cf3e426f9f45607..8155bfa310cb8c7a21d38e31453e4d559338dc82 100644 --- a/src/SecExp/attackGenerator.tw +++ b/src/SecExp/attackGenerator.tw @@ -1 +1,2 @@ -:: attackGenerator [nobr] \ No newline at end of file +:: attackGenerator [nobr] + diff --git a/src/SecExp/attackHandler.tw b/src/SecExp/attackHandler.tw index b3d7e08d7d15cd9335704af4427d347e846f01d5..e480826adb8586c7efed4f37d432cbff1113b515 100644 --- a/src/SecExp/attackHandler.tw +++ b/src/SecExp/attackHandler.tw @@ -5,7 +5,7 @@ Attack Imminent <br> The ominous message dominates the screens of your office. <<print $assistantName>> quickly gathers all information available to prepare your arcology for battle. <<if $attackType == "raiders">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "raiders">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> A disorganized horde of raiders is coming to your city. To such jackals your arcology surely looks like an appetizing morsel. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -14,7 +14,7 @@ The ominous message dominates the screens of your office. <<print $assistantName Some of your citizens saw the disorganized horde of raiders coming towards the city and quickly reported it. To such jackals your arcology surely looks like an appetizing morsel. <</if>> <<elseif $attackType == "free city">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "free city">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> A menacing column of consumed mercenaries and slavers is coming to your city. Another free city is ready to use their best tools to bring down a dangerous competitor. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -23,7 +23,7 @@ The ominous message dominates the screens of your office. <<print $assistantName Some of your citizens saw the disorganized horde of raiders coming towards the city and quickly reported it. Another free city is ready to use their best tools to bring down a dangerous competitor. <</if>> <<elseif $attackType == "freedom fighters">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "freedom fighters">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> A dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -32,7 +32,7 @@ The ominous message dominates the screens of your office. <<print $assistantName Some of your citizens saw the dangerous looking army of guerrillas is gathering just outside the arcology. Fanatics and idealists armed with dead men's words and hope, set on erasing your fledgling empire. <</if>> <<elseif $attackType == "old world">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "old world">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> A diciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -40,8 +40,18 @@ The ominous message dominates the screens of your office. <<print $assistantName <<else>> Some of your citizens saw the diciplined yet dusty, scruffy old world army is approaching the confines of your arcology. There's nothing better than a good war to unite the electorate and your arcology is just the perfect target. <</if>> -<<elseif $attackType == "mercenary revolt">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "mercenary revolt">> +<<elseif $attackType == "arcology">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> + A disorgarganized horde of armed citizens are assembling into a semblance of battleline just outside jour arcology. The differences between your arcology's culture and <<print $attackingArcology.name>> were simply to much to bear, your domain must be cleansed. + Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. + <<elseif $perimeterDrones == 1>> + Your drones easily spot the disorgarganized horde of armed citizens assembling just outside your our arcology. The differences between your arcology's culture and <<print $attackingArcology.name>> were simply to much to bear, your domain must be cleansed. + + <<else>> + Some of your citizens, terrified by the disorgarganized horde of armed citizens assembling just outside your our arcology, were gathering near the entrance of your penthouse. The differences between your arcology's culture and <<print $attackingArcology.name>> were simply to much to bear, your domain must be cleansed. + <</if>> +<<elseif $attackType == "mercenary">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> Some sections of the lower levels were already no longer responding. In the end it happened, your own mercenaries took arms against their benefactor. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -49,8 +59,8 @@ The ominous message dominates the screens of your office. <<print $assistantName <<else>> Some of your citizens, terrified by the movements of mercenary units in the lower levels, were gathering near the entrance of your penthouse. In the end it happened, your own mercenaries took arms against their benefactor. <</if>> -<<elseif $attackType == "citizen revolt">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "citizen revolt">> +<<elseif $attackType == "citizen">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> The streets were already clogged with citizens armed to the teeth, ready to oust their owner. In the end it happened, your own citizens dared took arms against their arcology owner. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -58,8 +68,8 @@ The ominous message dominates the screens of your office. <<print $assistantName <<else>> Some of your citizens, terrified by the mobs of armed rebels, were gathering near the entrance of your penthouse. In the end it happened, your own citizens dared took arms against their arcology owner. <</if>> -<<elseif $attackType == "slave revolt">> - <<if $riskSim == 1 && $riskSimExpectedAttack == "slave revolt">> +<<elseif $attackType == "slave">> + <<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> Reports from all over the arcology are pouring in, filled with slaves assaulting, killing and butchering your citizens. In the end it happened, the slaves dared attack their betters. Fortunately you knew of their coming weeks in advance, the risk simulation system did its job admirably. <<elseif $perimeterDrones == 1>> @@ -88,8 +98,22 @@ It seems your troops and your adversary will fight in the wastelands outside the free city territory. <</if>> <br> -Your army will be facing: - +<<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> + Your sophisticated virtual simulations allows you to accurately predict the numbers you're about to face. <<print $assistantName>> sends you the data: approximately <<print Math.round($attackTroops * (1 + random(-1,1) * 0.1))>> men are coming. +<<elseif $perimeterDrones ==1>> + Thanks to your drones you have a rough estimate of the numbers you're about to face. <<print $assistantName>> sends you the data: around <<print Math.round($attackTroops * (1 + random(-3,3) * 0.1))>> men are coming +<<else>> + <<print Math.round($attackTroops * (1 + random(-5,5) * 0.1))>> men, + Unfortunately you have no good information on what is coming your way, the confused reports of your citizens gives you only a vague number. <<print $assistantName>> sends you the data: around <<print Math.round($attackTroops * (1 + random(-5,5) * 0.1))>> men are coming. +<</if>> +For what you know they are +<<if $riskSim == 1 && $riskSimExpectedAttack == $attackType>> + <<if $attackEquip == 0>> + just lightly armed, mostly small arms with some repurposed civilian vehicles and a scattered few machine guns. There's no sign of heavy vehicles, artillery or aircrafts. + <<elseif $attackEquip == 0>> + + + <br> You quickly lay down a plan of action: diff --git a/src/init/storyInit.tw b/src/init/storyInit.tw index d30d9dbc3623e1fe687b5cb515c1acfc76baa238..fd7af2abbd22526fe9b4d376cadf7c901eadc131 100644 --- a/src/init/storyInit.tw +++ b/src/init/storyInit.tw @@ -1094,6 +1094,9 @@ FertilityAge($fertilityAge) <<set $riskSim = 0>> <<set $riskSimExpectedAttack = "none">> <<set $perimeterDrones = 0>> +/* battle relevant variables */ +<<set $attackTroops = 0>> +<<set $attackEquip = 0>> /% Begin mod section: toggle whether slaves lisp. %/