22#ifndef WORLD_ACTORS_MAINACTOR_H
23#define WORLD_ACTORS_MAINACTOR_H
25#include "ultima/ultima8/world/actors/actor.h"
31struct WeaponOverlayFrame;
54 void move(int32 X, int32 Y, int32 Z)
override;
64 void teleport(
int mapNum, int32 x, int32 y, int32 z)
override;
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;
Definition: debugger.h:33
Definition: gravity_process.h:33
Definition: main_actor.h:33
void accumulateStr(int n)
void accumulateDex(int n)
const ShapeInfo * getShapeInfoFromGameInstance() const override
void nextInvItem()
Swap to the next inventory item (Crusader)
void teleport(int mapNum, int teleport_id)
void move(int32 X, int32 Y, int32 Z) override
void teleport(int mapNum, int32 x, int32 y, int32 z) override
teleport to the given location on the given map
void nextWeapon()
Swap to the next active weapon (Crusader)
uint16 getDamageType() const override
get the damage type this object does when hitting something
uint16 _shieldSpriteProc
Process for a shield zap animation sprite.
Definition: main_actor.h:205
bool CanAddItem(Item *item, bool checkwghtvol=false) override
bool addItem(Item *item, bool checkwghtvol=false) override
void detonateBomb()
Detonate used bomb (Crusader)
uint16 _shieldType
Type of shield (only used in Crusader)
Definition: main_actor.h:207
int receiveShieldHit(int damage, uint16 damage_type) override
Check if we can absorb a hit with the shield. Returns the modified damage value.
int16 addItemCru(Item *item, bool showtoast)
GravityProcess * ensureGravityProcess() override
Get the GravityProcess of this Item, creating it if necessary.
bool removeItemCru(Item *item)
Remove a single item - only called from an intrinsic.
void dropWeapon()
Drop the current weapon (Crusader)
ProcId die(uint16 damageType, uint16 damagePts, Direction srcDir) override
void accumulateInt(int n)
Definition: shape_info.h:33
Definition: algorithm.h:29
Definition: weapon_overlay.h:30