Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Feature #877543 ยป 0002-Make-not-fortified-hard-req-obligatory.patch

Sveinung Kvilhaugsvik, 2020-06-14 07:35 AM

View differences:

common/actions.c
ACTRES_ESTABLISH_EMBASSY,
ACTRES_NONE);
/* Why this is a hard requirement: There is currently no point in
* fortifying an already fortified unit. */
oblig_hard_req_register(req_from_values(VUT_ACTIVITY, REQ_RANGE_LOCAL,
FALSE, TRUE, TRUE,
ACTIVITY_FORTIFIED),
FALSE,
"All action enablers for %s must require that"
" the actor unit isn't already fortified.",
ACTRES_FORTIFY,
ACTRES_NONE);
/* Why this is a hard requirement: there is a hard requirement that
* the actor player is at war with the owner of any city on the
* target tile. It can't move to the ruleset as long as Bombard and Attack
......
}
break;
case ACTRES_FORTIFY:
if (actor_unit->activity == ACTIVITY_FORTIFIED) {
return TRI_NO;
}
break;
case ACTRES_TRANSPORT_ALIGHT:
if (!can_unit_unload(actor_unit, target_unit)) {
/* Keep the old rules about Unreachable and disembarks. */
......
case ACTRES_CONVERT:
case ACTRES_STRIKE_BUILDING:
case ACTRES_STRIKE_PRODUCTION:
case ACTRES_FORTIFY:
case ACTRES_NONE:
/* No known hard coded requirements. */
break;
data/alien/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/civ1/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/civ2/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/civ2civ3/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/classic/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/experimental/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/multiplayer/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/sandbox/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
data/webperimental/game.ruleset
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"TerrainFlag", "NoFortify", "Local", FALSE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_fortify_city]
......
"UnitClassFlag", "CanFortify", "Local", TRUE
"UnitFlag", "Cant_Fortify", "Local", FALSE
"CityTile", "Center", "Local", TRUE
"Activity", "Fortified", "Local", FALSE
}
[actionenabler_road]
doc/README.actions
* UI name can be set using ui_name_fortify
* the actor unit has "CanFortify" unit class flag (!)
* the actor unit can't have the "Cant_Fortify" unit type flag (!)
* the actor unit can't already be fortified (!)
"Convert Unit" - Convert the unit to another unit type.
* UI name can be set using ui_name_convert_unit
    (1-1/1)