From d68718a769a3222a8f4482ead505f8279d1452b7 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Tue, 16 Mar 2021 13:50:29 +0100 Subject: [PATCH] !TerrainSpeed shouldn't pay slow_invasion cost. Make sure that units without the TerrainSpeed unit class flag doesn't pay the slow_invasion MP cost. See osdn #41794 --- data/alien/effects.ruleset | 14 +++++++------ data/civ2civ3/effects.ruleset | 28 ++++++++++++++----------- data/classic/effects.ruleset | 35 ++++++++++++++++++-------------- data/goldkeep/effects.ruleset | 35 ++++++++++++++++++-------------- data/granularity/effects.ruleset | 7 ++++--- data/multiplayer/effects.ruleset | 35 ++++++++++++++++++-------------- data/sandbox/effects.ruleset | 35 ++++++++++++++++++-------------- 7 files changed, 108 insertions(+), 81 deletions(-) diff --git a/data/alien/effects.ruleset b/data/alien/effects.ruleset index f1e0fcb544..661a34b6b1 100644 --- a/data/alien/effects.ruleset +++ b/data/alien/effects.ruleset @@ -1084,18 +1084,20 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_unit_shield_value_recycle] diff --git a/data/civ2civ3/effects.ruleset b/data/civ2civ3/effects.ruleset index ea2d7a6ce5..021e504283 100644 --- a/data/civ2civ3/effects.ruleset +++ b/data/civ2civ3/effects.ruleset @@ -4359,36 +4359,40 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_conquer_cost_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer City 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer City 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_frighten_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Frighten Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Frighten Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_attack_one_attack] diff --git a/data/classic/effects.ruleset b/data/classic/effects.ruleset index 1c0b70ac9e..55b0f479db 100644 --- a/data/classic/effects.ruleset +++ b/data/classic/effects.ruleset @@ -2616,45 +2616,50 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_conquer_cost_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer City 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer City 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_frighten_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Frighten Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Frighten Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_conquer_extras_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer Extras 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer Extras 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_attack_one_attack] diff --git a/data/goldkeep/effects.ruleset b/data/goldkeep/effects.ruleset index ab836f4f89..7d68e683cb 100644 --- a/data/goldkeep/effects.ruleset +++ b/data/goldkeep/effects.ruleset @@ -2919,45 +2919,50 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_conquer_cost_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer City 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer City 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_frighten_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Frighten Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Frighten Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_conquer_extras_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer Extras 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer Extras 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_attack_one_attack] diff --git a/data/granularity/effects.ruleset b/data/granularity/effects.ruleset index 44efbd10e5..e325900a92 100644 --- a/data/granularity/effects.ruleset +++ b/data/granularity/effects.ruleset @@ -190,9 +190,10 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_no_tools] diff --git a/data/multiplayer/effects.ruleset b/data/multiplayer/effects.ruleset index b808dc6240..b124c2bfa6 100644 --- a/data/multiplayer/effects.ruleset +++ b/data/multiplayer/effects.ruleset @@ -2581,45 +2581,50 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_conquer_cost_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer City 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer City 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_frighten_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Frighten Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Frighten Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_conquer_extras_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer Extras 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer Extras 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_attack_one_attack] diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset index 7b4a84dbae..361a2e13ae 100644 --- a/data/sandbox/effects.ruleset +++ b/data/sandbox/effects.ruleset @@ -4623,45 +4623,50 @@ reqs = type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Transport Disembark 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Transport Disembark 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_conquer_cost_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer City 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer City 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_entry_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Enter Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Enter Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_hut_frighten_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Frighten Hut 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Frighten Hut 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_move_cost_conquer_extras_from_non_native] type = "Action_Success_Actor_Move_Cost" value = 65535 reqs = - { "type", "name", "range", "present" - "Action", "Conquer Extras 2", "Local", TRUE - "UnitState", "OnNativeTile", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Conquer Extras 2", "Local", TRUE + "UnitState", "OnNativeTile", "Local", TRUE + "UnitClassFlag", "TerrainSpeed", "Local", TRUE } [effect_action_success_attack_one_attack] -- 2.20.1