Skip to content

Commit

Permalink
Merge pull request #1273 from Warcraft-GoA-Development-Team/empire_of…
Browse files Browse the repository at this point in the history
…_zul
  • Loading branch information
helloruhe authored Dec 16, 2023
2 parents 7be176e + 5dedb65 commit 9af34f4
Show file tree
Hide file tree
Showing 11 changed files with 621 additions and 5 deletions.
148 changes: 148 additions & 0 deletions common/decisions/wc_major_zul_decisions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
restore_empire_of_zul_decision = {
ai_check_interval = 120
major = yes
# PIC CREDIT https://phillipzhang.artstation.com/
picture = "gfx/interface/illustrations/decisions/zulian_restoration.dds"
selection_tooltip = restore_empire_of_zul_decision_tt

is_shown = {
culture = { has_cultural_pillar = heritage_zulite }
NOT = {
is_target_in_global_variable_list = {
name = unavailable_unique_decisions
target = flag:restore_empire_of_zul_decision
}
}
is_independent_ruler = yes
}

cost = {
gold = 750
prestige = 1000
}

is_valid = {
prestige_level >= 4
can_form_zul_trigger = yes
}

is_valid_showing_failures_only = {
is_imprisoned = no
is_capable_adult = yes
is_at_war = no
}

effect = {
# Can only happen once
hidden_effect = {
add_to_global_variable_list = {
name = unavailable_unique_decisions
target = flag:restore_empire_of_zul_decision
}
}
custom_tooltip = restore_empire_of_zul_decision_tt
save_scope_as = founder

create_empire_of_zul_effect = yes

# Notification
every_ruler = {
limit = {
OR = {
culture = { has_cultural_pillar = heritage_zulite }
is_within_diplo_range = { CHARACTER = scope:founder }
}
}
trigger_event = zul_restoration.0001
}

add_prestige_level = 2
add_trait = augustus
}

ai_potential = {
always = yes
}

ai_will_do = {
base = 100
}
}

swear_fealty_to_zul_decision = {
ai_check_interval = 120

selection_tooltip = swear_fealty_zul_tt
picture = "gfx/interface/illustrations/decisions/zulian_restoration.dds"

is_shown = {
exists = title:e_empire_of_zul.holder
culture = { has_cultural_pillar = heritage_zulite }
NOT = { has_variable = this_union }
NOT = { root = title:e_empire_of_zul.holder }
NOT = { any_liege_or_above = { this = title:e_empire_of_zul.holder } }
}

is_valid = {
holds_zulian_territory_trigger = yes
}

is_valid_showing_failures_only = {
is_imprisoned = no
is_capable_adult = yes
is_at_war = no
}

effect = {
title:e_empire_of_zul.holder = { save_scope_as = scoped_emperor }
swear_fealty_to_zul_effect = yes
}

ai_potential = {
always = yes
}

ai_will_do = {
base = 5
modifier = {
factor = 0
OR = {
has_trait = disloyal
has_trait = ambitious
}
}
}
}

integrate_into_zul_decision = {
ai_check_interval = 120
selection_tooltip = integrate_title_zul_tt
picture = "gfx/interface/illustrations/decisions/zulian_restoration.dds"

is_shown = {
title:e_empire_of_zul.holder ?= root
}

is_valid = {
holds_zulian_empire_trigger = yes
}

is_valid_showing_failures_only = {
is_imprisoned = no
is_capable_adult = yes
is_at_war = no
}

effect = {
save_scope_as = founder
set_de_jure_to_zul_effect = yes
}

ai_potential = {
always = yes
}

ai_will_do = {
base = 100
}
}
141 changes: 141 additions & 0 deletions common/scripted_effects/wc_zul_effects.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
create_empire_of_zul_effect = {
spawn_zulian_troops_effect = yes
#Set max authority
if = {
limit = { has_realm_law_flag = uses_crown_authority }
add_realm_law = crown_authority_3
}
if = {
limit = { has_realm_law_flag = uses_tribal_authority }
add_realm_law = tribal_authority_3
}
if = {
limit = { realm_law_use_dark_frenzy_trigger = yes }
change_dark_frenzy_effect = { VALUE = 50 }
}

save_scope_as = founder

#Create the title
create_title_and_vassal_change = {
type = created
save_scope_as = change
add_claim_on_loss = no
}

title:e_empire_of_zul = {
change_title_holder = {
holder = root
change = scope:change
}
set_definitive_form = yes
}

resolve_title_and_vassal_change = scope:change
title:e_empire_of_zul = { custom_tooltip = create_empire_of_zul_titles_tt } #Scope change for tooltip formatting.

# Change primary title of holder (if exists)
hidden_effect = {
set_de_jure_to_zul_effect = yes
}
set_primary_title_to = title:e_empire_of_zul

}

set_de_jure_to_zul_effect = {
# Create List
title:e_amani = { add_to_list = zulian_empires }
title:e_drakkari = { add_to_list = zulian_empires }
title:e_gurubashi = { add_to_list = zulian_empires }
title:e_zandalari = { add_to_list = zulian_empires }
title:e_zulfarrak = { add_to_list = zulian_empires }

every_in_list = {
list = zulian_empires
if = {
limit = {
holder ?= scope:founder
}
# set dejure liege to zul
every_in_de_jure_hierarchy = {
limit = {
tier = tier_kingdom
}
set_de_jure_liege_title = title:e_empire_of_zul
}
# Destroy any active troll empires i own
scope:founder = { destroy_title = prev }
}
}
}

spawn_zulian_troops_effect = {
if = {
limit = { exists = capital_province }
spawn_army = { # 4000
uses_supply = no
inheritable = yes
name = zulian_elite_troops_name
levies = 900
men_at_arms = { # 400
type = war_dinosaur
stacks = 8
}
men_at_arms = { # 600
type = dire_troll
stacks = 12
}
men_at_arms = { # 900
type = witch_doctor
stacks = 12
}
men_at_arms = { # 900
type = headhunter
stacks = 6
}
men_at_arms = { # 100
type = mangonel
stacks = 10
}
men_at_arms = { # 100
type = armored_horsemen
stacks = 10
}
location = root.capital_province
origin = root.capital_province
}
}
}

swear_fealty_to_zul_effect = {
if = {
limit = {
highest_held_title_tier = tier_empire
}
primary_title = { save_scope_as = empire }
random_held_title = {
limit = { tier = tier_kingdom }
weight = {
base = 100
modifier = {
target_is_de_jure_liege_or_above = title:e_empire_of_zul
add = 1000
}
}
save_scope_as = new_title
}
if = { limit = { exists = scope:new_title } set_primary_title_to = scope:new_title }
destroy_title = scope:empire
}
create_title_and_vassal_change = {
type = swear_fealty
save_scope_as = swear_fealty
add_claim_on_loss = no
}
change_liege = {
liege = scope:scoped_emperor
change = scope:swear_fealty
}
hidden_effect = { primary_title = { set_de_jure_liege_title = title:e_empire_of_zul } }
resolve_title_and_vassal_change = scope:swear_fealty
}
33 changes: 33 additions & 0 deletions common/scripted_triggers/wc_zul_triggers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
can_form_zul_trigger = {
trigger_if = {
limit = { is_ai = yes }
sub_realm_size >= 69
holds_zulian_empire_trigger = yes
}
trigger_else = {
calc_true_if = {
amount >= 2
title:e_amani.holder ?= root
title:e_drakkari.holder ?= root
title:e_gurubashi.holder ?= root
title:e_zandalari.holder ?= root
title:e_zulfarrak.holder ?= root
}
sub_realm_size >= 80
}
}

holds_zulian_empire_trigger = {
OR = {
title:e_amani.holder ?= root
title:e_drakkari.holder ?= root
title:e_gurubashi.holder ?= root
title:e_zandalari.holder ?= root
title:e_zulfarrak.holder ?= root
}
}

holds_zulian_territory_trigger = {
is_independent_ruler = yes
culture = { has_cultural_pillar = heritage_zulite }
}
4 changes: 4 additions & 0 deletions common/traits/00_traits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8987,6 +8987,10 @@ augustus = {
trigger = { OR = { culture = { has_cultural_pillar = heritage_gorian } has_culture = culture:moknathal } }
desc = trait_gorgustus
}
triggered_desc = {
trigger = { culture = { has_cultural_pillar = heritage_zulite } }
desc = trait_zulustus
}
desc = trait_augustus
}
}
Expand Down
Loading

0 comments on commit 9af34f4

Please sign in to comment.