Index: scripts/globals/magic.lua =================================================================== --- scripts/globals/magic.lua (revision 3801) +++ scripts/globals/magic.lua (working copy) @@ -615,7 +615,13 @@ function addBonuses(caster, spell, target, dmg, bonusmab) local ele = spell:getElement(); + local skill = spell:getSkillType(); + -- Enfeebling Mag Dmg Bonus (Estoquers Sayon +2 etc.) + if(skill == 35) then + dmg = math.floor(dmg * (1 + (caster:getMod(MOD_ENFB_MAG_DMG)/100))); + end + local affinityBonus = AffinityBonus(caster, spell); dmg = math.floor(dmg * affinityBonus); Index: scripts/globals/status.lua =================================================================== --- scripts/globals/status.lua (revision 3801) +++ scripts/globals/status.lua (working copy) @@ -579,6 +579,8 @@ MOD_MDEF = 0x1D MOD_MACC = 0x1E MOD_MEVA = 0x1F +MOD_ENFB_MAG_DMG = 0x1A3 + MOD_FIREATT = 0x20 MOD_ICEATT = 0x21 MOD_WINDATT = 0x22 Index: src/map/lua/lua_spell.cpp =================================================================== --- src/map/lua/lua_spell.cpp (revision 3801) +++ src/map/lua/lua_spell.cpp (working copy) @@ -126,6 +126,13 @@ return 1; } +inline int32 CLuaSpell::getSkillType(lua_State *L) +{ + DSP_DEBUG_BREAK_IF(m_PLuaSpell == NULL); + lua_pushinteger(L,m_PLuaSpell->getSkillType()); + return 1; +} + /************************************************************************ * * * Инициализация методов в lua * @@ -143,5 +150,6 @@ LUNAR_DECLARE_METHOD(CLuaSpell,getTotalTargets), LUNAR_DECLARE_METHOD(CLuaSpell, getID), LUNAR_DECLARE_METHOD(CLuaSpell, getSpellGroup), + LUNAR_DECLARE_METHOD(CLuaSpell, getSkillType), {NULL,NULL} }; \ No newline at end of file Index: src/map/lua/lua_spell.h =================================================================== --- src/map/lua/lua_spell.h (revision 3801) +++ src/map/lua/lua_spell.h (working copy) @@ -55,6 +55,7 @@ int32 getElement(lua_State*); int32 getID(lua_State*); int32 getSpellGroup(lua_State*); + int32 getSkillType(lua_State*); }; #endif \ No newline at end of file Index: src/map/modifier.h =================================================================== --- src/map/modifier.h (revision 3801) +++ src/map/modifier.h (working copy) @@ -69,6 +69,7 @@ MOD_MDEF =0x1D,// Magic Defense MOD_MACC =0x1E,// Magic Accuracy MOD_MEVA =0x1F,// Magic Evasion + MOD_ENFB_MAG_DMG =0x1A3, // Enfeebling Magic Dmg % Bonus // Magic Accuracy and Elemental Attacks @@ -441,7 +442,7 @@ MOD_EAT_RAW_MEAT = 410 }; -#define MAX_MODIFIER 411 +#define MAX_MODIFIER 0x242