From cea1b5ec7be60aee8535f695b3c31d593b46c51e Mon Sep 17 00:00:00 2001 From: Ariana Date: Wed, 18 Sep 2024 00:05:19 -0400 Subject: [PATCH] Light lifestyle (#1420) * Spell Hack: sgui * Spell Hack: Removing un-eeded buttons * Spell Hack: New loc, revert vis change * Spell Hack: u can close window now * Spell Hack: cant hack trigger desc * Spell Hack: Can't select certain spells for hacking * Update wc_magic_guis.txt * Spell Hack: Effect * Spell Hack: loc to clarify * Init order spells * Cyromancer spells localization * Pyromancer spells localization * Pyro and Cryomancy tree backgrounds * New tree backgrounds * Add spell game concepts * Cyromancer spells localization * Pyromancer spells localization * Arcane elemental spells (#1408) * Scorch spell * Make Scorch Order, not Fire * Clear Scorch cooldown when hit with elemental or fel hostile magic * Use burned effect * Use normal order bonuses * Scorch doesn't have ranks * Pyroblast * Fix errors * Fix broken tooltips * Toast for hit * Make tooltip smaller * Correct pyroblast values * Flamestrike * Flamestrike better duration and tooltip * Fire Shield * Correct loc * Frostfire bolt * Frostbite traits * Name * Frostbolt * Names once again * Naaameees * Frost Nova modifier and Frostbolt chance modifier * Frost Nova * Make Flamestrike loop simpler * Frost Armor pt1 * Frost Armor pt2 * Frost Armor pt3 * Finish up Frost Armor * Improve ice block * Blizzard pt1 * Blizzard pt2 * Blizzard pt3 * Finish up Blizzard * Flame synergy name * Mana values * Duration values * Fixed blizzard duration not applying * sexier loc * sexier loc part 2 * hi * Fix flamestrike duration and remove dupe loc * Update to match fire branch and fix errors * Fix loc file and bom * Fix error * Fix another error * Fix errors * Fix last errors --------- Co-authored-by: d * Netherburned perk * Netherburn cooldown * Flame and Frost synergy * Flame armor perk * Icy Veins perk * Freezerburn perk * Elemental master perk warning loc * Fix loc * Simplify event effects * Twin Flame perk (excluding event loc) * Twin Flame event loc * Master Pyromancer and Cryomancer * remove mana cost from spell desc * Revert "remove mana cost from spell desc" This reverts commit a0184aed968f5b7968e2d59a2ba2d999617dd032. * remove mana cost from spell desc - rea; * Freeze Timer perk * Move to character on_action * Make fire shield giving a character interaction * Fire shield is granted when casting is finished * Prowess to Netherburn * Mostly working ice block model * Fixed ice block shader * Court shaders * Include spouse in twin flame loc * Don't apply opinion to yourself * Fix frostbite and burned tt * Lowercase SheHe for burned and frostbite * Master Pyro/Cryomancer loc * Fix Burned and Frostbite loc * Flame Synergy applies to cooldown, not cost * Fix game concept * Add compression on iceblock * Move iceblock files * Correct wrong value * Update ice block * Fix var name * tree loc * Flash of Light Init * Add game concepts and loc * Update wc_magic_spell_values.txt * triggers * update * New injury triggers * Clean some errors * Update wc_game_concepts_magic_spells_l_english.yml * update traits and triggers for new injury/illness system * start working on effect * effect pt2 * Update wc_magic_spell_values.txt * standardize mana costs for arcane * Revert flag change * Set up dispelling system * Aether Tap Perk * Buying Time Perk * Arcane Explosion Perk * Magical Procrastination Perk * Mirror Image Perk * Arcane Intellect Perk * Scheme Reflect pt1 * Scheme Reflect pt2 * Scheme Reflect pt3 AI fix and Fabricate Hook scheme * Scheme Reflect pt4 Murder and Steal Artifact schemes * Scheme Reflect pt5 Claim Throne and Overthrow Regent schemes * Arcane Spells (#1422) * Arcane values * Init order spells * Chronomancy duration value * Chronomancy spell trigger * Fix broken trigger * Polymorph static model * Polymorph Spell * Counterspell Spell * Remove modifier from correct character * Remove var correctly * Polymorphed are unable to be harmed in combat * Add counterspell to trigger * Spellsteal Spell * Scrying Spell * Haste / Slow spell * Conjure Refreshment pt1 * Conjure Refreshment pt2 * Conjure Refreshment Spell * Make the if/else from hell less hellish * Include the modifier * Chronomancy pt1 * Chronomancy pt2 * Chronomancy spell * Arcane Elemental Lifestyle * Pyro and Cryomancy tree backgrounds * Consistent tree size * New tree backgrounds * Localize lifestyle trees * Add spell game concepts * Cyromancer spells localization * Pyromancer spells localization * Pyro and Cryomancy tree backgrounds * New tree backgrounds * Add spell game concepts * Cyromancer spells localization * Pyromancer spells localization * Arcane elemental spells (#1408) * Scorch spell * Make Scorch Order, not Fire * Clear Scorch cooldown when hit with elemental or fel hostile magic * Use burned effect * Use normal order bonuses * Scorch doesn't have ranks * Pyroblast * Fix errors * Fix broken tooltips * Toast for hit * Make tooltip smaller * Correct pyroblast values * Flamestrike * Flamestrike better duration and tooltip * Fire Shield * Correct loc * Frostfire bolt * Frostbite traits * Name * Frostbolt * Names once again * Naaameees * Frost Nova modifier and Frostbolt chance modifier * Frost Nova * Make Flamestrike loop simpler * Frost Armor pt1 * Frost Armor pt2 * Frost Armor pt3 * Finish up Frost Armor * Improve ice block * Blizzard pt1 * Blizzard pt2 * Blizzard pt3 * Finish up Blizzard * Flame synergy name * Mana values * Duration values * Fixed blizzard duration not applying * sexier loc * sexier loc part 2 * hi * Fix flamestrike duration and remove dupe loc * Update to match fire branch and fix errors * Fix loc file and bom * Fix error * Fix another error * Fix errors * Fix last errors --------- Co-authored-by: d * Netherburned perk * Netherburn cooldown * Flame and Frost synergy * Flame armor perk * Icy Veins perk * Freezerburn perk * Elemental master perk warning loc * Fix loc * Simplify event effects * Twin Flame perk (excluding event loc) * Master Pyromancer and Cryomancer * remove mana cost from spell desc * Revert "remove mana cost from spell desc" This reverts commit a0184aed968f5b7968e2d59a2ba2d999617dd032. * remove mana cost from spell desc - rea; * Freeze Timer perk * Move to character on_action * Make fire shield giving a character interaction * Fire shield is granted when casting is finished * Fire shield loc * Prowess to Netherburn * Mostly working ice block model * Fixed ice block shader * Court shaders * Include spouse in twin flame loc * Don't apply opinion to yourself * Fix frostbite and burned tt * Ice block has no animations * Lowercase SheHe for burned and frostbite * Master Pyro/Cryomancer loc * Fix Burned and Frostbite loc * Flame Synergy applies to cooldown, not cost * Fix shader * Fix game concept * Add iceblock gene everywhere * Add compression on iceblock * Move iceblock files * Correct wrong value * Update ice block * Fix var name * Frostbite trait icons * Fix merge --------- Co-authored-by: d * Add elemental spells to trigger * Evocation Ritual * Fix minor errors * Arcane Dome pt1 * Arcane Dome Ritual * Double cast due to Evocation * Fix Haste/Slow effect loc * Update wc_magic_spells_triggers.txt * Fix loc * Fix double casting rituals * Fix evocation errors * Add proper punctuation * Chronomancy countdown * Chronomancy tooltip --------- Co-authored-by: d * Make spell tooltip names uppercase * Use short UI name * Minor loc errors * Scheme Reflect Perk * Quickening and Synergistic Alacrity Perks * Empowered Scrying Perk * Time Warping Perk * Fix gain/gains * Fix gain/gains 2.0 * Frost Synergy value desc * Presence of Mind pt1 * Presence of Mind Perk * Arcane Dialectics fix * Reverse Causality Perk and fixes * Fix Reverse Causality being overridable * Ice modifier icon * Dispel game concepts part 1 * Dispel game concepts part 2 * adjust flash of light mana cost * Dispels localization * Fix dispels triggers to make more sense * More trigger cleanup * Fix generic dispel effect * More dispel localization * Flash of Light effect * Flash of light fixes + loc * Dispel personal cooldowns * Init Spell: Dispel * dispel changes * add the shit back wtf lol * fix errors1 * fix merge * Update spellbook_widget.gui * Init Holy Light & Holy Fire * change holy light to lightwell * remove lightwell and holy fire ranks * fix cauterize ctd * Lightwell / Holy Fire * flash of light fix * add holy fire dodge chance * Judgement + Fixes * Expulsion * Expulsion / Exorcism / fixes * New magic injury: Holy Wrath * Avenging Wrath * holy wrath desc * New helpful modifier for dispels * change cauterize wound dispel to match new system * add avenging wrath to perk tree * Fixes - remove opinion from urself * Holy wrath values fix * update dispels concepts * add holy wrath to dispel * Init Spell: Salvation * Update wc_magic_effects.txt * Increase Salvation mana cost * Setup Salvation events * Add Salvation death mechanic * Make sure all deaths go thru override effect * prevent some natural deaths * Add Salvation monitor * Can't cast salvation on demons * Add Salvation to perk tree * Fix salvation triggers * New negative salvation modifier * Salvation effects * First Salvation Event * Add option to die anyways + events * Salvation on an undead person just removes undead trait * Merge branch 'magic-2024' into light-lifestyle-new * has_negative_spell_modifier * add mods to spell_modifier_trigger * add mods to every_spell_modifier_effect * Revamp dispel effect to match spellsteal * Change the way magic resistance works for modifiers * Update wc_magic_spells_triggers.txt * Fix dispel stakcs * Fix dispel * dispel tooltip + interface toast * Update wc_magic_light_effects.txt * salvation events * More event fixes + make debug death work * Finish Salvation events * Spell: Bless * remove modifiers that wont have any effect from positive list * Spell: Divine Shield * fix error * Fix salvation event ai_chance * Update consecration loc * Consecration modifiers * Spell: Consecration * Update wc_magic_effects.txt * fix * Fix dispel template * Update consecration duration * Consecration GUI * Make consecration county * update consecration cost * move consecration effect * error sweep 1 * make Bless cd less * update consecration tt * Rebuke * rebuke cant kick rebuke * Divine storm * add more opinion if spell is ritual * Update wc_magic_light_effects.txt * Blessed Bastion * fix ctd and errors * Fix expulsion and FoL * Fix all loc issues * Fix arcane spells not working * fix magical prowess modifier application and scaling * Divine service perk * Blessed Blood * Echo of light perk * radiant hearth * Struggle perk * Seal of command * Holy wrath effects * give exorcism a rank 2 * add gui for multiple character targets * exorcism rank 2 effect * make sure character finder goes back to normal * Might fix ctd * Re-add removed triggers * Remove dupe loc * fix exorcism * Create holy_wrath.dds * divine purpose * holy retribution * virtue part 1 * Update holy_wrath.dds * Inner fire + virtue tt * choose an aura event * final stand * remove dispel template effect * fix dispel bug * Fix vengeance, ret aura, echo of light, and holy wrath effect * Fix judgement tooltip * Add notifcation text for magic secrets * update exorcism tooltip * Add divine storm death reason * change virtue * fix divine shield tooltip * add missing modifiers to water magic resistance * Fix final stand when heir is designated * fix rebuke dodge tootlip * fix rebuke * fix gay little british tooltip * Update wc_magic_effects.txt * Add 2 new salvation notification events * error sweep * implement robfart suggestions --------- Co-authored-by: Robmart --- common/casus_belli_types/00_civil_war.txt | 2 +- .../00_debug_interactions.txt | 6 +- .../00_commander_phase_events.txt | 9 + .../00_knight_phase_events.txt | 40 + .../council_tasks/00_court_chaplain_tasks.txt | 15 + common/deathreasons/wc_event_deaths.txt | 10 + common/decisions/wc_magic_decisions.txt | 10 + common/effect_localization/wc_ep1_effects.txt | 2 +- common/event_themes/wc_event_themes.txt | 12 + .../wc_magic_spells_concepts.txt | 103 +- .../lifestyle_perks/wc_light_magic_perks.txt | 133 +- .../lifestyle_perks/wc_order_magic_perks.txt | 5 +- common/modifiers/wc_magic_modifiers.txt | 228 ++- .../on_action/wc_magic_spell_on_actions.txt | 84 +- common/on_action/wc_mana_on_actions.txt | 1232 +++++++++------ .../opinion_modifiers/wc_magic_opinions.txt | 32 + .../99_court_chaplain_values.txt | 6 + .../script_values/wc_magic_spell_values.txt | 1142 +++++++++++++- common/script_values/wc_magic_values.txt | 1052 +++++++++++-- common/scripted_effects/00_secret_effects.txt | 144 ++ common/scripted_effects/wc_magic_effects.txt | 486 +++++- .../wc_magic_light_effects.txt | 1387 +++++++++++++++++ .../scripted_effects/wc_resource_effects.txt | 14 +- .../scripted_effects/wc_vanilla_effects.txt | 373 +++-- common/scripted_guis/wc_magic_guis.txt | 54 +- .../wc_magic_spells_triggers.txt | 868 +++++++---- common/secret_types/00_secret_types.txt | 11 + common/traits/00_traits.txt | 29 +- common/traits/wc_magic_traits.txt | 40 + .../wc_magic_triggers.txt | 32 + .../hold_court_events_general.txt | 6 +- .../tour_activity/tour_general_events.txt | 10 +- .../tour_activity/tour_phase_tour_grounds.txt | 8 +- .../tour_activity/tour_travel_events.txt | 6 +- .../tour_activity/tour_travel_events_dan.txt | 10 +- .../death_events/death_management_events.txt | 4 +- events/dlc/ce1/epidemic_events_2.txt | 2 +- events/dlc/ce1/legend_spread_events_8.txt | 2 +- events/dlc/ep2/ep2_tournament_events.txt | 10 +- .../ep2/wedding_events/ep2_wedding_events.txt | 4 +- events/factions/faction_demands.txt | 2 +- events/magic_events/wc_magic_perk_event.txt | 35 + events/magic_events/wc_magic_spell_events.txt | 394 +++++ events/wc_events/wc_forsaken_events.txt | 8 +- events/yearly_events/yearly_events_4.txt | 2 +- gfx/interface/icons/traits/holy_wrath.dds | Bin 0 -> 57728 bytes gui/shared/lists.gui | 18 +- gui/spellbook_widget.gui | 203 +++ .../wc_magic_lifestyle_events_l_english.yml | 43 +- .../wc_magic_perk_events_l_english.yml | 13 +- .../wc_magic_spell_events_l_english.yml | 65 +- .../english/gui/wc_magic_gui_l_english.yml | 5 +- .../english/gui/wc_resource_l_english.yml | 2 +- .../modifiers/wc_modifiers_mana_l_english.yml | 63 + .../wc_general_opinions_l_english.yml | 7 +- .../triggers/wc_magic_triggers_l_english.yml | 18 +- .../english/wc_council_tasks_l_english.yml | 2 + .../english/wc_death_reasons_l_english.yml | 8 +- .../wc_game_concepts_magic_l_english.yml | 48 +- ...c_game_concepts_magic_spells_l_english.yml | 158 +- .../english/wc_lifestyles_magic_l_english.yml | 82 +- localization/english/wc_traits_l_english.yml | 10 +- 62 files changed, 7493 insertions(+), 1316 deletions(-) create mode 100644 common/scripted_effects/wc_magic_light_effects.txt create mode 100644 gfx/interface/icons/traits/holy_wrath.dds diff --git a/common/casus_belli_types/00_civil_war.txt b/common/casus_belli_types/00_civil_war.txt index 4175534cd0..1cc3fc49b4 100644 --- a/common/casus_belli_types/00_civil_war.txt +++ b/common/casus_belli_types/00_civil_war.txt @@ -782,7 +782,7 @@ populist_war = { limit = { has_character_flag = peasant_faction_random_peasant } - death = { + override_death_effect = { death_reason = death_vanished } } diff --git a/common/character_interactions/00_debug_interactions.txt b/common/character_interactions/00_debug_interactions.txt index 09a0499228..08b5a8b51a 100644 --- a/common/character_interactions/00_debug_interactions.txt +++ b/common/character_interactions/00_debug_interactions.txt @@ -818,17 +818,17 @@ slay_character_interaction = { save_scope_as = rando } hidden_effect = { - death = { + override_death_killer_effect = { death_reason = death_duel killer = scope:rando } } } scope:no_slayer = { - death = { death_reason = death_natural_causes } + override_death_effect = { death_reason = death_natural_causes } } scope:actor_slayer = { - death = { + override_death_killer_effect = { death_reason = death_duel killer = scope:actor } diff --git a/common/combat_phase_events/00_commander_phase_events.txt b/common/combat_phase_events/00_commander_phase_events.txt index 4ff6b6d96f..311a0f81ec 100644 --- a/common/combat_phase_events/00_commander_phase_events.txt +++ b/common/combat_phase_events/00_commander_phase_events.txt @@ -89,6 +89,7 @@ commander_wounded = { factor = 0 has_trait_with_flag = unkillable } + # End Warcraft } effect = { @@ -354,6 +355,14 @@ commander_killed = { factor = 0.8 has_character_modifier = wc_frost_armor_modifier } + modifier = { + factor = 0.9 + has_character_modifier = wc_divine_purpose_modifier + } + modifier = { + factor = 0 + has_character_modifier = wc_divine_shield_modifier + } # End Warcraft modifier = { factor = 0 diff --git a/common/combat_phase_events/00_knight_phase_events.txt b/common/combat_phase_events/00_knight_phase_events.txt index f3a1f0d695..9f7e96912c 100644 --- a/common/combat_phase_events/00_knight_phase_events.txt +++ b/common/combat_phase_events/00_knight_phase_events.txt @@ -1119,6 +1119,46 @@ knight_killed = { } } } + + #Warcraft + modifier = { + factor = 0.9 + has_character_modifier = wc_divine_purpose_modifier + } + modifier = { + factor = 0.8 + has_character_modifier = wc_frost_armor_modifier + } + modifier = { + factor = 0.9 + has_character_modifier = wc_divine_purpose_modifier + } + modifier = { + factor = 0 + has_character_modifier = wc_divine_shield_modifier + } + modifier = { + factor = 0 + has_trait_with_flag = unkillable + } + modifier = { + factor = 0.95 + is_knight = yes + exists = liege + liege = { + has_perk = order_magic_tree_3_perk_4 + } + } + modifier = { + factor = 2 + # Warcraft + has_trait_with_flag = higher_chance_of_dying_in_battle + } + modifier = { + factor = 0.5 + # Warcraft + has_trait_with_flag = lower_chance_of_dying_in_combat + } } effect = { diff --git a/common/council_tasks/00_court_chaplain_tasks.txt b/common/council_tasks/00_court_chaplain_tasks.txt index 6369e18ad3..a947c885ce 100644 --- a/common/council_tasks/00_court_chaplain_tasks.txt +++ b/common/council_tasks/00_court_chaplain_tasks.txt @@ -427,6 +427,14 @@ task_conversion = { desc = minimum_conversion } } + #Warcraft + if = { + limit = { scope:councillor_liege = { has_perk = light_magic_tree_1_perk_2 } } + add = { + value = scope:councillor.court_chaplain_fabricate_claim_divine_service_perk + desc = COURT_CHAPLAIN_FABRICATE_CLAIM_DIVINE_SERVICE_PERK + } + } if = { limit = { scope:councillor_liege = { @@ -943,6 +951,13 @@ task_fabricate_claim = { desc = COURT_CHAPLAIN_FABRICATE_CLAIM_INNOVATION_BONUS_EXPANSIONISM } } + if = { + limit = { scope:councillor.liege = { has_perk = light_magic_tree_1_perk_2 } } + add = { + value = scope:councillor.court_chaplain_fabricate_claim_divine_service_perk + desc = COURT_CHAPLAIN_FABRICATE_CLAIM_DIVINE_SERVICE_PERK + } + } if = { limit = { exists = scope:county diff --git a/common/deathreasons/wc_event_deaths.txt b/common/deathreasons/wc_event_deaths.txt index 8b63b6eb6e..a38b380b3f 100644 --- a/common/deathreasons/wc_event_deaths.txt +++ b/common/deathreasons/wc_event_deaths.txt @@ -16,4 +16,14 @@ death_adventurers = { } death_merge = { icon = "death_unknown.dds" +} +death_salvation = { + icon = "death_unknown.dds" +} +death_salvation_killer = { + icon = "death_unknown.dds" +} +death_divine_storm = { + public_knowledge = yes + icon = "death_unknown.dds" } \ No newline at end of file diff --git a/common/decisions/wc_magic_decisions.txt b/common/decisions/wc_magic_decisions.txt index c08ff72ce5..92e3263af1 100644 --- a/common/decisions/wc_magic_decisions.txt +++ b/common/decisions/wc_magic_decisions.txt @@ -54,6 +54,8 @@ restore_chronomancy_decision = { major = yes + ai_check_interval = 60 + is_shown = { has_character_flag = chronomancy_active OR = { @@ -71,6 +73,8 @@ restore_chronomancy_decision = { activate_presence_of_mind_decision = { major = yes + ai_check_interval = 60 + is_shown = { has_variable = wc_presence_of_mind_available } @@ -93,6 +97,8 @@ activate_presence_of_mind_decision = { deactivate_presence_of_mind_decision = { major = yes + ai_check_interval = 60 + is_shown = { has_variable = wc_presence_of_mind_activated } @@ -108,6 +114,8 @@ deactivate_presence_of_mind_decision = { activate_reverse_causality_decision = { major = yes + ai_check_interval = 60 + is_shown = { has_variable = wc_reverse_causality_available NOT = { @@ -133,6 +141,8 @@ activate_reverse_causality_decision = { deactivate_reverse_causality_decision = { major = yes + ai_check_interval = 60 + is_shown = { has_variable = wc_reverse_causality_activated } diff --git a/common/effect_localization/wc_ep1_effects.txt b/common/effect_localization/wc_ep1_effects.txt index 0bfe724438..e9f17ea2c4 100644 --- a/common/effect_localization/wc_ep1_effects.txt +++ b/common/effect_localization/wc_ep1_effects.txt @@ -1,4 +1,4 @@ -equip_artifact_to_owner_replace = { +equip_artifact_to_owner_replace = { global = EQUIP_ARTIFACT_TO_OWNER global_past = EQUIP_ARTIFACT_TO_OWNER_PAST first = EQUIP_ARTIFACT_TO_OWNER_FIRST diff --git a/common/event_themes/wc_event_themes.txt b/common/event_themes/wc_event_themes.txt index d5f9fd188b..f92b65aac2 100644 --- a/common/event_themes/wc_event_themes.txt +++ b/common/event_themes/wc_event_themes.txt @@ -30,4 +30,16 @@ order = { background = { reference = throne_room } +} + +light = { + icon = { + reference = "gfx/interface/icons/icon_light_magic.dds" + } + sound = { + reference = "event:/SFX/Events/Themes/sfx_event_theme_type_learning" + } + background = { + reference = throne_room + } } \ No newline at end of file diff --git a/common/game_concepts/wc_magic_spells_concepts.txt b/common/game_concepts/wc_magic_spells_concepts.txt index b8b86330a0..ae838c6612 100644 --- a/common/game_concepts/wc_magic_spells_concepts.txt +++ b/common/game_concepts/wc_magic_spells_concepts.txt @@ -24,6 +24,47 @@ wc_spell_type_defend = { texture = "gfx/interface/icons/icon_spellbook.dds" } +wc_spell_type_heal = { + parent = wc_spell_type + texture = "gfx/interface/icons/icon_spellbook.dds" +} + +wc_spell_type_dispel = { + parent = wc_spell_type_heal + texture = "gfx/interface/icons/icon_spellbook.dds" +} + +wc_magic_illness = { + parent = illness +} + +wc_major_illness = { + parent = illness +} + +wc_magic_injury = { + parent = wc_injury +} + +wc_major_injury = { + parent = wc_injury +} + +wc_injury = { +} + +wc_poison = { + parent = wc_magic_injury +} + +wc_psych_illness = { + parent = illness +} + +wc_illness = { + parent = illness +} + wc_spell_type_summon = { parent = wc_spell_type texture = "gfx/interface/icons/icon_spellbook.dds" @@ -125,40 +166,68 @@ wc_spell_vernal_solstice = { parent = wc_spell_school_elemental_fire } -wc_spell_frostbolt = { +wc_spell_frostfire_bolt = { parent = wc_spell_school_order } -wc_spell_frost_armor = { - parent = wc_spell_school_order +wc_spell_flash_of_light = { + parent = wc_spell_school_light } -wc_spell_frost_nova = { - parent = wc_spell_school_order +wc_spell_dispel = { + parent = wc_spell_school_light } -wc_spell_blizzard = { - parent = wc_spell_school_order +wc_spell_lightwell = { + parent = wc_spell_school_light } -wc_spell_scorch = { - parent = wc_spell_school_order +wc_spell_holy_fire = { + parent = wc_spell_school_light } -wc_spell_pyroblast = { - parent = wc_spell_school_order +wc_spell_salvation = { + parent = wc_spell_school_light } -wc_spell_fire_shield = { - parent = wc_spell_school_order +wc_spell_judgement = { + parent = wc_spell_school_light } -wc_spell_flamestrike = { - parent = wc_spell_school_order +wc_spell_exorcism = { + parent = wc_spell_school_light } -wc_spell_frostfire_bolt = { - parent = wc_spell_school_order +wc_spell_expulsion = { + parent = wc_spell_school_light +} + +wc_spell_avenging_wrath = { + parent = wc_spell_school_light +} + +wc_spell_bless = { + parent = wc_spell_school_light +} + +wc_spell_divine_shield = { + parent = wc_spell_school_light +} + +wc_spell_consecration = { + parent = wc_spell_school_light +} + +wc_spell_rebuke = { + parent = wc_spell_school_light +} + +wc_spell_blessed_bastion = { + parent = wc_spell_school_light +} + +wc_spell_divine_storm = { + parent = wc_spell_school_light } wc_cosmos = { diff --git a/common/lifestyle_perks/wc_light_magic_perks.txt b/common/lifestyle_perks/wc_light_magic_perks.txt index 482936e894..7780b05986 100644 --- a/common/lifestyle_perks/wc_light_magic_perks.txt +++ b/common/lifestyle_perks/wc_light_magic_perks.txt @@ -24,6 +24,10 @@ } effect = { + custom_tooltip = wc_learn_spell_flash_of_light + wc_learn_spell_effect = { + SPELL = flash_of_light + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -39,6 +43,12 @@ light_magic_tree_1_perk_2 = { effect = { # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } + learn_spell_rank_effect = { + SPELL = flash_of_light + RANK = 2 + } + custom_tooltip = wc_learn_spell_flash_of_light_2 + custom_tooltip = wc_divine_service_effect } } light_magic_tree_1_perk_3 = { @@ -51,6 +61,10 @@ light_magic_tree_1_perk_3 = { effect = { # Maintenance + wc_learn_spell_effect = { + SPELL = dispel + } + custom_tooltip = wc_learn_spell_dispel_magic wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -63,6 +77,10 @@ light_magic_tree_1_perk_4 = { parent = light_magic_tree_1_perk_2 effect = { + custom_tooltip = wc_learn_spell_holy_fire + wc_learn_spell_effect = { + SPELL = holy_fire + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -76,6 +94,10 @@ light_magic_tree_1_perk_5 = { parent = light_magic_tree_1_perk_3 effect = { + custom_tooltip = wc_learn_spell_lightwell + wc_learn_spell_effect = { + SPELL = lightwell + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -90,6 +112,23 @@ light_magic_tree_1_perk_6 = { effect = { # Maintenance + learn_spell_rank_effect = { + SPELL = flash_of_light + RANK = 3 + } + custom_tooltip = wc_learn_spell_flash_of_light_3 + add_character_modifier = { + modifier = wc_blessed_blood_modifier + } + custom_tooltip = wc_blessed_blood_tooltip + hidden_effect = { + primary_heir ?= { + add_character_modifier = { + modifier = wc_blessed_blood_modifier + years = 10 + } + } + } wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -102,6 +141,7 @@ light_magic_tree_1_perk_7 = { parent = light_magic_tree_1_perk_5 effect = { + custom_tooltip = wc_echo_of_light_effect # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -115,6 +155,10 @@ light_magic_tree_1_perk_8 = { parent = light_magic_tree_1_perk_6 parent = light_magic_tree_1_perk_7 + character_modifier = { + character_travel_safety_mult = 0.25 + character_travel_speed_mult = 0.25 + } effect = { # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } @@ -130,6 +174,10 @@ light_magic_tree_1_perk_9 = { effect = { # Maintenance + custom_tooltip = wc_learn_spell_salvation + wc_learn_spell_effect = { + SPELL = salvation + } wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -160,6 +208,10 @@ light_magic_tree_2_perk_1 = { } effect = { + wc_learn_spell_effect = { + SPELL = judgement + } + custom_tooltip = wc_learn_spell_judgement # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -173,6 +225,7 @@ light_magic_tree_2_perk_2 = { parent = light_magic_tree_2_perk_1 effect = { + custom_tooltip = wc_struggle_effect # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -187,6 +240,14 @@ light_magic_tree_2_perk_3 = { effect = { # Maintenance + wc_learn_spell_effect = { + SPELL = exorcism + } + wc_learn_spell_effect = { + SPELL = expulsion + } + custom_tooltip = wc_learn_spell_exorcism + custom_tooltip = wc_learn_spell_expulsion wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -198,8 +259,12 @@ light_magic_tree_2_perk_4 = { parent = light_magic_tree_2_perk_3 + character_modifier = { + martial = 2 + } effect = { # Maintenance + custom_tooltip = wc_seal_of_command wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -213,6 +278,11 @@ light_magic_tree_2_perk_5 = { effect = { # Maintenance + learn_spell_rank_effect = { + SPELL = exorcism + RANK = 2 + } + custom_tooltip = wc_learn_spell_exorcism_2 wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -224,7 +294,20 @@ light_magic_tree_2_perk_6 = { parent = light_magic_tree_2_perk_3 + character_modifier = { + tyranny_gain_mult = -0.25 + general_opinion = 5 + } + effect = { + add_character_modifier = { + modifier = wc_divine_purpose_modifier + } + player_heir ?= { + add_character_modifier = { + modifier = wc_divine_purpose_modifier + } + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -241,6 +324,10 @@ light_magic_tree_2_perk_7 = { effect = { # Maintenance + wc_learn_spell_effect = { + SPELL = avenging_wrath + } + custom_tooltip = wc_learn_spell_avenging_wrath wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -253,6 +340,7 @@ light_magic_tree_2_perk_8 = { parent = light_magic_tree_2_perk_7 effect = { + custom_tooltip = holy_retribution_tooltip # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -268,6 +356,10 @@ light_magic_tree_2_perk_9 = { effect = { # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } + custom_tooltip = wc_learn_spell_divine_storm + wc_learn_spell_effect = { + SPELL = divine_storm + } } } @@ -283,7 +375,7 @@ light_magic_tree_3_perk_1 = { auto_selection_weight = { value = wc_light_magic_auto_selection_value - + if = { limit = { has_focus = light_magic_focus_3 } multiply = wc_lifestyle_perk_auto_selection_weight_multiply_from_focus_value @@ -298,6 +390,18 @@ light_magic_tree_3_perk_1 = { effect = { # Maintenance + custom_tooltip = wc_learn_spell_bless + wc_learn_spell_effect = { + SPELL = bless + } + learn_spell_rank_effect = { + SPELL = bless + RANK = 2 + } + learn_spell_rank_effect = { + SPELL = bless + RANK = 3 + } wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -310,6 +414,7 @@ light_magic_tree_3_perk_2 = { parent = light_magic_tree_3_perk_1 effect = { + custom_tooltip = wc_virtue_tooltip # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -324,6 +429,10 @@ light_magic_tree_3_perk_3 = { effect = { # Maintenance + custom_tooltip = wc_learn_spell_divine_shield + wc_learn_spell_effect = { + SPELL = divine_shield + } wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -335,7 +444,11 @@ light_magic_tree_3_perk_4 = { parent = light_magic_tree_3_perk_2 + character_modifier = { + hostile_scheme_resistance_mult = 0.15 + } effect = { + custom_tooltip = wc_inner_fire_tooltip # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -349,6 +462,10 @@ light_magic_tree_3_perk_5 = { parent = light_magic_tree_3_perk_3 effect = { + custom_tooltip = wc_learn_spell_consecration + wc_learn_spell_effect = { + SPELL = consecration + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -364,6 +481,11 @@ light_magic_tree_3_perk_6 = { parent = light_magic_tree_3_perk_5 effect = { + custom_tooltip = wc_holy_aura_tooltip + trigger_event = { + id = magic_perk.0002 + days = { 30 60 } # prevent lag + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -378,6 +500,10 @@ light_magic_tree_3_perk_7 = { effect = { # Maintenance + custom_tooltip = wc_learn_spell_rebuke + wc_learn_spell_effect = { + SPELL = rebuke + } wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } } @@ -390,6 +516,7 @@ light_magic_tree_3_perk_8 = { parent = light_magic_tree_3_perk_5 effect = { + custom_tooltip = wc_final_stand_tooltip # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } @@ -405,6 +532,10 @@ light_magic_tree_3_perk_9 = { parent = light_magic_tree_3_perk_8 effect = { + custom_tooltip = wc_learn_spell_blessed_bastion + wc_learn_spell_effect = { + SPELL = blessed_bastion + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = light } } diff --git a/common/lifestyle_perks/wc_order_magic_perks.txt b/common/lifestyle_perks/wc_order_magic_perks.txt index 6b334a5293..fa1007fe16 100644 --- a/common/lifestyle_perks/wc_order_magic_perks.txt +++ b/common/lifestyle_perks/wc_order_magic_perks.txt @@ -355,7 +355,10 @@ order_magic_tree_2_perk_7 = { effect = { custom_tooltip = wc_arcane_intellect_effect - trigger_event = magic_perk.0001 + trigger_event = { + id = magic_perk.0001 + days = { 30 60 } # prevent lag + } # Maintenance wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = order } } diff --git a/common/modifiers/wc_magic_modifiers.txt b/common/modifiers/wc_magic_modifiers.txt index ec928898f1..b763de7e49 100644 --- a/common/modifiers/wc_magic_modifiers.txt +++ b/common/modifiers/wc_magic_modifiers.txt @@ -39,15 +39,11 @@ wc_empowered_fire_elemental_modifier = { wc_lava_lash_modifier = { icon = flame_negative - levy_size = -0.1 - additional_fort_level = -1 + levy_size = -0.2 + additional_fort_level = -2 scale = { value = { - add = 20 - barony.holder = { - divide = wc_elemental_fire_magic_resistance_value - } - # cuz 20 is max + add = wc_elemental_fire_magic_resistance_scale_value } desc = wc_from_mr_elemental_fire_desc } @@ -69,11 +65,10 @@ wc_backdraft_proc_modifier = { wc_flame_wall_bad_modifier = { icon = flame_negative - army_pursuit_mult = -0.1 + army_pursuit_mult = -0.3 scale = { value = { - add = 20 - divide = wc_elemental_fire_magic_resistance_value + add = wc_elemental_fire_magic_resistance_scale_value } desc = wc_from_mr_elemental_fire_desc } @@ -433,8 +428,14 @@ wc_haste_modifier = { wc_slow_modifier = { icon = magic_negative - movement_speed = -0.15 - character_travel_speed_mult = -0.15 + movement_speed = -0.25 + character_travel_speed_mult = -0.25 + scale = { + value = { + add = wc_order_magic_resistance_scale_value + } + desc = wc_from_mr_order_desc + } } wc_conjure_food_modifier = { @@ -446,7 +447,6 @@ wc_conjure_food_modifier = { wc_conjure_drink_modifier = { icon = magic_positive - } wc_conjure_feast_modifier = { @@ -468,15 +468,205 @@ wc_arcane_dome_county_modifier = { wc_arcane_dome_character_modifier = { icon = magic_negative - hostile_county_attrition = 2.5 - hostile_county_attrition_raiding = 2.5 - supply_capacity_mult = -5 - supply_duration = -5 - advantage = -25 - siege_phase_time = 100 + hostile_county_attrition = 3.5 + hostile_county_attrition_raiding = 3.5 + supply_capacity_mult = -10 + supply_duration = -10 + advantage = -35 + siege_phase_time = 110 + scale = { + value = { + add = wc_order_magic_resistance_scale_value + } + desc = wc_from_mr_order_desc + } } wc_quickening_modifier = { icon = magic_positive stacking = yes +} + +wc_holy_fire_modifier = { + icon = magic_negative + + health = -0.3 + martial = -5 + prowess = -5 + scale = { + value = { + add = wc_light_magic_resistance_scale_value + } + desc = wc_from_mr_light_desc + } + #Decrease light mr +} + +wc_lightwell_modifier = { + icon = magic_positive + + health = 0.1 + martial = 2 + prowess = 2 + #increase light mr +} + +wc_exorcism_modifier = { + icon = magic_negative + stacking = yes + + martial = -3 + prowess = -3 + stewardship = -3 + intrigue = -3 + diplomacy = -3 + learning = -3 + health = -0.3 + scale = { + value = { + add = wc_light_magic_resistance_scale_value + } + desc = wc_from_mr_light_desc + } + # Decrease all MR +} + +wc_salvation_modifier = { + icon = health_positive +} + +wc_saved_with_salvation_modifier = { + icon = health_negative + + health = -0.1 + life_expectancy = -10 + # Decrease all MR +} + +wc_divine_shield_modifier = { + icon = magic_positive + + #Removes chance of being killed in battle + #Block next non-holy spell +} + +wc_consecration_county_positive_modifier = { + icon = magic_positive + + travel_danger = -15 + supply_limit_mult = 0.3 + monthly_county_control_growth_add = 0.6 +} + +wc_consecration_county_negative_modifier = { + icon = magic_negative + + travel_danger = 15 + supply_limit_mult = -0.30 + monthly_county_control_growth_add = -0.8 + + scale = { + value = { + add = wc_light_magic_resistance_scale_value + } + desc = wc_from_mr_light_desc + } +} + +wc_rebuke_modifier = { + icon = magic_negative + #25% cast time +} + +wc_divine_storm_county_modifier = { + icon = magic_negative + + travel_danger = 50 + monthly_county_control_growth_add = -0.2 + epidemic_resistance = -10 + build_speed = 0.3 + levy_size = -0.25 +} + +wc_divine_storm_character_modifier = { + icon = magic_negative + + health = -0.5 + martial = -5 + prowess = -5 + scale = { + value = { + add = wc_light_magic_resistance_scale_value + } + desc = wc_from_mr_light_desc + } +} + +wc_blessed_bastion_modifier = { + icon = magic_positive + + # +1 mana regen + # increase all mr 3 + # 30% holy spells cd +} + +wc_blessed_bastion_county_modifier = { + icon = magic_positive + + travel_danger = -20 + fort_level = 3 + defender_holding_advantage = 10 + epidemic_resistance = 10 + hostile_raid_time = 0.5 +} + +wc_blessed_blood_modifier = { + icon = health_positive + + health = 0.1 + negative_inactive_inheritance_chance = -0.25 + positive_inactive_inheritance_chance = 0.10 +} + +wc_divine_purpose_modifier = { + icon = magic_positive + # Lower chance of being killed in war +} + +wc_echo_of_light_modifier = { + icon = magic_positive +} + +wc_devotion_aura_modifier = { + icon = magic_positive + health = 0.1 + # Increase all mr 3 +} + +wc_retribution_aura_modifier = { + icon = magic_positive + martial = 1 + # when targeted by a hostile spell, or someone dies, get this buff + # 25% holy spells cd + # -15% cast time +} + +wc_concentration_aura_modifier = { + icon = magic_positive + monthly_lifestyle_xp_gain_mult = 0.1 + # +0.5 mana regen +} + +wc_vengeance_aura_modifier = { + icon = magic_positive + prowess = 3 + attacker_advantage = 2 + # give wc_vengeance_aura_modifier_negative to hostile spell targets +} + +wc_vengeance_aura_modifier_negative = { + icon = magic_negative + prowess -1 + # +10% cast time + # -1 mr } \ No newline at end of file diff --git a/common/on_action/wc_magic_spell_on_actions.txt b/common/on_action/wc_magic_spell_on_actions.txt index 59f5bad6de..8dddc0f934 100644 --- a/common/on_action/wc_magic_spell_on_actions.txt +++ b/common/on_action/wc_magic_spell_on_actions.txt @@ -271,4 +271,86 @@ on_join_court_evocation = { remove_character_modifier = wc_evocation_character_modifier } } -} \ No newline at end of file +} + +wc_divine_storm_county_pulse = { + effect = { + if = { + limit = { + has_county_modifier = wc_divine_storm_county_modifier + } + + every_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + } + title_province = { + every_character_in_location = { + limit = { + NOT = { + has_character_modifier = wc_divine_storm_character_modifier + } + } + apply_character_divine_storm_effect = yes + } + } + } + + trigger_event = { + on_action = wc_divine_storm_county_pulse + months = 1 + } + } + } +} + +wc_divine_storm_removal_pulse = { + effect = { + if = { + limit = { + has_character_modifier = wc_divine_storm_character_modifier + } + + if = { + limit = { + exists = location.county + location.county = { + NOT = { + has_county_modifier = wc_divine_storm_county_modifier + } + } + } + + remove_character_modifier = wc_divine_storm_character_modifier + } + else = { + trigger_event = { + on_action = wc_divine_storm_removal_pulse + months = 1 + } + } + } + } +} + +on_join_court_divine_storm = { + effect = { + if = { + limit = { + exists = location.county + location.county = { has_county_modifier = wc_divine_storm_county_modifier } + NOT = { + has_character_modifier = wc_divine_storm_character_modifier + } + } + apply_character_divine_storm_effect = yes + } + else_if = { + limit = { + exists = location.county + has_character_modifier = wc_divine_storm_character_modifier + } + remove_character_modifier = wc_divine_storm_character_modifier + } + } +} diff --git a/common/on_action/wc_mana_on_actions.txt b/common/on_action/wc_mana_on_actions.txt index 891e8b64dc..83b341bf90 100644 --- a/common/on_action/wc_mana_on_actions.txt +++ b/common/on_action/wc_mana_on_actions.txt @@ -1,70 +1,70 @@ wc_on_mana_regeneration = { - effect = { - if = { - limit = { has_variable = wc_current_mana_variable } - - wc_change_mana_by_value_effect = { - CHANGE = add - VALUE = wc_mana_regeneration_value - } - } - else = { - set_variable = { name = wc_current_mana_variable value = wc_max_mana_value } - wc_recalculate_prowess_from_mana_effect = yes - } - magic_buff_maintenance_effect = yes - trigger_event = { on_action = wc_on_mana_regeneration months = 1 } - } + effect = { + if = { + limit = { has_variable = wc_current_mana_variable } + + wc_change_mana_by_value_effect = { + CHANGE = add + VALUE = wc_mana_regeneration_value + } + } + else = { + set_variable = { name = wc_current_mana_variable value = wc_max_mana_value } + wc_recalculate_prowess_from_mana_effect = yes + } + magic_buff_maintenance_effect = yes + trigger_event = { on_action = wc_on_mana_regeneration months = 1 } + } } wc_on_health_regeneration = { - effect = { - if = { - limit = { has_variable = wc_current_hp_variable } - wc_change_hp_by_value_effect = { - CHANGE = add - VALUE = wc_hp_replenishment_value - } - } - - else = { - set_variable = { name = wc_current_hp_variable value = wc_hp_capacity_value } - } - - trigger_event = { on_action = wc_on_health_regeneration months = 1 } - } + effect = { + if = { + limit = { has_variable = wc_current_hp_variable } + wc_change_hp_by_value_effect = { + CHANGE = add + VALUE = wc_hp_replenishment_value + } + } + + else = { + set_variable = { name = wc_current_hp_variable value = wc_hp_capacity_value } + } + + trigger_event = { on_action = wc_on_health_regeneration months = 1 } + } } wc_on_spell_progression = { - effect = { - every_in_list = { - variable = current_spells_casting - save_scope_as = casting_spell - root = { - execute_scoped_spell_effect = { - SPELL = scope:casting_spell - EFFECT = add_spell_progression_effect - } - } - } - every_in_list = { - variable = spells_cd - save_scope_as = cd_spell - root = { - execute_scoped_spell_effect = { - SPELL = scope:cd_spell - EFFECT = update_spell_cooldown_effect - } - } - } - if = { # so it doesnt double count spells - limit = { - NOT = { exists = var:spell_loop_on } - } - set_variable = { name = spell_loop_on value = yes } - } - trigger_event = { on_action = wc_on_spell_progression days = 1 } - } + effect = { + every_in_list = { + variable = current_spells_casting + save_scope_as = casting_spell + root = { + execute_scoped_spell_effect = { + SPELL = scope:casting_spell + EFFECT = add_spell_progression_effect + } + } + } + every_in_list = { + variable = spells_cd + save_scope_as = cd_spell + root = { + execute_scoped_spell_effect = { + SPELL = scope:cd_spell + EFFECT = update_spell_cooldown_effect + } + } + } + if = { # so it doesnt double count spells + limit = { + NOT = { exists = var:spell_loop_on } + } + set_variable = { name = spell_loop_on value = yes } + } + trigger_event = { on_action = wc_on_spell_progression days = 1 } + } } ## root is the caster @@ -73,106 +73,106 @@ wc_on_spell_progression = { ### Variables: spell_name, rank, targets_list (variable list), recipient, elemental_type (for elemental type), class (spell class), target_type ### e.g. var:current_spell_type = flag:decay wc_on_spell_cast_started = { - effect = { - if = { - limit = { - has_variable = current_target_type - var:current_target_type = flag:character - has_variable = spell_recipient - } - var:spell_recipient = { - save_scope_as = current_target_character - root = { - trigger_event = { - on_action = wc_on_spell_cast_started_character - } - } - } - } - else_if = { - limit = { - has_variable = current_target_type - var:current_target_type = flag:character_list - has_variable = spell_targets_list - } - - every_in_list = { - variable = spell_targets_list - save_scope_as = current_target_character - root = { - trigger_event = { - on_action = wc_on_spell_cast_started_character - } - } - } - } - else_if = { - limit = { - has_variable = current_target_type - var:current_target_type = flag:title - has_variable = spell_recipient - } - var:spell_recipient = { - save_scope_as = current_target_title - root = { - trigger_event = { - on_action = wc_on_spell_cast_started_title - } - } - } - } - else_if = { - limit = { - has_variable = current_target_type - var:current_target_type = flag:title_list - has_variable = spell_targets_list - } - - every_in_list = { - variable = spell_targets_list - save_scope_as = current_target_title - root = { - trigger_event = { - on_action = wc_on_spell_cast_started_title - } - } - } - } - - if = { - limit = { - var:current_spell_name = flag:conjure_refreshment - var:current_spell_rank < 3 - } - trigger_event = wc_magic_spell_events.2001 - } - - # Flame and Frost synergy - if = { - limit = { - spell_is_arcane_frost = { - SPELL = var:current_spell_name - } - } - remove_variable = freeze_time_mult - - set_variable = { - name = freeze_time_mult - value = { - value = 0.01 - multiply = var:current_cost - } - } - } - else_if = { - limit = { - spell_is_arcane_fire = { - SPELL = var:current_spell_name - } - } - remove_character_flag = frost_synergy - } - } + effect = { + if = { + limit = { + has_variable = current_target_type + var:current_target_type = flag:character + has_variable = spell_recipient + } + var:spell_recipient = { + save_scope_as = current_target_character + root = { + trigger_event = { + on_action = wc_on_spell_cast_started_character + } + } + } + } + else_if = { + limit = { + has_variable = current_target_type + var:current_target_type = flag:character_list + has_variable = spell_targets_list + } + + every_in_list = { + variable = spell_targets_list + save_scope_as = current_target_character + root = { + trigger_event = { + on_action = wc_on_spell_cast_started_character + } + } + } + } + else_if = { + limit = { + has_variable = current_target_type + var:current_target_type = flag:title + has_variable = spell_recipient + } + var:spell_recipient = { + save_scope_as = current_target_title + root = { + trigger_event = { + on_action = wc_on_spell_cast_started_title + } + } + } + } + else_if = { + limit = { + has_variable = current_target_type + var:current_target_type = flag:title_list + has_variable = spell_targets_list + } + + every_in_list = { + variable = spell_targets_list + save_scope_as = current_target_title + root = { + trigger_event = { + on_action = wc_on_spell_cast_started_title + } + } + } + } + + if = { + limit = { + var:current_spell_name = flag:conjure_refreshment + var:current_spell_rank < 3 + } + trigger_event = wc_magic_spell_events.2001 + } + + # Flame and Frost synergy + if = { + limit = { + spell_is_arcane_frost = { + SPELL = var:current_spell_name + } + } + remove_variable = freeze_time_mult + + set_variable = { + name = freeze_time_mult + value = { + value = 0.01 + multiply = var:current_cost + } + } + } + else_if = { + limit = { + spell_is_arcane_fire = { + SPELL = var:current_spell_name + } + } + remove_character_flag = frost_synergy + } + } } ## root is the caster @@ -183,9 +183,9 @@ wc_on_spell_cast_started = { ### Variables: spell_name, rank, targets_list (variable list), recipient, elemental_type (for elemental type), class (spell class), target_type ### e.g. var:current_spell_type = flag:decay wc_on_spell_cast_started_character = { - effect = { + effect = { - } + } } ## root is the caster @@ -196,9 +196,9 @@ wc_on_spell_cast_started_character = { ### Variables: spell_name, rank, targets_list (variable list), recipient, elemental_type (for elemental type), class (spell class), target_type ### e.g. var:current_spell_type = flag:decay wc_on_spell_cast_started_title = { - effect = { + effect = { - } + } } ## root is the caster @@ -210,133 +210,205 @@ wc_on_spell_cast_started_title = { ### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost ### e.g. var:casted_spell = flag:lava_lash wc_on_spell_cast_before_cast = { - effect = { - if = { - limit = { - has_variable = casted_target_type - var:casted_target_type = flag:character - has_variable = casted_recipient - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - } - if = { - limit = { - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - NOT = { - var:casted_spell = flag:spellsteal - } - var:casted_recipient = { - has_character_modifier = wc_counterspell_modifier - } - } - var:casted_recipient = { - remove_character_modifier = wc_counterspell_modifier - } - set_variable = { - name = should_reflect - value = yes - } - } - else_if = { - limit = { - var:casted_recipient = { - has_character_modifier = wc_frost_armor_modifier - } - } - root = { - save_scope_as = ice_caster - } - var:casted_recipient = { - save_scope_as = blocker - trigger_event = wc_magic_spell_events.0001 - } - root = { - send_interface_toast = { - title = wc_ice_block - left_icon = var:$SPELL$_recipient - right_icon = root - custom_tooltip = wc_iceblock_tt - } - } - set_variable = { - name = should_cast - value = no - } - } - } - else_if = { - limit = { - has_variable = casted_target_type - var:casted_target_type = flag:character_list - has_variable = casted_targets_list - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - } - if = { - limit = { - any_in_list = { - variable = casted_targets_list - has_character_modifier = wc_counterspell_modifier - } - NOT = { - var:casted_spell = flag:spellsteal - } - } - every_in_list = { - variable = casted_targets_list - limit = { - has_character_modifier = wc_counterspell_modifier - } - remove_character_modifier = wc_counterspell_modifier - set_variable = { - name = should_include - value = no - } - root = { - set_variable = { - name = should_reflect - value = yes - } - } - } - } - else_if = { - limit = { - any_in_list = { - variable = casted_targets_list - has_character_modifier = wc_frost_armor_modifier - } - } - every_in_list = { - variable = casted_targets_list - limit = { - has_character_modifier = wc_frost_armor_modifier - } - root = { - save_scope_as = ice_caster - } - save_scope_as = blocker - trigger_event = wc_magic_spell_events.0001 - root = { - send_interface_toast = { - title = wc_ice_block - left_icon = var:$SPELL$_recipient - right_icon = root - custom_tooltip = wc_iceblock_tt - } - } - set_variable = { - name = should_include - value = no - } - } - } - } - } + effect = { + if = { + limit = { + has_variable = casted_target_type + var:casted_target_type = flag:character + has_variable = casted_recipient + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + if = { + limit = { + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + NOT = { + var:casted_spell = flag:spellsteal + } + var:casted_recipient = { + has_character_modifier = wc_counterspell_modifier + } + } + var:casted_recipient = { + remove_character_modifier = wc_counterspell_modifier + } + set_variable = { + name = should_reflect + value = yes + } + } + else_if = { + limit = { + var:casted_recipient = { + has_character_modifier = wc_frost_armor_modifier + } + } + root = { + save_scope_as = ice_caster + } + var:casted_recipient = { + save_scope_as = blocker + trigger_event = wc_magic_spell_events.0001 + } + root = { + send_interface_toast = { + title = wc_ice_block + left_icon = var:$SPELL$_recipient + right_icon = root + custom_tooltip = wc_iceblock_tt + } + } + set_variable = { + name = should_cast + value = no + } + } + else_if = { + limit = { + var:casted_recipient = { + has_character_modifier = wc_divine_shield_modifier + } + NOT = { var:casted_class = flag:light } + } + var:casted_recipient = { + save_scope_as = blocker + send_interface_toast = { + title = wc_spell_blocked + left_icon = scope:blocker + right_icon = root + custom_tooltip = wc_divine_shield_tt_self + remove_character_modifier = wc_divine_shield_modifier + } + } + root = { + send_interface_toast = { + title = wc_spell_blocked + left_icon = scope:blocker + right_icon = root + custom_tooltip = wc_divine_shield_tt + show_as_tooltip = { + var:casted_recipient = { + remove_character_modifier = wc_divine_shield_modifier + } + } + } + } + set_variable = { + name = should_cast + value = no + } + } + } + else_if = { + limit = { + has_variable = casted_target_type + var:casted_target_type = flag:character_list + has_variable = casted_targets_list + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + if = { + limit = { + any_in_list = { + variable = casted_targets_list + has_character_modifier = wc_counterspell_modifier + } + NOT = { + var:casted_spell = flag:spellsteal + } + } + every_in_list = { + variable = casted_targets_list + limit = { + has_character_modifier = wc_counterspell_modifier + } + remove_character_modifier = wc_counterspell_modifier + set_variable = { + name = should_include + value = no + } + root = { + set_variable = { + name = should_reflect + value = yes + } + } + } + } + else_if = { + limit = { + any_in_list = { + variable = casted_targets_list + has_character_modifier = wc_frost_armor_modifier + } + } + every_in_list = { + variable = casted_targets_list + limit = { + has_character_modifier = wc_frost_armor_modifier + } + root = { + save_scope_as = ice_caster + } + save_scope_as = blocker + trigger_event = wc_magic_spell_events.0001 + root = { + send_interface_toast = { + title = wc_ice_block + left_icon = var:$SPELL$_recipient + right_icon = root + custom_tooltip = wc_iceblock_tt + } + } + set_variable = { + name = should_include + value = no + } + } + } + else_if = { + limit = { + any_in_list = { + variable = casted_targets_list + has_character_modifier = wc_divine_shield_modifier + } + NOT = { var:casted_class = flag:light } + } + every_in_list = { + variable = casted_targets_list + save_scope_as = blocker + send_interface_toast = { + title = wc_spell_blocked + left_icon = scope:blocker + right_icon = root + custom_tooltip = wc_divine_shield_tt_self + remove_character_modifier = wc_divine_shield_modifier + } + root = { + send_interface_toast = { + title = wc_spell_blocked + left_icon = scope:blocker + right_icon = root + custom_tooltip = wc_divine_shield_tt + show_as_tooltip = { + scope:blocker = { + remove_character_modifier = wc_divine_shield_modifier + } + } + } + } + } + set_variable = { + name = should_cast + value = no + } + } + } + } } ## root is the caster @@ -345,12 +417,12 @@ wc_on_spell_cast_before_cast = { ### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost ### e.g. var:casted_spell = flag:lava_lash wc_on_spell_cast_finish = { - effect = { - # MOVED EVERYTHING INTO SCRIPTED EFFECTS BECAUSE ON_ACTIONS DONT HOT UPDATE ANYMORE - record_magic_stats_effect = yes + effect = { + # MOVED EVERYTHING INTO SCRIPTED EFFECTS BECAUSE ON_ACTIONS DONT HOT UPDATE ANYMORE + record_magic_stats_effect = yes - wc_on_spell_cast_finish_effect = yes - } + wc_on_spell_cast_finish_effect = yes + } } ## root is the caster @@ -361,198 +433,326 @@ wc_on_spell_cast_finish = { ### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost ### e.g. var:casted_spell = flag:lava_lash wc_on_spell_cast_finish_character = { - effect = { - # Send interface message to target - if = { - limit = { - NOT = { scope:current_target_character = root } - } - scope:current_target_character = { - save_temporary_scope_as = castee - } - scope:castee = { - root = { - save_temporary_scope_as = caster - } - set_variable = { - name = on_casted_spell - value = root.var:casted_spell - } - send_interface_message = { - title = spell_cast_on_you_title - custom_tooltip = spell_cast_on_you_desc - } - } - - if = { - limit = { - NOT = { - root = scope:current_target_character - } - scope:current_target_character = { - has_perk = order_magic_tree_2_perk_1 - } - } - - scope:current_target_character = { - send_interface_toast = { - title = wc_aether_tap_title - left_icon = scope:current_target_character - wc_change_mana_by_value_effect = { - CHANGE = add - VALUE = 5 - } - } - } - } - - if = { - limit = { - scope:current_target_character = { - is_courtier = yes - NOT = { - root = court_owner - } - court_owner = { - has_perk = order_magic_tree_2_perk_1 - } - } - } - scope:current_target_character = { - court_owner = { - save_scope_as = aether_tapper - } - } - } - else_if = { - limit = { - scope:current_target_character = { - is_councillor = yes - is_ruler = no - NOT = { - root = employer - } - employer = { - has_perk = order_magic_tree_2_perk_1 - } - } - } - scope:current_target_character = { - employer = { - save_scope_as = aether_tapper - } - } - } - - scope:aether_tapper ?= { - send_interface_toast = { - title = wc_aether_tap_title - left_icon = this - wc_change_mana_by_value_effect = { - CHANGE = add - VALUE = 5 - } - } - } - } - - # Clear Scorch cooldown when hit with elemental or fel hostile magic - if = { - limit = { - NOT = { scope:current_target_character = root } - OR = { - var:casted_class = flag:elemental_fire - var:casted_class = flag:elemental_earth - var:casted_class = flag:elemental_water - var:casted_class = flag:elemental_air - var:casted_class = flag:disorder - } - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - } - - scope:current_target_character = { - remove_spell_cooldown_effect = { SPELL = scorch } - } - } - - # Burn caster when target has Fire Shield - if = { - limit = { - scope:current_target_character = { - has_character_modifier = wc_fire_shield_modifier - } - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - } - - # TODO: Maybe remove Fire Shield modifier? - - root = { - add_or_increase_burned_effect = yes - - send_interface_toast = { - title = wc_spell_reflected - left_icon = root - right_icon = scope:current_target_character - custom_tooltip = wc_fire_shield_reflect_tt - } - } - } - - # Netherburn - if = { - limit = { - NOT = { - has_character_flag = netherburn_triggered - } - var:casted_class = flag:order - has_perk = order_magic_tree_4_perk_2 - spell_is_harmful_trigger = { - SPELL = var:casted_spell - } - } - scope:current_target_character = { - save_scope_value_as = { - name = spell_dodge_chance - value = wc_order_magic_resistance_dodge_value - } - } - random_list = { - 25 = { - burned_target_frostbite_modifier = { TARGET = var:casted_recipient CHANGE = add } - scope:current_target_character = { - add_or_increase_burned_effect = yes - add_opinion = { - modifier = wc_burned_me - target = scope:current_target_character - } - } - - send_interface_toast = { - title = wc_netherburn_triggered - left_icon = root - right_icon = scope:current_target_character - custom_tooltip = wc_netherburn_tt - } - - add_character_flag = { - flag = netherburn_triggered - years = 1 - } - } - 75 = { - modifier = { - is_alive = yes - add = scope:spell_dodge_chance - } - burned_target_frostbite_modifier = { TARGET = var:casted_recipient CHANGE = subtract } - } - } - } - } + effect = { + # Send interface message to target + if = { + limit = { + NOT = { scope:current_target_character = root } + } + scope:current_target_character = { + save_temporary_scope_as = castee + } + scope:castee = { + root = { + save_temporary_scope_as = caster + } + set_variable = { + name = on_casted_spell + value = root.var:casted_spell + } + send_interface_message = { + title = spell_cast_on_you_title + custom_tooltip = spell_cast_on_you_desc + } + } + + if = { + limit = { + NOT = { + root = scope:current_target_character + } + scope:current_target_character = { + has_perk = order_magic_tree_2_perk_1 + } + } + + scope:current_target_character = { + send_interface_toast = { + title = wc_aether_tap_title + left_icon = scope:current_target_character + wc_change_mana_by_value_effect = { + CHANGE = add + VALUE = 5 + } + } + } + } + + if = { + limit = { + scope:current_target_character = { + is_courtier = yes + NOT = { + root = court_owner + } + court_owner = { + has_perk = order_magic_tree_2_perk_1 + } + } + } + scope:current_target_character = { + court_owner = { + save_scope_as = aether_tapper + } + } + } + else_if = { + limit = { + scope:current_target_character = { + is_councillor = yes + is_ruler = no + NOT = { + root = employer + } + employer = { + has_perk = order_magic_tree_2_perk_1 + } + } + } + scope:current_target_character = { + employer = { + save_scope_as = aether_tapper + } + } + } + + scope:aether_tapper ?= { + send_interface_toast = { + title = wc_aether_tap_title + left_icon = this + wc_change_mana_by_value_effect = { + CHANGE = add + VALUE = 5 + } + } + } + } + + # Clear Scorch cooldown when hit with elemental or fel hostile magic + if = { + limit = { + NOT = { scope:current_target_character = root } + OR = { + var:casted_class = flag:elemental_fire + var:casted_class = flag:elemental_earth + var:casted_class = flag:elemental_water + var:casted_class = flag:elemental_air + var:casted_class = flag:disorder + } + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + + scope:current_target_character = { + remove_spell_cooldown_effect = { SPELL = scorch } + } + } + + # Burn caster when target has Fire Shield + if = { + limit = { + scope:current_target_character = { + has_character_modifier = wc_fire_shield_modifier + } + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + + # TODO: Maybe remove Fire Shield modifier? + + root = { + add_or_increase_burned_effect = yes + + send_interface_toast = { + title = wc_spell_reflected + left_icon = root + right_icon = scope:current_target_character + custom_tooltip = wc_fire_shield_reflect_tt + } + } + } + + # Netherburn + if = { + limit = { + NOT = { + has_character_flag = netherburn_triggered + } + var:casted_class = flag:order + has_perk = order_magic_tree_4_perk_2 + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + scope:current_target_character = { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_order_magic_resistance_dodge_value + } + } + random_list = { + 25 = { + burned_target_frostbite_modifier = { TARGET = var:casted_recipient CHANGE = add } + scope:current_target_character = { + add_or_increase_burned_effect = yes + add_opinion = { + modifier = wc_burned_me + target = scope:current_target_character + } + } + + send_interface_toast = { + title = wc_netherburn_triggered + left_icon = root + right_icon = scope:current_target_character + custom_tooltip = wc_netherburn_tt + } + + add_character_flag = { + flag = netherburn_triggered + years = 1 + } + } + 75 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + burned_target_frostbite_modifier = { TARGET = var:casted_recipient CHANGE = subtract } + } + } + } + + # If spell is hostile + if = { + limit = { + spell_is_harmful_trigger = { + SPELL = var:casted_spell + } + } + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier + scope:current_target_character = { + NOT = { has_character_modifier = wc_vengeance_aura_modifier_negative } + } + } + scope:current_target_character = { + send_interface_message = { + title = wc_vengeance_aura_title + add_character_modifier = { + modifier = wc_vengeance_aura_modifier_negative + months = 6 + } + } + } + } + if = { + limit = { + scope:current_target_character = { + has_character_flag = wc_retribution_aura_flag + NOT = { has_character_modifier = wc_retribution_aura_modifier } + } + } + scope:current_target_character = { + send_interface_message = { + title = wc_retribution_aura_title + add_character_modifier = { + modifier = wc_retribution_aura_modifier + months = 6 + } + } + } + } + if = { + limit = { + scope:current_target_character = { has_trait = holy_wrath } + } + random_list = { + 90 = {} + 10 = { + if = { + limit = { + NOT = { + scope:current_target_character = root + } + } + root = { + send_interface_message = { + title = trait_holy_wrath + show_as_tooltip = { + scope:current_target_character = { + add_or_increase_burned_effect = yes + } + } + } + } + } + scope:current_target_character = { + send_interface_message = { + title = trait_holy_wrath + add_or_increase_burned_effect = yes + } + } + } + } + } + } + + # Echo of Light + if = { + limit = { + var:casted_class = flag:light + has_perk = light_magic_tree_1_perk_7 + OR = { + spell_is_helpful_trigger = { + SPELL = var:casted_spell + } + spell_is_dispel_type_trigger = { + SPELL = var:casted_spell + } + var:casted_spell = flag:salvation + } + } + scope:current_target_character = { + random_list = { + 75 = { + send_interface_message = { + title = wc_echo_of_light_modifier + add_character_modifier = { + modifier = wc_echo_of_light_modifier + months = 3 + } + } + if = { + limit = { + NOT = { + scope:current_target_character = root + } + } + root = { + send_interface_message = { + title = wc_echo_of_light_modifier + left_icon = root + show_as_tooltip = { + scope:current_target_character = { + add_character_modifier = { + modifier = wc_echo_of_light_modifier + months = 3 + } + } + } + } + } + } + } + 25 = {} + } + } + } + } } ## root is the caster @@ -563,32 +763,32 @@ wc_on_spell_cast_finish_character = { ### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost ### e.g. var:casted_spell = flag:lava_lash wc_on_spell_cast_finish_title = { - effect = { - # Send interface message to target - if = { - limit = { - NOT = { scope:current_target_title.holder = root } - } - scope:current_target_title.holder = { - save_temporary_scope_as = castee - } - scope:castee = { - root = { - save_temporary_scope_as = caster - } - set_variable = { - name = on_casted_spell - value = root.var:casted_spell - } - send_interface_message = { - title = spell_cast_on_you_title - custom_tooltip = spell_cast_on_you_desc - } - } - } - - backdraft_check_effect = yes - } + effect = { + # Send interface message to target + if = { + limit = { + NOT = { scope:current_target_title.holder = root } + } + scope:current_target_title.holder = { + save_temporary_scope_as = castee + } + scope:castee = { + root = { + save_temporary_scope_as = caster + } + set_variable = { + name = on_casted_spell + value = root.var:casted_spell + } + send_interface_message = { + title = spell_cast_on_you_title + custom_tooltip = spell_cast_on_you_desc + } + } + } + + backdraft_check_effect = yes + } } ## root is the caster ### upon canceling spell, after refunding mana and everything ### @@ -596,7 +796,7 @@ wc_on_spell_cast_finish_title = { ### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost ### e.g. var:cancelled_spell = flag:lava_lash wc_on_spell_cast_cancelled = { - effect = { + effect = { - } + } } \ No newline at end of file diff --git a/common/opinion_modifiers/wc_magic_opinions.txt b/common/opinion_modifiers/wc_magic_opinions.txt index a3993c5fa1..6e9d57f6ea 100644 --- a/common/opinion_modifiers/wc_magic_opinions.txt +++ b/common/opinion_modifiers/wc_magic_opinions.txt @@ -26,4 +26,36 @@ wc_frostbit_me = { decaying = yes years = 5 stacking = yes +} + +wc_wrathed_me = { + opinion = -20 + decaying = yes + years = 5 + stacking = yes +} + +wc_shocked_me = { + opinion = -30 + decaying = yes + years = 5 + stacking = yes +} + +wc_healed_me = { + opinion = 20 + decaying = yes + years = 5 + stacking = yes +} + +wc_poisoned_me = { + opinion = -20 + decaying = yes + years = 5 + stacking = yes +} + +wc_saved_me_salvation = { + opinion = 50 } \ No newline at end of file diff --git a/common/script_values/99_court_chaplain_values.txt b/common/script_values/99_court_chaplain_values.txt index d63fcffda0..f5b7a7790c 100644 --- a/common/script_values/99_court_chaplain_values.txt +++ b/common/script_values/99_court_chaplain_values.txt @@ -319,6 +319,12 @@ court_chaplain_fabricate_claim_innovation_bonus_expansionism = { multiply = 0.50 } +court_chaplain_fabricate_claim_divine_service_perk = { + value = 0 + add = court_chaplain_fabricate_claim_base_total + multiply = 0.1 +} + # Relation impact court_chaplain_fabricate_claim_monthly_increase_friend_bonus = { value = court_chaplain_fabricate_claim_base_total diff --git a/common/script_values/wc_magic_spell_values.txt b/common/script_values/wc_magic_spell_values.txt index f796925894..391b8098ea 100644 --- a/common/script_values/wc_magic_spell_values.txt +++ b/common/script_values/wc_magic_spell_values.txt @@ -6,11 +6,13 @@ wc_spell_mana_cost_medium_2 = 27 wc_spell_mana_cost_high = 31 wc_spell_mana_cost_high_2 = 35 +wc_spell_dispel_type_mana_cost = 40 + wc_spell_rank_2_mana_cost_mult = 1.5 wc_spell_rank_3_mana_cost_mult = 2.5 wc_spell_2_targets_mana_cost_mult = 1.3 wc_spell_3_targets_mana_cost_mult = 1.5 -# All rituals cost 50% of max mana base, up to 150 mana +# All rituals cost 50% of max mana base, up to 150 mana (1-2 exceptions) # Add cooldown modifiers # Add cast time modifiers # Add mana cost modifiers @@ -29,8 +31,15 @@ wc_spell_cooldown_short = 120 wc_spell_cooldown_medium = 180 wc_spell_cooldown_long = 270 wc_spell_cooldown_very_long = 450 +wc_spell_cooldown_dispel_personal_short = 180 +wc_spell_cooldown_dispel_personal_medium = 270 +wc_spell_cooldown_dispel_personal_long = 360 +wc_spell_cooldown_dispel_rank_1 = 360 +wc_spell_cooldown_dispel_rank_2 = 530 +wc_spell_cooldown_dispel_rank_3 = 720 wc_spell_cooldown_ritual_short = 1095 # 3 years, but it starts at 2 years technically wc_spell_cooldown_ritual = 1825 # 5 years +wc_spell_cooldown_ritual_medium = 2735 #~7.5 years wc_spell_cooldown_ritual_long = 3650 # 10 years ## BASE VALUES ## @@ -236,6 +245,45 @@ wc_magic_cast_time_value = { # Use for changing Cast time for ALL spells (multip format = "WC_MAX_MANA_VALUE_FORMAT_PER" } } + if = { + limit = { + has_character_modifier = wc_rebuke_modifier + } + multiply = { + value = 1 + add = { + add = 0.25 + desc = wc_rebuke_modifier + format = "WC_MAX_MANA_VALUE_FORMAT_PER" + } + } + } + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + multiply = { + value = 1 + add = { + add = 0.10 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT_PER" + } + } + } + if = { + limit = { + has_character_modifier = wc_retribution_aura_modifier + } + multiply = { + value = 1 + subtract = { + add = 0.15 + desc = wc_retribution_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT_PER" + } + } + } } wc_magic_duration_value = { # Use for changing Duration for ALL spells (multiply this value) value = 1 @@ -286,6 +334,18 @@ wc_elemental_magic_cast_time_value = { # Use for changing Cast time for ALL elem wc_elemental_magic_duration_value = { # Use for changing Duration for ALL elemental spells (multiply this value) value = 1 } +wc_nonelemental_magic_mana_cost_value = { # Use for changing Mana cost for ALL non elemental spells (multiply this value) + value = 1 +} +wc_nonelemental_magic_cooldown_value = { # Use for changing Cooldown cost for ALL non elemental spells (multiply this value) + value = 1 +} +wc_nonelemental_magic_cast_time_value = { # Use for changing Cast time for ALL non elemental spells (multiply this value) + value = 1 +} +wc_nonelemental_magic_duration_value = { # Use for changing Duration for ALL non elemental spells (multiply this value) + value = 1 +} ############################################################################################## ELEMENTAL FIRE MAGIC ####################################################### ################################################ GENERAL VALUES ################################################ wc_elemental_fire_magic_mana_cost_value = { # Use for changing Mana cost for ALL elemental fire spells (multiply this value) @@ -361,7 +421,7 @@ wc_elemental_fire_magic_duration_value = { # Use for changing Duration for ALL e wc_spell_none_duration_days_value = 0 # Error suppression ### SUMMON FIRE ELEMENTAL ### -wc_spell_summon_fire_elemental_rank_1_cost_mana_base_value = 7 +wc_spell_summon_fire_elemental_rank_1_cost_mana_base_value = wc_spell_mana_cost_low wc_spell_summon_fire_elemental_duration_days_base_value = 200 wc_spell_summon_fire_elemental_rank_1_cooldown_days_base_value = wc_spell_cooldown_short wc_spell_summon_fire_elemental_rank_2_cooldown_days_base_value = wc_spell_cooldown_medium @@ -381,7 +441,7 @@ wc_spell_summon_fire_elemental_cost_mana_value = { } if = { limit = { - var:current_spell_rank = 2 + var:current_spell_rank ?= 2 } add = { value = { @@ -394,7 +454,7 @@ wc_spell_summon_fire_elemental_cost_mana_value = { } else_if = { limit = { - var:current_spell_rank = 3 + var:current_spell_rank ?= 3 } add = { value = { @@ -419,13 +479,8 @@ wc_spell_summon_fire_elemental_cooldown_value = { if = { limit = { OR = { - AND = { - has_variable = current_spell_rank - OR = { - var:current_spell_rank = 0 - var:current_spell_rank = 1 - } - } + var:current_spell_rank ?= 0 + var:current_spell_rank ?= 1 NOT = { has_variable = current_spell_rank } } } @@ -483,7 +538,6 @@ wc_spell_summon_fire_elemental_cast_time_value = { round = yes } - wc_spell_summon_fire_elemental_duration_days_value = { min = 5 value = { @@ -584,7 +638,7 @@ wc_spell_lava_lash_duration_days_value = { ### LAVA LASH ### ### BACKDRAFT ### -wc_spell_backdraft_cost_base_mana_value = wc_spell_mana_cost_low +wc_spell_backdraft_cost_base_mana_value = 6 wc_spell_backdraft_cost_mana_value = { value = { @@ -600,7 +654,7 @@ wc_spell_backdraft_cost_mana_value = { } if = { limit = { - var:current_spell_rank = 2 + var:current_spell_rank ?= 2 } add = { value = { @@ -613,7 +667,7 @@ wc_spell_backdraft_cost_mana_value = { } else_if = { limit = { - var:current_spell_rank = 3 + var:current_spell_rank ?= 3 } add = { value = { @@ -706,7 +760,7 @@ wc_spell_backdraft_duration_days_value = { ### BACKDRAFT ### ### FLAME WALL ### -wc_spell_flame_wall_base_mana_value = wc_spell_mana_cost_medium +wc_spell_flame_wall_base_mana_value = 11 wc_spell_flame_wall_cost_mana_value = { value = { add = { @@ -722,7 +776,7 @@ wc_spell_flame_wall_cost_mana_value = { } if = { limit = { - var:current_spell_rank = 2 + var:current_spell_rank ?= 2 } add = { value = { @@ -735,7 +789,7 @@ wc_spell_flame_wall_cost_mana_value = { } else_if = { limit = { - var:current_spell_rank = 3 + var:current_spell_rank ?= 3 } add = { value = { @@ -793,7 +847,7 @@ wc_spell_flame_wall_duration_days_value = { } ### FLAME WALL ### ### FLAME SHOCK ### -wc_spell_flame_shock_base_mana_value = wc_spell_mana_cost_medium +wc_spell_flame_shock_base_mana_value = 8 wc_spell_flame_shock_cost_mana_value = { value = { add = { @@ -809,7 +863,7 @@ wc_spell_flame_shock_cost_mana_value = { } if = { limit = { - var:current_spell_rank = 2 + var:current_spell_rank ?= 2 } add = { value = { @@ -822,7 +876,7 @@ wc_spell_flame_shock_cost_mana_value = { } else_if = { limit = { - var:current_spell_rank = 3 + var:current_spell_rank ?= 3 } add = { value = { @@ -868,7 +922,7 @@ wc_spell_flame_shock_cooldown_value = { wc_spell_flame_shock_duration_days_value = 0 ### FLAME SHOCK ### ### BURNOUT ### -wc_spell_burnout_base_mana_value = wc_spell_mana_cost_low_2 +wc_spell_burnout_base_mana_value = 7 wc_spell_burnout_cost_mana_value = { value = { add = { @@ -884,7 +938,7 @@ wc_spell_burnout_cost_mana_value = { } if = { limit = { - var:current_spell_rank = 2 + var:current_spell_rank ?= 2 } add = { value = { @@ -897,7 +951,7 @@ wc_spell_burnout_cost_mana_value = { } else_if = { limit = { - var:current_spell_rank = 3 + var:current_spell_rank ?= 3 } add = { value = { @@ -1033,7 +1087,7 @@ wc_spell_planar_fire_duration_days_value = { # Duration for the effects } ## RITUAL: PLANAR FIRE ## ## CAUTERIZE WOUND ## -wc_spell_cauterize_wound_base_mana_value = wc_spell_mana_cost_medium +wc_spell_cauterize_wound_base_mana_value = 5 wc_spell_cauterize_wound_cost_mana_value = { value = { add = { @@ -1166,7 +1220,7 @@ wc_spell_vernal_solstice_cast_time_value = { } wc_spell_vernal_solstice_cooldown_value = { value = { - add = wc_spell_cooldown_ritual_long + add = wc_spell_cooldown_ritual desc = wc_mana_base_value_desc format = "WC_MAX_MANA_VALUE_FORMAT" } @@ -2307,4 +2361,1038 @@ wc_spell_blizzard_duration_days_value = { multiply = wc_magic_duration_value round = yes } -## BLIZZARD ## \ No newline at end of file +## BLIZZARD ## +############################################################################################## LIGHT MAGIC ####################################################### +################################################ GENERAL VALUES ################################################ +wc_light_magic_mana_cost_value = { # Use for changing Mana cost for ALL LIGHT spells (multiply this value) + value = 1 +} +wc_light_magic_cooldown_value = { # Use for changing Cooldown for ALL LIGHT fire spells (multiply this value) + value = 1 + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = -0.3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT_PER" + } + } + if = { + limit = { + has_character_modifier = wc_retribution_aura_modifier + } + add = { + value = -0.25 + desc = wc_retribution_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT_PER" + } + } +} +wc_light_magic_cast_time_value = { # Use for changing Cast time for ALL LIGHT spells (multiply this value) + value = 1 +} +wc_light_magic_duration_value = { # Use for changing Duration for ALL LIGHT spells (multiply this value) + value = 1 +} +### DISPEL ### +wc_spell_dispel_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_medium_2 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_dispel_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_very_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_dispel_cast_time_value = { + min = 0 + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### DISPEL ### +### Flash of Light ### +wc_spell_flash_of_light_duration_days_value = 0 +wc_spell_flash_of_light_cost_mana_value = { + value = { + add = { + value = wc_spell_dispel_type_mana_cost + 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 + } + add = { + value = { + add = 12 + multiply = 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 + } + add = { + value = { + add = 18 + multiply = wc_spell_rank_3_mana_cost_mult + } + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_flash_of_light_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_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_flash_of_light_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### Flash of Light ### +### Lightwell & Holy Fire ### +wc_spell_lightwell_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_low + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_lightwell_cooldown_value = { + min = 0 + add = { + value = { + add = wc_spell_cooldown_long + } + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_base_value_desc + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_lightwell_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +wc_spell_lightwell_duration_days_value = { + min = 5 + value = { + add = 275 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +wc_spell_holy_fire_cost_mana_value = { + value = wc_spell_lightwell_cost_mana_value +} +wc_spell_holy_fire_cooldown_value = { + value = wc_spell_lightwell_cooldown_value +} +wc_spell_holy_fire_cast_time_value = { + value = wc_spell_lightwell_cast_time_value +} +wc_spell_holy_fire_duration_days_value = { + value = wc_spell_lightwell_duration_days_value +} +### Lightwell & Holy Fire ### +### Bless ### +wc_spell_bless_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_low + 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 + } + add = { + value = { + add = wc_spell_mana_cost_low + multiply = 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 + } + add = { + value = { + add = wc_spell_mana_cost_low + multiply = wc_spell_rank_3_mana_cost_mult + } + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_bless_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_medium + } + 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_medium + add = 45 + 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_medium + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_bless_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_medium + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +wc_spell_bless_duration_days_value = { + min = 5 + value = { + add = 365 + 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 + } + add = { + value = 365 + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_2_value_desc + } + } + else_if = { + limit = { + var:current_spell_rank ?= 3 + } + add = { + value = 730 + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + } + + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +### Bless ### +### Consecration ### +wc_spell_consecration_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_high + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_consecration_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_consecration_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_short + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +wc_spell_consecration_duration_days_value = { + min = 5 + value = { + add = 270 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +wc_consecration_spell_duration = { + value = 0 + add = scope:consecration_duration +} +### Consecration ### +### Rebuke ### +wc_spell_rebuke_duration_days_value = 0 +wc_spell_rebuke_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 + } + add = { + value = { + add = 15 + multiply = 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 + } + add = { + value = { + add = 18 + multiply = wc_spell_rank_3_mana_cost_mult + } + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_rebuke_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_medium + } + 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_medium + add = 45 + 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_long + format = "WC_MAX_MANA_VALUE_FORMAT" + desc = wc_mana_rank_3_value_desc + } + } + + } + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_rebuke_cast_time_value = { + min = 0 + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### Rebuke ### +### Avenging Wrath ### +wc_spell_avenging_wrath_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_high + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_avenging_wrath_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_very_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_avenging_wrath_cast_time_value = { + min = 0 + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### Avenging Wrath ### +### Judgement ### +wc_spell_judgement_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_medium_2 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_judgement_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_very_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_judgement_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_very_short + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### Judgement ### +### Divine Shield ### +wc_spell_divine_shield_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_medium + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_divine_shield_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_short + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_divine_shield_cast_time_value = { + min = 0 + value = { + add = wc_spell_cast_time_very_short + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +wc_spell_divine_shield_duration_days_value = { + min = 5 + value = { + add = 365 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +### Divine Shield ### +### Exorcism ### +wc_spell_exorcism_cost_mana_value = { + value = { + add = { + value = wc_spell_mana_cost_medium_2 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + 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 + } + } + + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_exorcism_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_medium + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_exorcism_cast_time_value = { + min = 0 + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +wc_spell_exorcism_duration_days_value = { + min = 5 + value = { + add = 365 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +### Exorcism ### +### Expulsion ### +wc_spell_expulsion_duration_days_value = 0 +wc_spell_expulsion_cost_mana_value = { + value = { + add = { + value = wc_spell_dispel_type_mana_cost + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + multiply = wc_light_magic_mana_cost_value + multiply = wc_nonelemental_magic_mana_cost_value + multiply = wc_magic_mana_cost_value + + round = yes +} +wc_spell_expulsion_cooldown_value = { + min = 0 + + value = { + add = wc_spell_cooldown_very_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + + round = yes +} +wc_spell_expulsion_cast_time_value = { + min = 0 + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + + round = yes +} +### Expulsion ### +### Salvation ### +wc_spell_salvation_cost_mana_value = { + value = { + add = { + value = { + add = wc_max_mana_value + multiply = 0.9 + } + } + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + round = yes +} +wc_spell_salvation_cast_time_value = { + value = { + add = wc_spell_cast_time_ritual + add = 115 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + min = 0 + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + round = yes +} +wc_spell_salvation_cooldown_value = { + value = { + add = wc_spell_cooldown_ritual_long + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + round = yes +} +### Salvation ### +### Divine Storm ### +wc_spell_divine_storm_cost_mana_value = { + value = { + add = { + value = { + add = wc_max_mana_value + multiply = 0.5 + } + } + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + max = 150 + round = yes +} +wc_spell_divine_storm_cast_time_value = { + value = { + add = wc_spell_cast_time_ritual + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + min = 0 + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + round = yes +} +wc_spell_divine_storm_cooldown_value = { + value = { + add = wc_spell_cooldown_ritual_medium + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + round = yes +} +wc_spell_divine_storm_duration_days_value = { + min = 5 + value = { + add = 365 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +### Divine Storm ### +### Blessed Bastion ### +wc_spell_blessed_bastion_cost_mana_value = { + value = { + add = { + value = { + add = wc_max_mana_value + multiply = 0.5 + } + } + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + max = 150 + round = yes +} +wc_spell_blessed_bastion_cast_time_value = { + value = { + add = 0 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + min = 0 + multiply = wc_light_magic_cast_time_value + multiply = wc_nonelemental_magic_cast_time_value + multiply = wc_magic_cast_time_value + round = yes +} +wc_spell_blessed_bastion_cooldown_value = { + value = { + add = wc_spell_cooldown_ritual + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + multiply = wc_light_magic_cooldown_value + multiply = wc_nonelemental_magic_cooldown_value + multiply = wc_magic_cooldown_value + round = yes +} +wc_spell_blessed_bastion_duration_days_value = { + min = 5 + value = { + add = 730 + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + + multiply = wc_light_magic_duration_value + multiply = wc_nonelemental_magic_duration_value + multiply = wc_magic_duration_value + + round = yes +} +### Blessed Bastion ### \ No newline at end of file diff --git a/common/script_values/wc_magic_values.txt b/common/script_values/wc_magic_values.txt index 7e2017fd72..63314ae8bd 100644 --- a/common/script_values/wc_magic_values.txt +++ b/common/script_values/wc_magic_values.txt @@ -743,6 +743,17 @@ wc_max_mana_value = { } } + if = { + limit = { + has_perk = light_magic_tree_3_perk_4 + } + add = { + value = 10 + desc = light_magic_tree_3_perk_4_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + multiply = { value = 1 @@ -768,6 +779,7 @@ wc_max_mana_value = { } } + if = { limit = { has_variable = reverse_causality_mult @@ -841,6 +853,17 @@ wc_mana_regeneration_value = { } } + if = { + limit = { has_character_modifier = wc_blessed_bastion_modifier } + + add = { + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + + value = 1 + } + } + multiply = { # Mana Regeneration value = 1 @@ -918,6 +941,17 @@ wc_mana_regeneration_value = { value = 0.50 } } + + if = { + limit = { + has_character_modifier = wc_concentration_aura_modifier + } + add = { + desc = wc_concentration_aura_modifier + format = "WC_MANA_REGENERATION_VALUE_PERCENTAGE_FORMAT" + value = 0.1 + } + } } } @@ -1009,9 +1043,32 @@ wc_current_mana_to_prowess_percent = { } } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = wc_sorcerer_trait_1_current_mana_to_prowess_value + } + + if = { + limit = { + has_perk = light_magic_tree_3_perk_2 + } + add = wc_arcane_dialectics_current_mana_to_prowess_value + } + + add = wc_mana_conductivity_mp_value + min = 0 } +wc_mana_conductivity_mp_value = { + value = { + add = wc_mp_value + divide = 1000 + } +} + wc_current_mana_to_prowess_value = { if = { limit = { has_variable = wc_current_mana_variable } @@ -1041,6 +1098,7 @@ wc_mp_powerful_being_value = 10 wc_mp_special_race_value = 5 wc_mp_value = { + min = 0 if = { limit = { has_trait = magic_good_1 } add = { @@ -1598,6 +1656,16 @@ wc_mp_value = { desc = wc_fire_decay_ritual_feed_modifier } } + if = { + limit = { + has_trait = holy_wrath + } + add = { + value = -5 + desc = trait_holy_wrath + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } floor = yes min = 0 } @@ -1616,7 +1684,7 @@ wc_mp_value_cd_percentage = { # Magic Resistance wc_magic_resistance_base_value = { - value = 7 + value = 6 } wc_magic_resistance_racial_value = 5 wc_magic_vulnerability_racial_value = -5 @@ -1779,6 +1847,108 @@ wc_light_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_holy_fire_modifier + } + multiply = { + value = 0.75 + desc = wc_holy_fire_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_lightwell_modifier + } + multiply = { + value = 1.25 + desc = wc_lightwell_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_trait = holy_wrath + } + multiply = { + value = 0 + desc = trait_holy_wrath + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_echo_of_light_modifier + } + add = { + value = 3 + desc = wc_echo_of_light_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -1927,6 +2097,67 @@ wc_order_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -2074,6 +2305,69 @@ wc_death_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -2221,40 +2515,112 @@ wc_disorder_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } - round = yes - max = 25 - min = -5 -} -wc_life_magic_resistance_value = { - - value = { + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } add = { - value = wc_magic_resistance_base_value - desc = wc_mana_base_value_desc + value = -1 + desc = wc_exorcism_modifier format = "WC_MAX_MANA_VALUE_FORMAT" } } - add = { - desc = wc_magical_prowess - format = "WC_MAX_MANA_VALUE_FORMAT" - value = wc_magic_resistance_from_mp - } - if = { # Can be added or removed dynamically - limit = { has_variable = wc_life_magic_resistance } - add = var:wc_life_magic_resistance - } - # From User traits - if = { - limit = { has_trait = user_of_death_magic_2 } - + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } add = { - value = wc_magic_resistance_level2_value - desc = wc_magic_scaling_value_desc + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_echo_of_light_modifier + } + add = { + value = 3 + desc = wc_echo_of_light_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier format = "WC_MAX_MANA_VALUE_FORMAT" } } - else_if = { - limit = { has_trait = user_of_death_magic_3 } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + round = yes + max = 25 + min = -5 +} +wc_life_magic_resistance_value = { + + value = { + add = { + value = wc_magic_resistance_base_value + desc = wc_mana_base_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + add = { + desc = wc_magical_prowess + format = "WC_MAX_MANA_VALUE_FORMAT" + value = wc_magic_resistance_from_mp + } + if = { # Can be added or removed dynamically + limit = { has_variable = wc_life_magic_resistance } + add = var:wc_life_magic_resistance + } + # From User traits + if = { + limit = { has_trait = user_of_death_magic_2 } + + add = { + value = wc_magic_resistance_level2_value + desc = wc_magic_scaling_value_desc + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + else_if = { + limit = { has_trait = user_of_death_magic_3 } add = { value = wc_magic_resistance_level3_value @@ -2372,6 +2738,68 @@ wc_life_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -2519,6 +2947,78 @@ wc_shadow_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_echo_of_light_modifier + } + add = { + value = 3 + desc = wc_echo_of_light_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -2719,6 +3219,68 @@ wc_elemental_fire_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -2879,6 +3441,69 @@ wc_elemental_air_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -3078,6 +3703,78 @@ wc_elemental_water_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_echo_of_light_modifier + } + add = { + value = 3 + desc = wc_echo_of_light_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -3233,6 +3930,68 @@ wc_elemental_earth_magic_resistance_value = { format = "WC_MAX_MANA_VALUE_FORMAT" } } + if = { + limit = { + has_character_modifier = wc_exorcism_modifier + } + add = { + value = -1 + desc = wc_exorcism_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_saved_with_salvation_modifier + } + add = { + value = -2 + desc = wc_saved_with_salvation_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_blessed_bastion_modifier + } + add = { + value = 3 + desc = wc_blessed_bastion_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_2 + } + add = { + value = 1 + desc = light_magic_tree_2_perk_2_PERK_DESC + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + if = { + limit = { + has_character_modifier = wc_devotion_aura_modifier + } + add = { + value = 3 + desc = wc_devotion_aura_modifier + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + + if = { + limit = { + has_character_modifier = wc_vengeance_aura_modifier_negative + } + add = { + value = -1 + desc = wc_vengeance_aura_modifier_negative + format = "WC_MAX_MANA_VALUE_FORMAT" + } + } + round = yes max = 25 min = -5 @@ -3425,7 +4184,7 @@ light_magic_user_gender_chance = { faith = { has_doctrine_parameter = eks_faith_magic_gender } } } - value = root_faith_dominant_gender_clergy_female_chance + value = root_faith_clergy_gender_female_chance } #-- ubiquitous - always should be last @@ -3450,7 +4209,7 @@ shadow_magic_user_gender_chance = { #-- special doctrines if = { limit = { faith = { has_doctrine_parameter = troll_faith_magic_gender } } - value = root_faith_dominant_gender_clergy_female_chance + value = root_faith_clergy_gender_female_chance } #-- ubiquitous - always should be last @@ -3643,138 +4402,38 @@ elemental_earth_magic_user_gender_chance = { } } -wc_level_1_magic_trait_val = { +wc_level_1_magic_trait_count = { value = 0 - if = { - limit = { - has_trait_with_flag = wc_magic_level_1_flag - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_1_flag } - count >= 2 - } - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_1_flag } - count >= 3 - } - } + every_character_trait = { + limit = { has_trait_flag = wc_magic_level_1_flag } add = 1 } } -wc_level_2_magic_trait_val = { +wc_level_2_magic_trait_count = { value = 0 - if = { - limit = { - has_trait_with_flag = wc_magic_level_2_flag - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_2_flag } - count >= 2 - } - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_2_flag } - count >= 3 - } - } + every_character_trait = { + limit = { has_trait_flag = wc_magic_level_2_flag } add = 1 } } -wc_level_3_magic_trait_val = { +wc_level_3_magic_trait_count = { value = 0 - if = { - limit = { - has_trait_with_flag = wc_magic_level_3_flag - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_3_flag } - count >= 2 - } - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_3_flag } - count >= 3 - } - } + every_character_trait = { + limit = { has_trait_flag = wc_magic_level_3_flag } add = 1 } } -wc_level_4_magic_trait_val = { +wc_level_4_magic_trait_count = { value = 0 - if = { - limit = { - has_trait_with_flag = wc_magic_level_4_flag - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_4_flag } - count >= 2 - } - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_4_flag } - count >= 3 - } - } + every_character_trait = { + limit = { has_trait_flag = wc_magic_level_4_flag } add = 1 } } -wc_level_5_magic_trait_val = { +wc_level_5_magic_trait_count = { value = 0 - if = { - limit = { - has_trait_with_flag = wc_magic_level_5_flag - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_5_flag } - count >= 2 - } - } - add = 1 - } - if = { - limit = { - any_character_trait = { - limit = { has_trait_with_flag = wc_magic_level_5_flag } - count >= 3 - } - } + every_character_trait = { + limit = { has_trait_flag = wc_magic_level_5_flag } add = 1 } } @@ -3878,4 +4537,107 @@ cancelled_cost = { } add = var:cancelled_cost } -} \ No newline at end of file +} +# Magic resistance for scaling +# Max is 25, so 25 == 100% resistance +# value * 4 = resistance, so 6 mr = 24% resistance +wc_elemental_fire_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_elemental_fire_magic_resistance_value #example = 6 + multiply = 4 # % resistance, so example is 24 % resistance + divide = 100 # so it's 0.24 + } + } +} +wc_elemental_water_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_elemental_water_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_elemental_air_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_elemental_air_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_elemental_earth_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_elemental_earth_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_light_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_light_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_shadow_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_shadow_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_life_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_life_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_death_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_death_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_order_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_order_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} +wc_disorder_magic_resistance_scale_value = { + value = 1 + subtract = { + value = { + add = wc_disorder_magic_resistance_value + multiply = 4 + divide = 100 + } + } +} diff --git a/common/scripted_effects/00_secret_effects.txt b/common/scripted_effects/00_secret_effects.txt index ffddff5319..dad031d60e 100644 --- a/common/scripted_effects/00_secret_effects.txt +++ b/common/scripted_effects/00_secret_effects.txt @@ -972,6 +972,78 @@ secret_exposed_notification_effect = { } desc = secret_exposed_notification_effect_message_faith } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_light_magic_user } } + desc = secret_exposed_notification_effect_message_light_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_shadow_magic_user } } + desc = secret_exposed_notification_effect_message_shadow_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_order_magic_user } } + desc = secret_exposed_notification_effect_message_order_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_disorder_magic_user } } + desc = secret_exposed_notification_effect_message_disorder_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_life_magic_user } } + desc = secret_exposed_notification_effect_message_life_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_death_magic_user } } + desc = secret_exposed_notification_effect_message_death_magic + } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_elemental_fire_magic_user } } + desc = secret_exposed_notification_effect_message_elemental_fire_magic + } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_fire_spirit_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_fire_spirit_magic + # } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_fire_decay_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_fire_decay_magic + # } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_elemental_water_magic_user } } + desc = secret_exposed_notification_effect_message_elemental_water_magic + } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_water_spirit_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_water_spirit_magic + # } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_water_decay_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_water_decay_magic + # } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_elemental_air_magic_user } } + desc = secret_exposed_notification_effect_message_elemental_air_magic + } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_air_spirit_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_air_spirit_magic + # } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_air_decay_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_air_decay_magic + # } + triggered_desc = { + trigger = { scope:secret = { secret_type = secret_elemental_earth_magic_user } } + desc = secret_exposed_notification_effect_message_elemental_earth_magic + } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_earth_spirit_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_earth_spirit_magic + # } + # triggered_desc = { + # trigger = { scope:secret = { secret_type = secret_elemental_earth_decay_magic_user } } + # desc = secret_exposed_notification_effect_message_elemental_earth_decay_magic + # } } } @@ -1091,6 +1163,78 @@ secret_exposed_notification_effect = { limit = { scope:secret = { secret_type = secret_crypto_religionist } } custom_tooltip = secret_exposed_notification_effect_message_faith.i_exposed } + else_if = { + limit = { scope:secret = { secret_type = secret_light_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_light_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_shadow_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_shadow_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_order_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_order_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_disorder_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_disorder_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_life_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_life_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_death_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_death_magic.i_exposed + } + else_if = { + limit = { scope:secret = { secret_type = secret_elemental_fire_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_elemental_fire_magic.i_exposed + } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_fire_spirit_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_fire_spirit_magic.i_exposed + # } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_fire_decay_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_fire_decay_magic.i_exposed + # } + else_if = { + limit = { scope:secret = { secret_type = secret_elemental_water_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_elemental_water_magic.i_exposed + } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_water_spirit_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_water_spirit_magic.i_exposed + # } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_water_decay_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_water_decay_magic.i_exposed + # } + else_if = { + limit = { scope:secret = { secret_type = secret_elemental_air_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_elemental_air_magic.i_exposed + } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_air_spirit_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_air_spirit_magic.i_exposed + # } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_air_decay_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_air_decay_magic.i_exposed + # } + else_if = { + limit = { scope:secret = { secret_type = secret_elemental_earth_magic_user } } + custom_tooltip = secret_exposed_notification_effect_message_elemental_earth_magic.i_exposed + } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_earth_spirit_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_earth_spirit_magic.i_exposed + # } + # else_if = { + # limit = { scope:secret = { secret_type = secret_elemental_earth_decay_magic_user } } + # custom_tooltip = secret_exposed_notification_effect_message_elemental_earth_decay_magic.i_exposed + # } if = { limit = { has_hook_from_secret = scope:secret } diff --git a/common/scripted_effects/wc_magic_effects.txt b/common/scripted_effects/wc_magic_effects.txt index 892e89dc81..88da809f22 100644 --- a/common/scripted_effects/wc_magic_effects.txt +++ b/common/scripted_effects/wc_magic_effects.txt @@ -215,6 +215,23 @@ execute_scoped_spell_effect = { ## Both flag:frostfire_bolt = { $EFFECT$ = { SPELL = frostfire_bolt RANK = var:current_spell_rank TYPE = order } } + + ## Light + flag:flash_of_light = { $EFFECT$ = { SPELL = flash_of_light RANK = var:current_spell_rank TYPE = light } } + flag:dispel = { $EFFECT$ = { SPELL = dispel RANK = var:current_spell_rank TYPE = light } } + flag:holy_fire = { $EFFECT$ = { SPELL = holy_fire RANK = var:current_spell_rank TYPE = light } } + flag:lightwell = { $EFFECT$ = { SPELL = lightwell RANK = var:current_spell_rank TYPE = light } } + flag:judgement = { $EFFECT$ = { SPELL = judgement RANK = var:current_spell_rank TYPE = light } } + flag:exorcism = { $EFFECT$ = { SPELL = exorcism RANK = var:current_spell_rank TYPE = light } } + flag:expulsion = { $EFFECT$ = { SPELL = expulsion RANK = var:current_spell_rank TYPE = light } } + flag:avenging_wrath = { $EFFECT$ = { SPELL = avenging_wrath RANK = var:current_spell_rank TYPE = light } } + flag:salvation = { $EFFECT$ = { SPELL = salvation RANK = var:current_spell_rank TYPE = light } } + flag:bless = { $EFFECT$ = { SPELL = bless RANK = var:current_spell_rank TYPE = light } } + flag:divine_shield = { $EFFECT$ = { SPELL = divine_shield RANK = var:current_spell_rank TYPE = light } } + flag:consecration = { $EFFECT$ = { SPELL = consecration RANK = var:current_spell_rank TYPE = light } } + flag:rebuke = { $EFFECT$ = { SPELL = rebuke RANK = var:current_spell_rank TYPE = light } } + flag:divine_storm = { $EFFECT$ = { SPELL = divine_storm RANK = var:current_spell_rank TYPE = light } } + flag:blessed_bastion = { $EFFECT$ = { SPELL = blessed_bastion RANK = var:current_spell_rank TYPE = light } } } } @@ -244,8 +261,8 @@ every_spell_modifier_effect = { $EFFECT$ = { MODIFIER = wc_elemental_fire_major_efficiency SPELL = planar_fire TYPE = positive } $EFFECT$ = { MODIFIER = wc_elemental_fire_major_companionship SPELL = planar_fire TYPE = positive } $EFFECT$ = { MODIFIER = wc_elemental_fire_minor_companionship SPELL = planar_fire TYPE = positive } - $EFFECT$ = { MODIFIER = wc_elemental_fire_fear_me SPELL = planar_fire TYPE = positive } - $EFFECT$ = { MODIFIER = wc_elemental_fire_love_me SPELL = planar_fire TYPE = positive } + # $EFFECT$ = { MODIFIER = wc_elemental_fire_fear_me SPELL = planar_fire TYPE = positive } + # $EFFECT$ = { MODIFIER = wc_elemental_fire_love_me SPELL = planar_fire TYPE = positive } # $EFFECT$ = { MODIFIER = wc_hearth_blessing SPELL = iforgot TYPE = positive } # $EFFECT$ = { MODIFIER = wc_elemental_fire_planar_fire SPELL = planar_fire TYPE = positive } $EFFECT$ = { MODIFIER = wc_fire_magic_blessing SPELL = planar_fire TYPE = positive } @@ -275,6 +292,14 @@ every_spell_modifier_effect = { # $EFFECT$ = { MODIFIER = wc_blizzard_character SPELL = iforgot TYPE = negative } # Only applied when inside specific location $EFFECT$ = { MODIFIER = wc_slow SPELL = haste TYPE = negative } # $EFFECT$ = { MODIFIER = wc_arcane_dome_character SPELL = iforgot TYPE = negative } # Only applied when inside specific location + $EFFECT$ = { MODIFIER = wc_exorcism SPELL = exorcism TYPE = negative } + $EFFECT$ = { MODIFIER = wc_lightwell SPELL = lightwell TYPE = positive } + $EFFECT$ = { MODIFIER = wc_holy_fire SPELL = holy_fire TYPE = negative } + # $EFFECT$ = { MODIFIER = wc_saved_with_salvation SPELL = salvation TYPE = negative } Ritual modifier # + # $EFFECT$ = { MODIFIER = wc_salvation SPELL = salvation TYPE = positive } Ritual modifier # + $EFFECT$ = { MODIFIER = wc_rebuke SPELL = none TYPE = negative } + $EFFECT$ = { MODIFIER = wc_divine_storm_character SPELL = divine_storm TYPE = negative } + $EFFECT$ = { MODIFIER = wc_blessed_bastion SPELL = blessed_bastion TYPE = positive } } record_spell_stats_effect = { @@ -504,8 +529,20 @@ spell_cast_effect = { spell_is_helpful_trigger_self = { SPELL = flag:$SPELL$ } } } - var:spell_recipient = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + var:spell_recipient = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } } else_if = { @@ -524,13 +561,37 @@ spell_cast_effect = { NOT = { var:spell_recipient.holder.liege = var:spell_recipient.holder } NOT = { var:spell_recipient.holder.liege = root } } - var:spell_recipient.holder.liege = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient.holder.liege = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + var:spell_recipient.holder.liege = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } } else = { - var:spell_recipient.holder = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient.holder = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + var:spell_recipient.holder = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } } } @@ -550,8 +611,20 @@ spell_cast_effect = { limit = { NOT = { scope:new_target = root } } - scope:new_target = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + scope:new_target = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } } } @@ -572,16 +645,40 @@ spell_cast_effect = { limit = { NOT = { scope:new_target.holder = root } } - scope:new_target.holder = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target.holder = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + scope:new_target.holder = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } if = { limit = { exists = scope:new_target.holder.liege NOT = { scope:new_target.holder.liege = root } } - scope:new_target.holder.liege = { - add_opinion = { modifier = wc_casted_helpful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target.holder.liege = { + add_opinion = { modifier = wc_casted_helpful_spell target = root opinion = 20 } + } + } + else = { + scope:new_target.holder.liege = { + add_opinion = { modifier = wc_casted_helpful_spell target = root } + } } } } @@ -633,8 +730,20 @@ spell_cast_effect = { exists = var:spell_recipient NOT = { this = var:spell_recipient } } - var:spell_recipient = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + var:spell_recipient = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } } else_if = { @@ -643,8 +752,20 @@ spell_cast_effect = { exists = var:spell_recipient.holder NOT = { this = var:spell_recipient.holder } } - var:spell_recipient.holder = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient.holder = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + var:spell_recipient.holder = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } if = { limit = { @@ -652,8 +773,20 @@ spell_cast_effect = { NOT = { var:spell_recipient.holder.liege = var:spell_recipient.holder } NOT = { var:spell_recipient.holder.liege = root } } - var:spell_recipient.holder.liege = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + var:spell_recipient.holder.liege = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + var:spell_recipient.holder.liege = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } } } @@ -669,8 +802,20 @@ spell_cast_effect = { limit = { NOT = { scope:new_target = root } } - scope:new_target = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + scope:new_target = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } } } @@ -687,8 +832,20 @@ spell_cast_effect = { limit = { NOT = { scope:new_target.holder = root } } - scope:new_target.holder = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target.holder = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + scope:new_target.holder = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } } if = { @@ -696,8 +853,20 @@ spell_cast_effect = { exists = scope:new_target.holder.liege NOT = { scope:new_target.holder.liege = root } } - scope:new_target.holder.liege = { - add_opinion = { modifier = wc_casted_harmful_spell target = root } + if = { + limit = { + spell_is_ritual_trigger = { + SPELL = flag:$SPELL$ + } + } + scope:new_target.holder.liege = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + else = { + scope:new_target.holder.liege = { + add_opinion = { modifier = wc_casted_harmful_spell target = root } + } } } } @@ -865,9 +1034,14 @@ add_spell_progression_effect = { value = var:$SPELL$_rank } - set_variable = { - name = casted_type - value = var:$SPELL$_type + if = { + limit = { + exists = var:$SPELL$_type + } + set_variable = { + name = casted_type + value = var:$SPELL$_type + } } set_variable = { @@ -1110,8 +1284,45 @@ wc_spell_death_maintenence_effect = { } ### BURNOUT clear_burnout_effect = yes + ### Ret aura + if = { + limit = { + any_close_or_extended_family_member = { + has_character_flag = wc_retribution_aura_flag + } + } + every_close_or_extended_family_member = { + limit = { + has_character_flag = wc_retribution_aura_flag + NOT = { has_character_modifier = wc_retribution_aura_modifier } + } + add_character_modifier = { + modifier = wc_retribution_aura_modifier + months = 6 + } + } + } + ### Final Stand + if = { + limit = { + has_perk = light_magic_tree_3_perk_8 + } + primary_heir ?= { + send_interface_message = { + title = fervor_gain_final_stand + final_stand_effect = yes + } + } + designated_heir ?= { + send_interface_message = { + title = fervor_gain_final_stand + final_stand_effect = yes + } + } + } } + spell_execute = { $EFFECT$ = yes } @@ -1417,7 +1628,11 @@ get_top_spell_class_by_cast_effect = { } } } - +## root is the caster +### upon finishing the spell cast, after setting cd and everything ### +### Variable prefix: casted_ +### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost +### e.g. var:casted_spell = flag:lava_lash record_magic_stats_effect = { ### MAGIC STATS RECORDING ### set_variable = { @@ -1521,7 +1736,11 @@ record_magic_stats_effect = { ### MAGIC STATS RECORDING ### } - +## root is the caster +### upon finishing the spell cast, after setting cd and everything ### +### Variable prefix: casted_ +### Variables: spell, recipient, targets_list (variable list), rank, type (for elemental type), class (spell class), target_type, cost +### e.g. var:casted_spell = flag:lava_lash wc_on_spell_cast_finish_effect = { # Send interface message to caster send_interface_message = { @@ -1787,6 +2006,22 @@ wc_on_spell_cast_finish_effect = { months = 1 } } + + if = { + limit = { + var:casted_class = flag:light + has_perk = light_magic_tree_2_perk_4 + } + random_list = { + 90 = { } + 10 = { + send_interface_message = { + title = wc_seal_of_command_title + add_legitimacy = 10 + } + } + } + } } cancel_cast_effect = { @@ -1900,4 +2135,191 @@ cancel_cast_effect = { cancel_cast_effect_elemental = { cancel_cast_effect = { SPELL = $SPELL$ RANK = $RANK$ TYPE = $TYPE$ } -} \ No newline at end of file +} + +# Prio for removing debuffs -> Magic Illness > Magic Injury > Major Illness > Major Injury > Illness > Injury +# Remove a magic disease +remove_magic_illness_effect = { + random_character_trait = { + limit = { + has_trait_flag = magic_illness + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_illness_effect = { + random_character_trait = { + limit = { + has_trait_flag = illness + NOT = { has_trait_flag = debilitating_illness } + NOT = { has_trait_flag = magic_illness } + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_major_illness_effect = { + random_character_trait = { + limit = { + has_trait_flag = debilitating_illness + NOT = { has_trait_flag = magic_illness } + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_physical_injury_effect = { + random_character_trait = { + limit = { + has_trait_flag = injury + NOT = { has_trait_flag = major_injury } + NOT = { has_trait_flag = magic_injury } + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_major_injury_effect = { + random_character_trait = { + limit = { + has_trait_flag = major_injury + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_magic_injury_effect = { + if = { + limit = { + $REDUCE_SEVERITY$ = yes + } + if = { + limit = { + has_trait = burned + } + change_trait_rank = { trait = burned rank = -1 } + } + else_if = { + limit = { + has_trait = frostbite + } + change_trait_rank = { trait = frostbite rank = -1 } + } + else = { + random_character_trait = { + limit = { + has_trait_flag = magic_injury + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + } + } + else = { + random_character_trait = { + limit = { + has_trait_flag = magic_injury + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + } + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_injury_effect = { + if = { + limit = { + $REDUCE_SEVERITY$ = yes + } + if = { + limit = { + has_trait = wounded + } + change_trait_rank = { trait = wounded rank = -1 } + } + else = { + random_character_trait = { + limit = { + has_trait_flag = injury + NOT = { has_trait_flag = major_injury } + NOT = { has_trait_flag = magic_injury } + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + } + } + else = { + random_character_trait = { + limit = { + has_trait_flag = injury + NOT = { has_trait_flag = major_injury } + NOT = { has_trait_flag = magic_injury } + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + } + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_psych_illness_effect = { + random_character_trait = { + limit = { + has_trait_flag = psych_illness + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} + +remove_poison_effect = { + random_character_trait = { + limit = { + has_trait_flag = psych_illness + } + save_scope_as = target_trait + } + remove_trait = scope:target_trait + add_character_flag = { + flag = wc_recently_dispelled_flag + days = wc_spell_cooldown_dispel_personal_short + } +} diff --git a/common/scripted_effects/wc_magic_light_effects.txt b/common/scripted_effects/wc_magic_light_effects.txt new file mode 100644 index 0000000000..10dd861eda --- /dev/null +++ b/common/scripted_effects/wc_magic_light_effects.txt @@ -0,0 +1,1387 @@ +init_light_spells_effect = { + add_to_global_variable_list = { name = light_spells target = flag:flash_of_light } + add_to_global_variable_list = { name = light_spells target = flag:dispel } + add_to_global_variable_list = { name = light_spells target = flag:holy_fire } + add_to_global_variable_list = { name = light_spells target = flag:lightwell } + add_to_global_variable_list = { name = light_spells target = flag:judgement } + add_to_global_variable_list = { name = light_spells target = flag:exorcism } + add_to_global_variable_list = { name = light_spells target = flag:expulsion } + add_to_global_variable_list = { name = light_spells target = flag:avenging_wrath } + add_to_global_variable_list = { name = light_spells target = flag:salvation } + add_to_global_variable_list = { name = light_spells target = flag:bless } + add_to_global_variable_list = { name = light_spells target = flag:divine_shield } + add_to_global_variable_list = { name = light_spells target = flag:consecration } + add_to_global_variable_list = { name = light_spells target = flag:rebuke } + add_to_global_variable_list = { name = light_spells target = flag:divine_storm } + add_to_global_variable_list = { name = light_spells target = flag:blessed_bastion } +} + +cast_flash_of_light_effect = { # Refer to Dispel sheet + if = { + limit = { exists = var:flash_of_light_recipient } + var:flash_of_light_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:flash_of_light + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + if = { + limit = { + exists = scope:this_recipient + } + # Look at ranks first + if = { + limit = { + OR = { # current_spell_rank is for tooltips + AND = { + exists = var:flash_of_light_rank + var:flash_of_light_rank = 3 + } + AND = { + exists = var:current_spell_rank + var:current_spell_rank = 3 + } + } + } + scope:this_recipient = { + if = { + limit = { + target_has_magic_illness_trigger = yes + } + remove_magic_illness_effect = yes + } + else_if = { + limit = { + target_has_major_illness_trigger = yes + } + remove_major_illness_effect = yes + } + else = { + custom_tooltip = wc_dispel_no_effect_tooltip + } + } + } + else_if = { + limit = { + OR = { + AND = { + exists = var:flash_of_light_rank + var:flash_of_light_rank = 2 + } + AND = { + exists = var:current_spell_rank + var:current_spell_rank = 2 + } + } + } + scope:this_recipient = { + if = { + limit = { + target_has_magic_injury_trigger = yes + } + remove_magic_injury_effect = { REDUCE_SEVERITY = yes } + } + else_if = { + limit = { + target_has_illness_trigger = yes + } + remove_illness_effect = yes + } + else = { + custom_tooltip = wc_dispel_no_effect_tooltip + } + } + } + else_if = { + limit = { + OR = { + AND = { + exists = var:flash_of_light_rank + var:flash_of_light_rank = 1 + } + AND = { + 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 + } + } + } + + } + +} + +cast_dispel_effect = { + if = { + limit = { exists = var:dispel_recipient } + var:dispel_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:dispel + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + custom_tooltip = wc_dispel_effect + every_spell_modifier_effect = { EFFECT = dispel_add_modifier_to_list_effect } + if = { + limit = { + has_variable_list = dispel_modifiers + } + random_in_list = { + variable = dispel_modifiers + save_scope_as = dispel_modifier + } + every_spell_modifier_effect = { EFFECT = dispel_remove_modifier_effect } + clear_variable_list = dispel_modifiers + } + add_character_flag = { + flag = wc_recently_dispelled_flag + days = 180 + } + } +} + +dispel_add_modifier_to_list_effect = { + if = { + limit = { + has_character_modifier = $MODIFIER$_modifier + flag:$TYPE$ = flag:negative + } + add_to_variable_list = { + name = dispel_modifiers + target = flag:$MODIFIER$ + } + } + if = { # Error prevention + limit = { flag:$SPELL$ = flag:error } + } +} + +dispel_remove_modifier_effect = { + if = { + limit = { + exists = scope:dispel_modifier + flag:$MODIFIER$ = scope:dispel_modifier + } + send_interface_toast = { + title = wc_dispel_successful + left_icon = scope:this_recipient + right_icon = root + remove_character_modifier = $MODIFIER$_modifier + } + if = { + limit = { + NOT = { + scope:this_recipient ?= root + } + } + hidden_effect = { + send_interface_toast = { + title = wc_dispel_successful + left_icon = scope:this_recipient + right_icon = root + show_as_tooltip = { + scope:this_recipient = { + remove_character_modifier = $MODIFIER$_modifier + } + } + } + } + } + } + + if = { # Error prevention + limit = { flag:$TYPE$ = flag:error } + limit = { flag:$SPELL$ = flag:error } + } +} + +cast_lightwell_effect = { + if = { + limit = { exists = var:lightwell_recipient } + var:lightwell_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:lightwell + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + if = { + limit = { + exists = scope:this_recipient + } + scope:this_recipient = { + root = { + save_temporary_scope_value_as = { + name = duration + value = wc_spell_lightwell_duration_days_value + } + } + add_character_modifier = { + modifier = wc_lightwell_modifier + days = wc_current_spell_duration + } + } + } +} + +cast_holy_fire_effect = { + if = { + limit = { exists = var:holy_fire_recipient } + var:holy_fire_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:holy_fire + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + root = { + save_temporary_scope_value_as = { + name = duration + value = wc_spell_holy_fire_duration_days_value + } + } + random_list = { + 80 = { + scope:this_recipient = { + add_character_modifier = { + modifier = wc_holy_fire_modifier + days = wc_current_spell_duration + } + save_temporary_scope_as = dodger + } + hidden_effect = { + root = { + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_holy_fire_hit_tt + } + } + } + } + 20 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + custom_tooltip = wc_holy_fire_resist_tt + hidden_effect = { + scope:this_recipient = { save_temporary_scope_as = dodger} + root = { + send_interface_toast = { + title = wc_spell_dodged + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_holy_fire_dodge + } + } + } + } + } + } +} + +cast_judgement_effect = { + if = { + limit = { exists = var:judgement_recipient } + var:judgement_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:judgement + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + scope:this_recipient ?= { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + random_list = { + 80 = { + custom_tooltip = wc_judgement_tt + hidden_effect = { + scope:this_recipient = { save_temporary_scope_as = dodger } + every_secret = { + expose_secret = root + } + root = { + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_judgement_hit_tt + } + } + } + } + 20 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + custom_tooltip = wc_judgement_resist_tt + hidden_effect = { + scope:this_recipient = { save_temporary_scope_as = dodger } + root = { + send_interface_toast = { + title = wc_spell_dodged + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_judgement_dodge + } + } + } + } + } + } +} + +cast_expulsion_effect = { + if = { + limit = { exists = var:expulsion_recipient } + var:expulsion_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:expulsion + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + scope:this_recipient ?= { + if = { + limit = { + target_has_psych_illness_trigger = yes + } + remove_psych_illness_effect = yes + } + } +} + +cast_exorcism_effect = { + if = { + limit = { exists = var:exorcism_recipient } + var:exorcism_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:exorcism + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + save_temporary_scope_value_as = { + name = duration + value = wc_spell_exorcism_duration_days_value + } + scope:this_recipient ?= { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + excorism_effect = yes + } + if = { + limit = { has_variable_list = exorcism_targets_list } + every_in_list = { + variable = exorcism_targets_list + save_scope_as = this_recipient + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + excorism_effect = yes + } + } + else_if = { + limit = { has_variable_list = spell_targets_list } + every_in_list = { + variable = spell_targets_list + save_scope_as = this_recipient + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + excorism_effect = yes + } + } +} +excorism_effect = { + random_list = { + 80 = { + add_character_modifier = { + modifier = wc_exorcism_modifier + days = wc_current_spell_duration + } + if = { + limit = { + OR = { + culture = { has_same_culture_heritage = culture:eredruin } + culture = { has_same_culture_heritage = culture:scourge } + has_trait = being_void + has_trait = being_demon + has_trait = being_undead + } + } + add_or_increase_burned_effect = yes + } + if = { # counting stacks + limit = { + has_variable = exorcism + } + set_variable = { + name = exorcism_2 + value = 1 + days = wc_current_spell_duration + } + } + else_if = { + limit = { + has_variable = exorcism_2 + } + set_variable = { + name = exorcism_3 + value = 1 + days = wc_current_spell_duration + } + } + else = { + set_variable = { + name = exorcism + value = 1 + days = wc_current_spell_duration + } + } + hidden_effect = { + root = { + scope:this_recipient = { save_temporary_scope_as = dodger } + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_exorcism_hit_tt + } + } + } + } + 20 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + custom_tooltip = wc_exorcism_resist_tt + hidden_effect = { + root = { + scope:this_recipient = { save_temporary_scope_as = dodger } + send_interface_toast = { + title = wc_spell_dodged + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_exorcism_dodge + } + } + } + } + } +} +cast_avenging_wrath_effect = { + if = { + limit = { exists = var:avenging_wrath_recipient } + var:avenging_wrath_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:avenging_wrath + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + random_list = { + 70 = { + scope:this_recipient = { + add_trait = holy_wrath + save_temporary_scope_as = dodger + } + if = { + limit = { + NOT = { this = root } + } + add_opinion = { + modifier = wc_wrathed_me + target = root + } + } + hidden_effect = { + root = { + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_avenging_wrath_hit_tt + } + if = { + limit = { + has_perk = light_magic_tree_2_perk_8 + } + random_list = { + 70 = { + # nothing + } + 30 = { + trigger = { + scope:this_recipient = { NOT = { has_trait = incapable } } + } + modifier = { + add = 20 + scope:this_recipient = { has_trait = being_undead } + } + modifier = { + add = 20 + scope:this_recipient = { has_trait = being_demon } + } + modifier = { + add = 20 + scope:this_recipient = { has_trait = being_void } + } + send_interface_toast = { + title = holy_retribution_title + left_icon = scope:this_recipient + right_icon = root + scope:this_recipient = { + add_trait = incapable + trigger_event = { + id = wc_magic_spell_events.4010 + days = { 90 180 } + } + } + } + } + } + } + } + } + } + 30 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + modifier = { + add = -10 + root = { has_perk = light_magic_tree_2_perk_8 } + } + custom_tooltip = wc_avenging_wrath_resist_tt + hidden_effect = { + scope:this_recipient = { save_temporary_scope_as = dodger } + root = { + send_interface_toast = { + title = wc_spell_dodged + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_avenging_wrath_dodge + } + } + } + } + } + } +} + +cast_salvation_effect = { + if = { + limit = { exists = var:salvation_recipient } + var:salvation_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:salvation + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + if = { + limit = { + has_trait = being_undead + } + root = { save_scope_as = salvation_caster } + show_as_tooltip = { + remove_trait = being_undead + proc_salvation_effect = yes + } + root = { + scope:this_recipient = { save_scope_as = saved_character } + trigger_event = { + id = wc_magic_spell_events.4005 + } + } + trigger_event = { + id = wc_magic_spell_events.4004 + days = 3 + } + } + else = { + add_character_modifier = { + modifier = wc_salvation_modifier + } + set_variable = { + name = salvation_caster + value = root + } + } + } +} + +proc_salvation_effect = { + if = { + limit = { + has_character_modifier = wc_salvation_modifier + } + remove_character_modifier = wc_salvation_modifier + } + add_character_modifier = wc_saved_with_salvation_modifier + + if = { + limit = { + scope:salvation_caster = { + is_alive = yes + } + } + add_opinion = { + modifier = wc_saved_me_salvation + target = scope:salvation_caster + } + } + + if = { + limit = { exists = scope:killer } + add_opinion = { modifier = attempted_to_kill_me target = scope:killer } + } + + while = { # DISPEL HIM OF EVERYTHING SO HE DOESNT DIE AGIAN + limit = { + OR = { + target_has_magic_illness_trigger = yes + target_has_illness_trigger = yes + target_has_major_illness_trigger = yes + target_has_injury_trigger = yes + target_has_major_injury_trigger = yes + target_has_magic_injury_trigger = yes + } + } + + if = { + limit = { + target_has_magic_injury_trigger = yes + } + remove_magic_injury_effect = { REDUCE_SEVERITY = no } + } + else_if = { + limit = { + target_has_major_injury_trigger = yes + } + remove_major_injury_effect = yes + } + else_if = { + limit = { + target_has_magic_illness_trigger = yes + } + remove_magic_illness_effect = yes + } + else_if = { + limit = { + target_has_major_illness_trigger = yes + } + remove_major_illness_effect = yes + } + else_if = { + limit = { + target_has_illness_trigger = yes + } + remove_illness_effect = yes + } + else_if = { + limit = { + target_has_injury_trigger = yes + } + remove_injury_effect = { REDUCE_SEVERITY = no } + } + } +} + +cast_bless_effect = { + if = { + limit = { exists = var:bless_recipient } + var:bless_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:bless + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + root = { + save_temporary_scope_value_as = { + name = duration + value = wc_spell_bless_duration_days_value + } + } + custom_tooltip = wc_bless_effect + every_spell_modifier_effect = { EFFECT = bless_add_modifier_to_list_effect } + if = { + limit = { + has_variable_list = bless_modifiers + } + random_in_list = { + variable = bless_modifiers + save_scope_as = bless_modifier + } + every_spell_modifier_effect = { EFFECT = bless_add_modifier_effect } + clear_variable_list = bless_modifiers + } + add_character_flag = { + flag = wc_recently_blessed + years = 1 + } + } +} + +bless_add_modifier_to_list_effect = { + if = { + limit = { + NOT = { has_character_modifier = $MODIFIER$_modifier } + flag:$TYPE$ = flag:positive + NOT = { + flag:$SPELL$ = flag:none + } + } + add_to_variable_list = { + name = bless_modifiers + target = flag:$MODIFIER$ + } + } +} + +bless_add_modifier_effect = { + if = { + limit = { + exists = scope:bless_modifier + flag:$MODIFIER$ = scope:bless_modifier + } + + send_interface_toast = { + title = wc_bless_successful + left_icon = scope:this_recipient + right_icon = root + add_character_modifier = { + modifier = $MODIFIER$_modifier + days = wc_current_spell_duration + } + } + if = { + limit = { + NOT = { + scope:this_recipient ?= root + } + } + hidden_effect = { + send_interface_toast = { + title = wc_bless_successful + left_icon = scope:this_recipient + right_icon = root + show_as_tooltip = { + scope:this_recipient = { + add_character_modifier = { + modifier = $MODIFIER$_modifier + days = wc_current_spell_duration + } + } + } + } + } + } + + } + + if = { # Error prevention + limit = { flag:$TYPE$ = flag:error } + limit = { flag:$SPELL$ = flag:error } + } +} + +cast_divine_shield_effect = { + if = { + limit = { exists = var:divine_shield_recipient } + var:divine_shield_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:divine_shield + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + add_character_modifier = { + modifier = wc_divine_shield_modifier + days = wc_spell_divine_shield_duration_days_value + } + } +} + +cast_consecration_effect = { + if = { + limit = { exists = var:consecration_recipient } + var:consecration_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:consecration + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + root = { + set_variable = { + name = consecration_moves_remaining + value = 3 + } + } + + if = { + limit = { + exists = scope:this_recipient + } + if = { + limit = { + OR = { + scope:this_recipient.holder = root + scope:this_recipient.holder.liege ?= root + scope:this_recipient.holder.top_liege ?= root + } + } + apply_consecration_effect = { + CONSECRATION_TYPE = flag:positive + COUNTY = scope:this_recipient + } + } + else = { + apply_consecration_effect = { + CONSECRATION_TYPE = flag:negative + COUNTY = scope:this_recipient + } + } + } +} + +apply_consecration_effect = { + clear_variable_list = consecration_neighboring_counties + + set_variable = { + name = consecration_county + value = $COUNTY$ + } + + save_temporary_scope_value_as = { + name = consecration_duration + value = wc_spell_consecration_duration_days_value + } + + change_variable = { + name = consecration_moves_remaining + add = -1 + } + + if = { + limit = { + $CONSECRATION_TYPE$ = flag:positive + } + $COUNTY$ = { + add_county_modifier = { + modifier = wc_consecration_county_positive_modifier + days = wc_consecration_spell_duration + } + set_variable = { + name = consecration_owner + value = root + } + every_neighboring_county = { + limit = { + NOT = { this = $COUNTY$ } + exists = holder + } + save_scope_as = neighboring_county_consecration + custom_tooltip = wc_consecration_neighboring_duchy_effect + root = { + add_to_variable_list = { + name = consecration_neighboring_counties + target = scope:neighboring_county_consecration + } + } + } + } + } + else = { + $COUNTY$ = { + add_county_modifier = { + modifier = wc_consecration_county_negative_modifier + days = wc_consecration_spell_duration + } + set_variable = { + name = consecration_owner + value = root + } + every_neighboring_county = { + limit = { + NOT = { this = $COUNTY$ } + exists = holder + } + save_scope_as = neighboring_county_consecration + custom_tooltip = wc_consecration_neighboring_duchy_effect + root = { + add_to_variable_list = { + name = consecration_neighboring_counties + target = scope:neighboring_county_consecration + } + } + } + holder = { + add_opinion = { modifier = wc_casted_harmful_spell target = root opinion = -20 } + } + } + } +} + +move_consecration_effect = { + clear_variable_list = consecration_neighboring_counties + if = { + limit = { + var:consecration_county = { + has_county_modifier = wc_consecration_county_positive_modifier + } + } + var:consecration_county = { + remove_county_modifier = wc_consecration_county_positive_modifier + } + apply_consecration_effect = { + CONSECRATION_TYPE = flag:positive + COUNTY = $COUNTY$ + } + } + else = { + var:consecration_county = { + remove_county_modifier = wc_consecration_county_negative_modifier + } + apply_consecration_effect = { + CONSECRATION_TYPE = flag:negative + COUNTY = $COUNTY$ + } + } +} + +cast_rebuke_effect = { + if = { + limit = { exists = var:rebuke_recipient } + var:rebuke_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:rebuke + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + scope:this_recipient ?= { + save_scope_value_as = { + name = spell_dodge_chance + value = wc_light_magic_resistance_dodge_value + } + scope:this_recipient = { save_temporary_scope_as = dodger } + random_list = { + 80 = { + add_character_modifier = { + modifier = wc_rebuke_modifier + months = 3 + } + if = { + limit = { + has_variable_list = current_spells_casting + any_in_list = { + variable = current_spells_casting + NOR = { + spell_is_ritual_trigger = { SPELL = this } + this = flag:rebuke + } + } + } + custom_tooltip = wc_rebuke_kick_tt + random_in_list = { + variable = current_spells_casting + limit = { + NOR = { + spell_is_ritual_trigger = { SPELL = this } + this = flag:rebuke + } + } + save_scope_as = spell_to_kick + hidden_effect = { + scope:this_recipient = { + root = { save_temporary_scope_as = rebuker } + execute_scoped_spell_effect = { + EFFECT = cancel_cast_effect + SPELL = scope:spell_to_kick + } + execute_scoped_spell_effect = { + EFFECT = put_spell_on_cooldown_effect + SPELL = scope:spell_to_kick + } + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_rebuke_kicked_you + } + } + root = { + send_interface_toast = { + title = wc_spell_hit + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_rebuke_hit_tt + } + } + } + } + } + + } + 20 = { + modifier = { + is_alive = yes + add = scope:spell_dodge_chance + } + custom_tooltip = wc_rebuke_resist_tt + hidden_effect = { + root = { + send_interface_toast = { + title = wc_spell_dodged + left_icon = scope:this_recipient + right_icon = root + custom_tooltip = wc_rebuke_dodge + } + } + } + } + } + } +} + +cast_divine_storm_effect = { + if = { + limit = { exists = var:divine_storm_recipient } + var:divine_storm_recipient = { + save_temporary_scope_as = this_recipient + } + } + else_if = { + limit = { + exists = var:current_spell_name + var:current_spell_name = flag:divine_storm + exists = var:spellbook_open + exists = var:spell_recipient + } + var:spell_recipient = { + save_temporary_scope_as = this_recipient + } + } + + root = { + random_list = { + 40 = { + add_or_increase_burned_effect = yes + } + 40 = { + if = { + limit = { + NOT = { has_trait = wounded_1 } + } + add_trait = wounded_1 + } + else = { + change_trait_rank = { trait = wounded rank = 1 max = 3 } + } + } + 20 = { + add_trait = holy_wrath + } + } + } + + scope:this_recipient ?= { + root = { + save_temporary_scope_value_as = { + name = duration + value = wc_spell_divine_storm_duration_days_value + } + } + + change_county_control = -100 + change_development_level = -10 + custom_tooltip = wc_divine_storm_tt + every_in_de_jure_hierarchy = { + if = { + limit = { + tier = tier_county + } + add_county_modifier = { + modifier = wc_divine_storm_county_modifier + days = wc_current_spell_duration + } + trigger_event = { + on_action = wc_divine_storm_county_pulse + months = 1 + } + } + else_if = { + limit = { + tier = tier_barony + } + title_province = { + hidden_effect = { + every_character_in_location = { + limit = { + NOT = { + has_character_modifier = wc_divine_storm_character_modifier + } + } + apply_character_divine_storm_effect = yes + } + } + } + } + } + } +} +apply_character_divine_storm_effect = { + if = { + limit = { + NOT = { + has_character_modifier = wc_divine_storm_character_modifier + } + } + if = { + limit = { + OR = { + culture = { has_same_culture_heritage = culture:eredruin } + culture = { has_same_culture_heritage = culture:scourge } + has_trait = being_void + has_trait = being_demon + has_trait = being_undead + } + } + random_list = { + 40 = { + add_or_increase_burned_effect = yes + } + 40 = { + if = { + limit = { + NOT = { has_trait = wounded_1 } + } + add_trait = wounded_1 + } + else = { + change_trait_rank = { trait = wounded rank = 1 max = 3 } + } + } + 30 = { + modifier = { + always = yes + subtract = wc_light_magic_resistance_value + } + override_death_killer_effect = { death_reason = death_divine_storm killer = root } + } + 30 = { + add_trait = holy_wrath + } + } + } + add_character_modifier = { + modifier = wc_divine_storm_character_modifier + } + + trigger_event = { + on_action = wc_divine_storm_removal_pulse + months = 1 + } + } +} + +cast_blessed_bastion_effect = { + root = { + add_character_modifier = { + modifier = wc_blessed_bastion_modifier + days = wc_spell_blessed_bastion_duration_days_value + } + } + if = { + limit = { has_variable_list = blessed_bastion_targets_list } + blessed_bastion_effect = { LIST = blessed_bastion_targets_list } + } + else_if = { + limit = { has_variable_list = spell_targets_list } + blessed_bastion_effect = { LIST = spell_targets_list } + } +} + +blessed_bastion_effect = { + every_in_list = { + variable = $LIST$ + save_scope_as = this_recipient + every_de_jure_county = { + add_county_modifier = { + modifier = wc_blessed_bastion_county_modifier + days = wc_spell_blessed_bastion_duration_days_value + } + } + } +} + +final_stand_effect = { + add_character_modifier = { + modifier = important_lore_character + years = 1 + } + add_piety = 1000 + add_prestige = 1000 + add_legitimacy = 300 + faith = { + change_fervor = { + value = 3 + desc = fervor_gain_final_stand + } + } +} \ No newline at end of file diff --git a/common/scripted_effects/wc_resource_effects.txt b/common/scripted_effects/wc_resource_effects.txt index afc527155c..18325dab55 100644 --- a/common/scripted_effects/wc_resource_effects.txt +++ b/common/scripted_effects/wc_resource_effects.txt @@ -21,10 +21,13 @@ wc_recalculate_prowess_from_mana_effect = { limit = { # So that prowess and related things to it, like army quality, don't flick every month trigger_if = { limit = { has_variable = wc_current_mana_to_prowess_variable } - NOT = { wc_current_mana_to_prowess_value = var:wc_current_mana_to_prowess_variable } + OR = { + NOT = { wc_current_mana_to_prowess_value = var:wc_current_mana_to_prowess_variable } + var:wc_current_mana_to_prowess_variable = 1 + } } trigger_else = { - always = yes + always = yes } } @@ -32,8 +35,13 @@ wc_recalculate_prowess_from_mana_effect = { if = { limit = { wc_current_mana_to_prowess_value > 0 - NOT = { has_character_modifier = wc_prowess_from_available_mana_modifier } } + if = { + limit = { + has_character_modifier = wc_prowess_from_available_mana_modifier + } + remove_character_modifier = wc_prowess_from_available_mana_modifier + } add_character_modifier = { modifier = wc_prowess_from_available_mana_modifier } } diff --git a/common/scripted_effects/wc_vanilla_effects.txt b/common/scripted_effects/wc_vanilla_effects.txt index 65b08e2762..9e1d93b908 100644 --- a/common/scripted_effects/wc_vanilla_effects.txt +++ b/common/scripted_effects/wc_vanilla_effects.txt @@ -1,170 +1,239 @@ # Override death effect for mod mechanics override_death_effect = { - save_scope_value_as = { - name = death_reason - value = flag:$death_reason$ - } - if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as - - if = { - limit = { return_to_twisting_nether_trigger = yes } - return_to_twisting_nether_effect = yes - } - else = { - death = { death_reason = $death_reason$ } - } + if = { + limit = { + is_alive = yes + } + save_scope_value_as = { + name = death_reason + value = flag:$death_reason$ + } + if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as + + if = { + limit = { return_to_twisting_nether_trigger = yes } + return_to_twisting_nether_effect = yes + } + if = { + limit = { + has_character_modifier = wc_salvation_modifier + NOR = { + scope:death_reason = flag:death_natural_causes + scope:death_reason = flag:death_peaceful + scope:death_reason = flag:death_old_age + } + } + show_as_tooltip = { + proc_salvation_effect = yes + } + trigger_event = { + id = wc_magic_spell_events.4000 + } + } + else = { + death = { death_reason = $death_reason$ } + } + } } override_death_killer_effect = { - save_scope_value_as = { - name = death_reason - value = flag:$death_reason$ - } - if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as - $killer$ = { save_scope_as = killer } + if = { + limit = { + is_alive = yes + } + save_scope_value_as = { + name = death_reason + value = flag:$death_reason$ + } + if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as + $killer$ = { save_scope_as = killer } - if = { - limit = { return_to_twisting_nether_trigger = yes } - return_to_twisting_nether_effect = yes - random_secret = { - limit = { - secret_type = secret_murder - secret_target = scope:killer - } - set_variable = { - name = was_banished_to_nether - value = yes - } - } - } - else = { - death = { death_reason = $death_reason$ killer = $killer$ } - } + if = { + limit = { return_to_twisting_nether_trigger = yes } + return_to_twisting_nether_effect = yes + random_secret = { + limit = { + secret_type = secret_murder + secret_target = scope:killer + } + set_variable = { + name = was_banished_to_nether + value = yes + } + } + } + if = { + limit = { has_character_modifier = wc_salvation_modifier } + show_as_tooltip = { + proc_salvation_effect = yes + } + trigger_event = { + id = wc_magic_spell_events.4000 + } + random_secret = { + limit = { + secret_type = secret_murder + secret_target = scope:killer + } + set_variable = { + name = was_saved_with_salvation + value = yes + } + } + } + else = { + death = { death_reason = $death_reason$ killer = $killer$ } + } + } } override_death_killer_artifact_effect = { - save_scope_value_as = { - name = death_reason - value = flag:$death_reason$ - } - if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as - $killer$ = { save_scope_as = killer } - - if = { - limit = { return_to_twisting_nether_trigger = yes } - return_to_twisting_nether_effect = yes - random_secret = { - limit = { - secret_type = secret_murder - secret_target = scope:killer - } - set_variable = { - name = was_banished_to_nether - value = yes - } - } - } - else = { - death = { death_reason = $death_reason$ killer = $killer$ artifact = $artifact$ } - } - - $killer$ = { buff_frostmourne_if_equipped_effect = yes } + if = { + limit = { + is_alive = yes + } + save_scope_value_as = { + name = death_reason + value = flag:$death_reason$ + } + if = { limit = { scope:death_reason = flag:$death_reason$ } } #to remove entire error list in error.log, honestly i dont even know why we need this save_scope_value_as + $killer$ = { save_scope_as = killer } + + if = { + limit = { return_to_twisting_nether_trigger = yes } + return_to_twisting_nether_effect = yes + random_secret = { + limit = { + secret_type = secret_murder + secret_target = scope:killer + } + set_variable = { + name = was_banished_to_nether + value = yes + } + } + } + if = { + limit = { has_character_modifier = wc_salvation_modifier } + show_as_tooltip = { + proc_salvation_effect = yes + } + trigger_event = { + id = wc_magic_spell_events.4000 + } + random_secret = { + limit = { + secret_type = secret_murder + secret_target = scope:killer + } + set_variable = { + name = was_saved_with_salvation + value = yes + } + } + } + else = { + death = { death_reason = $death_reason$ killer = $killer$ artifact = $artifact$ } + } + + $killer$ = { buff_frostmourne_if_equipped_effect = yes } + } } create_new_custom_empire_decision_effect = { - custom_tooltip = create_new_empire - show_as_tooltip = { - every_held_title = { - custom = create_title_every_held_kingdom - limit = { - tier = tier_kingdom - } - custom_tooltip = create_custom_empire_de_jure_changes - } - } + custom_tooltip = create_new_empire + show_as_tooltip = { + every_held_title = { + custom = create_title_every_held_kingdom + limit = { + tier = tier_kingdom + } + custom_tooltip = create_custom_empire_de_jure_changes + } + } - hidden_effect = { - save_scope_as = founder - primary_title = { - save_scope_as = old_title - } + hidden_effect = { + save_scope_as = founder + primary_title = { + save_scope_as = old_title + } - create_dynamic_title = { - tier = empire - name = $NAME$ - } - create_title_and_vassal_change = { - type = created - save_scope_as = change - add_claim_on_loss = no - } + create_dynamic_title = { + tier = empire + name = $NAME$ + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } - scope:new_title = { - change_title_holder = { - holder = root - change = scope:change - } - } + scope:new_title = { + change_title_holder = { + holder = root + change = scope:change + } + } - resolve_title_and_vassal_change = scope:change + resolve_title_and_vassal_change = scope:change - every_held_title = { - limit = { - tier = tier_kingdom - } - if = { - limit = { - #Check if you need to notify a player - exists = empire - empire = { - exists = holder - holder = { - NOT = { this = root } - is_ai = no - } - } - } - add_to_temporary_list = kingdoms_for_notification - root = { - save_temporary_scope_value_as = { - name = send_notifications - value = yes - } - } - } - set_de_jure_liege_title = scope:new_title - } + every_held_title = { + limit = { + tier = tier_kingdom + } + if = { + limit = { + #Check if you need to notify a player + exists = empire + empire = { + exists = holder + holder = { + NOT = { this = root } + is_ai = no + } + } + } + add_to_temporary_list = kingdoms_for_notification + root = { + save_temporary_scope_value_as = { + name = send_notifications + value = yes + } + } + } + set_de_jure_liege_title = scope:new_title + } - every_sub_realm_county = { - limit = { - exists = kingdom - NOT = { exists = kingdom.holder } - holder.top_liege = root - kingdom = { - save_temporary_scope_as = test_kingdom - } - holder.top_liege = { - completely_controls = scope:test_kingdom - } - } - if = { - limit = { - NOT = { - kingdom = { - is_in_list = additional_de_jure_kingdoms - } - } - } - kingdom = { - set_de_jure_liege_title = scope:new_title - add_to_list = additional_de_jure_kingdoms - } - } - } + every_sub_realm_county = { + limit = { + exists = kingdom + NOT = { exists = kingdom.holder } + holder.top_liege = root + kingdom = { + save_temporary_scope_as = test_kingdom + } + holder.top_liege = { + completely_controls = scope:test_kingdom + } + } + if = { + limit = { + NOT = { + kingdom = { + is_in_list = additional_de_jure_kingdoms + } + } + } + kingdom = { + set_de_jure_liege_title = scope:new_title + add_to_list = additional_de_jure_kingdoms + } + } + } - scope:new_title = { - set_coa = scope:old_title - set_color_from_title = scope:old_title - set_capital_county = scope:old_title.title_capital_county - } - set_primary_title_to = scope:new_title - } + scope:new_title = { + set_coa = scope:old_title + set_color_from_title = scope:old_title + set_capital_county = scope:old_title.title_capital_county + } + set_primary_title_to = scope:new_title + } } diff --git a/common/scripted_guis/wc_magic_guis.txt b/common/scripted_guis/wc_magic_guis.txt index 3d08feb5f2..5c9f512176 100644 --- a/common/scripted_guis/wc_magic_guis.txt +++ b/common/scripted_guis/wc_magic_guis.txt @@ -4,14 +4,15 @@ wc_show_mp_gui = { scope = character is_shown = { wc_mp_value > 0 } } # Used to open_spellbook_sgui = { scope = character - effect = { - if = { - limit = { - NOT = { exists = global_var:spellbook_init } - } - init_elemental_fire_spells_effect = yes - init_order_spells_effect = yes - + effect = { + if = { + limit = { + NOT = { exists = global_var:spellbook_init } + } + init_elemental_fire_spells_effect = yes + init_order_spells_effect = yes + init_light_spells_effect = yes + # set_global_variable = spellbook_init } # Temporary list so spell types will be displayed @@ -697,6 +698,7 @@ can_cast_spell_sgui = { spell_hack_activated_trigger = no wc_presence_of_mind_activated_trigger = no wc_reverse_causality_activated_trigger = no + exists = var:current_spell_mana_cost } all_requirements_for_casting_satisfied_trigger = yes } @@ -971,6 +973,15 @@ spell_target_is_character_sgui = { } } +spell_target_is_character_list_sgui = { + scope = character + is_valid = { + exists = var:current_spell_name + exists = var:current_spell_rank + spell_target_is_character_list_trigger = { SPELL = var:current_spell_name RANK_VALUE = var:current_spell_rank } + } +} + spell_target_is_province_sgui = { scope = character @@ -1473,4 +1484,31 @@ chronomancy_modifier_list_sgui = { is_valid = { has_variable_list = chronomancy_modifier_list } +} + +wc_monitoring_consecration_sgui = { + scope = character + is_valid = { + has_variable = consecration_county + var:consecration_county = { + OR = { + any_de_jure_county = { + has_county_modifier = wc_consecration_county_positive_modifier + } + any_de_jure_county = { + has_county_modifier = wc_consecration_county_negative_modifier + } + } + } + } +} + +wc_move_consecration_sgui = { + scope = character + saved_scopes = { county } + effect = { + move_consecration_effect = { + COUNTY = scope:county + } + } } \ No newline at end of file diff --git a/common/scripted_triggers/wc_magic_spells_triggers.txt b/common/scripted_triggers/wc_magic_spells_triggers.txt index 11f1a0b339..7999b2fad3 100644 --- a/common/scripted_triggers/wc_magic_spells_triggers.txt +++ b/common/scripted_triggers/wc_magic_spells_triggers.txt @@ -27,6 +27,21 @@ $TRIGGER$ = { SPELL = flag:frostfire_bolt } $TRIGGER$ = { SPELL = flag:evocation } $TRIGGER$ = { SPELL = flag:arcane_dome } + $TRIGGER$ = { SPELL = flag:flash_of_light } + $TRIGGER$ = { SPELL = flag:dispel } + $TRIGGER$ = { SPELL = flag:lightwell } + $TRIGGER$ = { SPELL = flag:holy_fire } + $TRIGGER$ = { SPELL = flag:judgement } + $TRIGGER$ = { SPELL = flag:exorcism } + $TRIGGER$ = { SPELL = flag:expulsion } + $TRIGGER$ = { SPELL = flag:avenging_wrath } + $TRIGGER$ = { SPELL = flag:salvation } + $TRIGGER$ = { SPELL = flag:bless } + $TRIGGER$ = { SPELL = flag:divine_shield } + $TRIGGER$ = { SPELL = flag:consecration } + $TRIGGER$ = { SPELL = flag:rebuke } + $TRIGGER$ = { SPELL = flag:divine_storm } + $TRIGGER$ = { SPELL = flag:blessed_bastion } } } @@ -55,8 +70,8 @@ any_spell_modifier_trigger = { $TRIGGER$ = { MODIFIER = wc_elemental_fire_major_efficiency SPELL = planar_fire TYPE = positive } $TRIGGER$ = { MODIFIER = wc_elemental_fire_major_companionship SPELL = planar_fire TYPE = positive } $TRIGGER$ = { MODIFIER = wc_elemental_fire_minor_companionship SPELL = planar_fire TYPE = positive } - $TRIGGER$ = { MODIFIER = wc_elemental_fire_fear_me SPELL = planar_fire TYPE = positive } - $TRIGGER$ = { MODIFIER = wc_elemental_fire_love_me SPELL = planar_fire TYPE = positive } + # $TRIGGER$ = { MODIFIER = wc_elemental_fire_fear_me SPELL = planar_fire TYPE = positive } + # $TRIGGER$ = { MODIFIER = wc_elemental_fire_love_me SPELL = planar_fire TYPE = positive } # $TRIGGER$ = { MODIFIER = wc_hearth_blessing SPELL = iforgot TYPE = positive } # $TRIGGER$ = { MODIFIER = wc_elemental_fire_planar_fire SPELL = planar_fire TYPE = positive } $TRIGGER$ = { MODIFIER = wc_fire_magic_blessing SPELL = planar_fire TYPE = positive } @@ -86,6 +101,14 @@ any_spell_modifier_trigger = { # $TRIGGER$ = { MODIFIER = wc_blizzard_character SPELL = iforgot TYPE = negative } # Only applied when inside specific location $TRIGGER$ = { MODIFIER = wc_slow SPELL = haste TYPE = negative } # $TRIGGER$ = { MODIFIER = wc_arcane_dome_character SPELL = iforgot TYPE = negative } # Only applied when inside specific location + $TRIGGER$ = { MODIFIER = wc_exorcism SPELL = exorcism TYPE = negative } + $TRIGGER$ = { MODIFIER = wc_lightwell SPELL = lightwell TYPE = positive } + $TRIGGER$ = { MODIFIER = wc_holy_fire SPELL = holy_fire TYPE = negative } + # $TRIGGER$ = { MODIFIER = wc_saved_with_salvation SPELL = salvation TYPE = negative } Ritual modifier # + # $TRIGGER$ = { MODIFIER = wc_salvation SPELL = salvation TYPE = positive } Ritual modifier # + $TRIGGER$ = { MODIFIER = wc_rebuke SPELL = none TYPE = negative } + # $TRIGGER$ = { MODIFIER = wc_divine_storm_character SPELL = divine_storm TYPE = negative } # Only applied when inside specific location + $TRIGGER$ = { MODIFIER = wc_blessed_bastion SPELL = blessed_bastion TYPE = positive } } } @@ -98,6 +121,15 @@ has_positive_spell_modifier = { } } +has_negative_spell_modifier = { + has_character_modifier = $MODIFIER$_modifier + flag:$TYPE$ = flag:negative + + NOT = { # Error Prevention + flag:$SPELL$ = flag:error + } +} + is_known_spell_trigger = { custom_description = { text = is_known_spell_trigger @@ -205,19 +237,20 @@ is_casting_spell_trigger = { has_sufficient_mana_trigger = { custom_description = { text = has_sufficient_mana_trigger - trigger_if = { - limit = { - has_variable = current_spell_mana_cost - } - var:current_spell_mana_cost <= var:wc_current_mana_variable - } + exists = var:current_spell_mana_cost + var:current_spell_mana_cost <= var:wc_current_mana_variable } } has_sufficient_mana_value_trigger = { custom_description = { text = has_sufficient_mana_trigger - $VALUE$ <= var:wc_current_mana_variable + trigger_if = { + limit = { + has_variable = wc_current_mana_variable + } + $VALUE$ <= var:wc_current_mana_variable + } } } @@ -236,6 +269,7 @@ wc_reverse_causality_activated_trigger = { all_requirements_for_casting_satisfied_trigger = { has_variable = current_spell_name has_variable = current_spell_rank + has_variable = current_spell_mana_cost has_spell_selected_trigger = yes has_sufficient_mana_trigger = yes has_selected_spell_rank_trigger = yes @@ -305,9 +339,10 @@ all_requirements_for_casting_satisfied_trigger = { } custom_tooltip = { # Recipient must be a magic user text = wc_spell_is_magic_user - #OR = { - var:current_spell_name ?= flag:burnout - #} + OR = { + var:current_spell_name ?= flag:burnout + var:current_spell_name ?= flag:rebuke + } var:spell_recipient = { is_magic_user_trigger = no } } custom_tooltip = { @@ -444,6 +479,19 @@ has_monitored_spells_trigger = { has_variable_list = chronomancy_trait_list } } + trigger_else_if = { # Consecration + limit = { + is_known_spell_trigger = { SPELL = flag:consecration } + } + has_variable = consecration_county + var:consecration_county = { + var:consecration_owner ?= root + OR = { + has_county_modifier = wc_consecration_county_negative_modifier + has_county_modifier = wc_consecration_county_positive_modifier + } + } + } trigger_else = { always = no } @@ -465,6 +513,7 @@ spell_has_monitoring_gui_trigger = { # If the spell needs/has monitoring via GUI $SPELL$ = flag:backdraft $SPELL$ = flag:burnout $SPELL$ = flag:chronomancy + $SPELL$ = flag:consecration } } @@ -476,7 +525,9 @@ target_has_max_stacks_trigger = { limit = { OR = { $SPELL$ = flag:planar_fire - } + $SPELL$ = flag:divine_storm + $SPELL$ = flag:judgement + } } # No such thing as stacks always = no } @@ -509,6 +560,12 @@ target_has_max_stacks_trigger = { } # 3 stacks $TARGET$.title_province = { has_variable = lava_lash_3 } } + trigger_else_if = { + limit = { + $SPELL$ = flag:exorcism + } # 3 stacks + $TARGET$ = { has_variable = exorcism_3 } + } trigger_else_if = { limit = { $SPELL$ = flag:backdraft @@ -582,25 +639,95 @@ target_has_max_stacks_trigger = { } } } - trigger_else_if = { - limit = { - $SPELL$ = flag:polymorph - } # worst trait - $TARGET$ = { has_trait = polymorph } - } - trigger_else_if = { + trigger_else_if = { limit = { - $SPELL$ = flag:counterspell - } # worst trait - $TARGET$ = { has_character_modifier = wc_counterspell_modifier } + $SPELL$ = flag:holy_fire + } + $TARGET$ = { + has_character_modifier = wc_holy_fire_modifier + } } - trigger_else_if = { + trigger_else_if = { limit = { - $SPELL$ = flag:scry - } # worst trait - $TARGET$ = { has_character_modifier = wc_scry_modifier } + $SPELL$ = flag:lightwell + } + $TARGET$ = { + has_character_modifier = wc_lightwell_modifier + } } + trigger_else_if = { + limit = { + $SPELL$ = flag:avenging_wrath + } + $TARGET$ = { + has_trait = holy_wrath + } + } trigger_else_if = { + limit = { + $SPELL$ = flag:salvation + } + $TARGET$ = { + OR = { + has_character_modifier = wc_saved_with_salvation_modifier + has_character_modifier = wc_salvation_modifier + } + } + } + trigger_else_if = { + limit = { + spell_is_dispel_type_trigger = { SPELL = $SPELL$ } + } + $TARGET$ = { + has_character_flag = wc_recently_dispelled_flag + } + } + trigger_else_if = { + limit = { + $SPELL$ = flag:bless + } + $TARGET$ = { + has_character_flag = wc_recently_blessed + } + } + trigger_else_if = { + limit = { + $SPELL$ = flag:divine_shield + } + $TARGET$ = { + has_character_modifier = wc_divine_shield_modifier + } + } + trigger_else_if = { + limit = { + $SPELL$ = flag:consecration + } + $TARGET$ = { + OR = { + has_county_modifier = wc_consecration_county_negative_modifier + has_county_modifier = wc_consecration_county_positive_modifier + } + } + } + trigger_else_if = { + limit = { + $SPELL$ = flag:rebuke + } + $TARGET$ = { + has_character_modifier = wc_rebuke_modifier + } + } + trigger_else_if = { + limit = { + $SPELL$ = flag:blessed_bastion + } + $TARGET$ = { + any_de_jure_county = { + has_county_modifier = wc_blessed_bastion_county_modifier + } + } + } + trigger_else_if = { limit = { $SPELL$ = flag:haste } # worst trait @@ -616,7 +743,7 @@ target_has_max_stacks_trigger = { } } } - trigger_else_if = { + trigger_else_if = { limit = { $SPELL$ = flag:conjure_refreshment } # worst trait @@ -630,62 +757,25 @@ target_has_max_stacks_trigger = { } } } - trigger_else_if = { + trigger_else_if = { limit = { - $SPELL$ = flag:spellsteal + $SPELL$ = flag:polymorph } # worst trait - $TARGET$ = { - any_spell_modifier_trigger = { OPERATOR = AND TRIGGER = target_and_root_has_positive_modifier_trigger } - } - } - trigger_else_if = { - limit = { - $SPELL$ = flag:pyroblast - } - AND = { - $TARGET$.army_commander = { has_trait = burned_3 } - $TARGET$.army_owner = { - NOT = { - any_knight = { - exists = knight_army - knight_army = $TARGET$ - NOT = { - has_trait = burned_3 - } - } - } - } - } + $TARGET$ = { has_trait = polymorph } } trigger_else_if = { limit = { - $SPELL$ = flag:flamestrike - } - NOT = { - $TARGET$ = { - NOT = { - any_de_jure_county = { - has_county_modifier = wc_flamestrike_modifier - } - } - } - } + $SPELL$ = flag:counterspell + } # worst trait + $TARGET$ = { has_character_modifier = wc_counterspell_modifier } } trigger_else_if = { limit = { - $SPELL$ = flag:blizzard - } - NOT = { - $TARGET$ = { - NOT = { - any_de_jure_county = { - has_county_modifier = wc_blizzard_county_modifier - } - } - } - } + $SPELL$ = flag:scry + } # worst trait + $TARGET$ = { has_character_modifier = wc_scry_modifier } } - trigger_else_if = { + trigger_else_if = { limit = { $SPELL$ = flag:fire_shield } @@ -702,112 +792,89 @@ target_has_max_stacks_trigger = { has_trait = ice_block } } - trigger_else_if = { - limit = { - $SPELL$ = flag:frostfire_bolt - } - OR = { - $TARGET$ = { has_variable = frostfire_bolt_remainder } - $TARGET$.army_commander = { has_character_modifier = wc_frostfire_bolt_good_modifier } - $TARGET$.army_commander = { has_character_modifier = wc_frostfire_bolt_bad_modifier } - } - } - trigger_else_if = { - limit = { - $SPELL$ = flag:frost_nova - } - OR = { - $TARGET$ = { has_variable = frost_nova_remainder } - $TARGET$.army_commander = { has_character_modifier = wc_frost_nova_modifier } - } - } - trigger_else_if = { - limit = { - $SPELL$ = flag:evocation - } - $TARGET$ = { has_province_modifier = wc_evocation_province_modifier } - } - trigger_else_if = { - limit = { - $SPELL$ = flag:arcane_dome - } - $TARGET$ = { has_county_modifier = wc_arcane_dome_county_modifier } - } - trigger_else_if = { - limit = { - $SPELL$ = flag:chronomancy - } - $TARGET$ = { has_character_flag = chronomancy_active } - } - trigger_else = { - always = yes + trigger_else = { + always = yes + } + } +} + +target_and_root_has_modifier_trigger = { + AND = { + has_character_modifier = $MODIFIER$ + root = { + has_character_modifier = $MODIFIER$ } } } -target_and_root_has_positive_modifier_trigger = { - trigger_if = { - limit = { - has_character_modifier = $MODIFIER$_modifier - } - root = { - has_character_modifier = $MODIFIER$_modifier - } - flag:$TYPE$ = flag:positive - } - trigger_else = { - always = no - } - - NOT = { # Error Prevention - flag:$SPELL$ = flag:error - } +target_and_root_has_modifier_trigger = { + AND = { + has_character_modifier = $MODIFIER$ + root = { + has_character_modifier = $MODIFIER$ + } + } } spell_target_is_character_list_trigger = { # Multiple characters #OR = { - AND = { $SPELL$ = flag:placeholder $RANK_VALUE$ = 1 } + AND = { $SPELL$ = flag:exorcism $RANK_VALUE$ = 2 } #} } spell_target_is_province_or_title_trigger = { # One title - OR = { # Works for ranks 2 AND 3 - AND = { $SPELL$ = flag:summon_fire_elemental $RANK_VALUE$ >= 2 } - AND = { $SPELL$ = flag:lava_lash $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:backdraft $RANK_VALUE$ = 1 } - AND = { $SPELL$ = flag:vernal_solstice $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:flamestrike $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:blizzard $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:evocation $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:arcane_dome $RANK_VALUE$ = 0 } - } + OR = { # Works for ranks 2 AND 3 + AND = { $SPELL$ = flag:summon_fire_elemental $RANK_VALUE$ >= 2 } + AND = { $SPELL$ = flag:lava_lash $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:backdraft $RANK_VALUE$ = 1 } + AND = { $SPELL$ = flag:vernal_solstice $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:flamestrike $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:blizzard $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:evocation $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:arcane_dome $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:consecration $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:divine_storm $RANK_VALUE$ = 0 } + } } spell_target_is_province_or_title_list_trigger = { # Multiple titles - #OR = { + OR = { AND = { $SPELL$ = flag:backdraft $RANK_VALUE$ >= 2 } - #} + AND = { $SPELL$ = flag:blessed_bastion $RANK_VALUE$ = 0 } + } } spell_target_is_character_trigger = { # One character - OR = { - AND = { $SPELL$ = flag:flame_shock $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:burnout $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:planar_fire $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:cauterize_wound $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:summon_fire_elemental $RANK_VALUE$ = 1 } - AND = { $SPELL$ = flag:polymorph $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:counterspell $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:spellsteal $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:scry $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:haste $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:conjure_refreshment $RANK_VALUE$ > 0 } - AND = { $SPELL$ = flag:chronomancy $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:scorch $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:fire_shield $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:frostbolt $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:frost_armor $RANK_VALUE$ = 0 } - } + OR = { + AND = { $SPELL$ = flag:dispel $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:flame_shock $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:burnout $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:planar_fire $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:cauterize_wound $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:summon_fire_elemental $RANK_VALUE$ = 1 } + AND = { $SPELL$ = flag:polymorph $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:counterspell $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:spellsteal $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:scry $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:haste $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:conjure_refreshment $RANK_VALUE$ > 0 } + AND = { $SPELL$ = flag:chronomancy $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:scorch $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:fire_shield $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:frostbolt $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:frost_armor $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:flash_of_light $RANK_VALUE$ >= 1 } + AND = { $SPELL$ = flag:lightwell $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:holy_fire $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:bless $RANK_VALUE$ >= 1 } + AND = { $SPELL$ = flag:rebuke $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:avenging_wrath $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:judgement $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:divine_shield $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:exorcism $RANK_VALUE$ = 1 } + AND = { $SPELL$ = flag:salvation $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:expulsion $RANK_VALUE$ = 0 } + } } ### for spells that target title, must specify which kind of title and rak. @@ -821,10 +888,11 @@ spell_target_title_subtype_province_trigger = { } spell_target_title_subtype_county_trigger = { - OR = { - AND = { $SPELL$ = flag:backdraft $RANK_VALUE$ = 3 } - AND = { $SPELL$ = flag:arcane_dome $RANK_VALUE$ = 0 } - } + OR = { + AND = { $SPELL$ = flag:backdraft $RANK_VALUE$ = 3 } + AND = { $SPELL$ = flag:arcane_dome $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:consecration $RANK_VALUE$ = 0 } + } } spell_target_title_subtype_duchy_trigger = { @@ -832,16 +900,19 @@ spell_target_title_subtype_duchy_trigger = { AND = { $SPELL$ = flag:vernal_solstice $RANK_VALUE$ = 0 } AND = { $SPELL$ = flag:flamestrike $RANK_VALUE$ = 0 } AND = { $SPELL$ = flag:blizzard $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:blessed_bastion $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:divine_storm $RANK_VALUE$ = 0 } } } # Use this if all ranks only target self # For rank value use spell_target_is_self_trigger spell_target_is_only_self_trigger = { - OR = { - $SPELL$ = flag:planar_fire - $SPELL$ = flag:chronomancy - } + OR = { + $SPELL$ = flag:planar_fire + $SPELL$ = flag:chronomancy + $SPELL$ = flag:blessed_bastion + } } # Use this if specific ranks only target self @@ -854,19 +925,19 @@ spell_target_is_self_trigger = { ## can be both friendly and enemy army but if they are in both triggers, they both must have different effects spell_target_is_friendly_army_trigger = { - OR = { - AND = { $SPELL$ = flag:flame_wall $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:frostfire_bolt $RANK_VALUE$ = 0 } - } + OR = { + AND = { $SPELL$ = flag:flame_wall $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:frostfire_bolt $RANK_VALUE$ = 0 } + } } spell_target_is_enemy_army_trigger = { - OR = { - AND = { $SPELL$ = flag:flame_wall $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:pyroblast $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:frostfire_bolt $RANK_VALUE$ = 0 } - AND = { $SPELL$ = flag:frost_nova $RANK_VALUE$ = 0 } - } + OR = { + AND = { $SPELL$ = flag:flame_wall $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:pyroblast $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:frostfire_bolt $RANK_VALUE$ = 0 } + AND = { $SPELL$ = flag:frost_nova $RANK_VALUE$ = 0 } + } } ## ELEMENTAL SPELLS GO HERE @@ -925,6 +996,12 @@ spell_is_helpful_trigger = { # To the recipient(s) $SPELL$ = flag:arcane_dome $SPELL$ = flag:haste $SPELL$ = flag:frostfire_bolt + $SPELL$ = flag:dispel + $SPELL$ = flag:flash_of_light + $SPELL$ = flag:lightwell + $SPELL$ = flag:bless + $SPELL$ = flag:divine_shield + $SPELL$ = flag:expulsion } } @@ -944,9 +1021,17 @@ spell_is_harmful_trigger = { # To the recipient(s) $SPELL$ = flag:blizzard $SPELL$ = flag:haste $SPELL$ = flag:frostfire_bolt + $SPELL$ = flag:spellsteal + $SPELL$ = flag:frost_nova + $SPELL$ = flag:holy_fire + $SPELL$ = flag:judgement + $SPELL$ = flag:exorcism + $SPELL$ = flag:rebuke + $SPELL$ = flag:divine_storm } } + # Spell is only harmful when not cast on self or friendly army - add to both triggers spell_is_harmful_trigger_not_self = { OR = { @@ -989,25 +1074,42 @@ spell_adds_opinion_trigger = { $SPELL$ = flag:arcane_dome $SPELL$ = flag:haste $SPELL$ = flag:frostfire_bolt + $SPELL$ = flag:holy_fire + $SPELL$ = flag:judgement + $SPELL$ = flag:exorcism + $SPELL$ = flag:rebuke + $SPELL$ = flag:divine_storm + $SPELL$ = flag:dispel + $SPELL$ = flag:flash_of_light + $SPELL$ = flag:lightwell + $SPELL$ = flag:bless + $SPELL$ = flag:divine_shield + $SPELL$ = flag:expulsion } } ## IF YOUR SPELL HAS RANKS IT GOES HERE spell_has_ranks_trigger = { - OR = { - $SPELL$ = flag:summon_fire_elemental - $SPELL$ = flag:backdraft - $SPELL$ = flag:conjure_refreshment - } + OR = { + $SPELL$ = flag:summon_fire_elemental + $SPELL$ = flag:backdraft + $SPELL$ = flag:conjure_refreshment + $SPELL$ = flag:bless + $SPELL$ = flag:flash_of_light + $SPELL$ = flag:exorcism + } } spell_is_ritual_trigger = { # RITUALS GO HERE - OR = { - $SPELL$ = flag:planar_fire - $SPELL$ = flag:vernal_solstice - $SPELL$ = flag:evocation - $SPELL$ = flag:arcane_dome - } + OR = { + $SPELL$ = flag:planar_fire + $SPELL$ = flag:vernal_solstice + $SPELL$ = flag:evocation + $SPELL$ = flag:arcane_dome + $SPELL$ = flag:salvation + $SPELL$ = flag:divine_storm + $SPELL$ = flag:blessed_bastion + } } ## SPECIAL SPELL TRIGGERS. IF YOUR SPELL HAS NO SPECIAL TRIGGERS TO CAST, JUST DO ALWAYS = YES ## @@ -1015,62 +1117,79 @@ spell_is_ritual_trigger = { # RITUALS GO HERE ## IF THE TRIGGER REFERENCES THE TARGET, PUT THE TRIGGER IN A SUB TRIGGER LIKE satisfy_spell_triggers_character TO AVOID ERROR SPAMMING ## ## CAN ALSO USE all_requirements_for_casting_satisfied_trigger IF YOU WANT IT TO CALL AFTER THE TARGET & SPELL IS SELECTED ## satisfy_spell_triggers = { - trigger_if = { # For spells that have no special triggers - limit = { - OR = { - $SPELL$ = flag:summon_fire_elemental - $SPELL$ = flag:lava_lash - $SPELL$ = flag:backdraft - $SPELL$ = flag:flame_shock - $SPELL$ = flag:planar_fire - $SPELL$ = flag:vernal_solstice - $SPELL$ = flag:polymorph - $SPELL$ = flag:counterspell - $SPELL$ = flag:scry - $SPELL$ = flag:haste - $SPELL$ = flag:conjure_refreshment - $SPELL$ = flag:chronomancy - $SPELL$ = flag:scorch - $SPELL$ = flag:flamestrike - $SPELL$ = flag:fire_shield - $SPELL$ = flag:frostfire_bolt - $SPELL$ = flag:frostbolt - $SPELL$ = flag:frost_nova - $SPELL$ = flag:frost_armor - $SPELL$ = flag:blizzard - $SPELL$ = flag:evocation - $SPELL$ = flag:arcane_dome - } - } - always = yes - } - trigger_else_if = { # You need to be at war to cast this spell - limit = { - OR = { - $SPELL$ = flag:flame_wall - $SPELL$ = flag:pyroblast - } - } - is_at_war = yes - } - trigger_else_if = { - limit = { - trigger_if = { - limit = { exists = var:spell_recipient } - var:spell_recipient ?= { - is_character_trigger = yes - } - } - trigger_if = { - limit = { exists = var:original_recipient } - var:original_recipient ?= { - is_character_trigger = yes - } - } - } - satisfy_spell_triggers_character = { SPELL = $SPELL$ } - } - trigger_else = { always = no } + trigger_if = { # For spells that have no special triggers + limit = { + OR = { + $SPELL$ = flag:summon_fire_elemental + $SPELL$ = flag:lava_lash + $SPELL$ = flag:backdraft + $SPELL$ = flag:flame_shock + $SPELL$ = flag:planar_fire + $SPELL$ = flag:vernal_solstice + $SPELL$ = flag:polymorph + $SPELL$ = flag:counterspell + $SPELL$ = flag:scorch + $SPELL$ = flag:flamestrike + $SPELL$ = flag:fire_shield + $SPELL$ = flag:frostfire_bolt + $SPELL$ = flag:frostbolt + $SPELL$ = flag:frost_nova + $SPELL$ = flag:frost_armor + $SPELL$ = flag:blizzard + $SPELL$ = flag:scry + $SPELL$ = flag:haste + $SPELL$ = flag:conjure_refreshment + $SPELL$ = flag:chronomancy + $SPELL$ = flag:scorch + $SPELL$ = flag:flamestrike + $SPELL$ = flag:fire_shield + $SPELL$ = flag:frostfire_bolt + $SPELL$ = flag:frostbolt + $SPELL$ = flag:frost_nova + $SPELL$ = flag:frost_armor + $SPELL$ = flag:blizzard + $SPELL$ = flag:evocation + $SPELL$ = flag:arcane_dome + $SPELL$ = flag:lightwell + $SPELL$ = flag:holy_fire + $SPELL$ = flag:consecration + $SPELL$ = flag:rebuke + $SPELL$ = flag:avenging_wrath + $SPELL$ = flag:divine_shield + $SPELL$ = flag:blessed_bastion + $SPELL$ = flag:exorcism + $SPELL$ = flag:bless + } + } + always = yes + } + trigger_else_if = { # You need to be at war to cast this spell + limit = { + OR = { + $SPELL$ = flag:flame_wall + $SPELL$ = flag:pyroblast + } + } + is_at_war = yes + } + trigger_else_if = { + limit = { + trigger_if = { + limit = { exists = var:spell_recipient } + var:spell_recipient ?= { + is_character_trigger = yes + } + } + trigger_if = { + limit = { exists = var:original_recipient } + var:original_recipient ?= { + is_character_trigger = yes + } + } + } + satisfy_spell_triggers_character = { SPELL = $SPELL$ } + } + trigger_else = { always = no } } # If your spell CANT be learned with Arcane's 'Spell Hack' @@ -1100,17 +1219,17 @@ spell_cant_be_hacked_trigger = { } # If your spell is a 'dispel' type of spell spell_is_dispel_type_trigger = { - # OR = { - $SPELL$ = flag:poop # Placeholder - # $SPELL$ = flag:flash_of_light - # $SPELL$ = flag:expulsion + OR = { + $SPELL$ = flag:flash_of_light + $SPELL$ = flag:dispel + $SPELL$ = flag:expulsion # $SPELL$ = flag:natures_cure # $SPELL$ = flag:invigorate # $SPELL$ = flag:coagulation # $SPELL$ = flag:stonemend # $SPELL$ = flag:drain_essence # $SPELL$ = flag:mania - # } + } } satisfy_spell_triggers_character = { @@ -1131,9 +1250,10 @@ satisfy_spell_triggers_character = { } trigger_else_if = { # You can't cast on yourself limit = { - #OR = { - $SPELL$ = flag:burnout - #} + OR = { + $SPELL$ = flag:burnout + $SPELL$ = flag:divine_storm + } } custom_tooltip = { text = wc_spell_is_self @@ -1144,41 +1264,110 @@ satisfy_spell_triggers_character = { } } trigger_else_if = { # Target must have some kind of phyiscal injury - limit = { - #OR = { - $SPELL$ = flag:cauterize_wound - #} - } - custom_tooltip = { - text = wc_spell_injury - OR = { - var:spell_recipient ?= { has_trait = wounded_1 } - var:original_recipient ?= { has_trait = wounded_1 } - var:spell_recipient ?= { has_trait = wounded_2 } - var:original_recipient ?= { has_trait = wounded_2 } - var:spell_recipient ?= { has_trait = wounded_3 } - var:original_recipient ?= { has_trait = wounded_3 } - var:spell_recipient ?= { has_trait = burned_1 } - var:original_recipient ?= { has_trait = burned_1 } - var:spell_recipient ?= { has_trait = burned_2 } - var:original_recipient ?= { has_trait = burned_2 } - var:spell_recipient ?= { has_trait = burned_3 } - var:original_recipient ?= { has_trait = burned_3 } - var:spell_recipient ?= { has_trait = frostbite_1 } - var:original_recipient ?= { has_trait = frostbite_1 } - var:spell_recipient ?= { has_trait = frostbite_2 } - var:original_recipient ?= { has_trait = frostbite_2 } - var:spell_recipient ?= { has_trait = frostbite_3 } - var:original_recipient ?= { has_trait = frostbite_3 } - var:spell_recipient ?= { has_trait = maimed } - var:original_recipient ?= { has_trait = maimed } - var:spell_recipient ?= { has_trait = one_eyed } - var:original_recipient ?= { has_trait = one_eyed } - var:spell_recipient ?= { has_trait = one_legged } - var:original_recipient ?= { has_trait = one_legged } - } + limit = { + #OR = { + $SPELL$ = flag:cauterize_wound + #} + } + custom_tooltip = { + 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_magic_injury_trigger = yes } + } + } + AND = { + exists = var:original_recipient + OR = { + var:original_recipient = { target_has_injury_trigger = yes } + var:original_recipient = { target_has_magic_injury_trigger = yes } + } + } + } + } + } + + trigger_else_if = { # Target must have some kind of phyiscal injury, magic injury, disease + limit = { + #OR = { + $SPELL$ = flag:flash_of_light + #} + } + 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_magic_injury_trigger = yes } + var:spell_recipient = { target_has_illness_trigger = yes } + var:spell_recipient = { target_has_magic_illness_trigger = yes } + } + } + AND = { + exists = var:original_recipient + OR = { + var:original_recipient = { target_has_injury_trigger = yes } + var:original_recipient = { target_has_magic_injury_trigger = yes } + var:original_recipient = { target_has_illness_trigger = yes } + var:original_recipient = { target_has_magic_illness_trigger = yes } + } + } + } + } + } + trigger_else_if = { # Target must have some kind of negative magic modifier + limit = { + #OR = { + $SPELL$ = flag:dispel + #} + } + + custom_tooltip = { + text = wc_spell_has_modifier + var:spell_recipient ?= { + any_spell_modifier_trigger = { OPERATOR = OR TRIGGER = has_negative_spell_modifier } + } } - } + } + trigger_else_if = { # Must have a secret + limit = { + #OR = { + $SPELL$ = flag:judgement + #} + } + custom_description = { + text = has_any_secrets_trigger + OR = { + var:spell_recipient ?= { has_any_secrets = yes } + var:original_recipient ?= { has_any_secrets = yes } + } + } + } + trigger_else_if = { # Must have a psych illess + limit = { + #OR = { + $SPELL$ = flag:expulsion + #} + } + custom_description = { + text = target_has_psych_illness_trigger + OR = { + AND = { + exists = var:spell_recipient + var:spell_recipient = { target_has_psych_illness_trigger = yes } + } + AND = { + exists = var:original_recipient + var:original_recipient = { target_has_psych_illness_trigger = yes } + } + } + } + } trigger_else_if = { # Target must have some kind of positive magic modifier limit = { #OR = { @@ -1192,5 +1381,106 @@ satisfy_spell_triggers_character = { } } } + trigger_else_if = { # Salvation special + limit = { + $SPELL$ = flag:salvation + } + custom_tooltip = { + text = wc_salvation_trigger + NOT = { + OR = { + var:spell_recipient ?= root + var:original_recipient ?= root + } + OR = { + var:spell_recipient ?= { has_trait = being_demon } + var:original_recipient ?= { has_trait = being_demon } + } + } + } + } + trigger_else_if = { # Can't have consecration active already + limit = { + $SPELL$ = flag:consecration + } + custom_tooltip = { + text = wc_consecration_trigger + OR = { + NOT = { has_variable = consecration_county } + var:consecration_county ?= { + NOT = { + OR = { + any_de_jure_county = { + has_county_modifier = wc_consecration_county_positive_modifier + } + any_de_jure_county = { + has_county_modifier = wc_consecration_county_negative_modifier + } + } + } + } + } + } + } trigger_else = { always = no } +} + +target_has_magic_illness_trigger = { + custom_description = { + text = target_has_magic_illness_trigger + has_trait_with_flag = magic_illness + } +} + +target_has_illness_trigger = { + custom_description = { + text = target_has_illness_trigger + any_character_trait = { + has_trait_flag = illness + NOT = { has_trait_flag = debilitating_illness } + NOT = { has_trait_flag = magic_illness } + } + } +} + +target_has_major_illness_trigger = { + custom_description = { + text = target_has_illness_trigger + any_character_trait = { + has_trait_flag = debilitating_illness + NOT = { has_trait_flag = magic_illness } + } + } +} + +target_has_injury_trigger = { + custom_description = { + text = target_has_injury_trigger + any_character_trait = { + has_trait_flag = injury + NOT = { has_trait_flag = major_injury } + NOT = { has_trait_flag = magic_injury } + } + } +} + +target_has_major_injury_trigger = { + custom_description = { + text = target_has_major_injury_trigger + has_trait_with_flag = major_injury + } +} + +target_has_magic_injury_trigger = { + custom_description = { + text = target_has_magic_injury_trigger + has_trait_with_flag = magic_injury + } +} + +target_has_psych_illness_trigger = { + custom_description = { + text = target_has_psych_illness_trigger + has_trait_with_flag = psych_illness + } } \ No newline at end of file diff --git a/common/secret_types/00_secret_types.txt b/common/secret_types/00_secret_types.txt index df055b3db3..e6bb3d57be 100644 --- a/common/secret_types/00_secret_types.txt +++ b/common/secret_types/00_secret_types.txt @@ -453,6 +453,17 @@ secret_murder = { } } } + else_if = { + limit = { + exists = var:was_saved_with_salvation + } + scope:victim = { + set_death_reason = { + death_reason = death_salvation + killer = scope:murderer + } + } + } else = { scope:victim = { set_death_reason = { diff --git a/common/traits/00_traits.txt b/common/traits/00_traits.txt index 28f06f3757..72d25cf9b8 100644 --- a/common/traits/00_traits.txt +++ b/common/traits/00_traits.txt @@ -4951,6 +4951,8 @@ depressed_1 = { fertility = -0.1 + flag = psych_illness + shown_in_ruler_designer = no desc = { @@ -5016,7 +5018,8 @@ lunatic_1 = { # Highly event driven, Schizophrenia hostile_scheme_resistance_mult = 0.1 health = -0.25 category = health - + + flag = psych_illness shown_in_ruler_designer = no desc = { @@ -5078,6 +5081,7 @@ possessed_1 = { # Highly event driven, Temporal lobe epilepsy level = 1 category = health + flag = psych_illness monthly_learning_lifestyle_xp_gain_mult = 0.1 health = -0.5 @@ -5158,7 +5162,7 @@ ill = { ruler_designer_cost = 0 flag = illness - flag = debilitating_illness + #Warcraft flag = blocks_getting_non_epidemic_disease desc = { @@ -5198,6 +5202,7 @@ pneumonic = { ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5238,6 +5243,7 @@ great_pox = { #Syphilis ruler_designer_cost = -10 flag = illness + flag = debilitating_illness flag = blocks_getting_non_epidemic_disease desc = { @@ -5319,6 +5325,7 @@ leper = { ruler_designer_cost = -30 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5511,6 +5518,7 @@ one_eyed = { ruler_designer_cost = 10 flag = injury + flag = major_injury desc = { first_valid = { @@ -5533,9 +5541,11 @@ one_legged = { prowess = -4 dread_baseline_add = -10 - attraction_opinion = -10 + flag = injury + flag = major_injury + culture_modifier = { parameter = wounds_and_scars_give_bonuses monthly_prestige_gain_mult = 0.15 @@ -5564,7 +5574,7 @@ disfigured = { diplomacy = -4 fertility = -0.2 flag = injury - + flag = major_injury #No dread loss: you're not actually worse for wear physically or mentally. attraction_opinion = -20 @@ -5676,8 +5686,8 @@ gout_ridden = { ruler_designer_cost = -5 + # Warcraft flag = illness - flag = debilitating_illness flag = blocks_getting_non_epidemic_disease desc = { @@ -5713,7 +5723,6 @@ consumption = { # Tuberculosis ruler_designer_cost = 0 flag = illness - flag = debilitating_illness flag = blocks_getting_non_epidemic_disease desc = { @@ -5742,6 +5751,7 @@ cancer = { ruler_designer_cost = -10 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5780,6 +5790,7 @@ typhus = { ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5819,6 +5830,7 @@ bubonic_plague = { shown_in_ruler_designer = no + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5856,6 +5868,7 @@ smallpox = { ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5892,6 +5905,7 @@ measles = { ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5927,6 +5941,7 @@ dysentery = { # Bloody Flux ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5961,6 +5976,7 @@ ergotism = { # Holy Fire ruler_designer_cost = 0 + # Warcraft flag = illness flag = debilitating_illness flag = blocks_getting_non_epidemic_disease @@ -5993,7 +6009,6 @@ sickly = { shown_in_ruler_designer = no flag = illness - flag = debilitating_illness desc = { first_valid = { diff --git a/common/traits/wc_magic_traits.txt b/common/traits/wc_magic_traits.txt index 57032512bf..9c755bb2c6 100644 --- a/common/traits/wc_magic_traits.txt +++ b/common/traits/wc_magic_traits.txt @@ -14,6 +14,7 @@ group = burned level = 1 flag = injury + flag = magic_injury desc = { first_valid = { @@ -50,6 +51,7 @@ burned_2 = { group = burned level = 2 flag = injury + flag = magic_injury desc = { first_valid = { @@ -86,6 +88,8 @@ burned_3 = { flag = no_message flag = injury + flag = magic_injury + desc = { first_valid = { triggered_desc = { @@ -122,6 +126,7 @@ frostbite_1 = { group = frostbite level = 1 flag = injury + flag = magic_injury desc = { first_valid = { @@ -158,6 +163,7 @@ frostbite_2 = { group = frostbite level = 2 flag = injury + flag = magic_injury desc = { first_valid = { @@ -194,6 +200,8 @@ frostbite_3 = { flag = no_message flag = injury + flag = magic_injury + desc = { first_valid = { triggered_desc = { @@ -263,4 +271,36 @@ polymorph = { flag = unkillable can_have_children = no disables_combat_leadership = yes +} + +holy_wrath = { + category = health + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = this } + } + desc = trait_holy_wrath_desc + } + desc = trait_holy_wrath_character_desc + } + } + + flag = injury + flag = magic_injury + + learning = -2 + health = -0.5 + prowess = -4 + + dread_loss_mult = 1 + + attraction_opinion = -10 + + shown_in_ruler_designer = no + + flag = no_light_magic_resistance + flag = minor_magical_prowess_loss + flag = holy_wrath_special_flag } \ No newline at end of file diff --git a/common/trigger_localization/wc_magic_triggers.txt b/common/trigger_localization/wc_magic_triggers.txt index 5824ed88b3..453ec67207 100644 --- a/common/trigger_localization/wc_magic_triggers.txt +++ b/common/trigger_localization/wc_magic_triggers.txt @@ -112,6 +112,38 @@ spell_cant_be_hacked_trigger = { first = WC_CANT_HACK_SPELL } +target_has_magic_illness_trigger = { + first_not = WC_TARGET_HAS_MAGIC_ILLNESS_TRIGGER_GLOBAL_NOT +} + +target_has_illness_trigger = { + first_not = WC_TARGET_HAS_ILLNESS_TRIGGER_GLOBAL_NOT +} + +target_has_injury_trigger = { + first_not = WC_TARGET_HAS_INJURY_TRIGGER_GLOBAL_NOT +} + +target_has_major_injury_trigger = { + first_not = WC_TARGET_HAS_MAJOR_INJURY_TRIGGER_GLOBAL_NOT +} + +target_has_magic_injury_trigger = { + first_not = WC_TARGET_HAS_MAGIC_INJURY_TRIGGER_GLOBAL_NOT +} + +target_has_valid_debuff_trigger = { + first_not = WC_TARGET_HAS_VALID_DEBUFF_TRIGGER_GLOBAL_NOT +} + +has_any_secrets_trigger = { + first_not = WC_HAS_ANY_SECRETS_TRIGGER_GLOBAL_NOT +} + +target_has_psych_illness_trigger = { + first_not = WC_TARGET_HAS_PSYCH_ILLNESS_TRIGGER_GLOBAL_NOT +} + spell_is_ritual_trigger = { first = WC_SPELL_IS_RITUAL first_not = WC_SPELL_IS_NOT_RITUAL diff --git a/events/activities/hold_court_activity/hold_court_events_general.txt b/events/activities/hold_court_activity/hold_court_events_general.txt index 1d959d4d77..d5db191a07 100644 --- a/events/activities/hold_court_activity/hold_court_events_general.txt +++ b/events/activities/hold_court_activity/hold_court_events_general.txt @@ -23174,7 +23174,7 @@ hold_court.7050 = { show_chance = no desc = hold_court.7050.b.victory scope:lunatic_soldier = { - death = { + override_death_killer_effect = { killer = root death_reason = death_duel } @@ -23198,7 +23198,7 @@ hold_court.7050 = { 50 = { show_chance = no desc = hold_court.7050.b.defeat - death = { + override_death_killer_effect = { killer = scope:lunatic_soldier death_reason = death_duel } @@ -23297,7 +23297,7 @@ hold_court.7051 = { if = { limit = { scope:sc_victor = { this = scope:lunatic_soldier } } scope:lunatic_soldier = { - death = { + override_death_effect = { death_reason = death_suicide } } diff --git a/events/activities/tour_activity/tour_general_events.txt b/events/activities/tour_activity/tour_general_events.txt index 218422c638..0f4d6d21b8 100644 --- a/events/activities/tour_activity/tour_general_events.txt +++ b/events/activities/tour_activity/tour_general_events.txt @@ -1615,7 +1615,7 @@ tour_general.1001 = { desc = tour_general.1001.e.success.desc scope:visiting_liege = { - death = { + override_death_killer_effect = { killer = scope:stop_host_scope death_reason = death_fight } @@ -1640,7 +1640,7 @@ tour_general.1001 = { desc = tour_general.1001.e.bodyguard.desc scope:stop_host_scope = { - death = { + override_death_killer_effect = { killer = scope:tour_general_1001_bodyguard death_reason = death_fight } @@ -1670,7 +1670,7 @@ tour_general.1001 = { desc = tour_general.1001.e.success.desc scope:visiting_liege = { - death = { + override_death_killer_effect = { killer = scope:stop_host_scope death_reason = death_fight } @@ -1694,7 +1694,7 @@ tour_general.1001 = { desc = tour_general.1001.e.success.desc scope:stop_host_scope = { - death = { + override_death_killer_effect = { killer = scope:visiting_liege death_reason = death_fight } @@ -1921,7 +1921,7 @@ tour_general.1002 = { } } scope:tour_general_3001_target_courtier = { - death = { + override_death_effect = { death_reason = death_vanished } } diff --git a/events/activities/tour_activity/tour_phase_tour_grounds.txt b/events/activities/tour_activity/tour_phase_tour_grounds.txt index 7cd1baf9b5..f53448fd6b 100644 --- a/events/activities/tour_activity/tour_phase_tour_grounds.txt +++ b/events/activities/tour_activity/tour_phase_tour_grounds.txt @@ -387,7 +387,7 @@ tour_grounds_events.1003 = { has_trait = paranoid } show_as_tooltip = { - death = { + override_death_killer_effect = { killer = scope:fake_assassin_scope death_reason = death_murder } @@ -500,7 +500,7 @@ tour_grounds_events.1003 = { } add_stress = major_stress_impact_gain show_as_tooltip = { - death = { + override_death_killer_effect = { killer = scope:fake_assassin_scope death_reason = death_murder } @@ -3686,7 +3686,7 @@ tour_grounds_events.3008 = { random_list = { 10 = { scope:trampled_child_scope = { - death = { + override_death_killer_effect = { killer = root death_reason = death_trampled_by_horse } @@ -3873,7 +3873,7 @@ tour_grounds_events.3009 = { } } scope:trampled_child_scope = { - death = { + override_death_effect = { killer = root death_reason = death_trampled_by_horse } diff --git a/events/activities/tour_activity/tour_travel_events.txt b/events/activities/tour_activity/tour_travel_events.txt index 209de88661..430a2a7224 100644 --- a/events/activities/tour_activity/tour_travel_events.txt +++ b/events/activities/tour_activity/tour_travel_events.txt @@ -191,7 +191,7 @@ tour_travel.1001 = { value = scope:duel_value multiplier = -0.5 } - death = { + override_death_killer_effect = { killer = scope:angry_peasant death_reason = death_fight } @@ -612,7 +612,7 @@ tour_travel.1003 = { } } scope:rude_peasant = { - death = { + override_death_killer_effect = { killer = root death_reason = death_torture } @@ -1745,7 +1745,7 @@ tour_travel.1009 = { option = { # Have her executed! name = tour_travel.1009.b scope:wise_woman_scope = { - death = { + override_death_killer_effect = { killer = root death_reason = death_execution } diff --git a/events/activities/tour_activity/tour_travel_events_dan.txt b/events/activities/tour_activity/tour_travel_events_dan.txt index 4979e054e2..4d3f824896 100644 --- a/events/activities/tour_activity/tour_travel_events_dan.txt +++ b/events/activities/tour_activity/tour_travel_events_dan.txt @@ -416,16 +416,16 @@ tour_travel.3002 = { hidden_effect = { scope:widow_husband = { marry = scope:widow_peasant - death = { + override_death_effect = { death_reason = death_battle } scope:widow_father = { - death = { + override_death_effect = { death_reason = death_battle } } scope:widow_son = { - death = { + override_death_effect = { death_reason = death_battle } } @@ -1187,7 +1187,7 @@ tour_travel.3010 = { #Local shrine save_scope_as = saint_name } scope:saint_name = { - death = { death_reason = death_disappearance } + override_death_effect = { death_reason = death_disappearance } } } } @@ -1755,7 +1755,7 @@ tour_travel.3030 = { #Wrongfully accused } add_dread = miniscule_dread_gain scope:wrongfully_accused = { - death = { death_reason = death_execution } + override_death_effect = { death_reason = death_execution } } scope:accused_partner = { silent_disappearance_effect = yes } stress_impact = { diff --git a/events/death_events/death_management_events.txt b/events/death_events/death_management_events.txt index 35ddd2a7d5..cfbb9cf987 100644 --- a/events/death_events/death_management_events.txt +++ b/events/death_events/death_management_events.txt @@ -2266,7 +2266,7 @@ scripted_effect death_in_battle_scope_effect = { set_signature_weapon_effect = yes } show_as_tooltip = { - death = { + override_death_killer_effect = { death_reason = death_battle killer = scope:battle_death_killer } @@ -2274,7 +2274,7 @@ scripted_effect death_in_battle_scope_effect = { } else = { show_as_tooltip = { - death = { death_reason = death_battle } + override_death_effect = { death_reason = death_battle } } } } diff --git a/events/dlc/ce1/epidemic_events_2.txt b/events/dlc/ce1/epidemic_events_2.txt index a135e7fc13..1c3f9b3568 100755 --- a/events/dlc/ce1/epidemic_events_2.txt +++ b/events/dlc/ce1/epidemic_events_2.txt @@ -939,7 +939,7 @@ epidemic_events.2006 = { #Dancing plague add_piety = minor_piety_gain scope:dance_victim = { - death = { + override_death_killer_effect = { death_reason = death_murder killer = root } diff --git a/events/dlc/ce1/legend_spread_events_8.txt b/events/dlc/ce1/legend_spread_events_8.txt index 682dc0c555..8c9ce9b3dd 100755 --- a/events/dlc/ce1/legend_spread_events_8.txt +++ b/events/dlc/ce1/legend_spread_events_8.txt @@ -4062,7 +4062,7 @@ legend_spread_events.8172 = { localization_key = legend_chapter_accept_mortality_conclusion } } - death = { + override_death_effect = { death_reason = death_peaceful } diff --git a/events/dlc/ep2/ep2_tournament_events.txt b/events/dlc/ep2/ep2_tournament_events.txt index 83024dcab7..7a474b2229 100644 --- a/events/dlc/ep2/ep2_tournament_events.txt +++ b/events/dlc/ep2/ep2_tournament_events.txt @@ -3520,7 +3520,7 @@ ep2_tournament_events.1004 = { left_icon = root right_icon = scope:comely_stray scope:comely_stray = { - death = { death_reason = death_wounds } + override_death_effect = { death_reason = death_wounds } } } } @@ -3586,7 +3586,7 @@ ep2_tournament_events.1005 = { } } - death = { + override_death_effect = { death_reason = death_tournament_melee_throat } @@ -8635,7 +8635,7 @@ ep2_tournament_events.2006 = { hidden_effect = { tournament_contest_versus_resignation_effect = { RESIGNER = root CONTEST = wrestling SKILL = pugilism } } - death = { + override_death_effect = { death_reason = death_tournament_piledriver } scope:activity = { @@ -9721,7 +9721,7 @@ ep2_tournament_events.2506 = { } } - death = { + override_death_effect = { death_reason = death_tournament_roundhouse } @@ -10735,7 +10735,7 @@ ep2_tournament_events.3504 = { } 1 = { show_chance = no - death = { + override_death_effect = { death_reason = death_tournament_quintain_hit } diff --git a/events/dlc/ep2/wedding_events/ep2_wedding_events.txt b/events/dlc/ep2/wedding_events/ep2_wedding_events.txt index bc819dbf52..5e697aaf7a 100644 --- a/events/dlc/ep2/wedding_events/ep2_wedding_events.txt +++ b/events/dlc/ep2/wedding_events/ep2_wedding_events.txt @@ -6960,7 +6960,7 @@ ep2_wedding.1170 = { } } scope:murderee = { - death = { + override_death_killer_effect = { killer = root death_reason = death_plotting } @@ -10542,7 +10542,7 @@ ep2_wedding.1070 = { # Effect scope:1070_target = { - death = { death_reason = death_wild_animal } + override_death_effect = { death_reason = death_wild_animal } } } every_attending_character = { diff --git a/events/factions/faction_demands.txt b/events/factions/faction_demands.txt index cc97c5ae1d..54e4049df7 100644 --- a/events/factions/faction_demands.txt +++ b/events/factions/faction_demands.txt @@ -1367,7 +1367,7 @@ faction_demand.1102 = { } immediate = { - death = { + override_death_effect = { death_reason = death_vanished } } diff --git a/events/magic_events/wc_magic_perk_event.txt b/events/magic_events/wc_magic_perk_event.txt index d3a4593f53..16a1f29391 100644 --- a/events/magic_events/wc_magic_perk_event.txt +++ b/events/magic_events/wc_magic_perk_event.txt @@ -1,5 +1,6 @@ namespace = magic_perk +# Arcane Intellect by Robmart magic_perk.0001 = { title = magic_perk.0001.title desc = magic_perk.0001.desc @@ -39,4 +40,38 @@ magic_perk.0001 = { # name = magic_perk.0001.f # add_prowess_skill = 2 # } +} + +# Holy Aura by Dione +magic_perk.0002 = { + title = magic_perk.0002.title + desc = magic_perk.0002.desc + theme = light + + left_portrait = { + character = root + animation = happiness + } + + option = { + name = magic_perk.0002.devotion + add_character_modifier = wc_devotion_aura_modifier + } + + option = { + name = magic_perk.0002.retribution + custom_tooltip = magic_perk.0002.retribution_tooltip + add_character_flag = wc_retribution_aura_flag + } + + option = { + name = magic_perk.0002.concentration + add_character_modifier = wc_concentration_aura_modifier + } + + option = { + name = magic_perk.0002.vengeance + add_character_modifier = wc_vengeance_aura_modifier + } + } \ No newline at end of file diff --git a/events/magic_events/wc_magic_spell_events.txt b/events/magic_events/wc_magic_spell_events.txt index 119285b972..15850ad3c7 100644 --- a/events/magic_events/wc_magic_spell_events.txt +++ b/events/magic_events/wc_magic_spell_events.txt @@ -235,4 +235,398 @@ wc_magic_spell_events.3001 = { clear_variable_list = chronomancy_modifier_duration_list remove_character_flag = chronomancy_active } +} + +# Salvation Events by Dione + +# You are saved by Salvation +wc_magic_spell_events.4000 = { + type = character_event + theme = light + override_background = { + reference = bp1_bonfire + } + title = wc_magic_spell_events.4000.title + desc = { + desc = wc_magic_spell_events.4000.desc + first_valid = { # How did I die? + triggered_desc = { + trigger = { + scope:death_reason = flag:death_childbirth + } + desc = wc_magic_spell_events.4000.desc.death_childbirth + } + triggered_desc = { + trigger = { + scope:death_reason = flag:death_duel + } + desc = wc_magic_spell_events.4000.desc.death_duel + } + triggered_desc = { + trigger = { + scope:death_reason = flag:death_execution + } + desc = wc_magic_spell_events.4000.desc.death_execution + } + triggered_desc = { + trigger = { + scope:death_reason = flag:death_dungeon + } + desc = wc_magic_spell_events.4000.desc.death_dungeon + } + triggered_desc = { + trigger = { + scope:death_reason = flag:death_battle + } + desc = wc_magic_spell_events.4000.desc.death_battle + } + triggered_desc = { + trigger = { + scope:death_reason = flag:death_stress + } + desc = wc_magic_spell_events.4000.desc.death_stress + } + triggered_desc = { + trigger = { + OR = { + target_has_magic_illness_trigger = yes + target_has_illness_trigger = yes + target_has_major_illness_trigger = yes + target_has_injury_trigger = yes + target_has_major_injury_trigger = yes + target_has_magic_injury_trigger = yes + scope:death_reason = flag:death_wounds + } + } + desc = wc_magic_spell_events.4000.desc.death_illness + } + desc = wc_magic_spell_events.4000.desc.death_none + } + first_valid = { # Acknowledge the caster if they are alive + triggered_desc = { + trigger = { + scope:salvation_caster ?= { + is_alive = yes + } + } + desc = wc_magic_spell_events.4000.desc.caster_alive + } + desc = wc_magic_spell_events.4000.desc.caster_dead + } + desc = wc_magic_spell_events.4000.desc.middle + first_valid = { # Do you believe in the light or not? + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_light_magic_approved } + } + desc = wc_magic_spell_events.4000.desc.light_idolised + } + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_light_magic_accepted } + } + desc = wc_magic_spell_events.4000.desc.light_ok + } + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_light_magic_ignored } + } + desc = wc_magic_spell_events.4000.desc.nonbeliever + } + triggered_desc = { + trigger = { + OR = { + faith = { has_doctrine = doctrine_light_magic_shunned } + faith = { has_doctrine = doctrine_light_magic_crime } + } + } + desc = wc_magic_spell_events.4000.desc.bad + } + desc = wc_magic_spell_events.4000.desc.none + } + } + + immediate = { + var:salvation_caster = { + save_scope_as = salvation_caster + } + } + + lower_center_portrait = { + character = scope:salvation_caster + animation = idle + } + + left_portrait = { + character = root + animation = happiness + } + + option = { + name = wc_magic_spell_events.4000.a + proc_salvation_effect = yes + + if = { + limit = { # Don't double notify + exists = scope:killer + NOT = { scope:killer = scope:salvation_caster } + } + scope:killer = { + root = { save_scope_as = saved_character } + trigger_event = { + id = wc_magic_spell_events.4002 + days = { 2 5 } + } + } + } + + if = { + limit = { + scope:salvation_caster = { is_alive = yes } + } + scope:salvation_caster = { + root = { save_scope_as = saved_character } + trigger_event = { + id = wc_magic_spell_events.4001 + days = { 2 5 } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = wc_magic_spell_events.4000.b + if = { + limit = { exists = scope:killer } + death = { death_reason = death_salvation_killer killer = scope:killer } + } + else = { + death = { death_reason = death_salvation } + } + + if = { + limit = { + scope:salvation_caster = { is_alive = yes } + } + scope:salvation_caster = { + root = { save_scope_as = saved_character } + trigger_event = { + id = wc_magic_spell_events.4003 + days = { 2 5 } + } + } + } + + ai_chance = { + base = 25 + } + } +} + +# You saved someone with Salvation +wc_magic_spell_events.4001 = { + title = wc_magic_spell_events.4000.title + desc = wc_magic_spell_events.4001.desc + type = character_event + theme = light + + immediate = { + show_as_tooltip = { + root = { save_scope_as = salvation_caster } + scope:saved_character = { + proc_salvation_effect = yes + } + } + } + + left_portrait = { + character = root + animation = happiness + } + + lower_center_portrait = { + character = scope:saved_character + animation = idle + } + + option = { + name = wc_magic_spell_events.4001.a + } +} + +# Someone you tried to kill was saved by Salvation +wc_magic_spell_events.4002 = { + title = wc_magic_spell_events.4000.title + desc = wc_magic_spell_events.4002.desc + type = character_event + theme = light + + immediate = { + stress_impact = { + base = major_stress_impact_gain + } + show_as_tooltip = { + root = { save_scope_as = killer } + scope:saved_character = { + proc_salvation_effect = yes + } + } + } + + left_portrait = { + character = root + animation = anger + } + + lower_center_portrait = { + character = scope:saved_character + animation = idle + } + + option = { + name = wc_magic_spell_events.4002.a + } +} + +# You saved someone with Salvation, but they chose to die anyways +wc_magic_spell_events.4003 = { + title = wc_magic_spell_events.4000.title + desc = wc_magic_spell_events.4003.desc + type = character_event + theme = light + + immediate = { + stress_impact = { + base = medium_stress_impact_gain + } + show_as_tooltip = { + scope:saved_character = { + if = { + limit = { exists = scope:killer } + death = { death_reason = death_salvation_killer killer = scope:killer } + } + else = { + death = { death_reason = death_salvation } + } + } + } + } + + left_portrait = { + character = root + animation = sadness + } + + lower_center_portrait = { + character = scope:saved_character + animation = idle + } + + option = { + name = wc_magic_spell_events.4003.a + } +} + +# You are saved by Salvation, but you were undead +wc_magic_spell_events.4004 = { + title = wc_magic_spell_events.4000.title + desc = wc_magic_spell_events.4004.desc + type = character_event + theme = light + + immediate = { + remove_trait = being_undead + proc_salvation_effect = yes + } + + left_portrait = { + character = root + animation = happiness + } + + lower_center_portrait = { + character = scope:salvation_caster + animation = idle + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + faith = { has_doctrine = doctrine_light_magic_shunned } + faith = { has_doctrine = doctrine_light_magic_crime } + culture = { has_same_culture_heritage = culture:scourge } + } + } + desc = wc_magic_spell_events.4004.a_sus + } + desc = wc_magic_spell_events.4004.a + } + } + } + + if = { + limit = { + OR = { + has_trait = paranoid + faith = { has_doctrine = doctrine_light_magic_shunned } + faith = { has_doctrine = doctrine_light_magic_crime } + culture = { has_same_culture_heritage = culture:scourge } + } + } + stress_impact = { + base = medium_stress_impact_gain + } + } + } +} + +# You saved someone with Salvation, but they were undead +wc_magic_spell_events.4005 = { + title = wc_magic_spell_events.4000.title + desc = wc_magic_spell_events.4005.desc + type = character_event + theme = light + + immediate = { + show_as_tooltip = { + root = { save_scope_as = salvation_caster } + scope:saved_character = { + remove_trait = being_undead + proc_salvation_effect = yes + } + } + } + + left_portrait = { + character = root + animation = happiness + } + + lower_center_portrait = { + character = scope:saved_character + animation = idle + } + + option = { + name = wc_magic_spell_events.4005.a + } +} + +wc_magic_spell_events.4010 = { + hidden = yes + trigger = { + has_trait = incapable + } + immediate = { + remove_trait = incapable + } } \ No newline at end of file diff --git a/events/wc_events/wc_forsaken_events.txt b/events/wc_events/wc_forsaken_events.txt index 30e69d8b12..d8df62ae26 100644 --- a/events/wc_events/wc_forsaken_events.txt +++ b/events/wc_events/wc_forsaken_events.txt @@ -1426,12 +1426,12 @@ forsaken.9002 = { left_icon = root custom_tooltip = forsaken.9002.education_failed_tt scope:doomed_knight = { - death = { + override_death_effect = { death_reason = death_arcane_explosion } } scope:new_character = { - death = { + override_death_effect = { death_reason = death_arcane_explosion } } @@ -1466,12 +1466,12 @@ forsaken.9002 = { left_icon = root custom_tooltip = forsaken.9002.alterations_failed_tt scope:doomed_knight = { - death = { + override_death_effect = { death_reason = death_poison } } scope:new_character = { - death = { + override_death_effect = { death_reason = death_poison } } diff --git a/events/yearly_events/yearly_events_4.txt b/events/yearly_events/yearly_events_4.txt index c55692ab47..4c14006ea9 100644 --- a/events/yearly_events/yearly_events_4.txt +++ b/events/yearly_events/yearly_events_4.txt @@ -1338,7 +1338,7 @@ yearly.4021 = { } } save_scope_as = vassal_kid - death = { + override_death_effect = { death_reason = death_accident } } diff --git a/gfx/interface/icons/traits/holy_wrath.dds b/gfx/interface/icons/traits/holy_wrath.dds new file mode 100644 index 0000000000000000000000000000000000000000..fafb5ea2fc5dddd4980a7c45d1156e45e8a9002a GIT binary patch literal 57728 zcmeI54}9Haeea9n)+-9#>Z-Ne*g#f^lyzZ+Tw*cyU?@EjRw8APYqZ$)u3Mm%MXEJ` zf?0QqxpswYeXWaDx>xAzj1^`W>&x;&YF#&GZ-H4vq`-7Auk+%rjACi~yPx;-dp^HB z=a2$oQVQn0`0#zs$@%j;zxVU`K7W6w?|IMrre8f_!h~O*G;zYm6w!po_}|Zdo35A4 zjW44-VM6Br@;j5lgBAbFvTVY*#?Qfc9T=|z<8@%X4vg1<@j5VG2gd8bcpVt81LJjI zybg@lf$=&pUI)hOz<3=PuLI+CV7v~D*MadmFq(CsVliTD@4QBDk6v4)V{|{2?!N3d zA1m?LDy7Fi<_G%ovL2%Y%r_Az=dUKQ> zE5}q+to%B-AqhI$+@x3_Kw@4>N%~WiZI9?ws@uDjIw(g^MN1dif9hesNCPnH9 z=Y(_fbKPEMzMSu0i#lEL^a;mKJU8ltis(wI2i2V1ym{ss9XC&%-c)GPq}u-aQ``E9 z(x>#ik3_vs@qH7Io!A`pHpRE;GwgE}U(}6bv`*F;Pj!LrTgz3JCSE&jdeb_j^14ZH zs$DnZ)YdObcOiX;FCzWzPo$6Nm@b#jv-DYKM)|z_@{2mk!#wF_;>-D(9tGD0(iPGT z`p#?h{n6$*r4`>*yi<>DM!J7*TgSi;o9AEmpyDB7>D->jEph(loaPmKqK0ZtYW`E5 zw@*ZUP_bE`F(=BL-5%=U=iJD>9IJD|+=S=HRsQ(2>5Vrvp1o{HaY*;2iC=C!yYn$? zPHE-0#PwT>Kgi>X@9BGdPv7hB75~1u)cu{hlS@N7wzWu~_0gz{6=D5frI*b32=n#% znyzCek1mw1m^`KK25HlbQ|Il7Ot%wb`Cgridv)GI6jS*A5WcAWvY`x_aeK$$J}D!L z^S-9$<&WsRZLsutK7Z{h!x~TjiUeohI8NG9ayxA2N*|Q2o_12>0BUSrb}wqXbYQ=f z#ke1?ZI|}zv3@;9)Nx)q@B;*6eW$?J5xzS9Lqs%ZZr8VKrZ?Rot<&dmth7BZneh?i z%Q>UpGhJ$W?J=+Yu+I4nFm0OKiT(w(UpDxkRobWf`*c3Ok0RGhjDy5A@HOYi7QR7x zeg@-0XLa5?W5&F{nLN4fPjwtVf3(*yM&^2w%8gRsI^``h?X-hrb;GzVs0gK6#sb z*d}#NJE?gHm0SCsT(EG%zV;7F@jHpp-Su?Rpk9oZXo< zowG74l~?8Qyj5ALLf2+(3;XogwORRs)me+4Cmkd%xM+Pg@BCGVq$g*ex#-c_=}lkJ zFQ8ICU&r=uQf9Tie;|~bTe`DU@$>w-S-EX(RytqD7&Y&L z-V81N{cYL8_#V7xxlPABzb7j%To**$DYdSCcG^jEw&;AVl0G1juc>zk#xKZujQPGs z$6&VfD=#+NHswzww%Njt&EZ@T7hJp^t|3xxIe&HVCyenZY|9t+1;HA&dY>T5ssn*7 zd=dB4a~{0|W4v@o?{)vwX$^m^V>9Q#RrfzvbJCo<#r95}|AQ%4vw%lSYj5D&q+@|I zpVh2mB!=Tm_~K{S!quXlxUPh z0}W>`He)!$HL#s?&dMiJwj85*IF=Xo>+_XUBHs{oj4-Bb|2BzzkdBYzN%{JHsW-5d zZ>^^ro0mV3YVwpB8+43|Br|5*cUT{fAz%7@jAaAc};w(uPOMat75 zrflKMxv=oEy$jnQdA8i9`Vez8&vkAlrrxD2-&Qb=?{`2Rz8}sowK(soT<6m0+?@K@ zpBWg7E4kTx@vpxRha=-p>fFNk*QLWU9z(v&Kbpj$3Ljt;l_TR%bTnU8;ksyTrz`mxsUm zd8KpIu1Mtz*5-Y)=!I5&&)|zo`=4!m=hDZf)y)2)&M*B#=1Q1bf$?*0W5hRS%V!@u z@zY}ab+J9zwQ^6v)qLCOXNWJt!{$JQwYkDJ$Xp|5b9IDks`ULRn{5$?`R1JGi@jvN z0}t%YQuW@sC$r$Z_6VSK_YkJzl|f~25x$TgYp+!q?3w@jNh4^?wIQMO8SIWx6j?Qb&bIs?eozl3Uh)ULyu?udS0r*2lixZZ{Cpgtm=vC&DPyK5Y)3u z{i6$&&l80@MZJn@YLQ=4&DHTInsW|yP~SzO92m!(PMJQM75ai|m*|6__TL{mpd7J# z>WK{l(Zh9$tbY`@QRaI>Q<0u%*oRgsZK$J!Wh1(w&}hFYxr7lHdn_>u3DF+T6}%K+Ur~k zFJGHAzN<56_-M)Q9zT{~9YsTWc`uCE33}4t5F|svdxZ1m6 zz9e#mF&>tG5gs<*sbj>Kc3pE-6W=S{sPWH16z17n*Qk3i)3KRXllmWK8FDp$ljdj) z(HO=LF;|Dj_^!%lrDY*f)|y12MZepvdEKsTbzgtB=Z8-Q^*^HaG-}n?l#_26sL+;e z+q13zw7bx@e-^_;_k4R#mTK^!y;-VF_dS@QzB_khTc7y%Y{yUbWm~@cSfTElHj1l` zF{(6QbLUd|Li&lzve`}iEzWHzYOX5WCkDM!ewNZa<+uGKZ z!56k8@r7->`bevKd$Z+TT|txwzBH8W5HrhceLrQp@7aCXlh0-q+NJw&wNkb{dhhnj znY(%}Ul^Nj!x^f>QL~$ti20J7EsU%9x-BDyK56dX{en5xe3@%LMc)0exZZBQo@XLf zvkgAhaR%Q;&cnW?UDEu{yOssP7}mkF(Zj*V@~_!;UDb0~|1SSat@ntp**aG9HCIRY zlCNPq5?}k*alQIzsruD_t6(h8!qvjRjm`R=5@pynoY7vyhKBYG%|3H+Q1FV*6*2K| zCjYV)hJTr_WQ-baqv&7wYK<-MeK6%4j)mMT#xPAelb=(*coeR1&ON*`@O2rcsqinp zg{}E+xogLB@^i|!{nGXf!T9<34#u|FY>5y4_^E9Bzy2VIJdJP7mWY3=`KFAiqoJNg z#`qSt_AfaZzRu4n*Xlf-_?P#5KLD8yJj z?<+8_TcQ47UJqNu)JoaHv_-xx$JiA8ThhEjbIUUEXYRPYQ0Fxoqu#!)B7g4Pmu0B) z@3vvb$wuE-WFS*qh|59KX)?<{gNp54Ct{-AXOn=+Is|DtU_dMfLG;>oN}ZFwr% z`5o%7S=$~``H{WZ&;t)ZA5oN!)dov|pCs~_V& z;_vjktiU&}m8y^ZwEDL6u~;L9MYxTkf7$={o{{*%7`F2?2L;oDE$e6WxAZs5eDN=8 zR(^)DWv*tN^6k}FrMi7IUm|?Vssk{7KE816T-hDo3$}Zo+FuB^tJRhx%I4|_-&8y3 zuP2NzS(LXk<_oiWvvz#`nnfbUJ}Ge2FdX(e-! z@GW1+oR64B|Jt|YY?QaT%<1HL+TMjPtmn*K8sv63<;(cx`S{}D)W7%`|8CuNe<8Cq z-;^!oYt@c-sU0Vxp&jyn;$OTAU;G=qT*dd=KVGAG_hH6xGhd?1_A9*2nwYX3f$vR% zdPMn>m*MJ&e=Qh?Jr6NIQ^vE5?ah~*Z0{1y6(1w>B{%=9d|{pP9Z+tEt3_R@<_p_Y z1GlOFExsO)!PktcbD6u#*R>hb%sE%%8%g^QwWcDkiYscQ|0tf?gBW5cH|f4q(%b-Q zRNool_1R~&Weu&lR%-m&uN?fin4}ugW9Zt4zMsvzb7!{r6KeC-_M%?p;h|l-3a$K< z#&ZkXg0Aabtz7Wj@lgLyvaCEXnANI2q3%EF%Le{tNOK%}a((xqY*!-p!--q};ht>A zt{vIB&uz?>UZHh_vva?~&^#L&)qj>?7|LHYW68rFe?%yusJ#;hQCE~k9IXCbPxi|8Kamc?gP55%m)qHbyIm0>4S~rtYzHo(c z!x^Pf<=ft&zMA+BvmKdl*FWtk7`Lg+gfW7A9Ae^M*rvk23$>0jl7Ba=&ui~i`xhS%X%5l;UH64e+N+iGz2ob5Mepv* zo;s9O2>-&@jLnybkGE-lyP7XtxBTrL*?{KG@UDe_;fwHZ$kAfzbCO2bq9(Ov@HJ!D z+QSVE3%5tUXDN=Rf62{fPI&F>t`Xlo1zR0U=u0K}nVjslhe-W&jt=!R=4Wy=J}y|t zJe{%)9!~hexZ%FN*|JA}kinJ+SF@e8QG4yu+??T0ky0tgDV{y>>FKr2H1%s>+N-I`s zujRt_Y|&qC%JyndVWn+3<<2LwtZnz+LJe0bFD=#HSgEzWJ=-{_^(1MV+I3{U#DR?i z+1kFfK^y)uUsIlUzUq5AKdHXuY>72dqJ8byAfKlyslSTwk>+>z!XU87nH)O`1eN4E5rhwG&J&|)3-vxuwPUZVNJHsx!^hvN%d+E)0k zShc!X2ZHTd<;>CMYsM+xEkkz{eAzDm>y8hpo+o_s@zG-C?8TuC&hHQB@CMD-rF@$- z27xV%#rIL=&@tsJrjNqbjLp~m|CBGe8vmvqhAAG-+2;PO=4-aqe1n&jf9HKt^In^@ zhmsh5>wYn8?OoRRQtv*We+QNCQR>~MTelV7#lP*XN#HcKhr6j8Ea~ zILtNoFZtOy+W9$fZ7pf;ON#lqh~isLCC{2IF=Y$i)Vp}NR{3_rz4sStQhVN|b{w|E zlyB{g{RLlgGwS^P&cpJB_26xTFN!ZL;cTwtXIKaC!Z&ipzxJ?LKQabW{R4{bB84WbHTXKW6{7_oz^wr)z?c`&jg&D$3%`xHs_D-)1%Dd5VZiEx9@_>&g)8 z1QpUbZo5c%II1j9S!-|JSmfp4-JLtL?#~TmOSH~F--_6Fh1$_I>NAMzi26sh=TVI} z==*36%p&)9s(x&|^|nIW?%f^cJ3Q|(u60NA(S* zOm(eXn9~T4iEldoovr;17VlxcD>b)(yv|32^Ww`E2epf{xe}LsbVV2sdEW)G|L?X| z@P#pa(Y#ylcwWA9HVYd-&|_LR1r@MRw|3Tq3R-O-4E&erMvt_(%-@=ylh}6F+Uo&q0+wEB@xZ+#b zqLT74jLo;gyY!*uUkeYzH)RZ8WdG_Ko($Q?y1p&&#ltz{*w+$c{${?4Ip1SmJC=O^ zK>2wmx!L*Ie7SzZeC^-hWqB9>T5t{XT#DprbG85RFKo>huI#z7kIi=^w&rWL@Lm2t zdqZx9Z8cvQH(lSG&H3!65Gk9hBW%r>I1=B%+lMj)XY(!Mo!aZ4?TJ;ND(yql-$Psj7~)*^ zsSGR3%V?d5x@yia_qe#Ey)L~s_7!qJbm`KimF;kBm)8yHylNfR+H|MZW24r7>9%aG z7_U$}=r(-ulEqo~C$B98vsC3JTGLFlSbw+rKHIPUlUPba%E3GMT;+`ZEw^R88v7DA z?7Sx%(wdURKD_RA1F#92*|0G5J&JhRf^4QleyI}+cG zI-ln1Xts{~ zn9dS&1ZUVbss1DCJba@L=vwqm;@Ub!e3`?7?@jV;@NVv7t?kG8EAn&dUDrGKdcQAB z&6vGcaCPn`R{M8_`b{ZYm|BcS%$2zL>zd1uXK8bTccXu+`KFBFn=g*nQ=SL?dZ;cFikdD%XW zxw)DzY}5P<+mZa6vW2zTl5Z))6p^QU)J~f%{$>7r&g~@2G53*mLeYfwK zIC0Vq;&Kpa564065jx~Otn5Q?);zdHzScF>x=umkCyDaxvvU9HH;2SiW4*K3bHu&{ z)<{)n=Pu4xe)QU`??$Z|DRy3=c_a0g3#p&9V8Mby3qP<(`|5KozOpOp`7^E8-np%i z*N=$n#mw#bU0U-&cig?bko_5Qu&!Mgk_NYmZ=$>YNo!Jif3$T+KDX^T?*7}iX6tpW z3mVYpp?&2iX zG4>7DFpN_BTg~^;z_vrz$b{=pe65h$S20cbnyvXV_m*?j8kkta6j4WD3}0lv1=q+J zwoPX=Wi6$apn2!FYW}ZP^VUrvE>?X=8K-0fBcVU>%M}`Pn?!#GpXPwy*`X=NzjiUlv@qJKCyT_0(d-fWm zf8ndS{7SyChAn&U;Ycn#;Iem zKX#(tw@$iHd+BeHHy@D>u>X~QUhu2R`EhCPLf2iOCe2G#NZfg@#T-XP`Ca;MQSFy% zEmvy>^kIp}^BP5*uleUht_MZbYgS%=UC;)t3HRMHkliJYdo)HxyB~h2LfiD%mVeH# zIqcJZyaCmTLGc>;hn-<=Y?rPj8~XarpnlCycCYUbxcSN)v~S?8LH+BTV$?|?59cv-}IVr<~v~vld4a<=Q$2lxA# zFKo*ThuNAjY-xi7TR5xVTrnPo>97vMS8VU)oJ;U!oLbyQsei@$!FP%@Te?9W-fsWe ze?<72u~{{UrOSb-xRS3ahyFwrU;NAS;S1A_4=GninQ!M+E3)nzdb8_pTw5XYb;P@H z^*Sxy-Mn>cp&_mRBYX^J_*UpJeDN-PgJ<=clrL3L?PD;{k*{MjC#kaf6SKvbeK|qed({-xuJzXP?=H#87hh7SN#kF% zpj*GyDgR!(u0QM7b(+=&nSc}^M-7u2u$roNr`WSgSa zYp)F&(7Z{nd}{TmpNw|tS|zk2(UzT>YrdvCXwiqXcCY^MjCZsK&75^f$jjtr%a7U1 zL_ATW=SYVpzomZnq)F3uO6-gMkTgpQ`z95`ZIu1XJTy5PzH8yDIm$!ug>9MNYGb2UZg!b2+nA==K0N-xPEX; zkQtk+BW&SnnJbYs1Nf$lVLPNfek1YiQGKiC%Xxq?OkIZS@MFqxs^4ZTzFG%t&&2kL ziEo$`_)eU7{GaNa&yVMx{cy!?l=-?1#=~o8p4zrcTo2mAAx7WwU4kN8bAx3nxZ+{U z&nx)4Z;X#MKLt}{#;gsPF|kW)PcXL3mxzDyZYuk>S98WFrENoeC7|zRi ze)e2B+{o4TuOnPJ56;tvxdbeL~ zJvrHI%{Q&T&d;zjYs%^4`Te}l75V-o`gcdn%~y*jxtZKKmVBu;TwBcVU^`Oz2djcbbmC*zq}nc^KE_I>yBHaHsbGU>gN1! z@jW2cnt#w72m96|-+bReC110hp}l4><^FJ<;;~lwob}Px;BE5_j8nFhUx4qX2ObKH z;f$*JhBh|gYpz5%o9~)0Y}S0^=7KAHH~#ft!4<~y+7=b{*547nGsF_{9qT37TINa& zbCx;ZY|5Kw?h@b6>U=MkV9UQJaU}TaV+zL0#CIcX@o&o4j8p$oKk;thDz=;h_~yRN z+aNp(TSszT%D0I*i`s4(3?8eKbSW=uKdOa2{+FI;;y$BFD) zVz=(wyE$9+jqze4vvo9A$8;_lzVun--QeNK7w?+wk>=YfzP+h`?OVsxzwk9%=V-UX z)NRUm*8b%@jl>tOs7?JSn3mPfruo@9nmnDdb$*5``MF20Gher})qF!vPWY0a@hxo4 zcbM&S`P#qE(d6bjdD?sn-|}6_)zQB(Klg~Oy^F7&a~tLUmEZq0D)8?=%~bnv$&_gg zx6eGi{VA;_JmqVFeLZ2mzMwfb&6&e$w)~sQ^_TA!_(#5Vr_2kSc}?lUVKwPGzVZ$F zT_~yjmd#mN`yIQ#uHPMe_%ZzshkhSL9!<52HuvBEBkTXye-C0`)cUPkvrU@E>eXCy z-{wJG1HL1BT+c(>p4^xD_q5tIR_^}Bu56{AWA$$A&pLH2jK!YlhQ_>a46E9cn$?!l zo<_lQMoXcZla+@x&LyJSx6jkMpyntYd5^l%e*JqNyL5i9l72IuYlY|D#)vN;1mkJq zdzSQ3*done>EAri?=z@B4KMh@2*DV(vy_{|z6Hh5=ES&?lcpF2$eBSFLUwiml@bw%e--mYCd;=@>yUdnozW6w0 z>vGB$ALHNPTlse+zV>eM8?j=Fhf&HG&M>}5V<7ZG{)Mgi!WGq@7Q8mh*8YX($t?v_ z*y3U0)DzWrj^4$`u&v^||F}0yxmo8Hw(OZ9PagI*#(ZBRzHhaM$-<8a+u zSpOZ)&t_{6!xy%e{Sf-jacqo#oui$X?cX#v<7515!J6DWQhqjH@^i}9xw%_ot295u zw(H8y;9s*HkuP}}wvlhj7RF{vO!=x^J|I0Uw$97udsw#oVT}1Q)@II<>%TA3^+~H| z%v!iN>Ja<08+4to=PW`L&j$8#J2E~}y{~6(-Q`)T*VftPtZ{x@*0NCZlG1{kwI?Eq z^WXW6-9gUL>F?`2{>*`F&A0Shqu>8Qp#in8YxFwQqrP^h+VB2{9?ORCw_>+`BN}zx zsWG(Fqdpv3(yi+NFVcMYg?Ss|dRSMdwpFT`-W*hihw*ESwI|KV>dCu`C~b==JGV`% zY50G~pD^`)dF3-YmzPMj66?Gb^BKBdaT{a4e3tn(sr+Fb-)ASkb=I9?9Qg7(qbXy4 ze+9lxbM-r$NORX_8=|-d-jQ$HWm*H4UWo6&Bi|40a5Z20M=*vTs^*)rt>(LURd2x; zua4wbxSDZjZ_G6^PT2<5YO~-vL+eB%@coMBGP-mg=Sc8G$aDoqaJ3@T<_?+>v6FcxQIa>Mo5M1$a*cTms zTQg^C#=*;}hn<%dn>5#lZ&Suix^^VZ&kbMFZ(1ow+rN9C-XGW!_sFm2>xh5Nb|k*! zWV1D2^78ZXg)#l6+{ZcBG(S5x6JeUR$*|SAgKeL5vE;n0;tSu7AYaz4eocC>bj6HQ z+wRkETt5|lM^t=aOgXg4?8{Qy%=|_5e3sjz&~Ki*Fk7JOGCQtV9%4zXOUl(9>o){- zYJR`tvm3MJJ9h{5=(lhBG%m7M-nl*NyIX7Ydff7FJFn99|EPO|+E=X~TkOy3(*6sJ z-&JdBmIviaq<{M?oA$QGqR*^?0Q)zWW{3TyZBYt2c#PcGhb%9I)G zjr@qj8p4~TiZwvpKkV%Y^5q!VgZB>Uy_2WZ-Yz*Nysja?oe`vh`ov5h8re70$?99os(8S+Io#Y|So2v4t-p z2Uq+}oM8%I$GW#`UPEkSd|L1M-Q$j%yiVtgeQogN9KPt=5#~$1|67%J`3>e5?OiIt5$4NB79Li4jjn6{o*4ghB);i9yvxtW zH{@wu9|T`BCO;$Ah7nAy4tq9IN0w(za~{(snexB9m2Vu`rs$m-Krs9WRO-Y@8y zk*KvBH)XwA<0po)#k^8Ix%B}Y3}^M$DeWAlY^?^gXrvzYeix)7^R>-ZLo*XXyetZKf?KhaaLHRB4l z318SEyy@Ib+4qSs5BDSEy#D6np)eL=Z6OYC#$3w?C{-(!kzNhQKvb0kB@&EjV z_`RATk~C~+`C@u!9>{hYfT6R&I#X@J?c9pe4FQMY?`p83}3S)!qsdG zzA%o0uLWoGt<#!bm&9{QB=94Xg3%18jT%zx7-~LSFT)l3@+fl-oV}mi``nO@mlWK1jUtLSA>r<-u z1`q3ZHq!je{2?-Dm=q4Bw7X0mk$xn8#d#hn1`U(_+s@ zjmE`wYP*Q_nlnI4u3Qq$Is?F8fK~QArd>mqp+T}zr*8ZBkQQNc!a*e(xYku^lSSSCv z+FQN8;&v4IH$5&hK3fldB4rF;vrYM$aRpnkUaCGdJc&VK3RerhaCKi7@4?s#T;Yqv zm+_F5kBgL(VT@lDVM3n`}i;cD5xj_G_*D98S-`?=MBFSv?JC?|Y_kMV7t@+(n{&9)f#My}O-;fz;N z zjl>sUPJ5g3subA57m05=*3HMeF*n0ma&E@EW}NW7Gy2wS>1&J$S56?eqnIy;$9F$Y znl8Opx=LgJ0p@qqHwklj%-LI0VR9mUR;{-x=J`{sIQR5<@Fs2Hv{^-@?0!CZgW#2{0mg67wK9t_`u(wwjU)n0p&m_rx>&tZ=>gRQ>@z&#xo3iz|H%@&}`{*Bx z`vLZApSZ>)VjAWCl-KY)_wUDv>0|CMIr@3Uyp;O#eAbi`X9wvxcIh~7)iHfc$M}AU zb?#c}jnWZitIs>y`&S&|NH;U)+MBba_eqyatHk#X^M$qA;(eTd^EEq1^EzBKS4W=5 z-beU`J&-xyL*o0eKIdU^HQQz#&&kr5_mTA(hrPYR{F{Cc7$c7#&H1Xxct4!w-+jL3 z1IEnnhrF!_D>z&HEq#o#ed_TJk$ueOE3U9TbljwxZJJ+XY>RKrmOaWGv*(v>z`mb9xM){8T(C>Oyj1T1bTE5kI z$^EJjwg0I`*KVS^x3>l_7uSO6da(M_w12Zfdpo6R)93y4_(^r&R3B=sK8NcHm`kOd zWpCNb?pqy0xV?(_@_k^;+6#=C`-Ahx#Q4wQ3|}!l0N22lwi9oPYwgLpE?0u9853b@ z#^x)w-xS-=>%BiBF&AaFHzm{@T29%T5! z(TvSD#vkKZy%$_rr$u-c!S<-Ty-NA|Jj0o_#)9#riIZ-bGP&+M&eMS_K92r{tvww4 z8vU!ap~tj7@D;t6*-ld#x&2r1=)1kj`5vP)&N{^jQoVGJbeZ(|NmFLtHFbLF(P=fM z1NEnIeb{2W!*pw+Vzos$mb@8>l2k*su^4@&LQG0up^YwW* z;}iA3TnWaXoOs-n&mVt6?U%)MkNB!xF8HcEXV38`)O=Z7Z`O0Ki?89eyocGUcy!-> zLHGgz#;7(5R+mXjq)(f(x$;>28_(gnwNZW_-97qmzd(Eq;}{i?c`;r^a8BjN{XD-; zPkZIuegXL!4&xZEbz?n;c~15b%!;DSWBiTh993f;9nXut{Q~p#IkGQbuLn~3aX;@B r8Gl~B