00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef SPELL_CASTER_H
00019 #define SPELL_CASTER_H
00020
00021 #include <iostream>
00022 #include <string>
00023 #include <vector>
00024 #include "constants.h"
00025 #include "session.h"
00026 #include "map.h"
00027 #include "creature.h"
00028 #include "item.h"
00029 #include "rpg/character.h"
00030 #include "rpg/monster.h"
00031 #include "effect.h"
00032 #include "projectile.h"
00033 #include "battle.h"
00034 #include "calendar.h"
00035 #include "events/statemodexpirationevent.h"
00036
00037 using namespace std;
00038
00043 class Session;
00044 class Creature;
00045 class Item;
00046 class Projectile;
00047 class Battle;
00048
00049 class SpellCaster {
00050 private:
00051 Battle *battle;
00052 Spell *spell;
00053 bool projectileHit;
00054 float power;
00055
00056 public:
00057
00058 SpellCaster(Battle *battle, Spell *spell, bool projectileHit);
00059 virtual ~SpellCaster();
00060
00061 void spellFailed();
00062
00063 void spellSucceeded();
00064
00065 protected:
00066 float getPower();
00067 void viewInfo();
00068 void increaseHP();
00069 void increaseAC();
00070
00071 void launchProjectile(int count, bool stopOnImpact=true);
00072 void causeDamage( GLuint delay=0, GLfloat mult=1.0f );
00073 void setStateMod(int mod, bool setting=true);
00074 void circleAttack();
00075 void hailAttack();
00076
00077
00078 int getRadius( int spellEffectSize, float *sx, float *sy );
00079 };
00080
00081 #endif