Scripted effect
single_combat_clean_temp_weapon_effect
single_combat_clean_temp_weapon_effect = { ATTACKER = … DEFENDER = … }game/common/scripted_effects/00_single_combat_effects.txt, line 419 (54 lines). Parameters: $ATTACKER$, $DEFENDER$.
single_combat_clean_temp_weapon_effect is a scripted effect in Crusader Kings III, written at line 419 of its file. A call passes 2 parameters: ATTACKER and DEFENDER. The game's script calls it in 2 places, among them Single Combat: Defeat! (event single_combat.0031) and Single Combat: Victory! (event single_combat.0041). Patch 1.20.1.2, from game/common/scripted_effects/00_single_combat_effects.txt.
The comment above it in the file
Let everyone put their signature weapon back on.
What it does
Every line of it is script with no tooltip text: the script is below.
The script as written (54 lines of game script)
single_combat_clean_temp_weapon_effect = {
$ATTACKER$ = {
if = { #check for variables set up in set_temporary_signature_weapon
limit = {
is_alive = yes
has_variable = {
name = og_signature_weapon
name = temporary_signature_weapon
}
}
if = { #remove the signature_weapon variable if the character didn't have anything before
limit = {
var:og_signature_weapon = flag:no_signature_weapon_yet
}
remove_variable = signature_weapon
}
else = { #restore the original signature_weapon
set_variable = {
name = signature_weapon
value = var:og_signature_weapon
}
}
#remove all variables set up in set_temporary_signature_weapon
remove_variable = temporary_signature_weapon
remove_variable = og_signature_weapon
}
}
$DEFENDER$ = {
if = { #check for variables set up in set_temporary_signature_weapon
limit = {
is_alive = yes
has_variable = {
name = og_signature_weapon
name = temporary_signature_weapon
}
}
if = { #remove the signature_weapon variable if the character didn't have anything before
limit = {
var:og_signature_weapon = flag:no_signature_weapon_yet
}
remove_variable = signature_weapon
}
else = { #restore the original signature_weapon
set_variable = {
name = signature_weapon
value = var:og_signature_weapon
}
}
#remove all variables set up in set_temporary_signature_weapon
remove_variable = temporary_signature_weapon
remove_variable = og_signature_weapon
}
}
}As written in game/common/scripted_effects/00_single_combat_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls single_combat_clean_temp_weapon_effect.
Events (2)
- Single Combat: Defeat!
single_combat.0031 - Single Combat: Victory!
single_combat.0041
Source: game/common/scripted_effects/00_single_combat_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.