Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields

spellcaster.h

00001 /***************************************************************************
00002                           spellcaster.h  -  description
00003                              -------------------
00004     begin                : Sat May 3 2003
00005     copyright            : (C) 2003 by Gabor Torok
00006     email                : cctorok@yahoo.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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   // count==0 means that count depends on level
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

Generated on Thu Jun 16 21:50:43 2005 for scourge by  doxygen 1.4.0