(WIP) Start implementing ICombatant

Start by replacing `hitMob` with `takeDamage` interface function.
Simplify `pcAttackChars` a little by utilizing the new interface, then add more interface functions as needed.

A lot of the combat logic is tied to the `Mob` class. Need to start moving stuff over to CombatNPC.
This commit is contained in:
gsemaj
2022-04-11 23:14:03 -04:00
parent 166e148878
commit 5d9dcb8609
6 changed files with 106 additions and 99 deletions

View File

@@ -90,9 +90,11 @@ struct Player : public Entity, public ICombatant {
virtual void enterIntoViewOf(CNSocket *sock) override;
virtual void disappearFromViewOf(CNSocket *sock) override;
virtual void takeDamage(EntityRef src, int amt) override;
virtual int takeDamage(EntityRef src, int amt) override;
virtual void heal(EntityRef src, int amt) override;
virtual bool isAlive() override;
virtual int getCurrentHP() override;
virtual int32_t getID() override;
sPCAppearanceData getAppearanceData();
};