Scripted effect
destroy_or_downgrade_estate_building_5_effect
destroy_or_downgrade_estate_building_5_effect = { BUILDING = … }game/common/scripted_effects/00_building_effects.txt, line 1675 (19 lines). Parameters: $BUILDING$.
destroy_or_downgrade_estate_building_5_effect is a scripted effect in Crusader Kings III, written at line 1675 of its file. A call passes 1 parameter: BUILDING. The game's script calls it in 2 places, among them destroy_random_east_asian_estate_building_effect (scripted effect) and destroy_random_estate_building_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/00_building_effects.txt.
What it does
If
has_domicile_building = $BUILDING$_05
Then
lower_domicile_building_no_refund = $BUILDING$_05
Else if
has_domicile_building = $BUILDING$_04
Then
lower_domicile_building_no_refund = $BUILDING$_04
Else if
has_domicile_building = $BUILDING$_03
Then
lower_domicile_building_no_refund = $BUILDING$_03
Else if
has_domicile_building = $BUILDING$_02
Then
lower_domicile_building_no_refund = $BUILDING$_02
Otherwise
remove_domicile_building_no_refund = $BUILDING$_01
• 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 (19 lines of game script)
destroy_or_downgrade_estate_building_5_effect = {
if = {
limit = { has_domicile_building = $BUILDING$_05 }
lower_domicile_building_no_refund = $BUILDING$_05
}
else_if = {
limit = { has_domicile_building = $BUILDING$_04 }
lower_domicile_building_no_refund = $BUILDING$_04
}
else_if = {
limit = { has_domicile_building = $BUILDING$_03 }
lower_domicile_building_no_refund = $BUILDING$_03
}
else_if = {
limit = { has_domicile_building = $BUILDING$_02 }
lower_domicile_building_no_refund = $BUILDING$_02
}
else = { remove_domicile_building_no_refund = $BUILDING$_01 }
}As written in game/common/scripted_effects/00_building_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls destroy_or_downgrade_estate_building_5_effect.
Source: game/common/scripted_effects/00_building_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.