public InternalTarget(MagicReflectSpell owner) : base(12, false, TargetFlags.Beneficial) { m_Owner = owner; }
public InternalSphereTarget(MagicReflectSpell owner) : base(Core.ML ? 10 : 12, false, TargetFlags.Beneficial) { m_Owner = owner; m_Owner.Caster.SendAsciiMessage("Selecione o alvo..."); }
public InternalTarget( MagicReflectSpell owner ) : base( 12, false, TargetFlags.Beneficial ) { m_Owner = owner; }
public bool ApplyMagicReflectEffect(PlayerMobile Wearer) { if (Wearer == null) return false; Spell spell = new MagicReflectSpell(Wearer,null); if ( Wearer.MagicDamageAbsorb > 0 ) { Wearer.SendMessage("The magic of this item is already protecting you."); return false; } else if (Wearer.Region.OnBeginSpellCast( Wearer, spell ) == false) { Wearer.SendMessage("The magic normally within this object seems absent."); return false; } else if ( !Wearer.CanBeginAction( typeof( DefensiveSpell ) ) ) { Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time. return false; } else { if ( Wearer.BeginAction( typeof( DefensiveSpell ) ) ) { int value = (int)((Utility.Random(51) + 50) + (Utility.Random(51) + 50)); // Random value of up to 100 for magery and up to 100 for scribing - lowest though is 50 magery/50 scribing equivalent strength value = (int)(8 + (value/200)*7.0);//absorb from 8 to 15 "circles" Wearer.MagicDamageAbsorb = value; Wearer.FixedParticles( 0x375A, 10, 15, 5037, EffectLayer.Waist ); Wearer.PlaySound( 0x1E9 ); Wearer.SendMessage("You feel the magic of the item envelope you."); return true; } else { Wearer.SendLocalizedMessage( 1005385 ); // The spell will not adhere to you at this time. return false; } } }