Freeciv-3.3: /fast/freeciv/nightly/main/server/actiontools.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
actiontools.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996-2015 - Freeciv Development 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#ifndef FC__ACTIONTOOLS_H
15#define FC__ACTIONTOOLS_H
16
17/* common */
18#include "actions.h"
19#include "player.h"
20#include "tile.h"
21#include "unit.h"
22
23void action_consequence_caught(const struct action *paction,
24 struct player *offender,
25 const struct unit_type *offender_utype,
26 struct player *victim_player,
27 const struct tile *victim_tile,
28 const char *victim_link);
29
30void action_consequence_success(const struct action *paction,
31 struct player *offender,
32 const struct unit_type *offender_utype,
33 struct player *victim_player,
34 const struct tile *victim_tile,
35 const char *victim_link);
36
37void action_consequence_complete(const struct action *paction,
38 struct player *offender,
39 const struct unit_type *offender_utype,
40 struct player *victim_player,
41 const struct tile *victim_tile,
42 const char *victim_link);
43
44void action_success_target_pay_mp(struct action *paction,
45 int target_id, struct unit *target);
46
47void action_success_actor_price(struct action *paction,
48 int actor_id, struct unit *actor);
49
50struct city *action_tgt_city(struct unit *actor, struct tile *target_tile,
51 bool accept_all_actions);
52
53struct unit *action_tgt_unit(struct unit *actor, struct tile *target_tile,
54 bool accept_all_actions);
55
56struct tile *action_tgt_tile(struct unit *actor,
57 struct tile *target_tile,
58 const struct extra_type *target_extra,
59 bool accept_all_actions);
60
61struct extra_type *action_tgt_tile_extra(const struct unit *actor,
62 const struct tile *target_tile,
63 bool accept_all_actions);
64
65int action_sub_target_id_for_action(const struct action *paction,
66 struct unit *actor_unit);
67
68const struct action_auto_perf *
69 action_auto_perf_unit_sel(const enum action_auto_perf_cause cause,
70 const struct unit *actor,
71 const struct player *other_player,
72 const struct output_type *eval_output,
73 const struct action *eval_action);
74
75const struct action *
76 action_auto_perf_unit_do(const enum action_auto_perf_cause cause,
77 struct unit *actor,
78 const struct player *other_player,
79 const struct output_type *eval_output,
80 const struct action *eval_action,
81 const struct tile *target_tile,
82 const struct city *target_city,
83 const struct unit *target_unit,
84 const struct extra_type *target_extra);
85
86struct act_prob
87 action_auto_perf_unit_prob(const enum action_auto_perf_cause cause,
88 struct unit *actor,
89 const struct player *other_player,
90 const struct output_type *eval_output,
91 const struct action *eval_action,
92 const struct tile *target_tile,
93 const struct city *target_city,
94 const struct unit *target_unit,
95 const struct extra_type *target_extra);
96
97bool action_failed_dice_roll(const struct player *act_player,
98 const struct unit *act_unit,
99 const struct city *tgt_city,
100 const struct player *tgt_player,
101 const struct action *paction);
102
103#endif /* FC__ACTIONTOOLS_H */
actions.h
action_consequence_complete
void action_consequence_complete(const struct action *paction, struct player *offender, const struct unit_type *offender_utype, struct player *victim_player, const struct tile *victim_tile, const char *victim_link)
Definition actiontools.c:572
action_auto_perf_unit_sel
const struct action_auto_perf * action_auto_perf_unit_sel(const enum action_auto_perf_cause cause, const struct unit *actor, const struct player *other_player, const struct output_type *eval_output, const struct action *eval_action)
Definition actiontools.c:943
action_success_target_pay_mp
void action_success_target_pay_mp(struct action *paction, int target_id, struct unit *target)
Definition actiontools.c:80
action_consequence_caught
void action_consequence_caught(const struct action *paction, struct player *offender, const struct unit_type *offender_utype, struct player *victim_player, const struct tile *victim_tile, const char *victim_link)
Definition actiontools.c:374
action_auto_perf_unit_prob
struct act_prob action_auto_perf_unit_prob(const enum action_auto_perf_cause cause, struct unit *actor, const struct player *other_player, const struct output_type *eval_output, const struct action *eval_action, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit, const struct extra_type *target_extra)
Definition actiontools.c:1093
action_auto_perf_unit_do
const struct action * action_auto_perf_unit_do(const enum action_auto_perf_cause cause, struct unit *actor, const struct player *other_player, const struct output_type *eval_output, const struct action *eval_action, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit, const struct extra_type *target_extra)
Definition actiontools.c:991
action_tgt_tile
struct tile * action_tgt_tile(struct unit *actor, struct tile *target_tile, const struct extra_type *target_extra, bool accept_all_actions)
Definition actiontools.c:729
action_tgt_unit
struct unit * action_tgt_unit(struct unit *actor, struct tile *target_tile, bool accept_all_actions)
Definition actiontools.c:703
action_consequence_success
void action_consequence_success(const struct action *paction, struct player *offender, const struct unit_type *offender_utype, struct player *victim_player, const struct tile *victim_tile, const char *victim_link)
Definition actiontools.c:551
action_tgt_city
struct city * action_tgt_city(struct unit *actor, struct tile *target_tile, bool accept_all_actions)
Definition actiontools.c:638
action_tgt_tile_extra
struct extra_type * action_tgt_tile_extra(const struct unit *actor, const struct tile *target_tile, bool accept_all_actions)
Definition actiontools.c:864
action_success_actor_price
void action_success_actor_price(struct action *paction, int actor_id, struct unit *actor)
Definition actiontools.c:105
action_failed_dice_roll
bool action_failed_dice_roll(const struct player *act_player, const struct unit *act_unit, const struct city *tgt_city, const struct player *tgt_player, const struct action *paction)
Definition actiontools.c:1185
action_sub_target_id_for_action
int action_sub_target_id_for_action(const struct action *paction, struct unit *actor_unit)
Definition actiontools.c:881
incite_cost
char * incite_cost
Definition comments.c:74
target_unit
struct unit struct city struct unit * target_unit
Definition dialogs_g.h:56
actor_unit
struct unit * actor_unit
Definition dialogs_g.h:55
actor
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit * actor
Definition dialogs_g.h:73
target_tile
struct unit struct city struct unit struct tile * target_tile
Definition dialogs_g.h:57
target_city
struct unit struct city * target_city
Definition dialogs_g.h:56
target_extra
struct unit struct city struct unit struct tile struct extra_type * target_extra
Definition dialogs_g.h:57
player.h
act_prob
Definition fc_types.h:1250
action_auto_perf
Definition actions.h:316
action_auto_perf::cause
enum action_auto_perf_cause cause
Definition actions.h:318
action
Definition actions.h:106
city
Definition city.h:320
extra_type
Definition extras.h:88
output_type
Definition city.h:259
player
Definition player.h:249
tile
Definition tile.h:50
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
tile.h
unit.h