2023-05-23 11:11:33 +08:00
|
|
|
namespace = rg_skill
|
2023-06-14 17:15:05 +08:00
|
|
|
# fleet_event = {
|
|
|
|
# id = rg_skill.1
|
|
|
|
# hide_window = yes
|
|
|
|
# is_triggered_only = yes
|
|
|
|
#
|
|
|
|
# trigger = {
|
|
|
|
# NOT = { has_global_flag = rg_grayskill_cooldown }
|
|
|
|
# any_owned_fleet = {
|
|
|
|
# exists = leader
|
|
|
|
# leader = { has_leader_flag = gray_leader_admiral }
|
|
|
|
# is_in_combat = yes
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# immediate = {
|
|
|
|
# if = {
|
|
|
|
# limit = {
|
|
|
|
# any_owned_fleet = {
|
|
|
|
# exists = leader
|
|
|
|
# leader = { has_leader_flag = gray_leader_admiral }
|
|
|
|
# is_in_combat = yes
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# random_owned_fleet = {
|
|
|
|
# if = {
|
|
|
|
# limit = { leader = { has_leader_flag = gray_leader_admiral }}
|
|
|
|
# save_event_target_as = gray_warship_location
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# create_fleet = {
|
|
|
|
# name = "NAME_RG_carrier"
|
|
|
|
# settings = {
|
|
|
|
# can_disband = yes
|
|
|
|
# can_upgrade = no
|
|
|
|
# can_change_composition = yes
|
|
|
|
# can_change_leader = no
|
|
|
|
# uses_naval_capacity = no
|
|
|
|
# spawn_debris = no
|
|
|
|
# }
|
|
|
|
# effect = {
|
|
|
|
# set_owner = event_target:gray_owner
|
|
|
|
# while = {
|
|
|
|
# count = 4
|
|
|
|
# create_ship = {
|
|
|
|
# name = random
|
|
|
|
# design = "RG_carrier_Interdictor"
|
|
|
|
# graphical_culture = "pirate_01"
|
|
|
|
# prefix = no
|
|
|
|
# upgradable = no
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# set_location = {
|
|
|
|
# target = event_target:gray_warship_location
|
|
|
|
# distance = 55
|
|
|
|
# angle = 270
|
|
|
|
# }
|
|
|
|
# set_fleet_flag = RG_carrier_fleet
|
|
|
|
# save_global_event_target_as = RG_carrier_fleet
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# set_timed_global_flag = {
|
|
|
|
# flag = rg_grayskill_cooldown days = 120
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
|
|
|
# fleet_event = {
|
|
|
|
# id = rg_skill.2
|
|
|
|
# hide_window = yes
|
|
|
|
# is_triggered_only = yes
|
|
|
|
#
|
|
|
|
# trigger = {
|
|
|
|
# any_owned_fleet = {
|
|
|
|
# has_fleet_flag = RG_carrier_fleet
|
|
|
|
# is_in_combat = no
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# immediate = {
|
|
|
|
# if = {
|
|
|
|
# limit = {
|
|
|
|
# any_owned_fleet = {
|
|
|
|
# has_fleet_flag = RG_carrier_fleet
|
|
|
|
# is_in_combat = no
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# event_target:RG_carrier_fleet = { delete_ship = this }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
|
2023-05-23 11:11:33 +08:00
|
|
|
ship_event = {
|
|
|
|
id = rg_skill.3
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
2024-09-23 00:38:01 +08:00
|
|
|
is_ship_size = RG_armed_science_ship
|
|
|
|
has_component = RG_AUTOCONST_HANGER
|
2023-05-23 11:11:33 +08:00
|
|
|
solar_system = {
|
|
|
|
OR = {
|
2023-06-08 13:11:05 +08:00
|
|
|
NOT = {
|
|
|
|
exists = space_owner
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
AND = {
|
2023-06-08 13:11:05 +08:00
|
|
|
space_owner = {
|
|
|
|
is_same_empire = root.controller
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
any_system_planet = {
|
|
|
|
RG_planet_can_auto_build = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NOT = {
|
|
|
|
any_neighbor_system = {
|
|
|
|
has_owner = yes
|
|
|
|
owner = {
|
|
|
|
OR = {
|
|
|
|
is_fallen_empire_xenophobe = yes
|
|
|
|
has_ai_personality = fallen_empire_xenophobe
|
|
|
|
has_ai_personality = awakened_fallen_empire_xenophobe
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
if = {
|
2023-06-08 13:11:05 +08:00
|
|
|
limit = {
|
2023-06-07 22:29:39 +08:00
|
|
|
solar_system = {
|
2024-09-17 13:32:31 +08:00
|
|
|
NOT = {
|
2023-06-08 13:11:05 +08:00
|
|
|
any_fleet_in_system = {
|
2023-06-07 22:29:39 +08:00
|
|
|
exists = controller
|
2023-06-08 13:11:05 +08:00
|
|
|
controller = {
|
|
|
|
is_hostile = root.controller
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-07 22:29:39 +08:00
|
|
|
RG_const_auto_build_effect_event = yes
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
ship_event = {
|
|
|
|
id = rg_skill.3
|
2024-09-23 00:38:01 +08:00
|
|
|
days = 30
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Gray Breeds(?
|
|
|
|
fleet_event = {
|
|
|
|
id = rg_skill.4
|
|
|
|
hide_window = yes
|
2023-06-08 13:11:05 +08:00
|
|
|
mean_time_to_happen = {
|
|
|
|
years = 1
|
|
|
|
}
|
|
|
|
trigger = {
|
2023-05-23 11:11:33 +08:00
|
|
|
any_controlled_ship = {
|
|
|
|
has_ship_flag = rg_mothership
|
2023-06-08 13:11:05 +08:00
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
num_ships < 20
|
|
|
|
is_ship_size = RG_graygoo_mothership
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
random_list = {
|
|
|
|
14 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_aircruiser_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_carrier_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_battleship_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_titan_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_torpedo_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_AA_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
2023-06-08 13:11:05 +08:00
|
|
|
create_ship = {
|
2023-05-23 11:11:33 +08:00
|
|
|
name = random
|
|
|
|
design = "RG_Arsenal_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_torpedocruiser_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#Tempest Breeds(?
|
|
|
|
fleet_event = {
|
|
|
|
id = rg_skill.5
|
|
|
|
hide_window = yes
|
2023-06-08 13:11:05 +08:00
|
|
|
mean_time_to_happen = {
|
|
|
|
months = 5
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
trigger = {
|
|
|
|
any_controlled_ship = {
|
|
|
|
OR = {
|
|
|
|
OR = {
|
|
|
|
is_ship_size = RG_graygoo_mothership
|
|
|
|
is_ship_size = graygoo_mothership
|
|
|
|
}
|
|
|
|
has_ship_flag = rg_nanite_mothership
|
|
|
|
}
|
2023-06-08 13:11:05 +08:00
|
|
|
owner = {
|
|
|
|
is_country_type = gray_goo
|
|
|
|
}
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
num_ships < 40
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
random_list = {
|
|
|
|
14 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_aircruiser_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_carrier_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_battleship_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_titan_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_torpedo_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_AA_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
2023-06-08 13:11:05 +08:00
|
|
|
create_ship = {
|
2023-05-23 11:11:33 +08:00
|
|
|
name = random
|
|
|
|
design = "RG_Arsenal_Interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
12 = {
|
|
|
|
create_ship = {
|
|
|
|
name = random
|
|
|
|
design = "RG_icebreaker_interdictor"
|
|
|
|
upgradable = yes
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Tempest incoming traits
|
|
|
|
# Recursive check every X days
|
|
|
|
# This = planet
|
|
|
|
# From = country attacking
|
|
|
|
planet_event = {
|
|
|
|
id = rg_skill.6
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
immediate = {
|
|
|
|
save_event_target_as = tempest_incoming_battlefield_planet
|
2023-06-08 13:11:05 +08:00
|
|
|
if = {
|
|
|
|
# planet
|
|
|
|
limit = {
|
|
|
|
has_ground_combat = no
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
remove_planet_flag = checking_tempest_incoming
|
|
|
|
}
|
2023-06-08 13:11:05 +08:00
|
|
|
else = {
|
2024-09-17 13:32:31 +08:00
|
|
|
if = {
|
|
|
|
limit = {
|
|
|
|
#planet
|
|
|
|
any_ground_combat_attacker = {
|
|
|
|
#army
|
|
|
|
exists = leader
|
|
|
|
leader = {
|
|
|
|
#leader
|
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
2024-09-17 13:32:31 +08:00
|
|
|
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
2024-09-17 13:32:31 +08:00
|
|
|
from = {
|
|
|
|
#country
|
|
|
|
save_event_target_as = attacking_general_country
|
|
|
|
}
|
|
|
|
}
|
|
|
|
from = {
|
|
|
|
# Do the same check again in X days
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.10
|
|
|
|
}
|
|
|
|
# NOTE: Update custom loc for effect when changing days
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# tempest incoming traits
|
|
|
|
# Inital event started by on_ground_combat_started
|
|
|
|
# to kick of the recursive check in X days
|
|
|
|
# This = planet
|
|
|
|
# From = country attacking
|
|
|
|
planet_event = {
|
|
|
|
id = rg_skill.7
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
# Prevent duplicate events
|
|
|
|
trigger = {
|
2023-06-08 13:11:05 +08:00
|
|
|
not = {
|
|
|
|
has_planet_flag = checking_tempest_incoming
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
immediate = {
|
2023-06-08 13:11:05 +08:00
|
|
|
set_planet_flag = checking_tempest_incoming # Prevent duplicate events
|
2023-05-23 11:11:33 +08:00
|
|
|
planet_event = {
|
|
|
|
id = rg_skill.6
|
|
|
|
days = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# On army killed in combat.
|
|
|
|
# This = owner
|
|
|
|
# From = army
|
|
|
|
# FromFrom = opponent
|
|
|
|
# FromFromFrom = planet
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.8
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
immediate = {
|
2023-06-08 13:11:05 +08:00
|
|
|
FROMFROMFROM = {
|
|
|
|
# Planet where ground combat is taking place.
|
2023-05-23 11:11:33 +08:00
|
|
|
# Check if dead army is a defensive army.
|
|
|
|
if = {
|
|
|
|
limit = {
|
|
|
|
any_ground_combat_defender = {
|
|
|
|
is_same_value = ROOT.FROM
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# Check if attacking army has general with Crusader trait.
|
|
|
|
random_ground_combat_attacker = {
|
|
|
|
limit = {
|
|
|
|
exists = leader
|
|
|
|
leader = {
|
|
|
|
OR = {
|
2023-11-20 20:39:13 +08:00
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
leader = {
|
|
|
|
save_event_target_as = attacking_general
|
|
|
|
owner = {
|
|
|
|
save_event_target_as = attacking_general_country
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-08 13:11:05 +08:00
|
|
|
if = {
|
|
|
|
# planet where ground combat is taking place.
|
|
|
|
limit = {
|
|
|
|
exists = event_target:attacking_general
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
if = {
|
|
|
|
limit = {
|
2023-06-08 13:11:05 +08:00
|
|
|
event_target:attacking_general_country = {
|
|
|
|
# attacking general country
|
|
|
|
NOT = {
|
|
|
|
check_variable = {
|
|
|
|
which = rg_general_skill_combat_killed_variable
|
|
|
|
value = 100
|
|
|
|
}
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
event_target:attacking_general_country = {
|
|
|
|
change_variable = {
|
|
|
|
which = rg_general_skill_combat_killed_variable
|
|
|
|
value = 1
|
|
|
|
}
|
|
|
|
change_variable = {
|
|
|
|
which = rg_general_skill_combat_daypassed_variable
|
|
|
|
value = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# Handle both sides of the ground combat
|
2023-06-08 13:11:05 +08:00
|
|
|
RG_leader_trait_tempest_incoming_random_kill_effect = {
|
|
|
|
SIDE_A = attacker
|
|
|
|
SIDE_B = defender
|
|
|
|
}
|
|
|
|
RG_leader_trait_tempest_incoming_random_kill_effect = {
|
|
|
|
SIDE_A = defender
|
|
|
|
SIDE_B = attacker
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.9
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
|
|
|
any_owned_army = {
|
|
|
|
army_type = gray_army
|
|
|
|
if = {
|
2023-06-08 13:11:05 +08:00
|
|
|
limit = {
|
|
|
|
exists = planet
|
|
|
|
}
|
|
|
|
planet = {
|
|
|
|
has_ground_combat = no
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
2023-06-08 13:11:05 +08:00
|
|
|
set_variable = {
|
|
|
|
# country
|
2023-05-23 11:11:33 +08:00
|
|
|
which = rg_general_skill_combat_daypassed_variable
|
|
|
|
value = 1
|
|
|
|
}
|
2023-06-08 13:11:05 +08:00
|
|
|
set_variable = {
|
|
|
|
# country
|
2023-05-23 11:11:33 +08:00
|
|
|
which = rg_general_skill_combat_killed_variable
|
|
|
|
value = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.10
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
|
|
|
any_owned_army = {
|
|
|
|
army_type = gray_army
|
|
|
|
exists = leader
|
|
|
|
leader = {
|
|
|
|
OR = {
|
2023-11-20 20:39:13 +08:00
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if = {
|
2023-06-08 13:11:05 +08:00
|
|
|
limit = {
|
|
|
|
exists = planet
|
|
|
|
}
|
|
|
|
planet = {
|
|
|
|
has_ground_combat = yes
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
event_target:attacking_general_country = {
|
|
|
|
change_variable = {
|
|
|
|
which = rg_general_skill_combat_daypassed_variable
|
|
|
|
value = 1
|
|
|
|
}
|
|
|
|
}
|
2023-06-08 13:11:05 +08:00
|
|
|
country_event = {
|
|
|
|
id = rg_skill.10
|
|
|
|
days = 1
|
|
|
|
}
|
2023-05-23 11:11:33 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# 重组仪
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.11
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
|
|
|
FromFromFrom = {
|
|
|
|
is_in_combat = yes
|
|
|
|
has_component = RG_revive_component
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
FromFromFrom = {
|
|
|
|
save_event_target_as = event_ship
|
|
|
|
}
|
|
|
|
FromFromFrom.fleet = {
|
|
|
|
create_ship = {
|
|
|
|
name = event_target:event_ship
|
|
|
|
design = event_target:event_ship
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-20 14:05:14 +08:00
|
|
|
|
|
|
|
# 纳米重塑
|
2023-06-21 12:34:44 +08:00
|
|
|
# This = owner of ship 1 (combatant)
|
|
|
|
# From = owner of ship 2 (destroyed)
|
|
|
|
# FromFrom = ship 1
|
|
|
|
# FromFromFrom = ship 2
|
2023-06-20 14:05:14 +08:00
|
|
|
country_event = {
|
|
|
|
id = rg_skill.12
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
|
|
|
FromFromFrom = {
|
|
|
|
is_in_combat = yes
|
|
|
|
NOT = {
|
2023-06-21 13:08:31 +08:00
|
|
|
is_same_value = event_target:gray_warship_ship
|
2023-06-20 14:05:14 +08:00
|
|
|
}
|
2023-06-21 13:08:31 +08:00
|
|
|
exists = fleet.leader
|
2023-06-20 14:05:14 +08:00
|
|
|
}
|
2023-06-21 12:34:44 +08:00
|
|
|
FromFromFrom.fleet.leader = {
|
2023-06-20 14:05:14 +08:00
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
if = {
|
|
|
|
limit = {
|
2023-06-21 12:34:44 +08:00
|
|
|
From = {
|
2023-06-20 14:05:14 +08:00
|
|
|
check_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value >= 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FromFromFrom = {
|
|
|
|
save_event_target_as = event_ship
|
|
|
|
}
|
|
|
|
FromFromFrom.fleet = {
|
|
|
|
create_ship = {
|
|
|
|
name = event_target:event_ship
|
|
|
|
design = event_target:event_ship
|
|
|
|
}
|
|
|
|
}
|
2023-06-21 12:34:44 +08:00
|
|
|
From = {
|
2023-06-20 14:05:14 +08:00
|
|
|
change_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = -1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-21 12:34:44 +08:00
|
|
|
# country_event = {
|
|
|
|
# id = rg_skill.13
|
|
|
|
# hide_window = yes
|
|
|
|
# is_triggered_only = yes
|
|
|
|
# trigger = {
|
|
|
|
# FromFromFrom = {
|
|
|
|
# is_in_combat = yes
|
|
|
|
# }
|
|
|
|
# FromFrom.solar_system = {
|
|
|
|
# any_fleet_in_system = {
|
|
|
|
# leader = {
|
|
|
|
# has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# this = {
|
|
|
|
# NOT = {
|
|
|
|
# is_same_value = event_target:gray_owner
|
|
|
|
# is_in_federation_with = event_target:gray_owner
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# immediate = {
|
|
|
|
# event_target:gray_owner = {
|
|
|
|
# change_variable = {
|
|
|
|
# which = rg_nanorebuild_counter
|
|
|
|
# value = 1
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# On destroying enemy ship.
|
2023-06-20 14:05:14 +08:00
|
|
|
country_event = {
|
|
|
|
id = rg_skill.13
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
2023-06-21 13:08:31 +08:00
|
|
|
trigger = {
|
|
|
|
FromFrom = {
|
|
|
|
is_in_combat = yes
|
|
|
|
exists = fleet.leader
|
|
|
|
}
|
|
|
|
FromFrom.fleet.leader = {
|
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
}
|
2023-06-20 14:05:14 +08:00
|
|
|
immediate = {
|
2024-09-17 13:32:31 +08:00
|
|
|
FROMFROM = {
|
|
|
|
# Winning ship.
|
2023-06-21 12:34:44 +08:00
|
|
|
if = {
|
2024-09-17 13:32:31 +08:00
|
|
|
limit = {
|
|
|
|
exists = fleet.leader
|
|
|
|
}
|
2023-06-21 12:34:44 +08:00
|
|
|
fleet.leader = {
|
|
|
|
if = {
|
|
|
|
limit = {
|
|
|
|
OR = {
|
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ROOT = {
|
|
|
|
change_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-06-20 14:05:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-09-17 13:32:31 +08:00
|
|
|
|
2023-06-21 12:58:32 +08:00
|
|
|
# This = owner of fleet 1 (winner)
|
|
|
|
# From = owner of fleet 2 (loser)
|
|
|
|
# FromFrom = fleet 1
|
|
|
|
# FromFromFrom = fleet 2
|
2023-06-20 14:05:14 +08:00
|
|
|
country_event = {
|
|
|
|
id = rg_skill.14
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
2024-09-24 22:36:39 +08:00
|
|
|
exists = fromfrom.leader
|
2023-06-21 12:58:32 +08:00
|
|
|
OR = {
|
|
|
|
fromfrom.leader = {
|
2023-06-20 14:05:14 +08:00
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NOT = {
|
2023-06-21 12:58:32 +08:00
|
|
|
This = {
|
2023-06-20 14:05:14 +08:00
|
|
|
check_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
2023-06-21 12:58:32 +08:00
|
|
|
This = {
|
|
|
|
set_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-09-17 13:32:31 +08:00
|
|
|
|
2023-06-21 12:58:32 +08:00
|
|
|
# This = owner of fleet 1 (loser)
|
|
|
|
# From = owner of fleet 2 (winner)
|
|
|
|
# FromFrom = fleet 1
|
|
|
|
# FromFromFrom = fleet 2
|
|
|
|
country_event = {
|
|
|
|
id = rg_skill.15
|
|
|
|
hide_window = yes
|
|
|
|
is_triggered_only = yes
|
|
|
|
trigger = {
|
2024-09-24 22:36:39 +08:00
|
|
|
exists = fromfromfrom.leader
|
2023-06-21 12:58:32 +08:00
|
|
|
OR = {
|
2024-09-24 22:36:39 +08:00
|
|
|
fromfromfrom.leader = {
|
2023-06-21 12:58:32 +08:00
|
|
|
has_trait = RG_leader_trait_admiral_nanorebuild_gray
|
|
|
|
}
|
|
|
|
}
|
|
|
|
NOT = {
|
|
|
|
This = {
|
|
|
|
check_variable = {
|
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
immediate = {
|
|
|
|
This = {
|
|
|
|
set_variable = {
|
2023-06-20 14:05:14 +08:00
|
|
|
which = rg_nanorebuild_counter
|
|
|
|
value = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|