Author: cazfi Date: Sat Dec 20 04:44:02 2014 New Revision: 27357 URL: http://svn.gna.org/viewcvs/freeciv?rev=27357&view=rev Log: Moved Barbarian Leader escape rules to the rulesets.
See patch #5574 Modified: trunk/data/alien/effects.ruleset trunk/data/civ1/effects.ruleset trunk/data/civ2/effects.ruleset trunk/data/civ2civ3/effects.ruleset trunk/data/classic/effects.ruleset trunk/data/experimental/effects.ruleset trunk/data/multiplayer/effects.ruleset trunk/server/srv_main.c Modified: trunk/data/alien/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/alien/effects.ruleset (original) +++ trunk/data/alien/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -78,6 +78,33 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_madmen_cyborg_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "Nation", "Madmen", "Player" + "UnitType", "Cyborgs", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + +[effect_lunatic_cyborg_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "Nation", "Lunatic", "Player" + "UnitType", "Cyborgs", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Base vision range - radius of vision is sqrt(5) = 2.24 [effect_city_vision] type = "City_Vision_Radius_Sq" Modified: trunk/data/civ1/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/civ1/effects.ruleset (original) +++ trunk/data/civ1/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -236,6 +236,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Base vision range - radius of vision is sqrt(5) = 2.24 [effect_city_vision] type = "City_Vision_Radius_Sq" Modified: trunk/data/civ2/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/civ2/effects.ruleset (original) +++ trunk/data/civ2/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -88,6 +88,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + [effect_unhappysize] type = "City_Unhappy_Size" value = 4 Modified: trunk/data/civ2civ3/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/civ2civ3/effects.ruleset (original) +++ trunk/data/civ2civ3/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -182,6 +182,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Specialist output bonuses [effect_elvis] Modified: trunk/data/classic/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/classic/effects.ruleset (original) +++ trunk/data/classic/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -74,6 +74,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Specialist output bonuses [effect_elvis] Modified: trunk/data/experimental/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/experimental/effects.ruleset (original) +++ trunk/data/experimental/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -77,6 +77,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Specialist output bonuses [effect_elvis] Modified: trunk/data/multiplayer/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/effects.ruleset?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/data/multiplayer/effects.ruleset (original) +++ trunk/data/multiplayer/effects.ruleset Sat Dec 20 04:44:02 2014 @@ -74,6 +74,20 @@ "CityTile", "Center", "Local", FALSE } +; Lone Leader might escape on coast (33% chance) +; Complement of the two effects should be 0.9 * 0.66 = 0.594 +; (100 - 59) - 10 = 31 +[effect_leader_escape] +type = "Retire_Pct" +value = 31 +reqs = + { "type", "name", "range" + "UnitType", "Barbarian Leader", "Local" + "Age", "5", "Local" + "TerrainClass", "Oceanic", "Adjacent" + "MaxUnitsOnTile", "1", "Local" + } + ; Specialist output bonuses [effect_elvis] Modified: trunk/server/srv_main.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/srv_main.c?rev=27357&r1=27356&r2=27357&view=diff ============================================================================== --- trunk/server/srv_main.c (original) +++ trunk/server/srv_main.c Sat Dec 20 04:44:02 2014 @@ -910,20 +910,6 @@ wipe_unit(punit, ULR_RETIRED, NULL); continue; } - if (is_barbarian(pplayer)) { - if (unit_has_type_role(punit, L_BARBARIAN_LEADER)) { - /* Lone Leader past expected lifetime has extra 33% chance to disappear - * on coast */ - if (unit_list_size(ptile->units) == 1 - && is_terrain_class_near_tile(ptile, TC_OCEAN) - && (punit->server.birth_turn + BARBARIAN_MIN_LIFESPAN - < game.info.turn) - && fc_rand(3) == 0) { - log_debug("Barbarian leader disappearing..."); - wipe_unit(punit, ULR_RETIRED, NULL); - } - } - } } unit_list_iterate_safe_end; } players_iterate_end; } _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits