private static void EventSink_BeforeDamage(BeforeDamageEventArgs e) { Perseverance spellsong = Spellsong.GetEffectSpellsong <Perseverance>(e.Mobile); if (spellsong != null) { e.Amount = (int)(e.Amount * (100 - spellsong.DamageTaken) / 100); } }
public override int GetMana() { Spellsong song = GetActiveSpellsong(Caster, this.GetType()); if (song != null) { return(0); } return(RequiredMana - ComputeManaBonus()); }
private static void Mobile_Damaged(Mobile m, DamagedEventArgs args) { bool isFromPlayer = args.From != null && args.From.IsPlayer; foreach (Spellsong spellsong in Spellsong.GetAllActiveSpellsongs(m).ToArray()) { if (isFromPlayer || args.Amount > Utility.Random(50)) { // Your spell song has been interrupted. spellsong.InterruptSong(1115710); } } }
private static void Mobile_Damaged(Mobile sender, DamagedEventArgs e) { if (!sender.Alive) { return; } var spellsong = Spellsong.GetEffectSpellsong <Tribulation>(sender); if (spellsong != null) { spellsong.OnDamage(sender, e.Amount); } }
private static void EventSink_BeforeDamage(BeforeDamageEventArgs e) { if (e.From == null) { return; } Inspire spellsong = Spellsong.GetEffectSpellsong <Inspire>(e.From); if (spellsong != null) { e.Amount = (int)(e.Amount * (100 + spellsong.DamageModifier) / 100); } }
public override void OnCast() { Spellsong song = GetActiveSpellsong(Caster, this.GetType()); if (song != null) { // You halt your spellsong. song.InterruptSong(1115774); } else { Caster.Target = new InternalTarget(this); } }
protected void RemoveTarget(Mobile m) { Type type = this.GetType(); Spellsong song = GetEffectSpellsong(m, type); if (song != null && song.Caster == Caster) { m_EffectTable[m].Remove(type); if (m_EffectTable[m].IsEmpty()) { m_EffectTable.Remove(m); } OnTargetRemoved(m); } }
public override void OnCast() { Spellsong song = GetActiveSpellsong(Caster, this.GetType()); if (song != null) { // You halt your spellsong. song.InterruptSong(1115774); } else if (CheckSequence()) { m_Targets = new HashSet <Mobile>(); StartSong(); } FinishSequence(); }
public UpkeepTimer(Spellsong owner) : base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.0)) { m_Owner = owner; }