File: action.def

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (128 lines) | stat: -rw-r--r-- 5,237 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
/* The definitions of all the types of actions in Xconq.
   Copyright (C) 1992, 1993, 1994 Stanley T. Shebs.

Xconq is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.  See the file COPYING.  */

DEF_ACTION("none", ACTION_NONE, "",
  prep_none_action, do_none_action, check_none_action,
  (Unit *unit, Unit *unit2),
  "The non-action (not used, but maybe a good placeholder)")

DEF_ACTION("move", ACTION_MOVE, "xyz",
  prep_move_action, do_move_action, check_move_action,
  (Unit *unit, Unit *unit2, int x, int y, int z),
  "Change position to the given cell and altitude")

DEF_ACTION("enter", ACTION_ENTER, "U",
  prep_enter_action, do_enter_action, check_enter_action,
  (Unit *unit, Unit *unit2, Unit *dest),
  "Enter a transport")

DEF_ACTION("attack", ACTION_ATTACK, "Un",
  prep_attack_action, do_attack_action, check_attack_action,
  (Unit *unit, Unit *unit2, Unit *defender, int n),
  "Attack a given unit")

DEF_ACTION("overrun", ACTION_OVERRUN, "xyzn",
  prep_overrun_action, do_overrun_action, check_overrun_action,
  (Unit *unit, Unit *unit2, int x, int y, int z, int n),
  "Attack everything in a cell and occupy if possible")

DEF_ACTION("fire-at", ACTION_FIRE_AT, "Um",
  prep_fire_at_action, do_fire_at_action, check_fire_at_action,
  (Unit *unit, Unit *unit2, Unit *defender, int m),
  "Throw a given material at a given unit")

DEF_ACTION("fire-into", ACTION_FIRE_INTO, "xyzm",
  prep_fire_into_action, do_fire_into_action, check_fire_into_action,
  (Unit *unit, Unit *unit2, int x, int y, int z, int m),
  "Throw a given material at a given cell")

DEF_ACTION("capture", ACTION_CAPTURE, "U",
  prep_capture_action, do_capture_action, check_capture_action,
  (Unit *unit, Unit *unit2, Unit *defender),
  "Take a unit prisoner")

DEF_ACTION("detonate", ACTION_DETONATE, "xyz",
  prep_detonate_action, do_detonate_action, check_detonate_action,
  (Unit *unit, Unit *unit2, int x, int y, int z),
  "Damage or destroy self in a violent fashion")

DEF_ACTION("produce", ACTION_PRODUCE, "mn",
  prep_produce_action, do_produce_action, check_produce_action,
  (Unit *unit, Unit *unit2, int m, int n),
  "Produce a quantity of a material")

DEF_ACTION("transfer", ACTION_TRANSFER, "mnU",
  prep_transfer_action, do_transfer_action, check_transfer_action,
  (Unit *unit, Unit *unit2, int m, int n, Unit *unit3),
  "Transfer a quantity of a material between two units")

DEF_ACTION("research", ACTION_RESEARCH, "u",
  prep_research_action, do_research_action, check_research_action,
  (Unit *unit, Unit *unit2, int u3),
  "Study how to build the given type")

DEF_ACTION("toolup", ACTION_TOOL_UP, "u",
  prep_toolup_action, do_toolup_action, check_toolup_action,
  (Unit *unit, Unit *unit2, int u3),
  "Prepare tools to build the given type")

DEF_ACTION("create-in", ACTION_CREATE_IN, "uU",
  prep_create_in_action, do_create_in_action, check_create_in_action,
  (Unit *unit, Unit *unit2, int u3, Unit *dest),
  "Start construction of a unit inside (or outside?) another unit")

DEF_ACTION("create-at", ACTION_CREATE_AT, "uxyz",
  prep_create_at_action, do_create_at_action, check_create_at_action,
  (Unit *unit, Unit *unit2, int u3, int x, int y, int z),
  "Start construction of a unit at a given location")

DEF_ACTION("build", ACTION_BUILD, "U",
  prep_build_action, do_build_action, check_build_action,
  (Unit *unit, Unit *unit2, Unit *newunit),
  "Make progress on the given unit")

DEF_ACTION("repair", ACTION_REPAIR, "U",
  prep_repair_action, do_repair_action, check_repair_action,
  (Unit *unit, Unit *unit2, Unit *unit3),
  "Repair a given unit")

DEF_ACTION("disband", ACTION_DISBAND, "",
  prep_disband_action, do_disband_action, check_disband_action,
  (Unit *unit, Unit *unit2),
  "Dismantle the given unit completely")

DEF_ACTION("transfer-part", ACTION_TRANSFER_PART, "nU",
  prep_transfer_part_action, do_transfer_part_action, check_transfer_part_action,
  (Unit *unit, Unit *unit2, int parts, Unit *unit3),
  "Split a part of self into another unit")

DEF_ACTION("change-type", ACTION_CHANGE_TYPE, "u",
  prep_change_type_action, do_change_type_action, check_change_type_action,
  (Unit *unit, Unit *unit2, int u3),
  "Change self to a different unit type")

DEF_ACTION("change-side", ACTION_CHANGE_SIDE, "S",
  prep_change_side_action, do_change_side_action, check_change_side_action,
  (Unit *unit, Unit *unit2, Side *side),
  "Change to a given side")

DEF_ACTION("alter-terrain", ACTION_ALTER_TERRAIN, "xyt",
  prep_alter_cell_action, do_alter_cell_action, check_alter_cell_action,
  (Unit *unit, Unit *unit2, int x, int y, int t),
  "Alter cell terrain")

DEF_ACTION("add-terrain", ACTION_ADD_TERRAIN, "xydt",
  prep_add_terrain_action, do_add_terrain_action, check_add_terrain_action,
  (Unit *unit, Unit *unit2, int x, int y, int dir, int t),
  "Add border/connection/coating terrain")

DEF_ACTION("remove-terrain", ACTION_REMOVE_TERRAIN, "xydt",
  prep_remove_terrain_action, do_remove_terrain_action, check_remove_terrain_action,
  (Unit *unit, Unit *unit2, int x, int y, int dir, int t),
  "Remove border/connection/coating terrain")