Scripted trigger · Roads to Power files
laamp_as_mercenary_payout_last_war_trigger
laamp_as_mercenary_payout_last_war_trigger = { WAR = … }game/common/scripted_triggers/07_ep3_triggers.txt, line 1885 (20 lines). Parameters: $WAR$.
laamp_as_mercenary_payout_last_war_trigger is a scripted trigger in Crusader Kings III, in the Roads to Power files, written at line 1885 of its file. A call passes 1 parameter: WAR. The game's script calls it in 2 places, among them laamp_as_mercenary_payout_effect (scripted effect) and laamp_as_mercenary_payout_tooltip_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_triggers/07_ep3_triggers.txt.
What it checks
$WAR$ = { save_temporary_scope_as = war_temp }scope:merc_temp:None of these
- Any character war:
NOT = { this = scope:war_temp }is_war_leader = scope:merc_temp.var:joined_as_mercenaryIf
is_attacker = scope:merc_temp.var:joined_as_mercenary
Then
is_attacker = scope:merc_temp
Otherwise
is_defender = scope:merc_temp
- Any character war:
• the game's own tooltip text · ◦ our reading of the script line · code the script where neither exists
“They” is whatever it runs on (the scope it is called in). The scripted triggers and effects it calls link to their own pages; $PARAMETERS$ stay as written: each call fills them in.
The script as written (20 lines of game script)
laamp_as_mercenary_payout_last_war_trigger = {
save_temporary_scope_as = merc_temp
$WAR$ = { save_temporary_scope_as = war_temp }
scope:merc_temp ?= {
# ENSURE THIS IS THE LAST WAR YOU ARE FIGHTING IN WITH THE EMPLOYER
NOT = {
any_character_war = {
NOT = { this = scope:war_temp }
is_war_leader = scope:merc_temp.var:joined_as_mercenary
trigger_if = {
limit = { is_attacker = scope:merc_temp.var:joined_as_mercenary }
is_attacker = scope:merc_temp
}
trigger_else = {
is_defender = scope:merc_temp
}
}
}
}
}As written in game/common/scripted_triggers/07_ep3_triggers.txt.
Where it is used
Every place in common/, events/ and history/ that calls laamp_as_mercenary_payout_last_war_trigger.
Scripted effects (2)
Source: game/common/scripted_triggers/07_ep3_triggers.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.