22 #ifndef WORLD_ACTORS_ATTACKPROCESS_H 23 #define WORLD_ACTORS_ATTACKPROCESS_H 25 #include "ultima/ultima8/kernel/process.h" 26 #include "ultima/ultima8/misc/direction.h" 28 #include "common/memstream.h" 48 ENABLE_RUNTIME_CLASSTYPE()
56 void setIsActivityAOrB() {
57 _isActivityAorB =
true;
59 void setIsActivity9OrB() {
60 _isActivity9orB =
true;
71 uint16 getTarget()
const {
75 void setTarget(uint16 target) {
87 static const uint16 ATTACK_PROC_TYPE = 0x259;
91 void setTacticNo(
int block);
94 void setBlockNo(
int block);
97 uint16 readNextWordRaw();
100 uint16 readNextWordWithData();
103 void setAttackData(uint16 offset, uint16 val);
105 uint16 getAttackData(uint16 offset)
const;
108 void genericAttack();
111 void sleep(
int ticks);
114 bool readyForNextSound(uint32 now);
116 bool checkTimer2PlusDelayElapsed(
int now);
117 void pathfindToItemInNPCData();
118 bool timer4and5Update(
int now);
119 void timeNowToTimerVal2(
int now);
120 bool checkReady(
int now, Direction targetdir);
124 void checkRandomAttackSound(
int now, uint32 shapeno);
127 void checkRandomAttackSoundRegret(
const Actor *actor);
132 uint16 _tacticDatStartOffset;
137 bool _playedStartSound;
139 Direction _npcInitialDir;
149 bool _isActivity9orB;
150 bool _isActivityAorB;
158 uint16 _dataArray[10];
160 int32 _wpnBasedTimeout;
161 int32 _difficultyBasedTimeout;
168 uint32 _soundTimestamp;
169 uint32 _soundDelayTicks;
170 int32 _fireTimestamp;
173 static int16 _lastAttackSound;
174 static int16 _lastLastAttackSound;
Definition: detection.h:27
void saveData(Common::WriteStream *ws) override
save Process data
Definition: memstream.h:43
Common::String dumpInfo() const override
dump some info about this process to a string
void terminate() override
terminate the process. This wakes up all processes waiting for it.
static int16 getRandomAttackSoundRegret(const Actor *actor)
Definition: combat_dat.h:41
Definition: attack_process.h:41