public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) { return; } if (Registry.ContainsKey(attacker)) { if (m_Registry[attacker] != null) { m_Registry[attacker].Stop(); } Registry.Remove(attacker); } ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1063360); // You baffle your target with a feint! defender.SendLocalizedMessage(1063361); // You were deceived by an attacker's feint! attacker.FixedParticles(0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist); int bonus = (int)(20.0 + 3.0 * (Math.Max(attacker.Skills[SkillName.Ninjitsu].Value, attacker.Skills[SkillName.Bushido].Value) - 50.0) / 7.0); FeintTimer t = new FeintTimer(attacker, defender, bonus); //20-50 % decrease t.Start(); m_Registry[attacker] = t; string args = String.Format("{0}\t{1}", defender.Name, bonus); BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.Feint, 1151308, 1151307, TimeSpan.FromSeconds(6), attacker, args)); }
public override void OnHit(Mobile attacker, Mobile defender, int damage) { if (!Validate(attacker) || !CheckMana(attacker, true)) { return; } if (Registry.Contains(defender)) { FeintTimer existingtimer = (FeintTimer)Registry[defender]; existingtimer.Stop(); Registry.Remove(defender); } ClearCurrentAbility(attacker); attacker.SendLocalizedMessage(1063360); // You baffle your target with a feint! defender.SendLocalizedMessage(1063361); // You were deceived by an attacker's feint! attacker.FixedParticles(0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist); Timer t = new FeintTimer(defender, (int)(20.0 + 3.0 * (Math.Max(attacker.Skills[SkillName.Ninjitsu].Value, attacker.Skills[SkillName.Bushido].Value) - 50.0) / 7.0)); //20-50 % decrease t.Start(); Registry.Add(defender, t); }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if( !Validate( attacker ) || !CheckMana( attacker, true ) ) return; if( Registry.ContainsKey( attacker ) ) { if (m_Registry[attacker] != null) m_Registry[attacker].Stop(); Registry.Remove(attacker); } ClearCurrentAbility( attacker ); attacker.SendLocalizedMessage( 1063360 ); // You baffle your target with a feint! defender.SendLocalizedMessage( 1063361 ); // You were deceived by an attacker's feint! attacker.FixedParticles( 0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist ); int bonus = (int)(20.0 + 3.0 * (Math.Max(attacker.Skills[SkillName.Ninjitsu].Value, attacker.Skills[SkillName.Bushido].Value) - 50.0) / 7.0); FeintTimer t = new FeintTimer( attacker, defender, bonus ); //20-50 % decrease t.Start(); m_Registry[attacker] = t; string args = String.Format("{0}\t{1}", defender.Name, bonus); BuffInfo.AddBuff(attacker, new BuffInfo(BuffIcon.Feint, 1151308, 1151307, TimeSpan.FromSeconds(6), attacker, args)); }
public override void OnHit( Mobile attacker, Mobile defender, int damage ) { if( !Validate( attacker ) || !CheckMana( attacker, true ) ) return; if( Registry.Contains( defender ) ) { FeintTimer existingtimer = (FeintTimer)Registry[defender]; existingtimer.Stop(); Registry.Remove( defender ); } ClearCurrentAbility( attacker ); attacker.SendLocalizedMessage( 1063360 ); // You baffle your target with a feint! defender.SendLocalizedMessage( 1063361 ); // You were deceived by an attacker's feint! attacker.FixedParticles( 0x3728, 1, 13, 0x7F3, 0x962, 0, EffectLayer.Waist ); Timer t = new FeintTimer( defender, (int)(20.0 + 3.0 * (Math.Max( attacker.Skills[SkillName.Ninjitsu].Value, attacker.Skills[SkillName.Bushido].Value ) - 50.0) / 7.0) ); //20-50 % decrease t.Start(); Registry.Add( defender, t ); }