25 #include "common/scummsys.h" 26 #include "common/rect.h" 27 #include "xeen/files.h" 28 #include "xeen/sprites.h" 32 #define MAX_NUM_MONSTERS 107 33 #define PARTY_AND_MONSTERS 12 35 #define ATTACK_MONSTERS_COUNT 26 38 DT_PHYSICAL = 0, DT_MAGICAL = 1, DT_FIRE = 2, DT_ELECTRICAL = 3,
39 DT_COLD = 4, DT_POISON = 5, DT_ENERGY = 6, DT_SLEEP = 7,
40 DT_FINGEROFDEATH = 8, DT_HOLYWORD = 9, DT_MASS_DISTORTION = 10,
41 DT_UNDEAD = 11, DT_BEASTMASTER = 12, DT_DRAGONSLEEP = 13,
42 DT_GOLEMSTOPPER = 14, DT_HYPNOTIZE = 15, DT_INSECT_SPRAY = 16,
43 DT_POISON_VOLLEY = 17, DT_MAGIC_ARROW = 18
47 SA_NONE = 0, SA_MAGIC = 1, SA_FIRE = 2, SA_ELEC = 3, SA_COLD = 4,
48 SA_POISON = 5, SA_ENERGY = 6, SA_DISEASE = 7, SA_INSANE = 8,
49 SA_SLEEP = 9, SA_CURSEITEM = 10, SA_INLOVE = 11, SA_DRAINSP = 12,
50 SA_CURSE = 13, SA_PARALYZE = 14, SA_UNCONSCIOUS = 15,
51 SA_CONFUSE = 16, SA_BREAKWEAPON = 17, SA_WEAKEN = 18,
52 SA_ERADICATE = 19, SA_AGING = 20, SA_DEATH = 21, SA_STONE = 22
60 COMBATMODE_STARTUP = 0, COMBATMODE_INTERACTIVE = 1, COMBATMODE_2 = 2
64 POW_INVALID = -1, POW_FIREBALL = 0, POW_INCINERATE = 1,
65 POW_FIERY_FLAIL = 2, POW_LIGHTNING = 3, POW_MEGAVOLTS = 4,
66 POW_SPARKS = 5, POW_STOPPER = 6, POW_MAGIC_ORB = 7,
67 POW_COLD_RAY = 8, POW_FROST_WAVE = 9, POW_SPRAY = 10,
68 POW_ARROW = 11, POW_MAGIC_ARROW = 12, POW_ENERGY_BLAST = 13,
69 POW_SPARKLES = 14, POW_DEADLY_SWARM = 15
73 RT_SINGLE = 0, RT_GROUP = 1, RT_ALL = 2, RT_HIT = 3
88 PowSlot() : _active(
false), _duration(0), _scale(0),
89 _elemFrame(0), _elemScale(0) {}
100 assert(idx < POW_COUNT);
108 for (
int idx = 0; idx < POW_COUNT; ++idx)
109 _data[idx]._elemFrame = 0;
120 void attack2(
int damage, RangeType rangeType);
125 bool hitMonster(
Character &c, RangeType rangeType);
130 void getWeaponDamage(
Character &c, RangeType rangeType);
140 int getDamageScale(
int v);
145 int getMonsterResistence(RangeType rangeType);
150 void giveExperience(
int experience);
153 bool _charsBlocked[PARTY_AND_MONSTERS];
154 int _charsGone[PARTY_AND_MONSTERS];
156 int _attackMonsters[ATTACK_MONSTERS_COUNT];
165 int _monsterMap[32][32];
166 bool _monsterMoved[MAX_NUM_MONSTERS];
167 bool _rangeAttacking[MAX_NUM_MONSTERS];
169 bool _monstersAttacking;
170 CombatMode _combatMode;
171 int _attackDurationCtr;
174 DamageType _damageType;
178 int _weaponDie, _weaponDice;
179 int _weaponElemMaterial;
186 RangeType _rangeType;
187 ShootType _shootType;
195 void clearAttackers();
205 void clearShooting();
215 void giveCharDamage(
int damage, DamageType attackType,
int charIndex);
220 void doCharDamage(
Character &c,
int charNum,
int monsterDataIndex);
230 void setupCombatParty();
235 void setSpeedTable();
240 bool allHaveGone()
const;
245 bool charsCantAct()
const;
255 void attack(
Character &c, RangeType rangeType);
275 void monstersAttack();
277 void setupMonsterAttack(
int monsterDataIndex,
const Common::Point &pt);
287 bool canMonsterMove(
const Common::Point &pt,
int wallShift,
int xDiff,
int yDiff,
int monsterId);
292 void moveMonster(
int monsterId,
const Common::Point &moveDelta);
297 void doMonsterTurn(
int monsterId);
302 void doMonsterTurn(
int monsterId,
int charNum);
309 void monsterOvercome();
319 void rangedAttack(PowType powNum);
324 void shootRangedWeapon();
329 bool areMonstersPresent()
const;
PowSlot & operator[](uint idx)
Definition: combat.h:99
Definition: character.h:101
void resetElementals()
Definition: combat.h:107
Definition: character.h:33