branch sync #2
This commit is contained in:
parent
96a37544fd
commit
4e6256b8cd
39 changed files with 415 additions and 137 deletions
|
|
@ -9,6 +9,7 @@ using Server.Targeting;
|
|||
using Server.Engines.PartySystem;
|
||||
using Server.Misc;
|
||||
using Server.Spells.Bushido;
|
||||
using Server.Spells.Necromancy;
|
||||
using Server.Spells.Ninjitsu;
|
||||
using System.Collections.Generic;
|
||||
using Server.Spells.Seventh;
|
||||
|
|
@ -920,7 +921,10 @@ namespace Server.Spells
|
|||
((BaseCreature)target).AlterSpellDamageFrom( from, ref iDamage );
|
||||
|
||||
WeightOverloading.DFA = dfa;
|
||||
AOS.Damage( target, from, iDamage, phys, fire, cold, pois, nrgy );
|
||||
|
||||
int damageGiven = AOS.Damage( target, from, iDamage, phys, fire, cold, pois, nrgy );
|
||||
DoLeech( damageGiven, from, target );
|
||||
|
||||
WeightOverloading.DFA = DFAlgorithm.Standard;
|
||||
}
|
||||
else
|
||||
|
|
@ -932,6 +936,24 @@ namespace Server.Spells
|
|||
((BaseCreature)target).OnDamagedBySpell( from );
|
||||
}
|
||||
|
||||
public static void DoLeech( int damageGiven, Mobile from, Mobile target )
|
||||
{
|
||||
TransformContext context = TransformationSpellHelper.GetContext( from );
|
||||
if ( context != null && context.Type == typeof( WraithFormSpell ) )
|
||||
{
|
||||
int wraithLeech = ( 5 + (int)( ( 15 * from.Skills.SpiritSpeak.Value ) / 100 ) ); // Wraith form gives 5-20% mana leech
|
||||
int manaLeech = AOS.Scale( damageGiven, wraithLeech );
|
||||
if ( manaLeech != 0 )
|
||||
{
|
||||
// Mana leeched by the Wraith Form spell is actually stolen, not just leeched.
|
||||
target.Mana -= manaLeech;
|
||||
from.Mana += manaLeech;
|
||||
from.PlaySound( 0x44D );
|
||||
//from.SendMessage(String.Format("You Leeched {0} Mana", manaLeech));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Heal( int amount, Mobile target, Mobile from )
|
||||
{
|
||||
Heal( amount, target, from, true );
|
||||
|
|
@ -1012,7 +1034,10 @@ namespace Server.Spells
|
|||
((BaseCreature)m_Target).AlterSpellDamageFrom( m_From, ref m_Damage );
|
||||
|
||||
WeightOverloading.DFA = m_DFA;
|
||||
AOS.Damage( m_Target, m_From, m_Damage, m_Phys, m_Fire, m_Cold, m_Pois, m_Nrgy );
|
||||
|
||||
int damageGiven = AOS.Damage( m_Target, m_From, m_Damage, m_Phys, m_Fire, m_Cold, m_Pois, m_Nrgy );
|
||||
DoLeech( damageGiven, m_From, m_Target );
|
||||
|
||||
WeightOverloading.DFA = DFAlgorithm.Standard;
|
||||
|
||||
if( m_Target is BaseCreature && m_From != null )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue