_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Go to the documentation of this file.
71 virtual void Parse(lua_State *l,
int startIndex,
int endIndex) = 0;
150 #define CONDITION_FALSE 1
151 #define CONDITION_TRUE 0
152 #define CONDITION_ONLY 2
174 #define ACP_NOVALUE -1
175 #define ACP_DISTANCE -2
208 SpellType(
int slot,
const std::string &ident);
221 #define INFINITE_RANGE 0xFFFFFFF
290 #endif // !__SPELLS_H__
Diplomacy states for CommandDiplomacy.
Definition: player.h:83
ConditionInfo * Condition
Id of upgrade, -1 if no upgrade needed for cast the spell.
Definition: spells.h:228
Base structure of missile-types.
Definition: missile.h:343
int Attacker
If it should be casted in combat.
Definition: spells.h:195
char TargetSelf
Target is opponent. (neutral is neither allied, nor opponent)
Definition: spells.h:155
AutoCastInfo * AutoCast
Conditions to cast the spell. (generic (no test for each target))
Definition: spells.h:231
int MinMax
Target must have less Value than that.
Definition: spells.h:123
@ MaxCosts
resource 6
Definition: upgrade_structs.h:70
TargetType Type
Definition: spells.h:98
std::string Ident
Definition: spells.h:212
ConditionInfo()
Definition: spells.h:139
Target(TargetType type, CUnit *unit, const Vec2i &pos)
Definition: spells.h:95
~ConditionInfo()
Definition: spells.h:141
SpellType(int slot, const std::string &ident)
Definition: spells.cpp:574
int Corpse
If it should be casted on unit which attacks.
Definition: spells.h:196
int PriorytyVar
Min range of the target.
Definition: spells.h:187
int Combat
Conditions to cast the spell.
Definition: spells.h:194
virtual int Cast(CUnit &caster, const SpellType &spell, CUnit *&target, const Vec2i &goalPos)=0
SpellActionType(int mod=0)
Definition: spells.h:66
int Range
Definition: spells.h:182
std::string Name
Spell unique identifier (spell-holy-vision)
Definition: spells.h:213
int MinRange
Max range of the target.
Definition: spells.h:185
@ TargetSelf
Definition: spells.h:81
char Alliance
Definition: spells.h:153
bool Check
Target is 'user defined variable'.
Definition: spells.h:117
bool IsCasterOnly() const
Sound played if cast.
Definition: spells.h:237
Definition: unitsound.h:54
#define CONDITION_FALSE
Definition: spells.h:150
Definition: unittype.h:508
bool CanCastSpell(const CUnit &caster, const SpellType &spell, const CUnit *target, const Vec2i &goalPos)
returns true if spell can be casted (enough mana, valid target)
Definition: spells.cpp:457
virtual void Parse(lua_State *l, int startIndex, int endIndex)=0
int Costs[MaxCosts]
If the spell will be cast again until out of targets.
Definition: spells.h:224
std::vector< SpellActionType * > Action
Targeting information. See TargetType.
Definition: spells.h:218
ConditionInfoVariable()
Definition: spells.h:112
int CoolDown
Resource costs of spell.
Definition: spells.h:225
std::vector< SpellType * > SpellTypeTable
Definition: spells.cpp:64
char Enable
Definition: spells.h:114
bool ReverseSort
Variable to sort autocast targets by priority.
Definition: spells.h:188
int Slot
Spell name shown by the engine.
Definition: spells.h:214
CUnit * Unit
type of target.
Definition: spells.h:99
char Opponent
Target is allied. (neutral is neither allied, nor opponent)
Definition: spells.h:154
int MaxValuePercent
Target must have more (100 * Value / Max) than that.
Definition: spells.h:125
int MinValuePercent
Target must have more Max than that.
Definition: spells.h:124
int SpellCast(CUnit &caster, const SpellType &spell, CUnit *target, const Vec2i &goalPos)
cast spell on target unit or place at x,y
Definition: spells.cpp:511
int AutoCastSpell(CUnit &caster, const SpellType &spell)
auto cast the spell if possible
Definition: spells.cpp:474
TargetType Target
Spell numeric identifier.
Definition: spells.h:217
AutoCastInfo()
Definition: spells.h:176
void SpellCclRegister()
register fonction.
Definition: script_spell.cpp:437
virtual ~SpellActionType()
Definition: spells.h:67
char * BoolFlag
Target is the same as the caster.
Definition: spells.h:157
int DependencyId
How much time spell needs to be cast again.
Definition: spells.h:227
int MaxValue
Target must have more Value than that.
Definition: spells.h:122
LuaCallback * PositionAutoCast
If it should be casted on corpses.
Definition: spells.h:199
SpellType * SpellTypeByIdent(const std::string &ident)
return spell type by ident string
Definition: spells.cpp:418
int Range
More arguments for spell (damage, delay, additional sounds...).
Definition: spells.h:220
void InitSpells()
init spell tables
Definition: spells.cpp:407
char Ccl2Condition(lua_State *l, const char *value)
return 0, 1, 2 for true, only, false.
Definition: script_spell.cpp:118
bool SpellIsAvailable(const CPlayer &player, int SpellId)
return 1 if spell is available, 0 if not (must upgrade)
Definition: spells.cpp:439
@ TargetPosition
Definition: spells.h:82
const int ModifyManaCaster
Definition: spells.h:73
Definition: luacallback.h:41
int RepeatCast
Required mana for each cast.
Definition: spells.h:223
~AutoCastInfo()
Definition: spells.h:178
int ManaCost
Definition: spells.h:222
ConditionInfo * Condition
If true, small values have the highest priority.
Definition: spells.h:190
int ExactValue
True if need to check that variable.
Definition: spells.h:119
int ExceptValue
Target must have exactly ExactValue of it's value.
Definition: spells.h:120
AutoCastInfo * AICast
AutoCast information for your own units.
Definition: spells.h:232
TargetType
Definition: spells.h:80
SoundConfig SoundWhenCast
AutoCast information for ai. More detalied.
Definition: spells.h:235
Vec2i targetPos
Unit target.
Definition: spells.h:100
char ConditionApplyOnCaster
Target must have less (100 * Value / Max) than that.
Definition: spells.h:127
void CleanSpells()
done spell tables
Definition: spells.cpp:605
#define ACP_NOVALUE
Definition: spells.h:174
bool ForceUseAnimation
Definition: spells.h:241
The big unit structure.
Definition: unit.h:135
@ TargetUnit
Definition: spells.h:83
ConditionInfoVariable * Variable
User defined boolean flag.
Definition: spells.h:159
~SpellType()
Definition: spells.cpp:586
LuaCallback * CheckFunc
Definition: spells.h:160
int MinValue
Target mustn't have ExceptValue of it's value.
Definition: spells.h:121
(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.