diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-05-30 20:12:36 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-05-30 20:12:36 -0300 |
| commit | 08780dad536eb5d0544eb2ea70e5443dc237976f (patch) | |
| tree | 673a57b538ca9016d5b386ff32c3bd67c2190c2f /src/magic.hh | |
| parent | dff5e62f6ebb1b06c234b9144458788893b6ca86 (diff) | |
| download | game-08780dad536eb5d0544eb2ea70e5443dc237976f.tar.gz game-08780dad536eb5d0544eb2ea70e5443dc237976f.zip | |
more work on `crcombat.cc`
Diffstat (limited to 'src/magic.hh')
| -rw-r--r-- | src/magic.hh | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/magic.hh b/src/magic.hh new file mode 100644 index 0000000..d24edd8 --- /dev/null +++ b/src/magic.hh @@ -0,0 +1,90 @@ +#ifndef TIBIA_MAGIC_HH_ +#define TIBIA_MAGIC_HH_ 1 + +#include "common.hh" + +struct TCreature; + +struct TImpact{ + // VIRTUAL FUNCTIONS + // ========================================================================= + virtual void handleField(int a, int b, int c); // VTABLE[0] + virtual void handleCreature(TCreature *Victim); // VTABLE[1] + virtual bool isAggressive(void); // VTABLE[2] + + // DATA + // ========================================================================= + //void *VTABLE; // IMPLICIT +}; + +#if 0 +struct TSummonImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int Race; + int Maximum; +}; + +struct TSpeedImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int Percent; + int Duration; +}; + +struct THealingImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int Power; +}; + +struct TOutfitImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + TOutfit Outfit; + int Duration; +}; + +struct TFieldImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int FieldType; +}; + +struct TDrunkenImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int Power; + int Duration; +}; + +struct TStrengthImpact { + TImpact super_TImpact; // INHERITANCE? + TCreature *Actor; + int Skills; + int Percent; + int Duration; +}; +#endif + +struct TDamageImpact: TImpact{ + // REGULAR FUNCTIONS + // ========================================================================= + TDamageImpact(TCreature *Actor, int DamageType, int Power, bool AllowDefense); + + // VIRTUAL FUNCTIONS + // ========================================================================= + void handleCreature(TCreature *Victim) override; + + // DATA + // ========================================================================= + // TImpact super_TImpact; // IMPLICIT + TCreature *Actor; + int DamageType; + int Power; + bool AllowDefense; +}; + +void CheckMana(TCreature *Creature, int ManaPoints, int SoulPoints, int Delay); + +#endif //TIBIA_MAGIC_HH_ |
