Skip to content

Commit

Permalink
Coagulation
Browse files Browse the repository at this point in the history
  • Loading branch information
robmart committed Sep 25, 2024
1 parent 05a5c29 commit 21ddd23
Show file tree
Hide file tree
Showing 6 changed files with 292 additions and 6 deletions.
12 changes: 12 additions & 0 deletions common/lifestyle_perks/wc_death_magic_perks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down
119 changes: 116 additions & 3 deletions common/script_values/wc_magic_spell_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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"
}
Expand Down Expand Up @@ -3832,4 +3832,117 @@ wc_spell_improved_body_cooldown_value = {
round = yes
}
wc_spell_improved_body_duration_days_value = 0
### Improved Body ###
### 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 ###
116 changes: 116 additions & 0 deletions common/scripted_effects/wc_magic_death_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
}
}
}
}
}
3 changes: 2 additions & 1 deletion common/scripted_effects/wc_magic_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
}
}

Expand Down Expand Up @@ -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
}
Expand Down
Loading

0 comments on commit 21ddd23

Please sign in to comment.