22 #ifndef ULTIMA4_GAME_PLAYER_H 23 #define ULTIMA4_GAME_PLAYER_H 25 #include "ultima/ultima4/game/creature.h" 26 #include "ultima/ultima4/map/direction.h" 27 #include "ultima/ultima4/core/observable.h" 28 #include "ultima/ultima4/filesys/savegame.h" 29 #include "ultima/ultima4/game/script.h" 30 #include "ultima/ultima4/map/tile.h" 31 #include "ultima/ultima4/core/types.h" 42 #define ALL_PLAYERS -1 48 KA_GAVE_ALL_TO_BEGGAR,
61 KA_DIDNT_DONATE_BLOOD,
63 KA_DIDNT_CHEAT_REAGENTS,
88 enum CannotJoinError {
97 EQUIP_CLASS_RESTRICTED
119 int getHp()
const override;
120 int getMaxHp()
const {
121 return _player->_hpMax;
127 return _player->_str;
130 return _player->_dex;
133 return _player->_intel;
145 const Weapon *getWeapon()
const;
146 const Armor *getArmor()
const;
148 SexType getSex()
const;
149 ClassType getClass()
const;
150 CreatureStatus getState()
const override;
166 void addStatus(StatusType status)
override;
191 bool heal(HealType type);
198 void setHp(
int hp)
override;
200 EquipError setArmor(
const Armor *a);
201 EquipError setWeapon(
const Weapon *w);
211 bool applyDamage(
int damage,
bool byplayer =
false)
override;
212 int getAttackBonus()
const override;
213 int getDefense()
const override;
214 bool dealDamage(
Creature *m,
int damage)
override;
253 static MapTile tileForClass(
int klass);
271 ACTIVE_PLAYER_CHANGED,
299 void adjustFood(
int food);
300 void adjustGold(
int gold);
307 void adjustKarma(KarmaAction action);
317 bool attemptElevation(Virtue virtue);
322 void burnTorch(
int turns = 1);
327 bool canEnterShrine(Virtue virtue);
337 void damageShip(uint pts);
343 bool donate(
int quantity);
358 int getTorchDuration()
const;
363 void healShip(uint pts);
368 bool isFlying()
const;
373 bool isImmobilized();
395 bool lightTorch(
int duration = 100,
bool loseTorch =
true);
407 void setTransport(
MapTile transport);
408 void setShipHull(
int str);
410 Direction getDirection()
const;
411 void setDirection(Direction dir);
413 void adjustReagent(
int reagent,
int amt);
414 int getReagent(
int reagent)
const;
415 short *getReagentPtr(
int reagent)
const;
417 void setActivePlayer(
int p);
418 int getActivePlayer()
const;
420 void swapPlayers(
int p1,
int p2);
434 PartyMemberVector _members;
440 friend void U4IOS::syncPartyMembersWithSaveGame();
444 bool isPartyMember(
Object *punknown);
const Common::String & getHitTile() const override
bool applyDamage(int damage, bool byplayer=false) override
Definition: savegame.h:270
Definition: savegame.h:193
Common::String translate(Std::vector< Common::String > &parts) override
void applyEffect(TileEffect effect)
void addStatus(StatusType status) override
const Common::String & getMissTile() const override
void putToSleep() override
void removeStatus(StatusType status) override
Definition: detection.h:27
Definition: map_tile.h:34
Definition: creature.h:159
Definition: observable.h:45