Merge branch 'fixes' into main/rendor-staging
[ryzomcore.git] / ryzom / common / src / game_share / magic_fx.h
blobe134ada6c682490b79f7c9f5bf0fe651706ad611
1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RY_MAGIC_FX_H
20 #define RY_MAGIC_FX_H
22 #include "nel/misc/types_nl.h"
23 #include "damage_types.h"
24 #include "effect_families.h"
26 namespace MAGICFX
29 enum TSpellMode
31 Bomb = 0,
32 Chain,
33 Spray,
34 SpellModeCount,
35 UnknownSpellMode = SpellModeCount,
38 enum TSpellType
40 Off = 0,
41 Cur,
42 Mix,
43 SpellTypeCount,
45 UnknownSpellType = SpellTypeCount,
47 // TODO: this enum is also used for attack, so could name it in a more general way
48 enum TSpellCastStage
50 CastBegin = 0,
51 CastLoop,
52 CastEnd,
53 CastFail,
54 SpellCastStageCount,
56 UnknownSpellCastStage = SpellCastStageCount,
59 const std::string& toString(TSpellMode mode);
60 const std::string& toString(TSpellType mode);
61 const std::string& toString(TSpellCastStage mode);
63 TSpellMode toSpellMode(const std::string &str);
65 // the number of possible powers for a spell
66 // TODO : this is also used for melee, range, so name it in a more general way in another namespace (NUM_ATTACK_POWER ?)
67 const uint NUM_SPELL_POWER = 5;
69 // projectile speed in meters per second
70 const float PROJECTILE_SPEED = 20.f;
72 /** the value of each enum should match the value in spells.spell_list
73 * and in links.id_to_string_array
75 enum TMagicFx
77 // offensif
78 Piercing = 0, // ok
79 Blunt = 1, // ok
80 Slashing = 2, // ok
81 Cold = 3, // ok
82 Rot = 4, // ok
83 Acid = 5, // ok
84 Fire = 6, // ok
85 Shockwave = 7, // ok
86 Electric = 8, // ok
87 Poison = 9, // ok
88 Curse = 10, //
89 Sickness = 11, //
90 Hatred = 12, //
91 Mezz = 13, // ok
92 Root = 14, // ok
93 Fear = 18, // ok
95 // curatif
96 HealHP = 15,
97 HealSap = 16,
98 HealSta = 17,
100 Stun = 19,
102 SlowAttack = 20,
103 SlowMove = 21,
104 Blind = 22,
105 Madness = 23,
107 // range weapon (reuse magic system for now)
108 RangeWeaponFirst = 128,
109 RangeWeaponGattling = RangeWeaponFirst,
110 RangeWeaponMissile = 129,
112 Unknown,
114 TMagicFx toMagicFx( DMGTYPE::EDamageType type ,bool Link);
115 TMagicFx toMagicFx( EFFECT_FAMILIES::TEffectFamily effect);
116 TMagicFx healtoMagicFx( sint32 healHp, sint32 healSap, sint32 healSta, bool link );
119 // enum for the auras fxs
120 enum TAuraFX
122 NoAura = 0,
123 Divinity = 1,
124 SpeedMove = 2,
125 AuraSap = 3,
126 AuraSta = 4,
127 AuraHp = 5,
128 ProtectionMelee = 6,
129 ProtectionRange = 7,
130 ProtectionMagic = 8,
131 WarCry = 9,
132 FireWall = 10,
133 WaterWall = 11,
134 ThornWall = 12,
135 LightningWall = 13,
136 OtherFireWall = 14,
137 TeleportKami = 15, // No effect aura
138 TeleportKara = 16, // No effect aura
139 TeleportMarauder = 17, // No effect aura
140 LevelUp = 18, // No effect aura
145 #endif // RY_MAGIC_FX_H
147 /* End of magic_fx.h */