22 #ifndef WORLD_ACTORS_MAINACTOR_H 23 #define WORLD_ACTORS_MAINACTOR_H 25 #include "ultima/ultima8/world/actors/actor.h" 31 struct WeaponOverlayFrame;
48 bool addItem(
Item *item,
bool checkwghtvol =
false)
override;
54 void move(int32 X, int32 Y, int32 Z)
override;
64 void teleport(
int mapNum, int32 x, int32 y, int32 z)
override;
69 void teleport(
int mapNum,
int teleport_id);
71 bool hasJustTeleported()
const {
72 return _justTeleported;
74 void setJustTeleported(
bool t) {
93 uint32 getArmourClass()
const override;
94 uint16 getDefenseType()
const override;
95 int16 getAttackingDex()
const override;
96 int16 getDefendingDex()
const override;
99 int getDamageAmount()
const override;
101 void toggleInCombat() {
109 void setInCombat(
int activity)
override;
110 void clearInCombat()
override;
112 ProcId
die(uint16 damageType, uint16 damagePts, Direction srcDir)
override;
121 int16 getMaxEnergy();
123 CruBatteryType getBatteryType()
const {
124 return _cruBatteryType;
126 void setBatteryType(CruBatteryType newbattery) {
127 _cruBatteryType = newbattery;
128 setMana(getMaxEnergy());
131 void setShieldType(uint16 shieldtype) {
135 uint16 getShieldType() {
139 bool hasKeycard(
int num)
const;
140 void addKeycard(
int bitno);
146 uint16 getActiveInvItem()
const {
147 return _activeInvItem;
168 ENABLE_RUNTIME_CLASSTYPE()
170 INTRINSIC(I_teleportToEgg);
171 INTRINSIC(I_accumulateStrength);
172 INTRINSIC(I_accumulateDexterity);
173 INTRINSIC(I_accumulateIntelligence);
174 INTRINSIC(I_clrAvatarInCombat);
175 INTRINSIC(I_setAvatarInCombat);
176 INTRINSIC(I_isAvatarInCombat);
177 INTRINSIC(I_getMaxEnergy);
178 INTRINSIC(I_hasKeycard);
179 INTRINSIC(I_clrKeycards);
180 INTRINSIC(I_addItemCru);
181 INTRINSIC(I_getNumberOfCredits);
182 INTRINSIC(I_switchMap);
183 INTRINSIC(I_removeItemCru);
189 void useInventoryItem(uint32 shapenum);
190 void useInventoryItem(
Item *item);
192 bool _justTeleported;
199 CruBatteryType _cruBatteryType;
200 uint16 _activeInvItem;
void nextWeapon()
Swap to the next active weapon (Crusader)
void detonateBomb()
Detonate used bomb (Crusader)
uint16 _shieldType
Type of shield (only used in Crusader)
Definition: main_actor.h:207
void teleport(int mapNum, int32 x, int32 y, int32 z) override
teleport to the given location on the given map
GravityProcess * ensureGravityProcess() override
Get the GravityProcess of this Item, creating it if necessary.
void dropWeapon()
Drop the current weapon (Crusader)
Definition: weapon_overlay.h:30
Definition: detection.h:27
void move(int32 X, int32 Y, int32 Z) override
void accumulateStr(int n)
void accumulateDex(int n)
Definition: main_actor.h:33
bool addItem(Item *item, bool checkwghtvol=false) override
Definition: shape_info.h:33
uint16 _shieldSpriteProc
Process for a shield zap animation sprite.
Definition: main_actor.h:205
ProcId die(uint16 damageType, uint16 damagePts, Direction srcDir) override
int16 addItemCru(Item *item, bool showtoast)
Definition: gravity_process.h:33
Definition: debugger.h:37
bool removeItemCru(Item *item)
Remove a single item - only called from an intrinsic.
bool CanAddItem(Item *item, bool checkwghtvol=false) override
int receiveShieldHit(int damage, uint16 damage_type) override
Check if we can absorb a hit with the shield. Returns the modified damage value.
const ShapeInfo * getShapeInfoFromGameInstance() const override
void nextInvItem()
Swap to the next inventory item (Crusader)
void accumulateInt(int n)
uint16 getDamageType() const override
get the damage type this object does when hitting something