Skip to content

Commit

Permalink
Updated 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
calniotrey committed Oct 2, 2021
1 parent 3793b0f commit d883950
Show file tree
Hide file tree
Showing 10 changed files with 295 additions and 310 deletions.
140 changes: 70 additions & 70 deletions common/deposits/iisc_hq_deposits_hive.txt

Large diffs are not rendered by default.

140 changes: 70 additions & 70 deletions common/deposits/iisc_hq_deposits_machine.txt

Large diffs are not rendered by default.

140 changes: 70 additions & 70 deletions common/deposits/iisc_hq_deposits_regular.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion common/deposits/iisc_income_deposits.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
d_iisc_income_deposit = {
is_for_colonizeable = yes
is_for_colonizable = yes
category = deposit_cat_rare
icon = d_city
resources = {
Expand Down
49 changes: 17 additions & 32 deletions common/scripted_effects/iisc_corps_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ iisc_split_disbanded_corp_money = {
}
set_variable = {
which = iisc_corp_money_to_give
value = prevprev
value = prevprev.iisc_corp_money_to_give
}
add_resource = {
energy = 1
Expand Down Expand Up @@ -222,46 +222,34 @@ iisc_destroy_corp = {
remove_deposit = d_iisc_income_deposit
subtract_variable = {
which = iisc_taxes_energy
value = {
scope = prev
variable = iisc_previous_taxes_energy
}
value = prev.iisc_previous_taxes_energy
}
subtract_variable = {
which = iisc_taxes_minerals
value = {
scope = prev
variable = iisc_previous_taxes_minerals
}
value = prev.iisc_previous_taxes_minerals
}
subtract_variable = {
which = iisc_taxes_food
value = {
scope = prev
variable = iisc_previous_taxes_food
}
value = prev.iisc_previous_taxes_food
}
subtract_variable = {
which = iisc_taxes_alloys
value = {
scope = prev
variable = iisc_previous_taxes_alloys
}
value = prev.iisc_previous_taxes_alloys
}
subtract_variable = {
which = iisc_taxes_consumer_goods
value = {
scope = prev
variable = iisc_previous_taxes_consumer_goods
}
value = prev.iisc_previous_taxes_consumer_goods
}
}
iisc_remove_hq_deposit_from_corp = yes
}
every_mining_station = {
delete_fleet = this
}
every_research_station = {
every_orbital_station = {
limit = {
OR = {
is_ship_class = shipclass_mining_station
is_ship_class = shipclass_research_station
}
}
delete_fleet = this
}
every_owned_fleet = {
Expand Down Expand Up @@ -1453,7 +1441,7 @@ iisc_compute_and_tax_space_corp_income_from_resource = {
overlord = {
set_variable = {
which = iisc_$RESOURCE$_income
value = prev
value = prev.iisc_$RESOURCE$_income
}
set_variable = {
which = iisc_taxes
Expand Down Expand Up @@ -1488,18 +1476,15 @@ iisc_compute_and_tax_space_corp_income_from_resource = {
# that way, iisc_taxes_$RESOURCE$ should always have the sum of the taxes from every corps on that HQ
set_variable = {
which = iisc_previous_taxes_$RESOURCE$
value = prevprev
value = prevprev.iisc_previous_taxes_$RESOURCE$
}
subtract_variable = {
which = iisc_taxes_$RESOURCE$
value = iisc_previous_taxes_$RESOURCE$
}
change_variable = {
which = iisc_taxes_$RESOURCE$
value = {
scope = prev
variable = iisc_taxes
}
value = prev.iisc_taxes
}
# decompose it into a list of 0 and 1 up to 1023
# remark: iisc_taxes_$RESOURCE$_0 is the modulo by 2 => might not be integer => we check in the deposit if >= 1
Expand All @@ -1515,7 +1500,7 @@ iisc_compute_and_tax_space_corp_income_from_resource = {
prev = {
set_variable = {
which = iisc_taxes
value = prev
value = prev.iisc_taxes
}
set_variable = {
which = iisc_previous_taxes_$RESOURCE$
Expand Down
6 changes: 3 additions & 3 deletions common/scripted_effects/iisc_leader_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ iisc_set_recruit_price = {
}
set_variable = {
which = iisc_energy_stock
value = event_target:iisc_overlord
value = event_target:iisc_overlord.iisc_energy_stock
}
}

Expand Down Expand Up @@ -270,7 +270,7 @@ iisc_overlord_recruit_leader = {
owner = {
set_variable = {
which = iisc_recruit_price
value = prev
value = prev.iisc_recruit_price
}
add_resource = {
energy = 1
Expand All @@ -279,7 +279,7 @@ iisc_overlord_recruit_leader = {
event_target:iisc_overlord = {
set_variable = {
which = iisc_recruit_price
value = prev
value = prev.iisc_recruit_price
}
add_resource = {
energy = -1
Expand Down
4 changes: 2 additions & 2 deletions common/scripted_effects/iisc_utility_effects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ iisc_compute_license_and_stations_cost = {
}
set_variable = {
which = iisc_mining_license_cost
value = prev
value = prev.iisc_mining_license_cost
}
set_variable = {
which = iisc_mining_station_total_cost
value = prev
value = prev.iisc_mining_station_total_cost
}
}
}
Expand Down
10 changes: 4 additions & 6 deletions common/scripted_triggers/iisc_military_triggers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ iisc_should_create_military_fleet = {
}
check_variable_arithmetic = {
which = iisc_current_fleet_power
by = @iisc_overlord_fleet_power_multiple
value < overlord
mode = multiply
multiply = @iisc_overlord_fleet_power_multiple
value < overlord.trigger:fleet_power
}
iisc_can_spawn_ships = yes
NOT = {
Expand All @@ -36,9 +35,8 @@ iisc_should_reinforce_a_fleet = {
}
check_variable_arithmetic = {
which = iisc_current_fleet_power
by = @iisc_overlord_fleet_power_multiple
value < overlord
mode = multiply
multiply = @iisc_overlord_fleet_power_multiple
value < overlord.trigger:fleet_power
}
count_owned_fleet = {
count >= 5
Expand Down
108 changes: 58 additions & 50 deletions events/iisc_diplomacy_events.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,32 +100,36 @@ country_event = {
option = {
name = iisc_diplomacy.20.hire_scientist
hidden_effect = {
if = {
limit = {
has_country_resource = {
type = energy
amount > 4095
}
}
SLEX_get_custom_parameter_advanced = {
CONDITION_NAME = has_country_resource
FIRST_KW = type
SECOND_KW = energy
THIRD_KW = amount
VARIABLE = iisc_energy_stock
ROUNDING_ZEROES = "00"
}
}
else = {
SLEX_get_custom_parameter_advanced = {
CONDITION_NAME = has_country_resource
FIRST_KW = type
SECOND_KW = energy
THIRD_KW = amount
VARIABLE = iisc_energy_stock
ROUNDING_ZEROES = "0"
}
export_resource_stockpile_to_variable = {
resource = energy
variable = iisc_energy_stock
}
# if = {
# limit = {
# has_country_resource = {
# type = energy
# amount > 4095
# }
# }
# SLEX_get_custom_parameter_advanced = {
# CONDITION_NAME = has_country_resource
# FIRST_KW = type
# SECOND_KW = energy
# THIRD_KW = amount
# VARIABLE = iisc_energy_stock
# ROUNDING_ZEROES = "00"
# }
# }
# else = {
# SLEX_get_custom_parameter_advanced = {
# CONDITION_NAME = has_country_resource
# FIRST_KW = type
# SECOND_KW = energy
# THIRD_KW = amount
# VARIABLE = iisc_energy_stock
# ROUNDING_ZEROES = "0"
# }
# }
event_target:iisc_corp_country = {
iisc_select_5_random_recruitable_leaders = {
CLASS = scientist
Expand Down Expand Up @@ -310,32 +314,36 @@ country_event = {
name = iisc_diplomacy.21.other_scientists
hidden_effect = {
iisc_deselect_random_recruitable_leaders = yes
if = {
limit = {
has_country_resource = {
type = energy
amount > 4095
}
}
SLEX_get_custom_parameter_advanced = {
CONDITION_NAME = has_country_resource
FIRST_KW = type
SECOND_KW = energy
THIRD_KW = amount
VARIABLE = iisc_energy_stock
ROUNDING_ZEROES = "00"
}
}
else = {
SLEX_get_custom_parameter_advanced = {
CONDITION_NAME = has_country_resource
FIRST_KW = type
SECOND_KW = energy
THIRD_KW = amount
VARIABLE = iisc_energy_stock
ROUNDING_ZEROES = "0"
}
export_resource_stockpile_to_variable = {
resource = energy
variable = iisc_energy_stock
}
# if = {
# limit = {
# has_country_resource = {
# type = energy
# amount > 4095
# }
# }
# SLEX_get_custom_parameter_advanced = {
# CONDITION_NAME = has_country_resource
# FIRST_KW = type
# SECOND_KW = energy
# THIRD_KW = amount
# VARIABLE = iisc_energy_stock
# ROUNDING_ZEROES = "00"
# }
# }
# else = {
# SLEX_get_custom_parameter_advanced = {
# CONDITION_NAME = has_country_resource
# FIRST_KW = type
# SECOND_KW = energy
# THIRD_KW = amount
# VARIABLE = iisc_energy_stock
# ROUNDING_ZEROES = "0"
# }
# }
event_target:iisc_corp_country = {
iisc_select_5_random_recruitable_leaders = {
CLASS = scientist
Expand Down
6 changes: 0 additions & 6 deletions events/iisc_pulse_events.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ country_event = {
trigger = fleet_power
variable = iisc_current_fleet_power
}
overlord = {
export_trigger_value_to_variable = {
trigger = fleet_power
variable = iisc_current_fleet_power
}
}
# build ships
if = {
limit = {
Expand Down

0 comments on commit d883950

Please sign in to comment.