Freeciv-3.3
Loading...
Searching...
No Matches
daiair.c
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2002 - The Freeciv Team
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "log.h"
20
21/* common */
22#include "combat.h"
23#include "game.h"
24#include "map.h"
25#include "movement.h"
26#include "player.h"
27#include "pf_tools.h"
28#include "unit.h"
29
30/* server */
31#include "citytools.h"
32#include "maphand.h"
33#include "srv_log.h"
34#include "unithand.h"
35#include "unittools.h"
36
37/* server/advisors */
38#include "advbuilding.h"
39#include "advgoto.h"
40
41/* ai */
42#include "handicaps.h"
43
44/* ai/default */
45#include "daicity.h"
46#include "daiplayer.h"
47#include "daitools.h"
48#include "daiunit.h"
49
50#include "daiair.h"
51
52/******************************************************************/
56static inline int regen_turns(struct unit *punit, struct tile *ptile,
57 int lost_hp)
58{
59 struct tile *real_tile = unit_tile(punit);
60 int res, regen, recov;
61
62 punit->tile = ptile;
63 /* unit_list_prepend(ptile, punit); ... (handle "MaxUnitsOnTile" etc.) */
66 if (lost_hp - recov <= 0) {
67 res = 0;
68 } else {
69 res = 1 + (lost_hp - recov) / (recov + regen);
70 }
72
73 return res;
74}
75
76/******************************************************************/
87static struct tile *find_nearest_airbase(struct unit *punit,
88 struct pf_path **path)
89{
90 struct player *pplayer = unit_owner(punit);
91 struct pf_parameter parameter;
92 struct pf_map *pfm;
93 struct tile *best = NULL;
96 const struct civ_map *nmap = &(wld.map);
97
99 parameter.omniscience = !has_handicap(pplayer, H_MAP);
100 pfm = pf_map_new(&parameter);
101
102 pf_map_move_costs_iterate(pfm, ptile, move_cost, TRUE) {
103 if (move_cost > punit->moves_left) {
104 /* Too far! */
105 break;
106 }
107
108 if (is_refuel_point(ptile, pplayer, punit)) {
109 if (lost_hp > 0) {
110 int regt = regen_turns(punit, ptile, lost_hp);
111
112 if (regt <= 0) {
113 /* Nothing better to search */
114 best = ptile;
115 break;
116 } else if (!best || regt < best_regt) {
117 /* Regenerates faster */
118 best_regt = regt;
119 best = ptile;
120 }
121 } else {
122 best = ptile;
123 break;
124 }
125 }
127
128 if (path && best) {
129 *path = pf_map_path(pfm, best);
130 }
132 return best;
133}
134
135/******************************************************************/
140 struct unit *punit, struct tile *ptile)
141{
142 struct city *acity = tile_city(ptile);
143
144 /* For a virtual unit (punit->id == 0), all targets are good */
145 /* TODO: There is a danger of producing too many units that will not
146 * attack anything. Production should not happen if there is an idle
147 * unit of the same type nearby */
148 if (acity && punit->id != 0
149 && def_ai_city_data(acity, ait)->invasion.occupy == 0
151 /* No units capable of occupying are invading */
152 log_debug("Don't want to attack %s, although we could",
154 return FALSE;
155 }
156
157 return TRUE;
158}
159
160/******************************************************************/
165 struct tile *dst_tile)
166{
167 struct unit *pdefender;
168 /* Unit costs in shields */
170 /* Unit stats */
172 /* Final answer */
174 /* Time spent in the air */
175 int sortie_time;
176 struct civ_map *nmap = &(wld.map);
177
178#define PROB_MULTIPLIER 100 /* Should unify with those in combat.c */
179
182 return 0;
183 }
184
185 /* Ok, we can attack, but is it worth it? */
186
187 /* Cost of our unit */
189 /* This is to say "wait, ill unit will get better!" */
191
192 /* Determine cost of enemy units */
194 if (0 == victim_cost) {
195 return 0;
196 }
197
198 /* Missile would die 100% so we adjust the victim_cost -- GB */
200 /* Assume that the attack will be a suicide attack even if a regular
201 * attack may be legal. */
203 }
204
207
209
211
216 /* Assume that dst_tile is closer to the tile the actor
217 * unit will attack from than its current tile. */
218 dst_tile,
219 dst_tile) >= MAX_MOVE_FRAGS ? 1 : 0);
220
223 if (profit > 0) {
227 log_debug("%s at (%d, %d) is a worthy target with profit " ADV_WANT_PRINTF,
229 } else {
230 log_debug("%s(%d, %d): %s at (%d, %d) is unworthy with profit " ADV_WANT_PRINTF,
233 profit = 0;
234 }
235
236 return profit;
237}
238
239/******************************************************************/
249 struct pf_path **path, struct tile **pptile)
250{
251 struct player *pplayer = unit_owner(punit);
252 struct pf_parameter parameter;
253 struct pf_map *pfm;
254 struct tile *best_tile = NULL;
255 adv_want best = 0;
256 const struct civ_map *nmap = &(wld.map);
257
258 pft_fill_unit_parameter(&parameter, nmap, punit);
259 parameter.omniscience = !has_handicap(pplayer, H_MAP);
260 pfm = pf_map_new(&parameter);
261
262 /* Let's find something to bomb */
263 pf_map_move_costs_iterate(pfm, ptile, move_cost, FALSE) {
264 if (move_cost >= punit->moves_left) {
265 /* Too far! */
266 break;
267 }
268
269 if (has_handicap(pplayer, H_MAP) && !map_is_known(ptile, pplayer)) {
270 /* The target tile is unknown */
271 continue;
272 }
273
274 if (has_handicap(pplayer, H_FOG)
275 && !map_is_known_and_seen(ptile, pplayer, V_MAIN)) {
276 /* The tile is fogged */
277 continue;
278 }
279
280 if (is_enemy_unit_tile(ptile, pplayer)
282 && can_unit_attack_tile(punit, NULL, ptile)) {
284
285 if (new_best > best) {
286 best_tile = ptile;
287 best = new_best;
288 log_debug("%s wants to attack tile (%d, %d)",
289 unit_rule_name(punit), TILE_XY(ptile));
290 }
291 }
293
294 /* Return the best values. */
295 if (pptile) {
296 *pptile = best_tile;
297 }
298 if (path) {
299 *path = best_tile ? pf_map_path(pfm, best_tile) : NULL;
300 }
301
303
304 return best;
305}
306
307/******************************************************************/
318static struct tile *dai_find_strategic_airbase(struct ai_type *ait,
319 struct unit *punit,
320 struct pf_path **path)
321{
322 struct player *pplayer = unit_owner(punit);
323 struct pf_parameter parameter;
324 struct pf_map *pfm;
325 struct tile *best_tile = NULL;
326 struct city *pcity;
327 struct unit *pvirtual = NULL;
331 bool defend = FALSE; /* Used only for lost_hp > 0 */
332 bool refuel_start = FALSE; /* Used for not a "grave danger" start */
333 const struct civ_map *nmap = &(wld.map);
334
335 /* Consider staying at the current position
336 * before we generate the map, maybe we should not */
338 /* We suppose here for speed that the recovery effect is global.
339 * It's so in the standard rulesets but might be not elsewhere */
342 const struct tile *ptile = unit_tile(punit);
343
344 if (lost_hp > 0 && regen + recov > 0) {
347 if (regen_turns_min <= 0) {
348 if (lost_hp - recov > 0) {
349 /* Probably, nothing can repair us faster */
350 log_debug("Repairment of %s is almost finished, stays here",
353 return NULL;
354 } else {
355 regen_turns_min = 0;
356 }
357 } else {
359 regen_turns_min += 1;
360 }
361 }
362 pcity = tile_city(ptile);
363 if (pcity
364 && def_ai_city_data(pcity, ait)->grave_danger
365 > (unit_list_size(ptile->units) - 1) << 1) {
366 if (lost_hp <= 0 || regen_turns_min <= 1) {
367 log_debug("%s stays defending %s",
369 return NULL;
370 } else {
371 /* We may find a city in grave danger that restores faster */
372 defend = TRUE;
373 }
374 } else {
376 }
377 }
378
379 pft_fill_unit_parameter(&parameter, nmap, punit);
380 parameter.omniscience = !has_handicap(pplayer, H_MAP);
381 pfm = pf_map_new(&parameter);
382 pf_map_move_costs_iterate(pfm, ptile, move_cost, FALSE) {
383 bool chg_for_regen = FALSE;
384
385 if (move_cost >= punit->moves_left) {
386 break; /* Too far! */
387 }
388
389 if (!is_refuel_point(ptile, pplayer, punit)) {
390 continue; /* Cannot refuel here. */
391 }
392
393 if (lost_hp > 0) {
394 /* Don't fly to a point where we'll regenerate longer */
395 int regen_tn = regen_turns(punit, ptile, lost_hp);
396
398 log_debug("%s knows a better repair base than %d,%d",
399 unit_rule_name(punit), TILE_XY(ptile));
400 continue;
401 } else if (regen_turns_min > regen_tn) {
403 best_tile = ptile;
404 best_worth = 0; /* to be calculated if necessary */
406 }
407 }
408
409 if ((pcity = tile_city(ptile))
410 /* Two defenders per attacker is enough,
411 * at least considering that planes are usually
412 * expensive and weak city defenders */
413 && def_ai_city_data(pcity, ait)->grave_danger
414 > unit_list_size(ptile->units) << 1) {
415 if (lost_hp <= 0) {
416 best_tile = ptile;
417 break; /* Fly there immediately!! */
418 } else {
419 if (!defend) {
420 /* We maybe have equally regenerating base but not in danger */
421 best_tile = ptile;
422 defend = TRUE;
423 }
424 continue;
425 }
426 } else if (defend) {
427 if (chg_for_regen) {
428 /* We better regenerate faster and take a revenge a bit later */
429 defend = FALSE;
430 } else {
431 /* We already have a base in grave danger that restores not worse */
432 continue;
433 }
434 }
435
436 if (!pvirtual) {
437 pvirtual =
438 unit_virtual_create(pplayer,
441 if (refuel_start) {
442 /* What worth really worth moving out? */
444
448 }
449 }
450
451 unit_tile_set(pvirtual, ptile);
453 if (target_worth > best_worth) {
454 /* It's either a first find or it's better than the previous. */
456 best_tile = ptile;
457 /* We can still look for something better. */
458 }
460
461 if (pvirtual) {
463 }
464
465 if (path) {
466 /* Stores the path. */
467 *path = best_tile ? pf_map_path(pfm, best_tile) : NULL;
468 }
470
471 return best_tile;
472}
473
474/******************************************************************/
487void dai_manage_airunit(struct ai_type *ait, struct player *pplayer,
488 struct unit *punit)
489{
490 struct tile *dst_tile = unit_tile(punit);
491 /* Loop prevention */
492 int moves = punit->moves_left;
493 int id = punit->id;
494 struct pf_parameter parameter;
495 struct pf_map *pfm;
496 struct pf_path *path;
497
499
501 /* We are out in the open, what shall we do? */
503 /* We are on a GOTO. Check if it will get us anywhere */
504 && NULL != punit->goto_tile
506 && is_refuel_point(punit->goto_tile, pplayer, punit)) {
507 pfm = pf_map_new(&parameter);
508 path = pf_map_path(pfm, punit->goto_tile);
509 if (path) {
510 bool alive = adv_follow_path(punit, path, punit->goto_tile);
511
512 pf_path_destroy(path);
514 if (alive && punit->moves_left > 0) {
515 /* Maybe do something else. */
516 dai_manage_airunit(ait, pplayer, punit);
517 }
518 return;
519 }
521 } else if ((dst_tile = find_nearest_airbase(punit, &path))) {
522 /* Go refuelling */
523 if (!adv_follow_path(punit, path, dst_tile)) {
524 pf_path_destroy(path);
525 return; /* The unit died. */
526 }
527 pf_path_destroy(path);
528 } else {
529 if (punit->fuel == 1) {
530 UNIT_LOG(LOG_DEBUG, punit, "Oops, fallin outta the sky");
531 }
532 def_ai_unit_data(punit, ait)->done = TRUE; /* Won't help trying again */
533 return;
534 }
535
536 } else if (punit->fuel == unit_type_get(punit)->fuel) {
537 /* We only leave a refuel point when we are on full fuel */
538
539 if (find_something_to_bomb(ait, punit, &path, &dst_tile) > 0) {
540 /* Found target, coordinates are in punit's goto_dest.
541 * TODO: separate attacking into a function, check for the best
542 * tile to attack from */
543 fc_assert_ret(path != NULL && dst_tile != NULL);
544 if (!adv_follow_path(punit, path, dst_tile)) {
545 pf_path_destroy(path);
546 return; /* The unit died. */
547 }
548 pf_path_destroy(path);
550 } else if ((dst_tile = dai_find_strategic_airbase(ait, punit, &path))) {
551 log_debug("%s will fly to (%i, %i) (%s) to fight there",
554 def_ai_unit_data(punit, ait)->done = TRUE; /* Wait for next turn */
555 if (!adv_follow_path(punit, path, dst_tile)) {
556 pf_path_destroy(path);
557 return; /* The unit died. */
558 }
559 pf_path_destroy(path);
560 } else {
561 log_debug("%s cannot find anything to kill and is staying put",
565 }
566 }
567
568 if ((punit = game_unit_by_number(id)) != NULL && punit->moves_left > 0
569 && punit->moves_left != moves) {
570 /* We have moved this turn, might have ended up stuck out in the fields
571 * so, as a safety measure, let's manage again */
572 dai_manage_airunit(ait, pplayer, punit);
573 }
574
575}
576
577/******************************************************************/
583bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer,
584 struct city *pcity, struct adv_choice *choice,
586{
587 bool want_something = FALSE;
588 const struct civ_map *nmap = &(wld.map);
589
590 /* This AI doesn't know how to build planes */
591 if (has_handicap(pplayer, H_NOPLANES)) {
592 return FALSE;
593 }
594
595 /* military_advisor_choose_build() does something idiotic,
596 * this function should not be called if there is danger... */
597 if (choice->want >= DAI_WANT_MILITARY_EMERGENCY
598 && choice->type != CT_ATTACKER) {
599 return FALSE;
600 }
601
603 return FALSE;
604 }
605
608
609 if (pclass->adv.land_move == MOVE_NONE
610 || pclass->adv.sea_move == MOVE_NONE
612 || unit_type_is_losing_hp(pplayer, punittype)) {
613 /* We don't consider this a plane */
614 continue;
615 }
616
617 if (!allow_gold_upkeep && utype_upkeep_cost(punittype, pplayer, O_GOLD) > 0) {
618 continue;
619 }
620
622 struct unit *virtual_unit =
624 pplayer, pcity, punittype,
627
628 if (profit > choice->want) {
629 /* Update choice */
630 choice->want = profit;
631 choice->value.utype = punittype;
632 choice->type = CT_ATTACKER;
633 choice->need_boat = FALSE;
634 adv_choice_set_use(choice, "offensive air");
636 log_debug("%s wants to build %s (want = " ADV_WANT_PRINTF ")",
638 } else {
639 log_debug("%s doesn't want to build %s (want = " ADV_WANT_PRINTF ")",
641 }
643 }
645
646 return want_something;
647}
static struct action * action_by_number(action_id act_id)
Definition actions.h:396
#define ACTION_NONE
Definition actions.h:55
#define TRADE_WEIGHTING
Definition advbuilding.h:21
#define SHIELD_WEIGHTING
Definition advbuilding.h:20
#define adv_choice_set_use(_choice, _use)
Definition advchoice.h:85
@ CT_ATTACKER
Definition advchoice.h:40
bool adv_follow_path(struct unit *punit, struct pf_path *path, struct tile *ptile)
Definition advgoto.c:47
const char * city_name_get(const struct city *pcity)
Definition city.c:1137
int city_production_unit_veteran_level(struct city *pcity, const struct unit_type *punittype)
Definition city.c:804
bool can_city_build_unit_now(const struct civ_map *nmap, const struct city *pcity, const struct unit_type *punittype)
Definition city.c:947
double unit_win_chance(const struct civ_map *nmap, const struct unit *attacker, const struct unit *defender, const struct action *paction)
Definition combat.c:480
struct unit * get_defender(const struct civ_map *nmap, const struct unit *attacker, const struct tile *ptile, const struct action *paction)
Definition combat.c:841
bool can_unit_attack_tile(const struct unit *punit, const struct action *paction, const struct tile *dest_tile)
Definition combat.c:312
char * incite_cost
Definition comments.c:76
static struct tile * find_nearest_airbase(struct unit *punit, struct pf_path **path)
Definition daiair.c:87
static adv_want find_something_to_bomb(struct ai_type *ait, struct unit *punit, struct pf_path **path, struct tile **pptile)
Definition daiair.c:248
void dai_manage_airunit(struct ai_type *ait, struct player *pplayer, struct unit *punit)
Definition daiair.c:487
#define PROB_MULTIPLIER
static int regen_turns(struct unit *punit, struct tile *ptile, int lost_hp)
Definition daiair.c:56
bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, bool allow_gold_upkeep)
Definition daiair.c:583
static bool dai_should_we_air_attack_tile(struct ai_type *ait, struct unit *punit, struct tile *ptile)
Definition daiair.c:139
static struct tile * dai_find_strategic_airbase(struct ai_type *ait, struct unit *punit, struct pf_path **path)
Definition daiair.c:318
static adv_want dai_evaluate_tile_for_air_attack(struct unit *punit, struct tile *dst_tile)
Definition daiair.c:164
static struct ai_city * def_ai_city_data(const struct city *pcity, struct ai_type *deftype)
Definition daiplayer.h:42
static struct unit_ai * def_ai_unit_data(const struct unit *punit, struct ai_type *deftype)
Definition daiplayer.h:48
int stack_cost(struct unit *pattacker, struct unit *pdefender)
Definition daitools.c:1281
adv_want military_amortize(struct player *pplayer, struct city *pcity, adv_want value, int delay, int build_cost)
Definition daitools.c:117
#define DAI_WANT_MILITARY_EMERGENCY
Definition daitools.h:32
adv_want kill_desire(adv_want benefit, int attack, int loss, int vuln, int victim_count)
Definition daiunit.c:342
int build_cost_balanced(const struct unit_type *punittype)
Definition daiunit.c:250
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
Definition dialogs_g.h:74
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
Definition dialogs_g.h:78
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
Definition effects.c:1066
float adv_want
Definition fc_types.h:1063
#define ADV_WANT_PRINTF
Definition fc_types.h:1064
@ O_GOLD
Definition fc_types.h:101
struct world wld
Definition game.c:62
struct unit * game_unit_by_number(int id)
Definition game.c:115
struct city * game_city_by_number(int id)
Definition game.c:106
bool has_handicap(const struct player *pplayer, enum handicap_type htype)
Definition handicaps.c:66
@ H_MAP
Definition handicaps.h:28
@ H_NOPLANES
Definition handicaps.h:27
@ H_FOG
Definition handicaps.h:26
#define fc_assert_ret(condition)
Definition log.h:192
#define log_debug(message,...)
Definition log.h:116
@ LOG_DEBUG
Definition log.h:35
bool same_pos(const struct tile *tile1, const struct tile *tile2)
Definition map.c:1076
bool map_is_known(const struct tile *ptile, const struct player *pplayer)
Definition maphand.c:899
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
Definition maphand.c:925
#define MAX_MOVE_FRAGS
Definition movement.h:29
void pf_path_destroy(struct pf_path *path)
struct pf_map * pf_map_new(const struct pf_parameter *parameter)
struct pf_path * pf_map_path(struct pf_map *pfm, struct tile *ptile)
void pf_map_destroy(struct pf_map *pfm)
#define pf_map_move_costs_iterate_end
#define pf_map_move_costs_iterate(ARG_pfm, NAME_tile, NAME_cost, COND_from_start)
void pft_fill_unit_parameter(struct pf_parameter *parameter, const struct civ_map *nmap, const struct unit *punit)
Definition pf_tools.c:843
bool player_knows_techs_with_flag(const struct player *pplayer, enum tech_flag_id flag)
Definition player.c:1328
struct city * player_city_by_number(const struct player *pplayer, int city_id)
Definition player.c:1203
#define FC_INFINITY
Definition shared.h:36
#define MAX(x, y)
Definition shared.h:54
#define UNIT_LOG(loglevel, punit, msg,...)
Definition srv_log.h:98
enum choice_type type
Definition advchoice.h:46
adv_want want
Definition advchoice.h:48
universals_u value
Definition advchoice.h:47
bool need_boat
Definition advchoice.h:49
Definition ai.h:50
Definition city.h:317
Definition tile.h:50
struct unit_list * units
Definition tile.h:58
bool done
Definition daiunit.h:44
Definition unit.h:140
enum unit_activity activity
Definition unit.h:159
int moves_left
Definition unit.h:152
int id
Definition unit.h:147
bool moved
Definition unit.h:176
int hp
Definition unit.h:153
int fuel
Definition unit.h:155
struct tile * tile
Definition unit.h:142
int homecity
Definition unit.h:148
struct tile * goto_tile
Definition unit.h:157
int veteran
Definition unit.h:154
struct civ_map map
#define TRUE
Definition support.h:46
#define FALSE
Definition support.h:47
struct city * tile_city(const struct tile *ptile)
Definition tile.c:83
#define TILE_XY(ptile)
Definition tile.h:43
const struct unit_type * utype
Definition fc_types.h:553
bool unit_type_is_losing_hp(const struct player *pplayer, const struct unit_type *punittype)
Definition unit.c:2277
int hp_gain_coord(const struct unit *punit)
Definition unit.c:2199
struct unit * unit_virtual_create(struct player *pplayer, struct city *pcity, const struct unit_type *punittype, int veteran_level)
Definition unit.c:1661
void unit_virtual_destroy(struct unit *punit)
Definition unit.c:1766
void unit_tile_set(struct unit *punit, struct tile *ptile)
Definition unit.c:1284
#define unit_tile(_pu)
Definition unit.h:404
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
Definition unit.h:427
#define CHECK_UNIT(punit)
Definition unit.h:273
#define unit_owner(_pu)
Definition unit.h:403
bool unit_activity_handling(struct unit *punit, enum unit_activity new_activity, enum gen_action trigger_action)
Definition unithand.c:6663
bool is_refuel_point(const struct tile *ptile, const struct player *pplayer, const struct unit *punit)
Definition unittools.c:1530
bool is_unit_being_refueled(const struct unit *punit)
Definition unittools.c:1521
const struct unit_type * unit_type_get(const struct unit *punit)
Definition unittype.c:123
int utype_upkeep_cost(const struct unit_type *ut, struct player *pplayer, Output_type_id otype)
Definition unittype.c:132
const char * unit_rule_name(const struct unit *punit)
Definition unittype.c:1593
int unit_build_shield_cost_base(const struct unit *punit)
Definition unittype.c:1490
int utype_pays_mp_for_action_estimate(const struct civ_map *nmap, const struct action *paction, const struct unit_type *putype, const struct player *act_player, const struct tile *act_tile, const struct tile *tgt_tile)
Definition unittype.c:1399
const char * utype_rule_name(const struct unit_type *punittype)
Definition unittype.c:1584
bool unit_can_take_over(const struct unit *punit)
Definition unittype.c:270
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
Definition unittype.c:377
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
Definition unittype.h:773
#define utype_class(_t_)
Definition unittype.h:756
@ MOVE_NONE
Definition unittype.h:144
#define unit_type_iterate(_p)
Definition unittype.h:862
#define unit_type_iterate_end
Definition unittype.h:869