Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRAFT - Scourge random assign undead (second try) #1248

Closed
wants to merge 11 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,19 @@

special_ai_interaction = recruit_courtier

desc = recruit_guest_interaction_desc
# Warcraft
# Warning for LK players
desc = {
desc = recruit_guest_interaction_desc
triggered_desc = {
trigger = {
scope:actor = { has_trait = lich_king }
scope:actor.faith = { has_doctrine = special_doctrine_end_justifies_means }
}

desc = recruit_guest_may_turn_undead
}
}

should_use_extra_icon = {
NOT = { scope:recipient = { is_close_family_of = scope:actor } }
Expand Down Expand Up @@ -65,6 +77,16 @@
localization = SCHEME_HOOK
}

send_option = {
is_shown = { scope:actor = { government_has_flag = government_offer_vassalization_turns_undead } }
is_valid = {
scope:recipient = { NOT = { has_trait = being_undead } }
}
flag = turns_undead
localization = turns_undead
}


on_accept = {
scope:recipient = {
every_traveling_family_member = {
Expand Down Expand Up @@ -113,6 +135,10 @@
opinion = 50
modifier = grateful_opinion
}
if = {
limit = { scope:turns_undead = yes }
raise_undead_by_basic_effect = { MASTER = scope:actor }
}
}

scope:actor = {
Expand Down Expand Up @@ -504,8 +530,20 @@ kick_from_court_interaction = {
invite_to_court_interaction = {
category = interaction_category_vassal
icon = guest

desc = invite_to_court_interaction_desc
desc = {
desc = invite_to_court_interaction_desc

# Warcraft
# Warning for LK players
triggered_desc = {
trigger = {
scope:actor = { has_trait = lich_king }
scope:actor.faith = { has_doctrine = special_doctrine_end_justifies_means }
}

desc = invite_to_court_may_turn_undead
}
}

is_shown = {
scope:recipient = {
Expand Down Expand Up @@ -619,6 +657,17 @@ invite_to_court_interaction = {
}
}
}

# Warcraft
# LK converts invitees to undead by inviting to court
if = {
limit = { scope:turns_undead = yes }
every_traveling_family_member = {
random = {
raise_undead_by_basic_effect = { MASTER = scope:actor }
}
}
}
}

ai_accept = {
Expand Down
38 changes: 36 additions & 2 deletions common/character_interactions/00_grant_titles_interaction.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
category = interaction_category_vassal
common_interaction = yes

desc = grant_titles_interaction_desc
# Warcraft
# Warning for LK players
desc = {
desc = grant_titles_interaction_desc

triggered_desc = {
trigger = {
scope:actor = { government_has_flag = government_offer_vassalization_turns_undead }
scope:actor.faith = { has_doctrine = special_doctrine_end_justifies_means }
}

desc = grant_title_may_turn_undead
}
}

special_interaction = grant_titles_interaction
interface = grant_titles
Expand All @@ -27,7 +40,7 @@
}
}
}

is_valid_showing_failures_only = {
scope:recipient = {
custom_tooltip = {
Expand Down Expand Up @@ -176,6 +189,15 @@
}
}

send_option = {
is_shown = { scope:actor = { government_has_flag = government_offer_vassalization_turns_undead } }
is_valid = {
scope:recipient = { NOT = { has_trait = being_undead } }
}
flag = turns_undead
localization = turns_undead
}

auto_accept = yes

on_auto_accept = {
Expand Down Expand Up @@ -206,6 +228,14 @@
save_temporary_scope_as = recipient_is_independent
}
}
if = {
limit = { scope:turns_undead = yes }
every_traveling_family_member = {
raise_undead_by_basic_effect = { MASTER = scope:actor }
}
}


#if = {
# limit = {
# NAND = {
Expand Down Expand Up @@ -1078,6 +1108,8 @@
}
}



#hidden_effect = {
# # Struggle Catalyst
# if = {
Expand Down Expand Up @@ -1115,6 +1147,8 @@
# }
#}
}


}

#This interaction is referenced in code! If it's renamed you have to ping a coder
Expand Down
10 changes: 10 additions & 0 deletions common/script_values/wc_plague_values.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@ plague_agent_sins = {
}

min = 0
}

# Scourge conversion values

scourge_undead_population_percent = {
value = 80 # this could be changed with a game rule in the future
}

scourge_conversion_effectiveness = {
value = 90 # this could be changed with a game rule in the future
}
11 changes: 11 additions & 0 deletions common/scripted_effects/wc_race_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ try_to_set_race_effect = {
# limit = { exists = mother }
# mother = { trigger_event = WCRAC.5 }
# }

#Add Undead trait if undead culture
if = {
limit = {
culture = { has_cultural_pillar = heritage_undead }
}
random = {
chance = scourge_undead_population_percent
add_trait = being_undead
}
}

# Add new races always at the end
if = {
Expand Down
29 changes: 28 additions & 1 deletion common/scripted_modifiers/wc_scourge_invasion_modifiers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
modifier = {
add = 135
desc = IS_SCOURGE
scope:actor = { has_title = title:e_scourge }
scope:actor = {
has_title = title:e_scourge
}
scope:target = {
NOT = { this_union = exists }
}
}
modifier = {
add = 40
Expand All @@ -11,6 +16,7 @@
faith = faith:odyn
}
}
scourge_hatred_modifiers = yes
}
scourge_interaction_modifiers = {
modifier = {
Expand Down Expand Up @@ -45,6 +51,7 @@ scourge_interaction_modifiers = {
has_trait = being_undead
is_vassal_or_below_of = scope:actor
}
scourge_hatred_modifiers = yes
}
}
scourge_marriage_modifiers = {
Expand All @@ -70,6 +77,7 @@ scourge_marriage_modifiers = {
is_vassal_or_below_of = scope:actor
}
}
scourge_hatred_modifiers = yes
}
scourge_interaction_owner_modifiers = {
modifier = {
Expand All @@ -94,6 +102,7 @@ scourge_interaction_owner_modifiers = {
is_vassal_or_below_of = scope:owner
}
}
scourge_hatred_modifiers = yes
}
scourge_character_rebel_modifiers = {
modifier = {
Expand Down Expand Up @@ -150,4 +159,22 @@ scourge_county_rebel_modifiers = {
}
undead_county_trigger = yes
}
}

scourge_hatred_modifiers = {
modifier = {
add = {
add = -50
if = {
limit = { this_union = exists }
multiply = 4
}
}
scope:target = {
NOR = {
has_trait = being_undead
culture = { has_cultural_pillar = heritage_undead }
}
}
}
}
6 changes: 5 additions & 1 deletion localization/english/wc_tooltip_l_english.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,8 @@
wc_unknown_birth:0 "The age of this character is unfathomable to most. Almost none can recall the time when they were born."

wc_members_choice_the_first_horde_tooltip:0 "Your [vassals|E] will face a choice — stay in the Horde or leave it and become [independent|E]."
wc_save_the_first_horde_tooltip:0 "The Horde will stay united"
wc_save_the_first_horde_tooltip:0 "The Horde will stay united"

grant_title_may_turn_undead:0 "\n#warning Granting this character a Title may cause them to turn Undead.\n#"
recruit_guest_may_turn_undead:0 "\n#warning Recruiting this character to Court may cause them to turn Undead.\n#"
invite_to_court_may_turn_undead:0 "\n#warning This character may turn Undead when they arrive at your Court.\n#""
Loading