Skip to content

Commit

Permalink
Hopefully working event to kill Mendelssohn
Browse files Browse the repository at this point in the history
  • Loading branch information
LordR19 committed Jan 14, 2024
1 parent f9ab49b commit 3ff6ddc
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
43 changes: 43 additions & 0 deletions common/on_actions/elgar_on_actions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,49 @@ elgar_on_yearly_pulse_country = {
1 = elgar.315 #Elgar 315: Private Concert
1 = elgar.316 #Elgar 316: A talented pupil
}

effect = {
if = {
limit = {
NOT = { has_global_variable = elgar_character_death_limiter_global_var }
}

if = {
limit = {
# year >= 1847
year < 1850
any_character_in_void = {
has_template = mr_sax_mendelssohn_bartholdy_felix_character_template
}
}
random_character_in_void = {
limit = {
has_template = mr_sax_mendelssohn_bartholdy_felix_character_template
}
if = {
limit = {
owner ?= {
var:elgar_composer_var ?= {
has_template = mr_sax_mendelssohn_bartholdy_felix_character_template
}
}
}
owner = {
trigger_event = elgar.601 #Elgar 601: Mendelssohn Death
}
}
else = {
kill_character = yes
}
}
}

set_global_variable = {
name = elgar_character_death_limiter_global_var
months = 6
}
}
}
}

elgar_on_acquired_technology = {
Expand Down
47 changes: 47 additions & 0 deletions events/elgar_events.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ namespace = elgar

######Cosmopolitan Composers######



######Composer Deaths######

#Elgar 601: Mendelssohn Death

###Donizetti###

#Elgar 1001: Poliuto, 1838 [Sicily may keep Donizetti. AI won't do this]
Expand Down Expand Up @@ -9397,6 +9403,47 @@ elgar.503 = {

######Cosmopolitan Composers######

######Composer Deaths######

#Elgar 601: Mendelssohn Death
elgar.601 = {
type = country_event
placement = ROOT

title = elgar.601.t
desc = elgar.601.d
flavor = elgar.601.f

gui_window = event_window_1char_tabloid

left_icon = scope:elgar_composer_scope

on_created_soundeffect = "event:/SFX/UI/Alerts/event_appear"

icon = "gfx/interface/icons/event_icons/event_music.dds"

duration = 1

trigger = {
}

immediate = {
var:elgar_composer_var = {
save_scope_as = elgar_composer_scope
}
}

option = {
name = elgar.601.g
default_option = yes

kill_composer_effect = yes
}

after = {
}
}

###Donizetti###

#Elgar 1001: Poliuto, 1838 [Sicily may keep Donizetti. AI won't do this]
Expand Down

0 comments on commit 3ff6ddc

Please sign in to comment.