diff --git a/common/lifestyle_perks/wc_death_magic_perks.txt b/common/lifestyle_perks/wc_death_magic_perks.txt index b6d38b1c0b..8b882a5f04 100644 --- a/common/lifestyle_perks/wc_death_magic_perks.txt +++ b/common/lifestyle_perks/wc_death_magic_perks.txt @@ -415,6 +415,18 @@ death_magic_tree_3_perk_1 = { } effect = { + custom_tooltip = wc_learn_spell_coagulation + wc_learn_spell_effect = { + SPELL = coagulation + } + learn_spell_rank_effect = { + SPELL = coagulation + RANK = 2 + } + learn_spell_rank_effect = { + SPELL = coagulation + RANK = 3 + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = death } } diff --git a/common/script_values/wc_magic_spell_values.txt b/common/script_values/wc_magic_spell_values.txt index e8d8b68005..986dee6ca8 100644 --- a/common/script_values/wc_magic_spell_values.txt +++ b/common/script_values/wc_magic_spell_values.txt @@ -3589,7 +3589,7 @@ wc_spell_death_coil_duration_days_value = { wc_spell_death_grip_cost_mana_value = { value = { add = { - value = wc_spell_mana_cost_medium + value = wc_spell_mana_cost_low desc = wc_mana_base_value_desc format = "WC_MAX_MANA_VALUE_FORMAT" } @@ -3741,7 +3741,7 @@ wc_spell_death_and_decay_duration_days_value = { wc_spell_cripple_cost_mana_value = { value = { add = { - value = wc_spell_mana_cost_medium_2 + value = wc_spell_mana_cost_low_2 desc = wc_mana_base_value_desc format = "WC_MAX_MANA_VALUE_FORMAT" } @@ -3832,4 +3832,117 @@ wc_spell_improved_body_cooldown_value = { round = yes } wc_spell_improved_body_duration_days_value = 0 -### Improved Body ### \ No newline at end of file +### Improved Body ### + +### Coagulation ### +wc_spell_coagulation_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_low_2 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_variable = current_spell_rank + } + if = { + limit = { + var:current_spell_rank ?= 2 + } + multiply = { + value = wc_spell_rank_2_mana_cost_mult + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_2_value_desc + } + } + else_if = { + limit = { + var:current_spell_rank ?= 3 + } + multiply = { + value = wc_spell_rank_3_mana_cost_mult + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + + multiply = wc_death_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_coagulation_cast_time_value = { + value = { + add = wc_spell_cast_time_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + min = 0 + multiply = wc_death_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + round = yes +} +wc_spell_coagulation_cooldown_value = { + min = 0 + if = { + limit = { + OR = { + AND = { + OR = { + var:current_spell_rank ?= 0 + var:current_spell_rank ?= 1 + } + has_variable = current_spell_rank + } + NOT = { has_variable = current_spell_rank } + } + } + add = { + value = { + add = wc_spell_cooldown_dispel_rank_1 + } + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_base_value_desc + } + } + if = { + limit = { + has_variable = current_spell_rank + } + if = { + limit = { + var:current_spell_rank ?= 2 + } + add = { + value = wc_spell_cooldown_dispel_rank_2 + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_2_value_desc + } + } + else_if = { + limit = { + var:current_spell_rank ?= 3 + } + add = { + value = wc_spell_cooldown_dispel_rank_3 + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + + multiply = wc_death_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + round = yes +} +wc_spell_coagulation_duration_days_value = 0 +### Coagulation ### \ No newline at end of file diff --git a/common/scripted_effects/wc_magic_death_effects.txt b/common/scripted_effects/wc_magic_death_effects.txt index eef0df09db..88890e6ec8 100644 --- a/common/scripted_effects/wc_magic_death_effects.txt +++ b/common/scripted_effects/wc_magic_death_effects.txt @@ -6,6 +6,7 @@ add_to_global_variable_list = { name = death_spells target = flag:death_and_decay } add_to_global_variable_list = { name = death_spells target = flag:cripple } add_to_global_variable_list = { name = death_spells target = flag:improved_body } + add_to_global_variable_list = { name = death_spells target = flag:coagulation } } init_raise_undead_types_effect = { @@ -601,4 +602,119 @@ improve_body_rank_effect = { rank = 1 } } +} + +cast_coagulation_effect = { + if = { + limit = { exists = var:coagulation_recipient } + var:coagulation_recipient = { + save_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:coagulation + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + + # Look at ranks first + if = { + limit = { + OR = { # current_spell_rank is for tooltips + AND = { + exists = var:coagulation_rank + var:coagulation_rank = 3 + } + AND = { + NOT = { + exists = var:coagulation_rank + } + exists = var:current_spell_rank + var:current_spell_rank = 3 + } + } + } + scope:this_recipient = { + if = { + limit = { + target_has_major_injury_trigger = yes + } + remove_major_injury_effect = yes + } + else_if = { + limit = { + target_has_magic_injury_trigger = yes + } + remove_magic_injury_effect = { REDUCE_SEVERITY = yes } + } + else = { + custom_tooltip = wc_dispel_no_effect_tooltip + } + } + } + else_if = { + limit = { + OR = { + AND = { + exists = var:coagulation_rank + var:coagulation_rank = 2 + } + AND = { + NOT = { + exists = var:coagulation_rank + } + exists = var:current_spell_rank + var:current_spell_rank = 2 + } + } + } + scope:this_recipient = { + if = { + limit = { + target_has_poison_trigger = yes + } + remove_poison_effect = yes + } + else = { + custom_tooltip = wc_dispel_no_effect_tooltip + } + } + } + else_if = { + limit = { + OR = { + AND = { + exists = var:coagulation_rank + var:coagulation_rank = 1 + } + AND = { + NOT = { + exists = var:coagulation_rank + } + exists = var:current_spell_rank + var:current_spell_rank = 1 + } + } + } + scope:this_recipient = { + if = { + limit = { + target_has_injury_trigger = yes + } + remove_injury_effect = { REDUCE_SEVERITY = yes } + } + else = { + custom_tooltip = wc_dispel_no_effect_tooltip + } + } + } + } } \ No newline at end of file diff --git a/common/scripted_effects/wc_magic_effects.txt b/common/scripted_effects/wc_magic_effects.txt index 4e3016bd0e..5f31387d11 100644 --- a/common/scripted_effects/wc_magic_effects.txt +++ b/common/scripted_effects/wc_magic_effects.txt @@ -241,6 +241,7 @@ execute_scoped_spell_effect = { flag:death_and_decay = { $EFFECT$ = { SPELL = death_and_decay RANK = var:current_spell_rank TYPE = death } } flag:cripple = { $EFFECT$ = { SPELL = cripple RANK = var:current_spell_rank TYPE = death } } flag:improved_body = { $EFFECT$ = { SPELL = improved_body RANK = var:current_spell_rank TYPE = death } } + flag:coagulation = { $EFFECT$ = { SPELL = coagulation RANK = var:current_spell_rank TYPE = death } } } } @@ -2334,7 +2335,7 @@ remove_psych_illness_effect = { remove_poison_effect = { random_character_trait = { limit = { - has_trait_flag = psych_illness + has_trait_flag = poison } save_scope_as = target_trait } diff --git a/common/scripted_triggers/wc_magic_spells_triggers.txt b/common/scripted_triggers/wc_magic_spells_triggers.txt index 2817b12bdc..1c2ba59733 100644 --- a/common/scripted_triggers/wc_magic_spells_triggers.txt +++ b/common/scripted_triggers/wc_magic_spells_triggers.txt @@ -47,6 +47,7 @@ $TRIGGER$ = { SPELL = flag:death_grip } $TRIGGER$ = { SPELL = flag:cripple } $TRIGGER$ = { SPELL = flag:improved_body } + $TRIGGER$ = { SPELL = flag:coagulation } } } @@ -540,6 +541,7 @@ target_has_max_stacks_trigger = { $SPELL$ = flag:judgement $SPELL$ = flag:raise_dead $SPELL$ = flag:improved_body + $SPELL$ = flag:coagulation } } # No such thing as stacks always = no @@ -950,6 +952,7 @@ spell_target_is_character_trigger = { # One character AND = { $SPELL$ = flag:give_disease $RANK_VALUE$ = 0 } AND = { $SPELL$ = flag:cripple $RANK_VALUE$ = 0 } AND = { $SPELL$ = flag:improved_body $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:coagulation $RANK_VALUE$ >= 1 } } } @@ -1081,6 +1084,7 @@ spell_is_helpful_trigger = { # To the recipient(s) $SPELL$ = flag:bless $SPELL$ = flag:divine_shield $SPELL$ = flag:expulsion + $SPELL$ = flag:coagulation } } @@ -1174,6 +1178,7 @@ spell_adds_opinion_trigger = { $SPELL$ = flag:death_and_decay $SPELL$ = flag:cripple $SPELL$ = flag:improved_body + $SPELL$ = flag:coagulation } } @@ -1186,6 +1191,7 @@ spell_has_ranks_trigger = { $SPELL$ = flag:bless $SPELL$ = flag:flash_of_light $SPELL$ = flag:exorcism + $SPELL$ = flag:coagulation } } @@ -1328,7 +1334,7 @@ spell_is_dispel_type_trigger = { $SPELL$ = flag:expulsion # $SPELL$ = flag:natures_cure # $SPELL$ = flag:invigorate - # $SPELL$ = flag:coagulation + $SPELL$ = flag:coagulation # $SPELL$ = flag:stonemend # $SPELL$ = flag:drain_essence # $SPELL$ = flag:mania @@ -1579,6 +1585,37 @@ satisfy_spell_triggers_character = { } } } + + trigger_else_if = { # Target must have some kind of phyiscal injury, magic injury, disease + limit = { + #OR = { + $SPELL$ = flag:coagulation + #} + } + custom_description = { + text = target_has_valid_debuff_trigger + OR = { + AND = { + exists = var:spell_recipient + OR = { + var:spell_recipient = { target_has_injury_trigger = yes } + var:spell_recipient = { target_has_major_injury_trigger = yes } + var:spell_recipient = { target_has_magic_injury_trigger = yes } + var:original_recipient = { target_has_poison_trigger = yes } + } + } + AND = { + exists = var:original_recipient + OR = { + var:original_recipient = { target_has_injury_trigger = yes } + var:spell_recipient = { target_has_major_injury_trigger = yes } + var:original_recipient = { target_has_magic_injury_trigger = yes } + var:original_recipient = { target_has_poison_trigger = yes } + } + } + } + } + } trigger_else = { always = no } } @@ -1646,6 +1683,13 @@ target_has_psych_illness_trigger = { } } +target_has_poison_trigger = { + custom_description = { + text = target_has_psych_illness_trigger + has_trait_with_flag = poison + } +} + is_known_undead_type_trigger = { switch = { trigger = $TYPE$ diff --git a/localization/english/wc_lifestyles_magic_l_english.yml b/localization/english/wc_lifestyles_magic_l_english.yml index 8348e153c3..4c96b1e625 100644 --- a/localization/english/wc_lifestyles_magic_l_english.yml +++ b/localization/english/wc_lifestyles_magic_l_english.yml @@ -347,7 +347,7 @@ death_magic_tree_2_perk_9_name:0 "bruh 9" death_magic_tree_3_name:0 "Hematurge" - death_magic_tree_3_perk_1_name:0 "bruh 1" + death_magic_tree_3_perk_1_name:0 "Blood Presence" death_magic_tree_3_perk_2_name:0 "bruh 2" death_magic_tree_3_perk_3_name:0 "bruh 3" death_magic_tree_3_perk_4_name:0 "bruh 4"