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 #849138 ยป 0001-adv_data-clarify-what-is-being-counted.patch

Sveinung Kvilhaugsvik, 2019-11-24 03:04 PM

View differences:

ai/default/daieffects.c
break;
case EFT_ENABLE_NUKE:
/* Treat nuke as a Cruise Missile upgrade */
v += 20 + ai->stats.units.missiles * 5;
v += 20 + ai->stats.units.suicide_attackers * 5;
break;
case EFT_ENABLE_SPACE:
if (victory_enabled(VC_SPACERACE)) {
server/advisors/advdata.c
adv->stats.units.coast_strict++;
}
if (utype_can_do_action(unit_type_get(punit), ACTION_SUICIDE_ATTACK)) {
adv->stats.units.missiles++;
adv->stats.units.suicide_attackers++;
}
if (unit_can_do_action(punit, ACTION_PARADROP)) {
adv->stats.units.paratroopers++;
......
/* If our enemy builds missiles, worry about missile defence. */
if (utype_can_do_action(unit_type_get(punit), ACTION_SUICIDE_ATTACK)
&& unit_type_get(punit)->attack_strength > 1) {
adv->threats.missile = TRUE;
adv->threats.suicide_attack = TRUE;
}
/* If he builds nukes, worry a lot. */
server/advisors/advdata.h
/* Long-term threats, not to be confused with short-term danger */
struct {
bool invasions; /* check if we need to consider invasions */
bool *continent; /* non-allied cities on continent? */
bool *ocean; /* non-allied offensive ships in ocean? */
bool missile; /* check for non-allied missiles */
int nuclear; /* nuke check: 0=no, 1=capability, 2=built */
bool igwall; /* enemies have igwall units */
bool invasions; /* check if we need to consider invasions */
bool *continent; /* non-allied cities on continent? */
bool *ocean; /* non-allied offensive ships in ocean? */
bool suicide_attack; /* check for non-allied missiles */
int nuclear; /* nuke check: 0=no, 1=capability, 2=built */
bool igwall; /* enemies have igwall units */
} threats;
/* Keeps track of which continents are fully explored already */
......
int coast_strict;
/* Unit can do action counts. */
int missiles, paratroopers, airliftable;
int suicide_attackers, paratroopers, airliftable;
int byclass[UCL_LAST];
    (1-1/1)