22 #ifndef NUVIE_CORE_PARTY_H 23 #define NUVIE_CORE_PARTY_H 25 #include "ultima/shared/std/string.h" 26 #include "ultima/nuvie/core/obj_manager.h" 27 #include "ultima/nuvie/core/map.h" 39 class PartyPathFinder;
42 typedef enum { TARGET_ACTOR, TARGET_LOCATION, TARGET_NONE } CombatTargetType;
45 CombatTargetType type;
54 uint8 combat_position;
61 #define PARTY_MAX_MEMBERS 16 62 #define PARTY_NAME_MAX_LENGTH 13 64 #define PARTY_KEEP_PARTY_FLAG true 67 #define PARTY_FORM_STANDARD 0 68 #define PARTY_FORM_COLUMN 1 69 #define PARTY_FORM_ROW 2 70 #define PARTY_FORM_DELTA 3 71 #define PARTY_FORM_COMBAT 7 72 #define PARTY_FORM_REST 8 105 uint16 prev_leader_x;
106 uint16 prev_leader_y;
112 bool defer_removing_dead_members;
122 virtual bool load(
NuvieIO *objlist);
123 virtual bool save(
NuvieIO *objlist);
126 void follow(sint8 rel_x, sint8 rel_y);
127 bool move(uint16 dx, uint16 dy, uint8 dz);
130 virtual void dismount_from_horses();
131 virtual void update_music();
132 virtual void split_gold();
133 virtual void gather_gold();
134 bool add_actor(
Actor *actor);
135 bool remove_actor(
Actor *actor,
bool keep_party_flag =
false);
136 bool remove_dead_actor(
Actor *actor);
137 bool resurrect_dead_members();
140 void set_ethereal(
bool ethereal);
142 uint8 get_formation()
const {
145 void set_formation(uint8 val) {
150 uint8 get_party_size();
151 virtual uint8 get_party_max() {
154 sint8 get_leader()
const;
155 MapCoord get_leader_location()
const;
156 MapCoord get_location(uint8 m = 0)
const;
157 MapCoord get_formation_coords(uint8 m)
const;
158 void set_in_vehicle(
bool value);
159 void set_in_combat_mode(
bool value);
160 bool is_in_vehicle()
const {
163 bool is_in_combat_mode()
const {
164 return in_combat_mode;
166 Actor *get_slowest_actor();
169 uint8 get_actor_num(uint8 member_num)
const;
170 Actor *get_actor(uint8 member_num)
const;
171 sint8 get_member_num(
const Actor *actor)
const;
172 sint8 get_member_num(uint8 a)
const;
173 Actor *get_leader_actor()
const;
174 const char *get_actor_name(uint8 member_num)
const;
175 bool is_leader(
const Actor *actor)
const {
176 return (get_member_num(actor) == get_leader());
178 bool contains_actor(
const Actor *actor)
const;
179 bool contains_actor(uint8 actor_num)
const;
182 bool is_at(uint16 x, uint16 y, uint8 z, uint32 threshold = 0)
const;
183 bool is_at(
const MapCoord &xyz, uint32 threshold = 0)
const;
184 bool is_anyone_at(uint16 x, uint16 y, uint8 z, uint32 threshold = 0)
const;
185 bool is_anyone_at(
const MapCoord &xyz, uint32 threshold = 0)
const;
186 bool has_obj(uint16 obj_n, uint8 quality,
bool match_zero_qual =
true)
const;
187 bool remove_obj(uint16 obj_n, uint8 quality);
188 Actor *who_has_obj(uint16 obj_n, uint8 quality,
bool match_zero_qual =
true);
189 Obj *get_obj(uint16 obj_n, uint8 quality,
bool match_qual_zero =
true, uint8 frame_n = 0,
bool match_frame_n =
false);
190 bool is_horsed()
const;
191 bool is_everyone_horsed()
const;
196 void walk(
MapCoord *walkto, uint32 step_delay = 0) {
197 walk(walkto,
nullptr, step_delay);
199 void walk(
Obj *moongate,
MapCoord *teleport, uint32 step_delay = 0);
200 void enter_vehicle(
Obj *ship_obj, uint32 step_delay = 0);
201 void exit_vehicle(uint16 x, uint16 y, uint16 z);
202 void stop_walking(
bool force_music_change);
203 bool get_autowalk()
const {
207 void rest_sleep(uint8 hours, sint16 guard);
210 void set_combat_target(uint8 member_num,
Actor *target);
211 void set_combat_target(uint8 member_num,
MapCoord target);
212 void clear_combat_target(uint8 member_num);
214 bool has_light_source();
215 void add_light_source() {
218 void subtract_light_source() {
221 void update_light_sources();
223 bool combat_changes_music, vehicles_change_music;
Definition: configuration.h:61
Definition: actor_manager.h:42
Definition: detection.h:27
Out move(In first, In last, Out dst)
Definition: algorithm.h:109
Definition: party_path_finder.h:51
Definition: nuvie_io.h:32