22 #ifndef XEEN_CHARACTER_H 23 #define XEEN_CHARACTER_H 25 #include "common/scummsys.h" 26 #include "common/array.h" 27 #include "common/rect.h" 28 #include "common/serializer.h" 29 #include "mm/xeen/combat.h" 30 #include "mm/xeen/item.h" 31 #include "mm/xeen/sprites.h" 36 #define INV_ITEMS_TOTAL 9 37 #define SPELLS_PER_CLASS 39 38 #define AWARDS_TOTAL 88 39 #define WARZONE_AWARD 9 42 SHANGRILA_GUILD_MEMBER = 5, GOOBER = 76, SUPER_GOOBER = 77,
43 CASTLEVIEW_GUILD_MEMBER = 83, SANDCASTER_GUILD_MEMBER = 84,
44 LAKESIDE_GUILD_MEMBER = 85, NECROPOLIS_GUILD_MEMBER = 86, OLYMPUS_GUILD_MEMBER = 87
48 MALE = 0, FEMALE = 1, YES_PLEASE = 2
52 HUMAN = 0, ELF = 1, DWARF = 2, GNOME = 3, HALF_ORC = 4
56 CLASS_KNIGHT = 0, CLASS_PALADIN = 1, CLASS_ARCHER = 2, CLASS_CLERIC = 3,
57 CLASS_SORCERER = 4, CLASS_ROBBER = 5, CLASS_NINJA = 6, CLASS_BARBARIAN = 7,
58 CLASS_DRUID = 8, CLASS_RANGER = 9, TOTAL_CLASSES = 10
62 HATES_DWARF = 12, HATES_PARTY = 15, HATES_NOBODY = 16
66 MIGHT = 0, INTELLECT = 1, PERSONALITY = 2, ENDURANCE = 3, SPEED = 4,
67 ACCURACY = 5, LUCK = 6, TOTAL_ATTRIBUTES = 7
71 THIEVERY = 0, ARMS_MASTER = 1, ASTROLOGER = 2, BODYBUILDER = 3,
72 CARTOGRAPHER = 4, CRUSADER = 5, DIRECTION_SENSE = 6, LINGUIST = 7,
73 MERCHANT = 8, MOUNTAINEER = 9, NAVIGATOR = 10, PATHFINDER = 11,
74 PRAYER_MASTER = 12, PRESTIDIGITATION = 13, SWIMMING = 14, TRACKING = 15,
75 SPOT_DOORS = 16, DANGER_SENSE = 17
79 CURSED = 0, HEART_BROKEN = 1, WEAK = 2, POISONED = 3,
80 DISEASED = 4, INSANE = 5, IN_LOVE = 6, DRUNK = 7, ASLEEP = 8,
81 DEPRESSED = 9, CONFUSED = 10, PARALYZED = 11, UNCONSCIOUS = 12,
82 DEAD = 13, STONED = 14, ERADICATED = 15,
87 QUICK_ATTACK = 0, QUICK_SPELL = 1, QUICK_BLOCK = 2, QUICK_RUN = 3
91 SPELLCAT_INVALID = -1, SPELLCAT_CLERICAL = 0, SPELLCAT_WIZARDRY = 1, SPELLCAT_DRUIDIC = 2
111 int conditionMod(Attribute attrib)
const;
117 CharacterClass _class;
131 bool _spells[SPELLS_PER_CLASS];
136 QuickAction _quickOption;
156 int _currentAdventuringSpell;
157 int _currentCombatSpell;
162 static int _itemType;
178 return src._rosterId == _rosterId;
185 return src._rosterId != _rosterId;
206 Condition worstCondition()
const;
211 bool isDisabled()
const;
216 bool isDisabledOrDead()
const;
226 int getAge(
bool ignoreTemp =
false)
const;
231 int getMaxHP()
const;
236 int getMaxSP()
const;
241 uint getStat(Attribute attrib,
bool baseOnly =
false)
const;
247 static int statColor(
int amount,
int threshold);
252 int statBonus(uint statValue)
const;
257 bool charSavingThrow(DamageType attackType)
const;
267 void setAward(
int awardId,
bool value);
272 bool hasAward(
int awardId)
const;
277 int getAwardCount(
int awardId)
const;
282 int getArmorClass(
bool baseOnly =
false)
const;
287 int getThievery()
const;
289 uint getCurrentLevel()
const;
294 int itemScan(
int itemId)
const;
299 void setValue(
int id, uint value);
304 bool guildMember()
const;
309 uint experienceToNextLevel()
const;
314 uint nextExperienceLevel()
const;
319 uint getCurrentExperience()
const;
324 int getNumSkills()
const;
329 int getNumAwards()
const;
334 ItemCategory makeItem(
int p1,
int itemIndex,
int p3);
339 void addHitPoints(
int amount);
344 void subtractHitPoints(
int amount);
349 bool hasSlayerSword()
const;
354 bool hasMissileWeapon()
const;
359 SpellsCategory getSpellsCategory()
const;
365 return (_class == CLASS_PALADIN || _class == CLASS_ARCHER || _class == CLASS_RANGER) ? 1 : 0;
371 void clearConditions();
bool operator!=(const Character &src) const
Definition: character.h:184
Definition: serializer.h:79
Definition: character.h:374
Definition: character.h:106
Definition: detection.h:27
Definition: character.h:97
bool operator==(const Character &src) const
Definition: character.h:177
int getSpellsExpenseFactor() const
Definition: character.h:364