$treeview $search $mathjax
Stratagus
2.2.6
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "unitsound.h"
#include "vec2i.h"
Go to the source code of this file.
Classes | |
class | SpellActionMissileLocation |
class | SpellActionTypeAdjustVariable |
class | SpellActionType |
class | AreaAdjustVitals |
class | SpawnMissile |
class | Demolish |
class | AreaBombardment |
class | SpawnPortal |
class | AdjustVariable |
class | AdjustVitals |
class | Polymorph |
class | Summon |
class | Capture |
class | Target |
class | ConditionInfoVariable |
class | ConditionInfo |
class | AutoCastInfo |
class | SpellType |
spells.h - The Spells. | |
enum | TargetType { TargetSelf, TargetPosition, TargetUnit } |
enum | LocBaseType { LocBaseCaster, LocBaseTarget } |
std::vector< SpellType * > | SpellTypeTable |
void | SpellCclRegister () |
register fonction. | |
void | InitSpells () |
init spell tables | |
void | CleanSpells () |
done spell tables | |
bool | SpellIsAvailable (const CPlayer &player, int SpellId) |
return 1 if spell is availible, 0 if not (must upgrade) | |
bool | CanCastSpell (const CUnit &caster, const SpellType *spell, const CUnit *target, int x, int y) |
returns true if spell can be casted (enough mana, valid target) | |
int | SpellCast (CUnit &caster, const SpellType *spell, CUnit *target, int x, int y) |
cast spell on target unit or place at x,y | |
int | AutoCastSpell (CUnit &caster, const SpellType *spell) |
auto cast the spell if possible | |
SpellType * | SpellTypeByIdent (const std::string &ident) |
return spell type by ident string | |
char | Ccl2Condition (lua_State *l, const char *value) |
return 0, 1, 2 for true, only, false. | |
Defines | |
#define | CONDITION_FALSE 1 |
#define | CONDITION_TRUE 0 |
#define | CONDITION_ONLY 2 |
#define | INFINITE_RANGE 0xFFFFFFF |
Max range of the target. |
#define CONDITION_FALSE 1 |
#define CONDITION_ONLY 2 |
#define CONDITION_TRUE 0 |
#define INFINITE_RANGE 0xFFFFFFF |
Max range of the target.
enum LocBaseType |
enum TargetType |
auto cast the spell if possible
Check if the spell can be auto cast and cast it.
caster | Unit who can cast the spell. | |
spell | Spell-type pointer. |
bool CanCastSpell | ( | const CUnit & | caster, | |
const SpellType * | spell, | |||
const CUnit * | target, | |||
int | x, | |||
int | y | |||
) |
returns true if spell can be casted (enough mana, valid target)
Check if unit can cast the spell.
caster | Unit that casts the spell | |
spell | Spell-type pointer | |
target | Target unit that spell is addressed to | |
x | X coord of target spot when/if target does not exist | |
y | Y coord of target spot when/if target does not exist |
char Ccl2Condition | ( | lua_State * | l, | |
const char * | value | |||
) |
return 0, 1, 2 for true, only, false.
Get a condition value from a scm object.
l | Lua state. | |
value | scm value to convert. |
void CleanSpells | ( | ) |
done spell tables
Cleanup the spell subsystem.
void InitSpells | ( | ) |
init spell tables
Spells constructor, inits spell id's and sounds
cast spell on target unit or place at x,y
Spell cast!
caster | Unit that casts the spell | |
spell | Spell-type pointer | |
target | Target unit that spell is addressed to | |
x | X coord of target spot when/if target does not exist | |
y | Y coord of target spot when/if target does not exist |
void SpellCclRegister | ( | ) |
register fonction.
Register CCL features for Spell.
bool SpellIsAvailable | ( | const CPlayer & | player, | |
int | spellid | |||
) |
return 1 if spell is availible, 0 if not (must upgrade)
Check if spell is research for player player
.
player | player for who we want to know if he knows the spell. | |
spellid | id of the spell to check. |
SpellType* SpellTypeByIdent | ( | const std::string & | ident | ) |
return spell type by ident string
Get spell-type struct pointer by string identifier.
ident | Spell identifier. |
std::vector<SpellType *> SpellTypeTable |
Define the names and effects of all available spells.
Define the names and effects of all im play available spells.