public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) { return; } ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1074383); // Your shot sends forth a wave of psychic energy. defender.SendLocalizedMessage(1074384); // Your mind is attacked by psychic force! defender.FixedParticles(0x3789, 10, 25, 5032, EffectLayer.Head); defender.PlaySound(0x1F8); if (m_Registry.ContainsKey(defender)) { if (!m_Registry[defender].DoneIncrease) { m_Registry[defender].SpellDamageMalus *= 2; m_Registry[defender].ManaCostMalus *= 2; } } else { m_Registry[defender] = new PsychicAttackTimer(defender); } BuffInfo.RemoveBuff(defender, BuffIcon.PsychicAttack); string args = String.Format("{0}\t{1}", m_Registry[defender].SpellDamageMalus, m_Registry[defender].ManaCostMalus); BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.PsychicAttack, 1151296, 1151297, args)); }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) return; ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1074383); // Your shot sends forth a wave of psychic energy. defender.SendLocalizedMessage(1074384); // Your mind is attacked by psychic force! defender.FixedParticles(0x3789, 10, 25, 5032, EffectLayer.Head); defender.PlaySound(0x1F8); if (m_Registry.ContainsKey(defender)) { if (!m_Registry[defender].DoneIncrease) { m_Registry[defender].SpellDamageMalus *= 2; m_Registry[defender].ManaCostMalus *= 2; } } else m_Registry[defender] = new PsychicAttackTimer(defender); BuffInfo.RemoveBuff(defender, BuffIcon.PsychicAttack); string args = String.Format("{0}\t{1}", m_Registry[defender].SpellDamageMalus, m_Registry[defender].ManaCostMalus); BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.PsychicAttack, 1151296, 1151297, args)); }