DEFINE_ACTION_FUNCTION wheels_amkethran BEGIN OUTER_SPRINT local_loc amkethran ////////////////////////////////////////////////// // overall area script ////////////////////////////////////////////////// // delete "killmonk" block LAF DELETE_SCRIPT_BLOCK STR_VAR script=ar5500 match=SpawnKillMonks END // delete "Saemon leaves" block LAF DELETE_SCRIPT_BLOCK STR_VAR script=ar5500 match=SaemonLeave END // delete redundant reference to "AMMONKENEMY" LAF DELETE_SCRIPT_BLOCK STR_VAR script=ar5500 match=AmMonkEnemy END // shift spawn-hostile-monks block onto merc status variable LAF swap_text STR_VAR file=ar5500.bcs swaps=~!Dead("Balth")=>Global("DMWWMercStatus","GLOBAL",4)~ END // shift spawn-ambient-mercs onto merc status variable LAF swap_text STR_VAR file=ar5500.bcs swaps=~GlobalLT("EXTRACOUNT2","MYAREA",4)=>GlobalLT("EXTRACOUNT2","MYAREA",4)Global("DMWWMercStatus","GLOBAL",0)~ END // add new content LAF extend STR_VAR script=ar5500 top=ar5500add END ////////////////////////////////////////////////// // smugglers and innkeeper ////////////////////////////////////////////////// // smuggler cave script. // Begin by wiping the entire old script ACTION_FOR_EACH wipe IN MONKSPAWNEDSMUGGLERPLOT CaveEnter PlaceBodies BEGIN LAF DELETE_SCRIPT_BLOCK STR_VAR script=ar5504 match="%wipe%" END END // add the new script over the top LAF extend STR_VAR script=ar5504 top=ar5504 END LAF edit_creature STR_VAR creature=dedsmug editstring="strip_script=>smugplot" END LAF swap_text STR_VAR file=ammonk02.dlg swaps=~Global("MONKSPAWNEDSMUGGLERPLOT","GLOBAL",1)=>NumTimesTalkedTo(0) Global("CaveEnter","AR5504",2)=>null~ END LAF swap_text STR_VAR file=smugplot.bcs swaps=~Global("MONKSPAWNEDSMUGGLERPLOT","GLOBAL",2)=>Global("MONKSPAWNEDSMUGGLERPLOT","GLOBAL",2)Class(Myself,MONK)~ END OUTER_SPRINT temp ~Global("Enclave","GLOBAL",2)~ LAF DELETE_SCRIPT_BLOCK STR_VAR script=smugplot match="%temp%" END LAF extend STR_VAR script="smugplot amwander" top=smugplotadd END LAF install STR_VAR files="baradd baradd1 carrasadd0 carrasadd" postfix=d END MAKE_PATCH price_noble=>0 room_peasant=>0 room_merchant=>0 patch_drink_inline=>"drink_price=>0" END LAF clone_store STR_VAR store="ambar01=>dw#ambar" edits=patch_data END LAF swap_text STR_VAR file=amsaemon.dlg swaps=~Global("Enclave","GLOBAL",2)=>OR(2)Dead("abazigal")Dead("sendai")~ END LAF install STR_VAR files="saemonadd0 saemonadd" postfix=d END LAF extend STR_VAR script=amsaemon top=amsaemonadd END OUTER_SPRINT temp ~Global("SpawnKillMonks","LOCALS",0)~ LAF DELETE_SCRIPT_BLOCK STR_VAR script=smugplot match="%temp%" END // the label which the priest of Waukeen uses to say "smugglers are dead" needs a slight alteration LAF swap_text STR_VAR files=amcler02.dlg swaps=~Global("Enclave","GLOBAL",2)=>Dead("sendai")Dead("abazigal")!Dead("balth")!Global("BalthazarFights","GLOBAL",1)~ END ////////////////////////////////////////////////// // Faheed and the graveyard ////////////////////////////////////////////////// LAF extend STR_VAR script=amfaheed top=faheedadd END LAF install STR_VAR files=faheedadd.d END LAF extend STR_VAR script=tp5505 top=tp5505add END ////////////////////////////////////////////////// // Attack on Amkethran ////////////////////////////////////////////////// // Create the armies (and panicked peasants, and post-battle mercs) LAF clone_creature STR_VAR creature=~drofod01=>dw#vidr1 drofod03=>dw#vidr3 senorc04=>dw#vider gorkuo01=>dw#vikuo bazliz03=>dw#viliz salgrice=>dw#visal elearl01=>dw#viele~ editstring="insert_script_high=>dw#vilat gender=>EXTRA6" END LAF edit_creature STR_VAR creature=dw#viliz editstring="strip_script=>grpsht01" END LAF clone_creature STR_VAR creature=~behold01=>dw#vibeh drofod02=>dw#vidr2 drofod04=>dw#vidr4 mindfl01=>dw#viill goliro01=>dw#vigol eyesek01=>dw#visek eyeegl01=>dw#viegl gorbat5=>dw#vibon~ editstring=~insert_script_high=>dw#vilat gender=>EXTRA7~ END LAF clone_creature STR_VAR creature=~amconw01=>dw#ampp1~ editstring="insert_script_high=>dw#ampp1" END LAF clone_creature STR_VAR creature=~amconw01=>dw#ampp2~ editstring="insert_script_high=>dw#ampp2" END LAF clone_creature STR_VAR creature=~amconm01=>dw#ampp3~ editstring="insert_script_high=>dw#ampp3" END LAF clone_creature STR_VAR creature="ammerc07=>dw#vime1" editstring="insert_script_high=>dw#vime1" END LAF install STR_VAR file="dw#ampp1 dw#ampp2 dw#ampp3 dw#vilat dw#vime1" postfix=baf END ////////////////////////////////////////////////// // Mercs and monks ////////////////////////////////////////////////// // GPMerc is a general combat script. It's used by some Amkethran forces; they mustn't go hostile during the attack on the village LAF swap_text STR_VAR files=gpmerc.bcs swaps=~Die()=>Die()!Global("DMWWVillageAttacked","GLOBAL",1) Heard([EVILCUTOFF],ALERT)=>Heard([EVILCUTOFF],ALERT)!Global("DMWWVillageAttacked","GLOBAL",1)~ END // ammerc is the generic scripts for mercs; ammgrd, for monks. Their go-hostile structure needs to be mapped onto our new system. They also have a reinforcement-summoning block that // needs to be remapped to work only when they're hostile. We do this in two steps: first, edit the existing script (nuking the extant go-hostile in the process // and editing the reinforcement-summoning) and then appending a new block, 'baltharmy' LAF DELETE_SCRIPT_BLOCK STR_VAR script=ammerc match=~Global("AmMercEnemy","GLOBAL",0)~ END LAF DELETE_SCRIPT_BLOCK STR_VAR script=ammgrd match=~Global("AmMonkEnemy","GLOBAL",0)~ END LAF DELETE_SCRIPT_BLOCK STR_VAR script=ammgrd match=killmonk END LAF DELETE_SCRIPT_BLOCK STR_VAR script=ammgrd match=spottedp1 END LAF swap_text STR_VAR files="ammerc.bcs ammgrd.bcs" swaps=~Global("reinforcement","LOCALS",0)=>Global("reinforcement","LOCALS",0)Global("DMWWMercStatus","GLOBAL",4)~ END LAF extend STR_VAR script="ammerc ammgrd" top=baltharmy END // these monk backup troops need to vanish if merc variable is appropriately set LAF edit_creature STR_VAR creature="cutammag cutamfig" editstring="insert_script_high=>dw#amksd" END LAF install STR_VAR file=dw#amksd.baf END // the flavour merc archers disappear when enclave=2, but they're not present at night. So they need more robust vanishing code. LAF swap_text STR_VAR files="amarch01.bcs amarch02.bcs" swaps=~Global("Enclave","GLOBAL",2)=>GlobalGT("DMWWMercStatus","GLOBAL",0)~ END // friendly monk comments for when you've allied with Balth ACTION_FOR_EACH thismonkdialog IN ammgrd01 ammgrd02 BEGIN LAF install STR_VAR file=monkadd.d END END ////////////////////////////////////////////////// // Misc ////////////////////////////////////////////////// // rumours; Sarevok is now more optimistic about storming the fortress LAF install STR_VAR file="rumoradd.d sarevadd.d" END // Balth's death shouldn't cause peasants to flee COPY_EXISTING ~ampeas.bcs~ ~override~ REPLACE_BCS_BLOCK ~%MOD_FOLDER%/%local_loc%/ampeas_old.baf~ ~%MOD_FOLDER%/%local_loc%/ampeas_new.baf~ LAF swap_text STR_VAR files="amwander.bcs amwand2.bcs" swaps=~GlobalGT("Enclave","GLOBAL",1)=>GlobalGT("Enclave","GLOBAL",1)!Dead("balth")!Global("BalthazarFights","GLOBAL",1)~ END // General flavour LAF swap_text STR_VAR files=amtalk1.bcs swaps=~!GlobalTimerNotExpired("amtalk1","LOCALS")=>!GlobalTimerNotExpired("amtalk1","LOCALS")!Dead("balth")!Global("BalthazarFights","GLOBAL",1)~ END LAF swap_text STR_VAR files=amtalk1.bcs swaps=~!GlobalTimerNotExpired("amtalk2","LOCALS")=>!GlobalTimerNotExpired("amtalk2","LOCALS")!Dead("balth")!Global("BalthazarFights","GLOBAL",1)~ END LAF extend STR_VAR script=amtalk1 top=amtalk1add END LAF extend STR_VAR script=amtalk2 top=amtalk2add END LAF install STR_VAR file=friendly.d END END