22 #ifndef WORLD_ACTORS_MAINACTOR_H 23 #define WORLD_ACTORS_MAINACTOR_H 25 #include "ultima/ultima8/world/actors/actor.h" 31 struct WeaponOverlayFrame;
47 bool addItem(
Item *item,
bool checkwghtvol =
false)
override;
53 void move(int32 X, int32 Y, int32 Z)
override;
63 void teleport(
int mapNum, int32 x, int32 y, int32 z)
override;
68 void teleport(
int mapNum,
int teleport_id);
70 bool hasJustTeleported()
const {
71 return _justTeleported;
73 void setJustTeleported(
bool t) {
92 uint32 getArmourClass()
const override;
93 uint16 getDefenseType()
const override;
94 int16 getAttackingDex()
const override;
95 int16 getDefendingDex()
const override;
98 int getDamageAmount()
const override;
100 void toggleInCombat() {
108 void setInCombat(
int activity)
override;
109 void clearInCombat()
override;
111 ProcId
die(uint16 damageType, uint16 damagePts, Direction srcDir)
override;
120 int16 getMaxEnergy();
122 CruBatteryType getBatteryType()
const {
123 return _cruBatteryType;
125 void setBatteryType(CruBatteryType newbattery) {
126 _cruBatteryType = newbattery;
127 setMana(getMaxEnergy());
130 void setShieldType(uint16 shieldtype) {
134 uint16 getShieldType() {
138 bool hasKeycard(
int num)
const;
139 void addKeycard(
int bitno);
145 uint16 getActiveInvItem()
const {
146 return _activeInvItem;
167 ENABLE_RUNTIME_CLASSTYPE()
169 INTRINSIC(I_teleportToEgg);
170 INTRINSIC(I_accumulateStrength);
171 INTRINSIC(I_accumulateDexterity);
172 INTRINSIC(I_accumulateIntelligence);
173 INTRINSIC(I_clrAvatarInCombat);
174 INTRINSIC(I_setAvatarInCombat);
175 INTRINSIC(I_isAvatarInCombat);
176 INTRINSIC(I_getMaxEnergy);
177 INTRINSIC(I_hasKeycard);
178 INTRINSIC(I_clrKeycards);
179 INTRINSIC(I_addItemCru);
180 INTRINSIC(I_getNumberOfCredits);
181 INTRINSIC(I_switchMap);
182 INTRINSIC(I_removeItemCru);
188 void useInventoryItem(uint32 shapenum);
189 void useInventoryItem(
Item *item);
191 bool _justTeleported;
198 CruBatteryType _cruBatteryType;
199 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:206
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:204
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