Skip to content

Commit

Permalink
Arcane portal ritual (#1458)
Browse files Browse the repository at this point in the history
* Create portal exempt to ritual cooldown

* Create Portal Initial commit

* add gui for multiple character targets

* Add ability to select destination

* add cascading portal selection

* add empires to list first

* pan_camera_to_title when target is selected

* add tooltip for characters

* fix change destination gui clipping

* army tooltips

* fix error spam

* fix 'type' error

* fix recipient error

* remove loose variables

* add travel entourage functionality

* add tooltips to prevent people from breaking shit

* Fix army tootlip

* add tooltips/disable teleporting when army in combat

* Fix army teleportation

* Fix pt 2

* Add decision to go back home

* Remove isolated titles and titles with no barony

* fix2
  • Loading branch information
helloruhe authored Jan 2, 2025
1 parent fcbd9dd commit 7ecd9b6
Show file tree
Hide file tree
Showing 14 changed files with 1,458 additions and 122 deletions.
65 changes: 65 additions & 0 deletions common/decisions/wc_magic_decisions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
decision_group_type = wc_magic
ai_check_interval = 60
sort_order = 81
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

cooldown = { days = 365 }

Expand Down Expand Up @@ -53,6 +56,9 @@

restore_chronomancy_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 60

Expand All @@ -72,6 +78,9 @@ restore_chronomancy_decision = {

activate_presence_of_mind_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 60

Expand Down Expand Up @@ -113,6 +122,9 @@ deactivate_presence_of_mind_decision = {

activate_reverse_causality_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 60

Expand Down Expand Up @@ -140,6 +152,9 @@ activate_reverse_causality_decision = {

deactivate_reverse_causality_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 60

Expand All @@ -157,6 +172,9 @@ deactivate_reverse_causality_decision = {

go_into_hibernation_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 20

Expand Down Expand Up @@ -225,4 +243,51 @@ wc_spell_hack_decision = {
remove_variable = wc_spell_hack_available
custom_tooltip = wc_spell_hack_effect
}
}

teleport_back_decision = {
decision_group_type = wc_magic
picture = {
reference = "gfx/interface/illustrations/decisions/decision_knight_kneeling.dds"
}

ai_check_interval = 2

is_shown = {
has_variable = create_portal_location
}

effect = {
if = {
limit = {
exists = capital_province
}
capital_province = { save_scope_as = home }
}
else_if = {
limit = {
exists = liege
}
liege.capital_province = { save_scope_as = home }
}
else = {
title:b_stormwind = { save_scope_as = home }
}
custom_tooltip = {
text = wc_teleport_back_decision_effect_tt
set_location = {
location = scope:home.title_province
stick_to_location = yes
}
}
remove_variable = create_portal_location
}

ai_potential = {
has_variable = create_portal_location
}

ai_will_do = {
base = 100
}
}
4 changes: 4 additions & 0 deletions common/game_concepts/wc_magic_spells_concepts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,8 @@ wc_injury_frostbite = {
parent = wc_magic_injury

alias = { wc_injury_frostbitten }
}

wc_spell_create_portal = {
parent = wc_spell_school_order
}
13 changes: 12 additions & 1 deletion common/lifestyle_perks/wc_order_magic_perks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,18 @@ order_magic_tree_3_perk_9 = {
effect = {
# Maintenance
wc_nonelemental_MAGIC_magic_lifestyle_rank_up_check_effect = { MAGIC = order }

custom_tooltip = wc_learn_spell_create_portal
wc_learn_spell_effect = {
SPELL = create_portal
}
learn_spell_rank_effect = {
SPELL = create_portal
RANK = 2
}
learn_spell_rank_effect = {
SPELL = create_portal
RANK = 3
}
}
}

Expand Down
43 changes: 42 additions & 1 deletion common/script_values/wc_magic_spell_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5379,4 +5379,45 @@ wc_life_magic_cast_time_value = { # Use for changing Cast time for ALL LIFE spel
}
wc_life_magic_duration_value = { # Use for changing Duration for ALL LIFE spells (multiply this value)
value = 1
}
}
## CREATE PORTAL ##
wc_spell_create_portal_cost_mana_value = {
value = {
add = {
value = {
add = wc_max_mana_value
multiply = 0.3
}
}
desc = wc_mana_base_value_desc
format = "WC_MAX_MANA_VALUE_FORMAT"
}
max = 150
round = yes
}
wc_spell_create_portal_cast_time_value = {
min = 0
value = {
add = 0
desc = wc_mana_base_value_desc
format = "WC_MAX_MANA_VALUE_FORMAT"
}

multiply = wc_order_magic_cast_time_value
multiply = wc_magic_cast_time_value
round = yes
}
wc_spell_create_portal_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_order_magic_cooldown_value
multiply = wc_magic_cooldown_value
round = yes
}
wc_spell_create_portal_duration_days_value = 0
### CREATE PORTAL ##
2 changes: 2 additions & 0 deletions common/scripted_effects/wc_magic_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ execute_scoped_spell_effect = {
flag:chronomancy = { $EFFECT$ = { SPELL = chronomancy RANK = var:current_spell_rank TYPE = order } }
flag:evocation = { $EFFECT$ = { SPELL = evocation RANK = var:current_spell_rank TYPE = order } }
flag:arcane_dome = { $EFFECT$ = { SPELL = arcane_dome RANK = var:current_spell_rank TYPE = order } }
flag:create_portal = { $EFFECT$ = { SPELL = create_portal RANK = var:current_spell_rank TYPE = order } }

## Fire
flag:scorch = { $EFFECT$ = { SPELL = scorch RANK = var:current_spell_rank TYPE = order } }
Expand Down Expand Up @@ -490,6 +491,7 @@ spell_cast_effect = {
spell_is_ritual_trigger = {
SPELL = flag:$SPELL$
}
NOT = { flag:$SPELL$ = flag:create_portal }
}
add_character_flag = {
flag = any_ritual_cd
Expand Down
Loading

0 comments on commit 7ecd9b6

Please sign in to comment.