_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

spell_spawnmissile.h
Go to the documentation of this file.
1 // _________ __ __
2 // / _____// |_____________ _/ |______ ____ __ __ ______
3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ |
5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
6 // \/ \/ \//_____/ \/
7 // ______________________ ______________________
8 // T H E W A R B E G I N S
9 // Stratagus - A free fantasy real time strategy game engine
10 //
11 //
12 // (c) Copyright 1999-2012 by Vladi Belperchinov-Shabanski,
13 // Joris DAUPHIN, and Jimmy Salmon
14 //
15 // This program is free software; you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation; only version 2 of the License.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
27 // 02111-1307, USA.
28 //
29 
30 #ifndef SPELL_SPAWNMISSILE_H
31 #define SPELL_SPAWNMISSILE_H
32 
34 
35 /*----------------------------------------------------------------------------
36 -- Includes
37 ----------------------------------------------------------------------------*/
38 
39 #include "spells.h"
40 
47 };
48 
56 {
57 public:
59  AddRandX(0), AddRandY(0) {} ;
60 
62  int AddX;
63  int AddY;
64  int AddRandX;
65  int AddRandY;
66 };
67 
69 {
70 public:
71  Spell_SpawnMissile() : Damage(0), TTL(-1), Delay(0), UseUnitVar(false),
72  StartPoint(LocBaseCaster), EndPoint(LocBaseTarget), Missile(0) {}
73  virtual int Cast(CUnit &caster, const SpellType &spell,
74  CUnit *&target, const Vec2i &goalPos);
75  virtual void Parse(lua_State *lua, int startIndex, int endIndex);
76 
77 private:
78  int Damage;
79  int TTL;
80  int Delay;
81  bool UseUnitVar;
82  SpellActionMissileLocation StartPoint;
85 };
86 
87 
89 
90 #endif // SPELL_SPAWNMISSILE_H
MissileType
Base structure of missile-types.
Definition: missile.h:343
LocBaseCaster
@ LocBaseCaster
Definition: spell_spawnmissile.h:45
SpellActionMissileLocation
Definition: spell_spawnmissile.h:55
SpellActionMissileLocation::Base
LocBaseType Base
Definition: spell_spawnmissile.h:59
Spell_SpawnMissile
Definition: spell_spawnmissile.h:68
Vec2T
Definition: vec2i.h:36
Spell_SpawnMissile::Parse
virtual void Parse(lua_State *lua, int startIndex, int endIndex)
Definition: spell_spawnmissile.cpp:103
Spell_SpawnMissile::Cast
virtual int Cast(CUnit &caster, const SpellType &spell, CUnit *&target, const Vec2i &goalPos)
Definition: spell_spawnmissile.cpp:182
SpellActionType
Definition: spells.h:63
SpellActionMissileLocation::AddY
int AddY
Add to the X coordinate.
Definition: spell_spawnmissile.h:63
SpellActionMissileLocation::AddRandY
int AddRandY
Random add to the X coordinate.
Definition: spell_spawnmissile.h:65
LocBaseType
LocBaseType
Definition: spell_spawnmissile.h:44
spells.h
SpellActionMissileLocation::AddRandX
int AddRandX
Add to the X coordinate.
Definition: spell_spawnmissile.h:64
SpellActionMissileLocation::AddX
int AddX
The base for the location (caster/target)
Definition: spell_spawnmissile.h:62
LocBaseTarget
@ LocBaseTarget
Definition: spell_spawnmissile.h:46
Spell_SpawnMissile::Spell_SpawnMissile
Spell_SpawnMissile()
Definition: spell_spawnmissile.h:71
SpellType
Definition: spells.h:205
SpellActionMissileLocation::SpellActionMissileLocation
SpellActionMissileLocation(LocBaseType base)
Definition: spell_spawnmissile.h:58
CUnit
The big unit structure.
Definition: unit.h:135
Missile
Missile on the map.
Definition: missile.h:413
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.