27#define SPECENUM_NAME action_actor_kind
28#define SPECENUM_VALUE0 AAK_UNIT
29#define SPECENUM_VALUE0NAME N_("a unit")
30#define SPECENUM_COUNT AAK_COUNT
34#define SPECENUM_NAME action_target_kind
35#define SPECENUM_VALUE0 ATK_CITY
36#define SPECENUM_VALUE0NAME "City"
37#define SPECENUM_VALUE1 ATK_UNIT
38#define SPECENUM_VALUE1NAME "Unit"
39#define SPECENUM_VALUE2 ATK_UNITS
40#define SPECENUM_VALUE2NAME "Stack"
41#define SPECENUM_VALUE3 ATK_TILE
42#define SPECENUM_VALUE3NAME "Tile"
43#define SPECENUM_VALUE4 ATK_EXTRAS
44#define SPECENUM_VALUE4NAME "Extras"
46#define SPECENUM_VALUE5 ATK_SELF
47#define SPECENUM_VALUE5NAME "Self"
48#define SPECENUM_COUNT ATK_COUNT
52#define SPECENUM_NAME action_sub_target_kind
53#define SPECENUM_VALUE0 ASTK_NONE
54#define SPECENUM_VALUE0NAME N_("nothing")
55#define SPECENUM_VALUE1 ASTK_BUILDING
56#define SPECENUM_VALUE1NAME N_("buildings in")
57#define SPECENUM_VALUE2 ASTK_TECH
58#define SPECENUM_VALUE2NAME N_("techs from")
59#define SPECENUM_VALUE3 ASTK_EXTRA
60#define SPECENUM_VALUE3NAME N_("extras on")
61#define SPECENUM_VALUE4 ASTK_EXTRA_NOT_THERE
62#define SPECENUM_VALUE4NAME N_("create extras on")
63#define SPECENUM_COUNT ASTK_COUNT
70#define SPECENUM_NAME gen_action
71#define SPECENUM_VALUE0 ACTION_ESTABLISH_EMBASSY
72#define SPECENUM_VALUE0NAME "Establish Embassy"
73#define SPECENUM_VALUE1 ACTION_ESTABLISH_EMBASSY_STAY
74#define SPECENUM_VALUE1NAME "Establish Embassy Stay"
75#define SPECENUM_VALUE2 ACTION_SPY_INVESTIGATE_CITY
76#define SPECENUM_VALUE2NAME "Investigate City"
77#define SPECENUM_VALUE3 ACTION_INV_CITY_SPEND
78#define SPECENUM_VALUE3NAME "Investigate City Spend Unit"
79#define SPECENUM_VALUE4 ACTION_SPY_POISON
80#define SPECENUM_VALUE4NAME "Poison City"
81#define SPECENUM_VALUE5 ACTION_SPY_POISON_ESC
82#define SPECENUM_VALUE5NAME "Poison City Escape"
83#define SPECENUM_VALUE6 ACTION_SPY_STEAL_GOLD
84#define SPECENUM_VALUE6NAME "Steal Gold"
85#define SPECENUM_VALUE7 ACTION_SPY_STEAL_GOLD_ESC
86#define SPECENUM_VALUE7NAME "Steal Gold Escape"
87#define SPECENUM_VALUE8 ACTION_SPY_SABOTAGE_CITY
88#define SPECENUM_VALUE8NAME "Sabotage City"
89#define SPECENUM_VALUE9 ACTION_SPY_SABOTAGE_CITY_ESC
90#define SPECENUM_VALUE9NAME "Sabotage City Escape"
91#define SPECENUM_VALUE10 ACTION_SPY_TARGETED_SABOTAGE_CITY
92#define SPECENUM_VALUE10NAME "Targeted Sabotage City"
93#define SPECENUM_VALUE11 ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC
94#define SPECENUM_VALUE11NAME "Targeted Sabotage City Escape"
95#define SPECENUM_VALUE12 ACTION_SPY_SABOTAGE_CITY_PRODUCTION
96#define SPECENUM_VALUE12NAME "Sabotage City Production"
97#define SPECENUM_VALUE13 ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC
98#define SPECENUM_VALUE13NAME "Sabotage City Production Escape"
99#define SPECENUM_VALUE14 ACTION_SPY_STEAL_TECH
100#define SPECENUM_VALUE14NAME "Steal Tech"
101#define SPECENUM_VALUE15 ACTION_SPY_STEAL_TECH_ESC
102#define SPECENUM_VALUE15NAME "Steal Tech Escape Expected"
103#define SPECENUM_VALUE16 ACTION_SPY_TARGETED_STEAL_TECH
104#define SPECENUM_VALUE16NAME "Targeted Steal Tech"
105#define SPECENUM_VALUE17 ACTION_SPY_TARGETED_STEAL_TECH_ESC
106#define SPECENUM_VALUE17NAME "Targeted Steal Tech Escape Expected"
107#define SPECENUM_VALUE18 ACTION_SPY_INCITE_CITY
108#define SPECENUM_VALUE18NAME "Incite City"
109#define SPECENUM_VALUE19 ACTION_SPY_INCITE_CITY_ESC
110#define SPECENUM_VALUE19NAME "Incite City Escape"
111#define SPECENUM_VALUE20 ACTION_TRADE_ROUTE
112#define SPECENUM_VALUE20NAME "Establish Trade Route"
113#define SPECENUM_VALUE21 ACTION_MARKETPLACE
114#define SPECENUM_VALUE21NAME "Enter Marketplace"
115#define SPECENUM_VALUE22 ACTION_HELP_WONDER
116#define SPECENUM_VALUE22NAME "Help Wonder"
117#define SPECENUM_VALUE23 ACTION_SPY_BRIBE_UNIT
118#define SPECENUM_VALUE23NAME "Bribe Unit"
119#define SPECENUM_VALUE24 ACTION_CAPTURE_UNITS
120#define SPECENUM_VALUE24NAME "Capture Units"
121#define SPECENUM_VALUE25 ACTION_SPY_SABOTAGE_UNIT
122#define SPECENUM_VALUE25NAME "Sabotage Unit"
123#define SPECENUM_VALUE26 ACTION_SPY_SABOTAGE_UNIT_ESC
124#define SPECENUM_VALUE26NAME "Sabotage Unit Escape"
125#define SPECENUM_VALUE27 ACTION_FOUND_CITY
126#define SPECENUM_VALUE27NAME "Found City"
127#define SPECENUM_VALUE28 ACTION_JOIN_CITY
128#define SPECENUM_VALUE28NAME "Join City"
129#define SPECENUM_VALUE29 ACTION_STEAL_MAPS
130#define SPECENUM_VALUE29NAME "Steal Maps"
131#define SPECENUM_VALUE30 ACTION_STEAL_MAPS_ESC
132#define SPECENUM_VALUE30NAME "Steal Maps Escape"
133#define SPECENUM_VALUE31 ACTION_SPY_NUKE
134#define SPECENUM_VALUE31NAME "Suitcase Nuke"
135#define SPECENUM_VALUE32 ACTION_SPY_NUKE_ESC
136#define SPECENUM_VALUE32NAME "Suitcase Nuke Escape"
137#define SPECENUM_VALUE33 ACTION_NUKE
138#define SPECENUM_VALUE33NAME "Explode Nuclear"
139#define SPECENUM_VALUE34 ACTION_NUKE_CITY
140#define SPECENUM_VALUE34NAME "Nuke City"
141#define SPECENUM_VALUE35 ACTION_NUKE_UNITS
142#define SPECENUM_VALUE35NAME "Nuke Units"
143#define SPECENUM_VALUE36 ACTION_DESTROY_CITY
144#define SPECENUM_VALUE36NAME "Destroy City"
145#define SPECENUM_VALUE37 ACTION_EXPEL_UNIT
146#define SPECENUM_VALUE37NAME "Expel Unit"
147#define SPECENUM_VALUE38 ACTION_DISBAND_UNIT_RECOVER
148#define SPECENUM_VALUE38NAME "Disband Unit Recover"
149#define SPECENUM_VALUE39 ACTION_DISBAND_UNIT
150#define SPECENUM_VALUE39NAME "Disband Unit"
151#define SPECENUM_VALUE40 ACTION_HOME_CITY
152#define SPECENUM_VALUE40NAME "Home City"
153#define SPECENUM_VALUE41 ACTION_HOMELESS
154#define SPECENUM_VALUE41NAME "Unit Make Homeless"
155#define SPECENUM_VALUE42 ACTION_UPGRADE_UNIT
156#define SPECENUM_VALUE42NAME "Upgrade Unit"
157#define SPECENUM_VALUE43 ACTION_CONVERT
158#define SPECENUM_VALUE43NAME "Convert Unit"
159#define SPECENUM_VALUE44 ACTION_AIRLIFT
160#define SPECENUM_VALUE44NAME "Airlift Unit"
161#define SPECENUM_VALUE45 ACTION_ATTACK
162#define SPECENUM_VALUE45NAME "Attack"
163#define SPECENUM_VALUE46 ACTION_SUICIDE_ATTACK
164#define SPECENUM_VALUE46NAME "Suicide Attack"
165#define SPECENUM_VALUE47 ACTION_STRIKE_BUILDING
166#define SPECENUM_VALUE47NAME "Surgical Strike Building"
167#define SPECENUM_VALUE48 ACTION_STRIKE_PRODUCTION
168#define SPECENUM_VALUE48NAME "Surgical Strike Production"
169#define SPECENUM_VALUE49 ACTION_CONQUER_CITY
170#define SPECENUM_VALUE49NAME "Conquer City"
171#define SPECENUM_VALUE50 ACTION_CONQUER_CITY2
172#define SPECENUM_VALUE50NAME "Conquer City 2"
173#define SPECENUM_VALUE51 ACTION_CONQUER_CITY3
174#define SPECENUM_VALUE51NAME "Conquer City 3"
175#define SPECENUM_VALUE52 ACTION_CONQUER_CITY4
176#define SPECENUM_VALUE52NAME "Conquer City 4"
177#define SPECENUM_VALUE53 ACTION_BOMBARD
178#define SPECENUM_VALUE53NAME "Bombard"
179#define SPECENUM_VALUE54 ACTION_BOMBARD2
180#define SPECENUM_VALUE54NAME "Bombard 2"
181#define SPECENUM_VALUE55 ACTION_BOMBARD3
182#define SPECENUM_VALUE55NAME "Bombard 3"
183#define SPECENUM_VALUE56 ACTION_FORTIFY
184#define SPECENUM_VALUE56NAME "Fortify"
185#define SPECENUM_VALUE57 ACTION_CULTIVATE
186#define SPECENUM_VALUE57NAME "Cultivate"
187#define SPECENUM_VALUE58 ACTION_PLANT
188#define SPECENUM_VALUE58NAME "Plant"
189#define SPECENUM_VALUE59 ACTION_TRANSFORM_TERRAIN
190#define SPECENUM_VALUE59NAME "Transform Terrain"
191#define SPECENUM_VALUE60 ACTION_ROAD
192#define SPECENUM_VALUE60NAME "Build Road"
193#define SPECENUM_VALUE61 ACTION_IRRIGATE
194#define SPECENUM_VALUE61NAME "Build Irrigation"
195#define SPECENUM_VALUE62 ACTION_MINE
196#define SPECENUM_VALUE62NAME "Build Mine"
197#define SPECENUM_VALUE63 ACTION_BASE
198#define SPECENUM_VALUE63NAME "Build Base"
199#define SPECENUM_VALUE64 ACTION_PILLAGE
200#define SPECENUM_VALUE64NAME "Pillage"
201#define SPECENUM_VALUE65 ACTION_CLEAN_POLLUTION
202#define SPECENUM_VALUE65NAME "Clean Pollution"
203#define SPECENUM_VALUE66 ACTION_CLEAN_FALLOUT
204#define SPECENUM_VALUE66NAME "Clean Fallout"
205#define SPECENUM_VALUE67 ACTION_TRANSPORT_BOARD
206#define SPECENUM_VALUE67NAME "Transport Board"
208#define SPECENUM_VALUE68 ACTION_TRANSPORT_ALIGHT
209#define SPECENUM_VALUE68NAME "Transport Alight"
210#define SPECENUM_VALUE69 ACTION_TRANSPORT_EMBARK
211#define SPECENUM_VALUE69NAME "Transport Embark"
212#define SPECENUM_VALUE70 ACTION_TRANSPORT_EMBARK2
213#define SPECENUM_VALUE70NAME "Transport Embark 2"
214#define SPECENUM_VALUE71 ACTION_TRANSPORT_EMBARK3
215#define SPECENUM_VALUE71NAME "Transport Embark 3"
216#define SPECENUM_VALUE72 ACTION_TRANSPORT_DISEMBARK1
217#define SPECENUM_VALUE72NAME "Transport Disembark"
218#define SPECENUM_VALUE73 ACTION_TRANSPORT_DISEMBARK2
219#define SPECENUM_VALUE73NAME "Transport Disembark 2"
220#define SPECENUM_VALUE74 ACTION_TRANSPORT_DISEMBARK3
221#define SPECENUM_VALUE74NAME "Transport Disembark 3"
222#define SPECENUM_VALUE75 ACTION_TRANSPORT_DISEMBARK4
223#define SPECENUM_VALUE75NAME "Transport Disembark 4"
224#define SPECENUM_VALUE76 ACTION_TRANSPORT_UNLOAD
225#define SPECENUM_VALUE76NAME "Transport Unload"
226#define SPECENUM_VALUE77 ACTION_SPY_SPREAD_PLAGUE
227#define SPECENUM_VALUE77NAME "Spread Plague"
228#define SPECENUM_VALUE78 ACTION_SPY_ATTACK
229#define SPECENUM_VALUE78NAME "Spy Attack"
230#define SPECENUM_VALUE79 ACTION_CONQUER_EXTRAS
231#define SPECENUM_VALUE79NAME "Conquer Extras"
232#define SPECENUM_VALUE80 ACTION_CONQUER_EXTRAS2
233#define SPECENUM_VALUE80NAME "Conquer Extras 2"
234#define SPECENUM_VALUE81 ACTION_CONQUER_EXTRAS3
235#define SPECENUM_VALUE81NAME "Conquer Extras 3"
236#define SPECENUM_VALUE82 ACTION_CONQUER_EXTRAS4
237#define SPECENUM_VALUE82NAME "Conquer Extras 4"
238#define SPECENUM_VALUE83 ACTION_HUT_ENTER
239#define SPECENUM_VALUE83NAME "Enter Hut"
240#define SPECENUM_VALUE84 ACTION_HUT_ENTER2
241#define SPECENUM_VALUE84NAME "Enter Hut 2"
242#define SPECENUM_VALUE85 ACTION_HUT_ENTER3
243#define SPECENUM_VALUE85NAME "Enter Hut 3"
244#define SPECENUM_VALUE86 ACTION_HUT_ENTER4
245#define SPECENUM_VALUE86NAME "Enter Hut 4"
246#define SPECENUM_VALUE87 ACTION_HUT_FRIGHTEN
247#define SPECENUM_VALUE87NAME "Frighten Hut"
248#define SPECENUM_VALUE88 ACTION_HUT_FRIGHTEN2
249#define SPECENUM_VALUE88NAME "Frighten Hut 2"
250#define SPECENUM_VALUE89 ACTION_HUT_FRIGHTEN3
251#define SPECENUM_VALUE89NAME "Frighten Hut 3"
252#define SPECENUM_VALUE90 ACTION_HUT_FRIGHTEN4
253#define SPECENUM_VALUE90NAME "Frighten Hut 4"
254#define SPECENUM_VALUE91 ACTION_HEAL_UNIT
255#define SPECENUM_VALUE91NAME "Heal Unit"
256#define SPECENUM_VALUE92 ACTION_HEAL_UNIT2
257#define SPECENUM_VALUE92NAME "Heal Unit 2"
258#define SPECENUM_VALUE93 ACTION_PARADROP
259#define SPECENUM_VALUE93NAME "Paradrop Unit"
260#define SPECENUM_VALUE94 ACTION_PARADROP_CONQUER
261#define SPECENUM_VALUE94NAME "Paradrop Unit Conquer"
262#define SPECENUM_VALUE95 ACTION_PARADROP_FRIGHTEN
263#define SPECENUM_VALUE95NAME "Paradrop Unit Frighten"
264#define SPECENUM_VALUE96 ACTION_PARADROP_FRIGHTEN_CONQUER
265#define SPECENUM_VALUE96NAME "Paradrop Unit Frighten Conquer"
266#define SPECENUM_VALUE97 ACTION_PARADROP_ENTER
267#define SPECENUM_VALUE97NAME "Paradrop Unit Enter"
268#define SPECENUM_VALUE98 ACTION_PARADROP_ENTER_CONQUER
269#define SPECENUM_VALUE98NAME "Paradrop Unit Enter Conquer"
270#define SPECENUM_VALUE99 ACTION_UNIT_MOVE
271#define SPECENUM_VALUE99NAME "Unit Move"
272#define SPECENUM_VALUE100 ACTION_UNIT_MOVE2
273#define SPECENUM_VALUE100NAME "Unit Move 2"
274#define SPECENUM_VALUE101 ACTION_UNIT_MOVE3
275#define SPECENUM_VALUE101NAME "Unit Move 3"
276#define SPECENUM_VALUE102 ACTION_USER_ACTION1
277#define SPECENUM_VALUE102NAME "User Action 1"
278#define SPECENUM_VALUE103 ACTION_USER_ACTION2
279#define SPECENUM_VALUE103NAME "User Action 2"
280#define SPECENUM_VALUE104 ACTION_USER_ACTION3
281#define SPECENUM_VALUE104NAME "User Action 3"
282#define SPECENUM_VALUE105 ACTION_USER_ACTION4
283#define SPECENUM_VALUE105NAME "User Action 4"
284#define SPECENUM_BITVECTOR bv_actions
285#define SPECENUM_COUNT ACTION_COUNT
286#define SPECENUM_NAME_UPDATER
290#define ACTION_ANY ACTION_COUNT
293#define ACTION_NONE ACTION_COUNT
296#define MAX_NUM_ACTIONS ACTION_COUNT
297#define NUM_ACTIONS MAX_NUM_ACTIONS
302#define SPECENUM_NAME action_battle_kind
303#define SPECENUM_VALUE0 ABK_NONE
304#define SPECENUM_VALUE0NAME N_("no battle")
305#define SPECENUM_VALUE1 ABK_STANDARD
306#define SPECENUM_VALUE1NAME N_("battle")
307#define SPECENUM_VALUE2 ABK_DIPLOMATIC
308#define SPECENUM_VALUE2NAME N_("diplomatic battle")
309#define SPECENUM_COUNT ABK_COUNT
313#define SPECENUM_NAME moves_actor_kind
314#define SPECENUM_VALUE0 MAK_STAYS
315#define SPECENUM_VALUE0NAME N_("stays")
316#define SPECENUM_VALUE1 MAK_REGULAR
317#define SPECENUM_VALUE1NAME N_("regular")
318#define SPECENUM_VALUE2 MAK_TELEPORT
319#define SPECENUM_VALUE2NAME N_("teleport")
320#define SPECENUM_VALUE3 MAK_ESCAPE
321#define SPECENUM_VALUE3NAME N_("escape")
322#define SPECENUM_VALUE4 MAK_FORCED
323#define SPECENUM_VALUE4NAME N_("forced")
324#define SPECENUM_VALUE5 MAK_UNREPRESENTABLE
325#define SPECENUM_VALUE5NAME N_("unrepresentable")
329#define SPECENUM_NAME action_requester
331#define SPECENUM_VALUE0 ACT_REQ_PLAYER
332#define SPECENUM_VALUE0NAME N_("the player")
334#define SPECENUM_VALUE1 ACT_REQ_RULES
335#define SPECENUM_VALUE1NAME N_("the game rules")
337#define SPECENUM_VALUE2 ACT_REQ_SS_AGENT
338#define SPECENUM_VALUE2NAME N_("a server agent")
340#define SPECENUM_COUNT ACT_REQ_COUNT
350#define ACTION_DISTANCE_LAST_NON_SIGNAL 128016
352#define ACTION_DISTANCE_UNLIMITED (ACTION_DISTANCE_LAST_NON_SIGNAL + 1)
354#define ACTION_DISTANCE_MAX ACTION_DISTANCE_UNLIMITED
357#define SPECENUM_NAME act_tgt_compl
360#define SPECENUM_VALUE0 ACT_TGT_COMPL_SIMPLE
361#define SPECENUM_VALUE0NAME N_("simple")
367#define SPECENUM_VALUE1 ACT_TGT_COMPL_FLEXIBLE
368#define SPECENUM_VALUE1NAME N_("flexible")
374#define SPECENUM_VALUE2 ACT_TGT_COMPL_MANDATORY
375#define SPECENUM_VALUE2NAME N_("mandatory")
448#define action_has_result(_act_, _res_) ((_act_)->result == (_res_))
450#define enabler_get_action(_enabler_) action_by_number(_enabler_->action)
452#define SPECLIST_TAG action_enabler
453#define SPECLIST_TYPE struct action_enabler
455#define action_enabler_list_iterate(action_enabler_list, aenabler) \
456 TYPED_LIST_ITERATE(struct action_enabler, action_enabler_list, aenabler)
457#define action_enabler_list_iterate_end LIST_ITERATE_END
459#define action_enabler_list_re_iterate(action_enabler_list, aenabler) \
460 action_enabler_list_iterate(action_enabler_list, aenabler) { \
461 if (!aenabler->ruledit_disabled) {
463#define action_enabler_list_re_iterate_end \
465 } action_enabler_list_iterate_end
467#define action_iterate(_act_) \
470 for (_act_ = 0; _act_ < NUM_ACTIONS; _act_++) {
472#define action_iterate_end \
477#define SPECLIST_TAG action
478#define SPECLIST_TYPE struct action
481#define action_list_iterate(_list_, _act_) \
482 TYPED_LIST_ITERATE(struct action, _list_, _act_)
483#define action_list_iterate_end LIST_ITERATE_END
488#define action_by_result_iterate(_paction_, _result_) \
490 action_list_iterate(action_list_by_result(_result_), _paction_) { \
492#define action_by_result_iterate_end \
493 } action_list_iterate_end; \
496#define action_by_activity_iterate(_paction_, _activity_) \
498 action_list_iterate(action_list_by_activity(_activity_), _paction_) {
500#define action_by_activity_iterate_end \
501 } action_list_iterate_end; \
504#define action_array_iterate(_act_list_, _act_id_) \
508 for (_pos_ = 0; _pos_ < NUM_ACTIONS; _pos_++) { \
509 const action_id _act_id_ = _act_list_[_pos_]; \
511 if (_act_id_ == ACTION_NONE) { \
516#define action_array_iterate_end \
520#define action_enablers_iterate(_enabler_) \
522 action_iterate(_act_) { \
523 action_enabler_list_iterate( \
524 action_enablers_for_action(_act_), _enabler_) {
526#define action_enablers_iterate_end \
527 } action_enabler_list_iterate_end; \
528 } action_iterate_end; \
532#define SPECENUM_NAME action_auto_perf_cause
535#define SPECENUM_VALUE0 AAPC_UNIT_UPKEEP
536#define SPECENUM_VALUE0NAME "Unit Upkeep"
538#define SPECENUM_VALUE1 AAPC_UNIT_MOVED_ADJ
539#define SPECENUM_VALUE1NAME "Moved Adjacent"
542#define SPECENUM_VALUE2 AAPC_POST_ACTION
543#define SPECENUM_VALUE2NAME "After Successful Action"
546#define SPECENUM_VALUE3 AAPC_CITY_GONE
547#define SPECENUM_VALUE3NAME "City Gone"
551#define SPECENUM_VALUE4 AAPC_UNIT_STACK_DEATH
552#define SPECENUM_VALUE4NAME "Unit Stack Dead"
554#define SPECENUM_COUNT AAPC_COUNT
574 struct requirement_vector
reqs;
581#define action_auto_perf_iterate(_act_perf_) \
586 _ap_num_ < MAX_NUM_ACTION_AUTO_PERFORMERS \
587 && (action_auto_perf_by_number(_ap_num_)->cause \
590 const struct action_auto_perf *_act_perf_ \
591 = action_auto_perf_by_number(_ap_num_);
593#define action_auto_perf_iterate_end \
597#define action_auto_perf_by_cause_iterate(_cause_, _act_perf_) \
598action_auto_perf_iterate(_act_perf_) { \
599 if (_act_perf_->cause != _cause_) { \
603#define action_auto_perf_by_cause_iterate_end \
604} action_auto_perf_iterate_end
606#define action_auto_perf_actions_iterate(_autoperf_, _act_id_) \
607 action_array_iterate(_autoperf_->alternatives, _act_id_)
609#define action_auto_perf_actions_iterate_end \
610 action_array_iterate_end
614#define ACTION_AUTO_UPKEEP_FOOD 0
615#define ACTION_AUTO_UPKEEP_GOLD 1
616#define ACTION_AUTO_UPKEEP_SHIELD 2
617#define ACTION_AUTO_MOVED_ADJ 3
618#define ACTION_AUTO_POST_BRIBE 4
619#define ACTION_AUTO_POST_ATTACK 5
620#define ACTION_AUTO_ESCAPE_CITY 6
621#define ACTION_AUTO_ESCAPE_STACK 7
640 if (!gen_action_is_valid((
enum gen_action)act_id)) {
651#define action_id_get_actor_kind(act_id) \
652 action_get_actor_kind(action_by_number(act_id))
654 const struct action *paction);
655#define action_id_get_target_kind(act_id) \
656 action_get_target_kind(action_by_number(act_id))
658 const struct action *paction);
659#define action_id_get_sub_target_kind(act_id) \
660 action_get_sub_target_kind(action_by_number(act_id))
666#define action_has_result_safe(paction, result) \
667 (paction && action_has_result(paction, result))
668#define action_id_has_result_safe(act_id, result) \
669 (action_by_number(act_id) \
670 && action_has_result(action_by_number(act_id), result))
673#define action_id_has_complex_target(act_id) \
674 action_has_complex_target(action_by_number(act_id))
676#define action_id_requires_details(act_id) \
677 action_requires_details(action_by_number(act_id))
681 const struct tile *tgt_tile,
683#define action_id_get_act_time(act_id, actor_unit, tgt_tile, tgt_extra) \
684 action_get_act_time(action_by_number(act_id), \
685 actor_unit, tgt_tile, tgt_extra)
696#define action_id_distance_accepted(act_id, distance) \
697 action_distance_accepted(action_by_number(act_id), distance)
701#define action_id_distance_inside_max(act_id, distance) \
702 action_distance_inside_max(action_by_number(act_id), distance)
705 const struct action *blocker);
708#define action_id_get_role(act_id) \
709 action_get_role(action_by_number(act_id))
712#define action_id_get_activity(act_id) \
713 actres_get_activity(action_by_number(act_id)->result)
721 const char *mnemonic);
735enum action_target_kind
738 enum action_target_kind tgt_kind);
750struct action_enabler_list *
769 const struct requirement_vector *vec);
770struct requirement_vector *
810 const struct tile *target,
820 const struct city *victim);
825 const struct unit *victim);
830 const struct tile* victims);
835 const struct tile *victims,
841 const struct tile *target,
849 const struct action *paction,
850 const struct unit *act_unit,
851 const struct city *tgt_city,
852 const struct unit *tgt_unit,
853 const struct tile *tgt_tile,
860 const struct city *actor_home,
861 const struct tile *actor_tile,
862 bool omniscient_cheat,
863 const struct city* target);
869 const struct city *actor_home,
870 const struct tile *actor_tile,
871 bool omniscient_cheat,
872 const struct unit *target);
878 const struct city *actor_home,
879 const struct tile *actor_tile,
880 bool omniscient_cheat,
881 const struct tile *target);
887 const struct city *actor_home,
888 const struct tile *actor_tile,
889 bool omniscient_cheat,
897 const struct city *actor_home,
898 const struct tile *actor_tile,
899 bool omniscient_cheat,
907 const struct city *actor_home,
908 const struct tile *actor_tile,
909 bool omniscient_cheat);
939#define ACTPROB_IMPOSSIBLE action_prob_new_impossible()
940#define ACTPROB_CERTAIN action_prob_new_certain()
941#define ACTPROB_NA action_prob_new_not_relevant()
942#define ACTPROB_NOT_IMPLEMENTED action_prob_new_not_impl()
943#define ACTPROB_NOT_KNOWN action_prob_new_unknown()
946#define ACTION_ODDS_PCT_DICE_ROLL_NA 110
949 const struct unit *act_unit,
950 const struct city *tgt_city,
951 const struct player *tgt_player,
952 const struct action *paction);
962#define action_id_univs_not_blocking(act_id, act_uni, tgt_uni) \
963 action_univs_not_blocking(action_by_number(act_id), act_uni, tgt_uni)
968 const struct player *actor_player,
984 enum action_result result);
bool action_removes_extra(const struct action *paction, const struct extra_type *pextra)
bool is_action_possible_on_city(action_id act_id, const struct player *actor_player, const struct city *target_city)
const char * action_prepare_ui_name(action_id act_id, const char *mnemonic, const struct act_prob prob, const char *custom)
const char * action_name_translation(const struct action *action)
bool action_distance_inside_max(const struct action *action, const int distance)
struct act_prob action_speculate_unit_on_extras(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target_tile, const struct extra_type *target_extra)
const char * action_prob_explain(const struct act_prob prob)
bool action_mp_full_makes_legal(const struct unit *actor, const action_id act_id)
enum action_actor_kind action_get_actor_kind(const struct action *paction)
bool action_prob_certain(const struct act_prob probability)
const char * action_id_name_translation(action_id act_id)
struct action_auto_perf * action_auto_perf_slot_number(const int num)
req_vec_num_in_item action_enabler_vector_number(const void *enabler, const struct requirement_vector *vec)
bool action_has_complex_target(const struct action *paction)
struct act_prob action_prob_vs_units(const struct civ_map *nmap, const struct unit *actor, const action_id act_id, const struct tile *victims)
struct req_vec_problem * action_enabler_suggest_repair(const struct action_enabler *enabler)
bool action_prob_possible(const struct act_prob probability)
struct act_prob action_prob_new_not_impl(void)
struct req_vec_problem * action_enabler_suggest_improvement(const struct action_enabler *enabler)
void actions_rs_pre_san_gen(void)
struct act_prob action_prob_unit_vs_tgt(const struct civ_map *nmap, const struct action *paction, const struct unit *act_unit, const struct city *tgt_city, const struct unit *tgt_unit, const struct tile *tgt_tile, const struct extra_type *sub_tgt)
const char * action_min_range_ruleset_var_name(int act)
struct act_prob action_speculate_unit_on_self(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat)
void action_list_end(action_id *act_list, int size)
const char * action_blocked_by_ruleset_var_name(const struct action *act)
struct req_vec_problem * action_enabler_suggest_repair_oblig(const struct action_enabler *enabler)
int action_dice_roll_odds(const struct player *act_player, const struct unit *act_unit, const struct city *tgt_city, const struct player *tgt_player, const struct action *paction)
int action_get_act_time(const struct action *paction, const struct unit *actor_unit, const struct tile *tgt_tile, const struct extra_type *tgt_extra)
static struct action * action_by_number(action_id act_id)
bool action_maybe_possible_actor_unit(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit)
bool action_is_in_use(struct action *paction)
bool action_ever_possible(action_id action)
bool action_result_legal_target_kind(enum action_result result, enum action_target_kind tgt_kind)
const char * action_enabler_vector_by_number_name(req_vec_num_in_item vec)
bool are_action_probabilitys_equal(const struct act_prob *ap1, const struct act_prob *ap2)
const char * action_post_success_forced_ruleset_var_name(const struct action *act)
struct action * action_by_rule_name(const char *name)
const char * action_rule_name(const struct action *action)
const char * action_id_rule_name(action_id act_id)
enum action_battle_kind action_get_battle_kind(const struct action *pact)
enum action_sub_target_kind action_get_sub_target_kind(const struct action *paction)
struct action * action_is_blocked_by(const struct civ_map *nmap, const struct action *act, const struct unit *actor_unit, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
void action_enabler_free(struct action_enabler *enabler)
struct act_prob action_speculate_unit_on_units(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target)
struct action_list * action_list_by_activity(enum unit_activity activity)
int action_number(const struct action *action)
struct act_prob action_prob_new_unknown(void)
bool action_would_be_blocked_by(const struct action *blocked, const struct action *blocker)
bool is_action_enabled_unit_on_tile(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile, const struct extra_type *target_extra)
struct act_prob action_prob_and(const struct act_prob *ap1, const struct act_prob *ap2)
const char * action_actor_consuming_always_ruleset_var_name(action_id act)
bool action_immune_government(struct government *gov, action_id act)
bool is_action_enabled_unit_on_units(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile)
enum unit_activity actres_get_activity(enum action_result result)
struct act_prob action_prob_new_certain(void)
const char * action_max_range_ruleset_var_name(int act)
int action_dice_roll_initial_odds(const struct action *paction)
struct act_prob action_prob_fall_back(const struct act_prob *ap1, const struct act_prob *ap2)
enum action_target_kind action_target_kind_default(enum action_result result)
bool is_action_enabled_unit_on_city(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct city *target_city)
struct act_prob action_prob_self(const struct civ_map *nmap, const struct unit *actor, const action_id act_id)
struct action_list * action_list_by_result(enum action_result result)
void action_list_add_all_by_result(action_id *act_list, int *position, enum action_result result)
bool action_univs_not_blocking(const struct action *paction, struct universal *actor_uni, struct universal *target_uni)
bool actions_are_ready(void)
bool is_action_enabled_unit_on_unit(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct unit *target_unit)
bool action_actor_utype_hard_reqs_ok(const struct action *result, const struct unit_type *actor_unittype)
int action_min_range_default(enum action_result result)
struct act_prob action_speculate_unit_on_tile(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target_tile, const struct extra_type *target_extra)
const char * action_target_kind_ruleset_var_name(int act)
void action_enabler_add(struct action_enabler *enabler)
struct act_prob action_prob_vs_tile(const struct civ_map *nmap, const struct unit *actor, const action_id act_id, const struct tile *victims, const struct extra_type *target_extra)
struct act_prob action_prob_vs_unit(const struct civ_map *nmap, const struct unit *actor, const action_id act_id, const struct unit *victim)
const char * action_ui_name_default(int act)
bool action_enabler_utype_possible_actor(const struct action_enabler *ae, const struct unit_type *act_utype)
struct act_prob action_speculate_unit_on_city(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct city *target)
struct action_enabler * action_enabler_new(void)
bool action_requires_details(const struct action *paction)
struct act_prob action_prob_new_not_relevant(void)
const char * action_target_kind_help(enum action_target_kind kind)
int action_get_role(const struct action *paction)
struct act_prob action_prob_vs_city(const struct civ_map *nmap, const struct unit *actor, const action_id act_id, const struct city *victim)
struct act_prob action_speculate_unit_on_unit(const struct civ_map *nmap, action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct unit *target)
const struct action_auto_perf * action_auto_perf_by_number(const int num)
struct act_prob action_prob_new_impossible(void)
bool action_enabler_possible_actor(const struct action_enabler *ae)
struct action ** _actions
bool action_id_exists(const action_id act_id)
bool action_enabler_remove(struct action_enabler *enabler)
enum action_target_kind action_get_target_kind(const struct action *paction)
struct act_prob action_prob_vs_extras(const struct civ_map *nmap, const struct unit *actor, const action_id act_id, const struct tile *target, const struct extra_type *tgt_extra)
struct action_enabler * action_enabler_copy(const struct action_enabler *original)
bool action_creates_extra(const struct action *paction, const struct extra_type *pextra)
int action_prob_cmp_pessimist(const struct act_prob ap1, const struct act_prob ap2)
bool is_action_enabled_unit_on_self(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit)
bool action_id_is_rare_pop_up(action_id act_id)
struct requirement_vector * action_enabler_vector_by_number(const void *enabler, req_vec_num_in_item vec)
double action_prob_to_0_to_1_pessimist(const struct act_prob ap)
const char * gen_action_name_update_cb(const char *old_name)
struct action_enabler_list * action_enablers_for_action(action_id action)
bool action_distance_accepted(const struct action *action, const int distance)
const char * action_ui_name_ruleset_var_name(int act)
const char * action_get_ui_name_mnemonic(action_id act_id, const char *mnemonic)
int action_max_range_default(enum action_result result)
bool is_action_enabled_unit_on_extras(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target, const struct extra_type *tgt_extra)
struct unit struct city struct unit * target_unit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
struct unit struct city struct unit struct tile * target_tile
struct unit struct city * target_city
struct unit struct city struct unit struct tile struct extra_type * target_extra
signed char req_vec_num_in_item
req_vec_num_in_item a requirement vectors number in an item.
struct requirement_vector reqs
enum action_auto_perf_cause cause
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
bool unitwaittime_controlled
bool actor_consuming_always
enum action_sub_target_kind sub_target_kind
enum moves_actor_kind moves_actor
struct action::@12::@13 is_unit
enum action_result result
char ui_name[MAX_LEN_NAME]
bv_action_sub_results sub_results
enum action_actor_kind actor_kind
enum act_tgt_compl target_complexity
enum action_target_kind target_kind