This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
int | could_see (int u) |
Could u see? | |
int | can_be_on (int u, Side *side, int x, int y, int *p_without=NULL) |
Can u on a given side be on a given cell? | |
int | can_be_on_known (int u, Side *side, int x, int y, int *p_without=NULL) |
Can u on a given side be on a given known cell? | |
int | could_be_occupant_of (int u, int u2) |
Could u be an occupant of u2? | |
int | could_be_occupant (int u) |
Could u be an occupant of any utypes? | |
int | can_be_in (int u2, Side *side, UnitView *uvtspt) |
Can u2 on the given side be an occupant of the given uview? | |
int | longest_economic_input (int u, int u2, int m) |
Longest direct economic input for a material from u2 to u. | |
int | longest_economic_input (int u, int u2) |
Longest direct economic input from u2 to u. | |
int | longest_economic_input (int u) |
Longest direct economic input from any utype to u. | |
void | productivity_on_known (int *p_mtypes, int u, Side *side, int x, int y) |
Materials productivity on given known cell for given utype and side. | |
int | can_survive_on_known (int u, Side *side, int x, int y, int *p_without=NULL) |
Can u on a given side survive on a given known cell? | |
int | can_survive_on_known (Unit *survivor, int x, int y, int *p_without=NULL) |
Can a given unit survive a given known cell? | |
int | can_refuel (Unit *supplier, Unit *demander, int m) |
Can a given unit refuel another given unit with a given fuel? | |
int | can_create_completed_unit (Unit *acpsrc, Unit *creator, int u2) |
Can a given unit complete an unit of a given type at creation? | |
int | can_construct_any (int u, Side *side) |
Can an utype on a given side construct >= 1 utypes? | |
int | can_construct (Unit *acpsrc, Unit *constructor, int u2) |
Can a given unit construct an unit of a given type? | |
int | can_construct_any (Unit *acpsrc, Unit *constructor) |
Can a given unit construct >= 1 utypes? | |
int | can_repair_any (Unit *actor, Unit *repairer) |
Can given actor-repairer pair repair any utype? | |
int | fire_damage_mean (int u, int u2) |
Mean fire damage that u does to u2. | |
int | attack_damage_mean (int u, int u2) |
Mean attack damage that u does to u2. | |
int | detonate_0dist_damage_mean (int u, int u2) |
Mean detonate damage that u does to u2 in same cell. | |
int | detonate_ranged_damage_mean (int u, int u2) |
Mean detonate damage that u does to u2 at range. | |
int | detonate_damage_mean (int u, int u2) |
Mean detonate damage that u does to u2. | |
int | n_detonations_available (int u) |
Number of detonations available to u before expiring. | |
int | could_counterattack (int u, int u2) |
Could u counterattack u2? | |
int | could_countercapture (int u, int u2, Side *side) |
Could u countercapture u2 on a given side? | |
int | could_prevent_capture_of (int u, int u2) |
Could u prevent capture of u2? | |
int | could_prevent_capture_by (int u, int u2) |
Could u prevent capture by u2? | |
int | could_damage_by_fire (int u, int u2) |
Could u damage u2 by firing? | |
int | could_damage_by_attacks (int u, int u2) |
Could u damage u2 by attacks? | |
int | could_destroy_by_fire (int u, int u2) |
Could u destroy u2 by firing? | |
int | can_destroy_by_fire (Unit *actor, Unit *destroyer, int u) |
Can a given unit destroy a given utype by firing? | |
int | can_destroy_any_by_fire (Unit *actor, Unit *destroyer) |
Can a given unit destroy >= 1 enemy utypes by firing? | |
int | could_destroy_by_attacks (int u, int u2) |
Could u destroy u2 by attacks? | |
int | can_destroy_by_attacks (Unit *actor, Unit *destroyer, int u) |
Can a given unit destroy a given utype by attacks? | |
int | can_destroy_any_by_attacks (Unit *actor, Unit *destroyer) |
Can a given unit destroy >= 1 enemy utypes by attacks? | |
int | could_damage_by_combat (int u, int u2) |
Could u damage u2 by combat? | |
int | can_destroy_any_by_combat (Unit *acpsrc, Unit *destroyer) |
Can a given unit destroy >= 1 enemy utypes through combat? | |
int | could_damage_by_detonations (int u, int u2) |
Could u damage u2 through detonations? | |
int | could_destroy_by_detonations (int u, int u2) |
Could u destroy u2 through detonations? | |
int | can_destroy_any_by_detonations (int u, Side *side) |
Can an utype on a given side destroy >= 1 enemy utypes through detonations? | |
int | can_destroy_any_by_detonations (Unit *acpsrc, Unit *exploder) |
Can a given unit destroy >= 1 enemy utypes through detonations? | |
int | could_damage (int u, int u2) |
Could u damage u2 by any means? | |
int | could_damage_any (int u) |
Could u damage >= 1 enemy utypes by any means? | |
int | can_destroy_any (Unit *acpsrc, Unit *destroyer) |
Can a given unit destroy >= 1 enemy utypes in any way? | |
int | can_capture_by_fire (Unit *actor, Unit *captor, int u) |
Can a given unit capture a given utype by fire? | |
int | can_capture_any (Unit *actor, Unit *captor) |
Can a given unit capture >= 1 enemy utypes in any way? | |
int | can_countercapture_any (Unit *actor, Unit *countercaptor) |
Can a given unit countercapture >= 1 enemy utypes? | |
int | can_prevent_capture_by_any (Unit *actor, Unit *anticaptor) |
Can a given unit prevent capture by >= 1 enemy utypes? | |
int | could_defeat_by_fire (int u, int u2, Side *side) |
Could u defeat u2 by fire? | |
int | can_defeat_by_fire (Unit *actor, Unit *firer, int u) |
Can a given unit defeat a given utype by fire? | |
int | could_defeat_by_attacks (int u, int u2, Side *side) |
Could u defeat u2 by attacks? | |
int | can_defeat_by_attacks (Unit *actor, Unit *attacker, int u) |
Can a given unit defeat a given utype with attacks? | |
int | could_defeat_by_counterattacks (int u, int u2, Side *side) |
Could u defeat u2 by counterattacks? | |
int | can_defeat_by_counterattacks (Unit *actor, Unit *counterattacker, int u) |
Can a given unit defeat a given utype with counterattacks? | |
int | can_defeat_any_by_counterattacks (Unit *actor, Unit *counterattacker) |
Can a given unit defeat >= 1 enemy utypes by counterattacks? | |
int | could_overwatch_against (int u, int u2, Side *side) |
Could u overwatch against u2? | |
int | could_overwatch_against_and_defeat (int u, int u2) |
Could u overwatch against and defeat u2? | |
int | can_overwatch_against_and_defeat (Unit *actor, Unit *overwatcher, int u) |
Can a given unit overwatch against and defeat a given utype? | |
int | can_overwatch_against_and_defeat_any (Unit *actor, Unit *overwatcher) |
Can a given unit provide defeating overwatch against >= 1 enemy utypes? | |
int | could_defend_against (int u, int u2, Side *side) |
Could u defend against u2 in any way? | |
int | could_defend_against_any (int u) |
Could u defend against >= 1 enemy utypes in any way? | |
int | can_defend_against_any (Unit *actor, Unit *defender) |
Can a given unit defend against >= 1 enemy utypes in any way? | |
int | could_explore (int u) |
Could u explore? | |
int | can_explore (Unit *actor, Unit *explorer) |
Can a given unit explore? | |
int | can_construct_explorers (Unit *actor, Unit *constructor) |
Can a given unit construct explorers? | |
int | could_colonize (int u) |
Could u colonize? | |
int | can_colonize (int u, Side *side) |
Can a given utype on a given side colonize? | |
int | can_colonize (Unit *actor, Unit *colonizer) |
Can a given unit colonize? | |
int | can_construct_colonizers (Unit *actor, Unit *constructor) |
Can a given unit construct any colonizers? | |
int | can_construct_offenders (Unit *actor, Unit *constructor) |
Can a given unit construct any offensive units? | |
int | can_construct_defenders (Unit *actor, Unit *constructor) |
Can a given unit construct any defensive units? | |
Variables | |
int * | cv__longest_economic_inputs |
Cache of longest direct economic inputs. |
Part of the AI API, Level 1.
Provides useful functions that an AI implementation may use to analyze and to learn the status of units and unit types.
The functions in this file provide information regarding units and unit types that is not directly available from the kernel functions, but is useful for decision-making.
There are various kinds of functions in this file. 'can_*' functions test an unit's inclusive-or side's current state to see if a given type of action or meta-action can be performed. 'could_*' functions disregard current state, and ask hypothetical questions based on type. These functions can be regarded as lower level than the 'can_*' functions.
Make use of caching, where applicable.
|
Mean attack damage that u does to u2.
|
|
Can u2 on the given side be an occupant of the given uview?
|
|
Can u on a given side be on a given cell?
|
|
Can u on a given side be on a given known cell?
|
|
Can a given unit capture >= 1 enemy utypes in any way?
|
|
Can a given unit capture a given utype by fire?
|
|
Can a given unit colonize?
|
|
Can a given utype on a given side colonize?
|
|
Can a given unit construct an unit of a given type?
|
|
Can a given unit construct >= 1 utypes?
|
|
Can an utype on a given side construct >= 1 utypes?
|
|
Can a given unit construct any colonizers?
|
|
Can a given unit construct any defensive units?
|
|
Can a given unit construct explorers?
|
|
Can a given unit construct any offensive units?
|
|
Can a given unit countercapture >= 1 enemy utypes?
|
|
Can a given unit complete an unit of a given type at creation?
|
|
Can a given unit defeat >= 1 enemy utypes by counterattacks?
|
|
Can a given unit defeat a given utype with attacks?
|
|
Can a given unit defeat a given utype with counterattacks?
|
|
Can a given unit defeat a given utype by fire?
|
|
Can a given unit defend against >= 1 enemy utypes in any way?
|
|
Can a given unit destroy >= 1 enemy utypes in any way?
|
|
Can a given unit destroy >= 1 enemy utypes by attacks?
|
|
Can a given unit destroy >= 1 enemy utypes through combat?
|
|
Can a given unit destroy >= 1 enemy utypes through detonations?
|
|
Can an utype on a given side destroy >= 1 enemy utypes through detonations?
|
|
Can a given unit destroy >= 1 enemy utypes by firing?
|
|
Can a given unit destroy a given utype by attacks?
|
|
Can a given unit destroy a given utype by firing?
|
|
Can a given unit explore?
|
|
Can a given unit overwatch against and defeat a given utype?
|
|
Can a given unit provide defeating overwatch against >= 1 enemy utypes?
|
|
Can a given unit prevent capture by >= 1 enemy utypes?
|
|
Can a given unit refuel another given unit with a given fuel?
|
|
Can given actor-repairer pair repair any utype?
|
|
Can a given unit survive a given known cell?
|
|
Can u on a given side survive on a given known cell?
|
|
Could u be an occupant of any utypes?
|
|
Could u be an occupant of u2?
|
|
Could u colonize?
|
|
Could u counterattack u2?
|
|
Could u countercapture u2 on a given side?
|
|
Could u damage u2 by any means?
|
|
Could u damage >= 1 enemy utypes by any means?
|
|
Could u damage u2 by attacks?
|
|
Could u damage u2 by combat?
|
|
Could u damage u2 through detonations?
|
|
Could u damage u2 by firing?
|
|
Could u defeat u2 by attacks?
|
|
Could u defeat u2 by counterattacks?
|
|
Could u defeat u2 by fire?
|
|
Could u defend against u2 in any way?
|
|
Could u defend against >= 1 enemy utypes in any way?
|
|
Could u destroy u2 by attacks?
|
|
Could u destroy u2 through detonations?
|
|
Could u destroy u2 by firing?
|
|
Could u explore?
|
|
Could u overwatch against u2?
|
|
Could u overwatch against and defeat u2?
|
|
Could u prevent capture by u2?
|
|
Could u prevent capture of u2?
|
|
Could u see?
|
|
Mean detonate damage that u does to u2 in same cell.
|
|
Mean detonate damage that u does to u2.
|
|
Mean detonate damage that u does to u2 at range.
|
|
Mean fire damage that u does to u2.
|
|
Longest direct economic input from any utype to u.
|
|
Longest direct economic input from u2 to u.
|
|
Longest direct economic input for a material from u2 to u.
|
|
Number of detonations available to u before expiring.
|
|
Materials productivity on given known cell for given utype and side.
|
|
Cache of longest direct economic inputs.
|