public void Target(Mobile m) { if (!Caster.CanSee(m)) { Caster.SendLocalizedMessage(500237); // Target can not be seen. } if (m_Table.ContainsKey(m)) { Caster.SendLocalizedMessage(501775); // This spell is already in effect. } else if (!Caster.CanBeginAction(typeof(GiftOfRenewalSpell))) { Caster.SendLocalizedMessage(501789); // You must wait before trying again. } else if (CheckBSequence(m)) { SpellHelper.Turn(Caster, m); Caster.FixedEffect(0x374A, 10, 20); Caster.PlaySound(0x5C9); if (m.Poisoned) { m.CurePoison(m); } else { double skill = Caster.Skills[SkillName.Spellweaving].Value; int hitsPerRound = 5 + (int)(skill / 24) + FocusLevel; TimeSpan duration = TimeSpan.FromSeconds(30 + (FocusLevel * 10)); #region Mondain's Legacy ArcaneEmpowermentSpell.AddHealBonus(Caster, ref hitsPerRound); #endregion GiftOfRenewalInfo info = new GiftOfRenewalInfo(Caster, m, hitsPerRound); Timer.DelayCall(duration, delegate { if (StopEffect(m)) { m.PlaySound(0x455); m.SendLocalizedMessage(1075071); // The Gift of Renewal has faded. } }); m_Table[m] = info; Caster.BeginAction(typeof(GiftOfRenewalSpell)); BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.GiftOfRenewal, 1031602, 1075797, duration, m, hitsPerRound.ToString())); } } FinishSequence(); }
public static void Heal(Mobile m) { Mobile caster = m_Table3[m] as Mobile; int toHeal = 8 + GetFocusLevel(caster); ArcaneEmpowermentSpell.ApplyHealBonus(caster, ref toHeal); m.Heal(toHeal, caster); m.FixedParticles(0x376A, 9, 32, 5005, EffectLayer.Waist); }
public override Spell ChooseSpell( Mobile c ) { Spell spell = CheckCastHealingSpell(); if ( spell != null ) return spell; switch ( Utility.Random( 16 ) ) { case 0: case 1: case 2: // Poison them { m_Mobile.DebugSay( "Attempting to poison" ); if ( !c.Poisoned ) spell = new PoisonSpell( m_Mobile, null ); break; } case 3: // Bless ourselves. { m_Mobile.DebugSay( "Blessing myself" ); if ( Utility.RandomBool() && !ArcaneEmpowermentSpell.IsBuffed( m_Mobile ) ) spell = new ArcaneEmpowermentSpell( m_Mobile, null ); else spell = new BlessSpell( m_Mobile, null ); break; } case 4: // Wildfire { m_Mobile.DebugSay( "Incendio!" ); spell = new WildfireSpell( m_Mobile, null ); break; } case 5: // Reduce their cast speed { if ( c.InRange( m_Mobile.Location, 6 ) ) { if ( m_Mobile.Skills[SkillName.Spellweaving].Value >= 90.0 ) spell = new EssenceOfWindSpell( m_Mobile, null ); else if ( c.InRange( m_Mobile.Location, 2 ) ) spell = new ThunderstormSpell( m_Mobile, null ); } m_Mobile.DebugSay( "Attempting to reduce their cast speed" ); break; } case 6: // Curse them. { m_Mobile.DebugSay( "Attempting to curse" ); spell = GetRandomCurseSpell( c ); break; } case 7: // Paralyze them. { m_Mobile.DebugSay( "Attempting to paralyze" ); if ( m_Mobile.Skills[SkillName.Magery].Value > 50.0 ) spell = new ParalyzeSpell( m_Mobile, null ); break; } case 8: // Drain mana { m_Mobile.DebugSay( "Attempting to drain mana" ); spell = GetRandomManaDrainSpell( c ); break; } default: // Damage them. { m_Mobile.DebugSay( "Just doing damage" ); spell = GetRandomDamageSpell( c ); break; } } return spell; }