Scripted effect
mystic_level_up_chance_effect
mystic_level_up_chance_effect = { CHANCE = … }game/common/scripted_effects/20_health_effects.txt, line 1643 (61 lines). Parameters: $CHANCE$.
mystic_level_up_chance_effect is a scripted effect in Crusader Kings III, written at line 1643 of its file. A call passes 1 parameter: CHANCE. The game's script calls it in 2 places, among them mystic_disease_treatment_effect (scripted effect) and safe_disease_treatment_effect (scripted effect). Patch 1.20.1.2, from game/common/scripted_effects/20_health_effects.txt.
The comment above it in the file
Needs argument CHANCE
What it does
If
Then
- …% chance of:
- …% chance of:
• 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 (61 lines of game script)
mystic_level_up_chance_effect = {
if = {
limit = {
NAND = {
has_trait = lifestyle_mystic
has_trait_xp = {
trait = lifestyle_mystic
value >= 100
}
}
is_alive = yes
}
random = {
chance = $CHANCE$
ai_mystic_lifestyle_rank_up_effect = yes
#Used by physician_rank_up_tooltip_effect, to be shown in treatment outcome...
set_variable = { name = physician_level_up value = flag:mystic days = 15 }
#...or in notification
if = {
limit = {
liege ?= { this != scope:sick_character }
}
liege = {
send_interface_message = {
type = event_court_physician_good
title = physician_level_up_chance_effect.t
left_icon = scope:physician
physician_rank_up_tooltip_effect = yes
}
}
}
#Have a tiny chance to become witch
hidden_effect = {
if = {
limit = {
is_ai = yes
NOR = {
any_secret = { type = secret_witch }
has_trait = witch
}
}
random = {
modifier = {
factor = 0
ai_zeal >= medium_positive_ai_value
}
modifier = {
factor = 2
ai_zeal <= high_negative_ai_value #high and not medium because mystic traits already remove some ai_zeal
}
chance = 5
give_witch_secret_or_trait_effect = yes
}
}
}
}
}
}As written in game/common/scripted_effects/20_health_effects.txt.
Where it is used
Every place in common/, events/ and history/ that calls mystic_level_up_chance_effect.
Scripted effects (2)
Source: game/common/scripted_effects/20_health_effects.txt and every file of common/, events/ and history/ that calls it, Crusader Kings III 1.20.1.2.