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 #877812 ยป 0026-need_war_player-by-action-result.patch

Sveinung Kvilhaugsvik, 2020-06-16 11:14 AM

View differences:

server/unithand.c
/* Look for hard coded war requirements that can't be an action enabler
* requirement. */
switch ((enum gen_action)act) {
case ACTION_BOMBARD:
case ACTION_BOMBARD2:
case ACTION_BOMBARD3:
case ACTION_ATTACK:
case ACTION_SUICIDE_ATTACK:
switch (paction->result) {
case ACTRES_BOMBARD:
case ACTRES_ATTACK:
/* Target is tile or unit stack but a city (or unit) can block it. */
if (target_tile) {
struct city *tcity;
......
}
break;
case ACTION_PARADROP:
case ACTRES_PARADROP:
/* Target is a tile but a city or unit can block it. */
if (target_tile
&& map_is_known_and_seen(target_tile, actor_player, V_MAIN)) {
......
} unit_list_iterate_end;
}
break;
case ACTION_ESTABLISH_EMBASSY:
case ACTION_ESTABLISH_EMBASSY_STAY:
case ACTION_SPY_INVESTIGATE_CITY:
case ACTION_INV_CITY_SPEND:
case ACTION_SPY_POISON:
case ACTION_SPY_POISON_ESC:
case ACTION_SPY_SPREAD_PLAGUE:
case ACTION_SPY_STEAL_GOLD:
case ACTION_SPY_STEAL_GOLD_ESC:
case ACTION_SPY_SABOTAGE_CITY:
case ACTION_SPY_SABOTAGE_CITY_ESC:
case ACTION_SPY_TARGETED_SABOTAGE_CITY:
case ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC:
case ACTION_SPY_SABOTAGE_CITY_PRODUCTION:
case ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC:
case ACTION_SPY_STEAL_TECH:
case ACTION_SPY_STEAL_TECH_ESC:
case ACTION_SPY_TARGETED_STEAL_TECH:
case ACTION_SPY_TARGETED_STEAL_TECH_ESC:
case ACTION_SPY_INCITE_CITY:
case ACTION_SPY_INCITE_CITY_ESC:
case ACTION_TRADE_ROUTE:
case ACTION_MARKETPLACE:
case ACTION_HELP_WONDER:
case ACTION_SPY_BRIBE_UNIT:
case ACTION_SPY_SABOTAGE_UNIT:
case ACTION_SPY_SABOTAGE_UNIT_ESC:
case ACTION_CAPTURE_UNITS: /* Only foreign is a hard req. */
case ACTION_FOUND_CITY:
case ACTION_JOIN_CITY:
case ACTION_STEAL_MAPS:
case ACTION_STEAL_MAPS_ESC:
case ACTION_SPY_NUKE:
case ACTION_SPY_NUKE_ESC:
case ACTION_NUKE:
case ACTION_NUKE_CITY:
case ACTION_NUKE_UNITS:
case ACTION_DESTROY_CITY:
case ACTION_EXPEL_UNIT:
case ACTION_RECYCLE_UNIT:
case ACTION_DISBAND_UNIT:
case ACTION_HOME_CITY:
case ACTION_UPGRADE_UNIT:
case ACTION_AIRLIFT:
case ACTION_HEAL_UNIT:
case ACTION_STRIKE_BUILDING:
case ACTION_STRIKE_PRODUCTION:
case ACTION_CONQUER_CITY:
case ACTION_CONQUER_CITY2:
case ACTION_TRANSFORM_TERRAIN:
case ACTION_CULTIVATE:
case ACTION_PLANT:
case ACTION_PILLAGE:
case ACTION_CLEAN_POLLUTION:
case ACTION_CLEAN_FALLOUT:
case ACTION_FORTIFY:
case ACTION_CONVERT:
case ACTION_ROAD:
case ACTION_BASE:
case ACTION_MINE:
case ACTION_IRRIGATE:
case ACTION_TRANSPORT_ALIGHT:
case ACTION_TRANSPORT_UNLOAD:
case ACTION_TRANSPORT_DISEMBARK1:
case ACTION_TRANSPORT_DISEMBARK2:
case ACTION_TRANSPORT_BOARD:
case ACTION_TRANSPORT_EMBARK:
case ACTION_SPY_ATTACK:
case ACTION_USER_ACTION1:
case ACTION_USER_ACTION2:
case ACTION_USER_ACTION3:
case ACTRES_ESTABLISH_EMBASSY:
case ACTRES_SPY_INVESTIGATE_CITY:
case ACTRES_SPY_POISON:
case ACTRES_SPY_SPREAD_PLAGUE:
case ACTRES_SPY_STEAL_GOLD:
case ACTRES_SPY_SABOTAGE_CITY:
case ACTRES_SPY_TARGETED_SABOTAGE_CITY:
case ACTRES_SPY_SABOTAGE_CITY_PRODUCTION:
case ACTRES_SPY_STEAL_TECH:
case ACTRES_SPY_TARGETED_STEAL_TECH:
case ACTRES_SPY_INCITE_CITY:
case ACTRES_TRADE_ROUTE:
case ACTRES_MARKETPLACE:
case ACTRES_HELP_WONDER:
case ACTRES_SPY_BRIBE_UNIT:
case ACTRES_SPY_SABOTAGE_UNIT:
case ACTRES_CAPTURE_UNITS: /* Only foreign is a hard req. */
case ACTRES_FOUND_CITY:
case ACTRES_JOIN_CITY:
case ACTRES_STEAL_MAPS:
case ACTRES_SPY_NUKE:
case ACTRES_NUKE:
case ACTRES_NUKE_CITY:
case ACTRES_NUKE_UNITS:
case ACTRES_DESTROY_CITY:
case ACTRES_EXPEL_UNIT:
case ACTRES_RECYCLE_UNIT:
case ACTRES_DISBAND_UNIT:
case ACTRES_HOME_CITY:
case ACTRES_UPGRADE_UNIT:
case ACTRES_AIRLIFT:
case ACTRES_HEAL_UNIT:
case ACTRES_STRIKE_BUILDING:
case ACTRES_STRIKE_PRODUCTION:
case ACTRES_CONQUER_CITY:
case ACTRES_TRANSFORM_TERRAIN:
case ACTRES_CULTIVATE:
case ACTRES_PLANT:
case ACTRES_PILLAGE:
case ACTRES_CLEAN_POLLUTION:
case ACTRES_CLEAN_FALLOUT:
case ACTRES_FORTIFY:
case ACTRES_CONVERT:
case ACTRES_ROAD:
case ACTRES_BASE:
case ACTRES_MINE:
case ACTRES_IRRIGATE:
case ACTRES_TRANSPORT_ALIGHT:
case ACTRES_TRANSPORT_UNLOAD:
case ACTRES_TRANSPORT_DISEMBARK:
case ACTRES_TRANSPORT_BOARD:
case ACTRES_TRANSPORT_EMBARK:
case ACTRES_SPY_ATTACK:
case ACTRES_NONE:
/* No special help. */
break;
case ACTION_COUNT:
/* Invalid. */
fc_assert(act != ACTION_COUNT);
break;
}
/* Look for war requirements from the action enablers. */
    (1-1/1)