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 "xeen/combat.h" 30 #include "xeen/item.h" 31 #include "xeen/sprites.h" 35 #define INV_ITEMS_TOTAL 9 36 #define SPELLS_PER_CLASS 39 37 #define AWARDS_TOTAL 88 38 #define WARZONE_AWARD 9 41 SHANGRILA_GUILD_MEMBER = 5, GOOBER = 76, SUPER_GOOBER = 77,
42 CASTLEVIEW_GUILD_MEMBER = 83, SANDCASTER_GUILD_MEMBER = 84,
43 LAKESIDE_GUILD_MEMBER = 85, NECROPOLIS_GUILD_MEMBER = 86, OLYMPUS_GUILD_MEMBER = 87
46 enum Sex { MALE = 0, FEMALE = 1, YES_PLEASE = 2 };
48 enum Race { HUMAN = 0, ELF = 1, DWARF = 2, GNOME = 3, HALF_ORC = 4 };
51 CLASS_KNIGHT = 0, CLASS_PALADIN = 1, CLASS_ARCHER = 2, CLASS_CLERIC = 3,
52 CLASS_SORCERER = 4, CLASS_ROBBER = 5, CLASS_NINJA = 6, CLASS_BARBARIAN = 7,
53 CLASS_DRUID = 8, CLASS_RANGER = 9, TOTAL_CLASSES = 10
57 HATES_DWARF = 12, HATES_PARTY = 15, HATES_NOBODY = 16
61 MIGHT = 0, INTELLECT = 1, PERSONALITY = 2, ENDURANCE = 3, SPEED = 4,
62 ACCURACY = 5, LUCK = 6, TOTAL_ATTRIBUTES = 7
66 THIEVERY = 0, ARMS_MASTER = 1, ASTROLOGER = 2, BODYBUILDER = 3,
67 CARTOGRAPHER = 4, CRUSADER = 5, DIRECTION_SENSE = 6, LINGUIST = 7,
68 MERCHANT = 8, MOUNTAINEER = 9, NAVIGATOR = 10, PATHFINDER = 11,
69 PRAYER_MASTER = 12, PRESTIDIGITATION = 13, SWIMMING = 14, TRACKING = 15,
70 SPOT_DOORS = 16, DANGER_SENSE = 17
74 CURSED = 0, HEART_BROKEN = 1, WEAK = 2, POISONED = 3,
75 DISEASED = 4, INSANE = 5, IN_LOVE = 6, DRUNK = 7, ASLEEP = 8,
76 DEPRESSED = 9, CONFUSED = 10, PARALYZED = 11, UNCONSCIOUS = 12,
77 DEAD = 13, STONED = 14, ERADICATED = 15,
82 QUICK_ATTACK = 0, QUICK_SPELL = 1, QUICK_BLOCK = 2, QUICK_RUN = 3
86 SPELLCAT_INVALID = -1, SPELLCAT_CLERICAL = 0, SPELLCAT_WIZARDRY = 1, SPELLCAT_DRUIDIC = 2
106 int conditionMod(Attribute attrib)
const;
112 CharacterClass _class;
126 bool _spells[SPELLS_PER_CLASS];
131 QuickAction _quickOption;
151 int _currentAdventuringSpell;
152 int _currentCombatSpell;
157 static int _itemType;
197 Condition worstCondition()
const;
202 bool isDisabled()
const;
207 bool isDisabledOrDead()
const;
217 int getAge(
bool ignoreTemp =
false)
const;
222 int getMaxHP()
const;
227 int getMaxSP()
const;
232 uint getStat(Attribute attrib,
bool baseOnly =
false)
const;
238 static int statColor(
int amount,
int threshold);
243 int statBonus(uint statValue)
const;
248 bool charSavingThrow(DamageType attackType)
const;
258 void setAward(
int awardId,
bool value);
263 bool hasAward(
int awardId)
const;
268 int getAwardCount(
int awardId)
const;
273 int getArmorClass(
bool baseOnly =
false)
const;
278 int getThievery()
const;
280 uint getCurrentLevel()
const;
285 int itemScan(
int itemId)
const;
290 void setValue(
int id, uint value);
295 bool guildMember()
const;
300 uint experienceToNextLevel()
const;
305 uint nextExperienceLevel()
const;
310 uint getCurrentExperience()
const;
315 int getNumSkills()
const;
320 int getNumAwards()
const;
325 ItemCategory makeItem(
int p1,
int itemIndex,
int p3);
330 void addHitPoints(
int amount);
335 void subtractHitPoints(
int amount);
340 bool hasSlayerSword()
const;
345 bool hasMissileWeapon()
const;
350 SpellsCategory getSpellsCategory()
const;
356 return (_class == CLASS_PALADIN || _class == CLASS_ARCHER || _class == CLASS_RANGER) ? 1 : 0;
362 void clearConditions();
bool operator==(const Character &src) const
Definition: character.h:172
Definition: character.h:92
Definition: character.h:365
Definition: serializer.h:79
int getSpellsExpenseFactor() const
Definition: character.h:355
bool operator!=(const Character &src) const
Definition: character.h:177
Definition: character.h:101
Definition: character.h:33