25 #include "common/scummsys.h" 26 #include "common/rect.h" 27 #include "mm/xeen/files.h" 28 #include "mm/xeen/sprites.h" 33 #define MAX_NUM_MONSTERS 107 34 #define PARTY_AND_MONSTERS 12 36 #define ATTACK_MONSTERS_COUNT 26 39 DT_PHYSICAL = 0, DT_MAGICAL = 1, DT_FIRE = 2, DT_ELECTRICAL = 3,
40 DT_COLD = 4, DT_POISON = 5, DT_ENERGY = 6, DT_SLEEP = 7,
41 DT_FINGEROFDEATH = 8, DT_HOLYWORD = 9, DT_MASS_DISTORTION = 10,
42 DT_UNDEAD = 11, DT_BEASTMASTER = 12, DT_DRAGONSLEEP = 13,
43 DT_GOLEMSTOPPER = 14, DT_HYPNOTIZE = 15, DT_INSECT_SPRAY = 16,
44 DT_POISON_VOLLEY = 17, DT_MAGIC_ARROW = 18
48 SA_NONE = 0, SA_MAGIC = 1, SA_FIRE = 2, SA_ELEC = 3, SA_COLD = 4,
49 SA_POISON = 5, SA_ENERGY = 6, SA_DISEASE = 7, SA_INSANE = 8,
50 SA_SLEEP = 9, SA_CURSEITEM = 10, SA_INLOVE = 11, SA_DRAINSP = 12,
51 SA_CURSE = 13, SA_PARALYZE = 14, SA_UNCONSCIOUS = 15,
52 SA_CONFUSE = 16, SA_BREAKWEAPON = 17, SA_WEAKEN = 18,
53 SA_ERADICATE = 19, SA_AGING = 20, SA_DEATH = 21, SA_STONE = 22
61 COMBATMODE_STARTUP = 0, COMBATMODE_INTERACTIVE = 1, COMBATMODE_2 = 2
65 POW_INVALID = -1, POW_FIREBALL = 0, POW_INCINERATE = 1,
66 POW_FIERY_FLAIL = 2, POW_LIGHTNING = 3, POW_MEGAVOLTS = 4,
67 POW_SPARKS = 5, POW_STOPPER = 6, POW_MAGIC_ORB = 7,
68 POW_COLD_RAY = 8, POW_FROST_WAVE = 9, POW_SPRAY = 10,
69 POW_ARROW = 11, POW_MAGIC_ARROW = 12, POW_ENERGY_BLAST = 13,
70 POW_SPARKLES = 14, POW_DEADLY_SWARM = 15
74 RT_SINGLE = 0, RT_GROUP = 1, RT_ALL = 2, RT_HIT = 3
89 PowSlot() : _active(
false), _duration(0), _scale(0),
90 _elemFrame(0), _elemScale(0) {}
101 assert(idx < POW_COUNT);
109 for (
int idx = 0; idx < POW_COUNT; ++idx)
110 _data[idx]._elemFrame = 0;
121 void attack2(
int damage, RangeType rangeType);
126 bool hitMonster(
Character &c, RangeType rangeType);
131 void getWeaponDamage(
Character &c, RangeType rangeType);
141 int getDamageScale(
int v);
146 int getMonsterResistance(RangeType rangeType);
151 void giveExperience(
int experience);
154 bool _charsBlocked[PARTY_AND_MONSTERS];
155 int _charsGone[PARTY_AND_MONSTERS];
157 int _attackMonsters[ATTACK_MONSTERS_COUNT];
166 int _monsterMap[32][32];
167 bool _monsterMoved[MAX_NUM_MONSTERS];
168 bool _rangeAttacking[MAX_NUM_MONSTERS];
170 bool _monstersAttacking;
171 CombatMode _combatMode;
172 int _attackDurationCtr;
175 DamageType _damageType;
179 int _weaponDie, _weaponDice;
180 int _weaponElemMaterial;
187 RangeType _rangeType;
188 ShootType _shootType;
196 void clearAttackers();
206 void clearShooting();
216 void giveCharDamage(
int damage, DamageType attackType,
int charIndex);
221 void doCharDamage(
Character &c,
int charNum,
int monsterDataIndex);
231 void setupCombatParty();
236 void setSpeedTable();
241 bool allHaveGone()
const;
246 bool charsCantAct()
const;
256 void attack(
Character &c, RangeType rangeType);
276 void monstersAttack();
278 void setupMonsterAttack(
int monsterDataIndex,
const Common::Point &pt);
288 bool canMonsterMove(
const Common::Point &pt,
int wallShift,
int xDiff,
int yDiff,
int monsterId);
293 void moveMonster(
int monsterId,
const Common::Point &moveDelta);
298 void doMonsterTurn(
int monsterId);
303 void doMonsterTurn(
int monsterId,
int charNum);
310 void monsterOvercome();
320 void rangedAttack(PowType powNum);
325 void shootRangedWeapon();
330 bool areMonstersPresent()
const;
Definition: character.h:106
Definition: detection.h:27
PowSlot & operator[](uint idx)
Definition: combat.h:100
void resetElementals()
Definition: combat.h:108