Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -1,31 +1,28 @@
namespace Server.Items
{
/// <summary>
/// This special move allows the skilled warrior to bypass his target's physical resistance, for one shot only.
/// The Armor Ignore shot does slightly less damage than normal.
/// Against a heavily armored opponent, this ability is a big win, but when used against a very lightly armored foe, it might be better to use a standard strike!
/// </summary>
public class ArmorIgnore : WeaponAbility
{
public ArmorIgnore()
{
}
/// <summary>
/// This special move allows the skilled warrior to bypass his target's physical resistance, for one shot only.
/// The Armor Ignore shot does slightly less damage than normal.
/// Against a heavily armored opponent, this ability is a big win, but when used against a very lightly armored foe, it might
/// be better to use a standard strike!
/// </summary>
public class ArmorIgnore : WeaponAbility
{
public override int BaseMana => 30;
public override double DamageScalar => 0.9;
public override int BaseMana => 30;
public override double DamageScalar => 0.9;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1060076); // Your attack penetrates their armor!
defender.SendLocalizedMessage(1060077); // The blow penetrated your armor!
attacker.SendLocalizedMessage( 1060076 ); // Your attack penetrates their armor!
defender.SendLocalizedMessage( 1060077 ); // The blow penetrated your armor!
defender.PlaySound( 0x56 );
defender.FixedParticles( 0x3728, 200, 25, 9942, EffectLayer.Waist );
}
}
}
defender.PlaySound(0x56);
defender.FixedParticles(0x3728, 200, 25, 9942, EffectLayer.Waist);
}
}
}

View file

@ -1,41 +1,39 @@
namespace Server.Items
{
/// <summary>
/// Strike your opponent with great force, partially bypassing their armor and inflicting greater damage. Requires either Bushido or Ninjitsu skill
/// </summary>
public class ArmorPierce : WeaponAbility
{
public ArmorPierce()
{
}
/// <summary>
/// Strike your opponent with great force, partially bypassing their armor and inflicting greater damage. Requires either
/// Bushido or Ninjitsu skill
/// </summary>
public class ArmorPierce : WeaponAbility
{
public override int BaseMana => 30;
public override double DamageScalar => 1.5;
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override bool RequiresSE => true;
return base.CheckSkills( from );
}
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override int BaseMana => 30;
public override double DamageScalar => 1.5;
return base.CheckSkills(from);
}
public override bool RequiresSE => true;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1063350); // You pierce your opponent's armor!
defender.SendLocalizedMessage(1063351); // Your attacker pierced your armor!
attacker.SendLocalizedMessage( 1063350 ); // You pierce your opponent's armor!
defender.SendLocalizedMessage( 1063351 ); // Your attacker pierced your armor!
defender.FixedParticles( 0x3728, 1, 26, 0x26D6, 0, 0, EffectLayer.Waist );
}
}
}
defender.FixedParticles(0x3728, 1, 26, 0x26D6, 0, 0, EffectLayer.Waist);
}
}
}

View file

@ -1,134 +1,131 @@
using System;
using System.Collections;
using Server.Mobiles;
using Server.Spells.Necromancy;
using Server.Network;
using Server.Spells;
using Server.Spells.Necromancy;
namespace Server.Items
{
/// <summary>
/// Make your opponent bleed profusely with this wicked use of your weapon.
/// When successful, the target will bleed for several seconds, taking damage as time passes for up to ten seconds.
/// The rate of damage slows down as time passes, and the blood loss can be completely staunched with the use of bandages.
/// </summary>
public class BleedAttack : WeaponAbility
{
public BleedAttack()
{
}
/// <summary>
/// Make your opponent bleed profusely with this wicked use of your weapon.
/// When successful, the target will bleed for several seconds, taking damage as time passes for up to ten seconds.
/// The rate of damage slows down as time passes, and the blood loss can be completely staunched with the use of bandages.
/// </summary>
public class BleedAttack : WeaponAbility
{
private static Hashtable m_Table = new Hashtable();
public override int BaseMana => 30;
public override int BaseMana => 30;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
// Necromancers under Lich or Wraith Form are immune to Bleed Attacks.
TransformContext context = TransformationSpellHelper.GetContext( defender );
// Necromancers under Lich or Wraith Form are immune to Bleed Attacks.
TransformContext context = TransformationSpellHelper.GetContext(defender);
if ( (context != null && ( context.Type == typeof( LichFormSpell ) || context.Type == typeof( WraithFormSpell ))) ||
(defender is BaseCreature creature && creature.BleedImmune) )
{
attacker.SendLocalizedMessage( 1062052 ); // Your target is not affected by the bleed attack!
return;
}
if (context != null && (context.Type == typeof(LichFormSpell) || context.Type == typeof(WraithFormSpell)) ||
defender is BaseCreature creature && creature.BleedImmune)
{
attacker.SendLocalizedMessage(1062052); // Your target is not affected by the bleed attack!
return;
}
attacker.SendLocalizedMessage( 1060159 ); // Your target is bleeding!
defender.SendLocalizedMessage( 1060160 ); // You are bleeding!
attacker.SendLocalizedMessage(1060159); // Your target is bleeding!
defender.SendLocalizedMessage(1060160); // You are bleeding!
if ( defender is PlayerMobile )
{
defender.LocalOverheadMessage( MessageType.Regular, 0x21, 1060757 ); // You are bleeding profusely
defender.NonlocalOverheadMessage( MessageType.Regular, 0x21, 1060758, defender.Name ); // ~1_NAME~ is bleeding profusely
}
if (defender is PlayerMobile)
{
defender.LocalOverheadMessage(MessageType.Regular, 0x21, 1060757); // You are bleeding profusely
defender.NonlocalOverheadMessage(MessageType.Regular, 0x21, 1060758,
defender.Name); // ~1_NAME~ is bleeding profusely
}
defender.PlaySound( 0x133 );
defender.FixedParticles( 0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist );
defender.PlaySound(0x133);
defender.FixedParticles(0x377A, 244, 25, 9950, 31, 0, EffectLayer.Waist);
BeginBleed( defender, attacker );
}
BeginBleed(defender, attacker);
}
private static Hashtable m_Table = new Hashtable();
public static bool IsBleeding(Mobile m)
{
return m_Table.Contains(m);
}
public static bool IsBleeding( Mobile m )
{
return m_Table.Contains( m );
}
public static void BeginBleed(Mobile m, Mobile from)
{
Timer t = (Timer)m_Table[m];
public static void BeginBleed( Mobile m, Mobile from )
{
Timer t = (Timer)m_Table[m];
t?.Stop();
t?.Stop();
t = new InternalTimer(from, m);
m_Table[m] = t;
t = new InternalTimer( from, m );
m_Table[m] = t;
t.Start();
}
t.Start();
}
public static void DoBleed(Mobile m, Mobile from, int level)
{
if (m.Alive)
{
int damage = Utility.RandomMinMax(level, level * 2);
public static void DoBleed( Mobile m, Mobile from, int level )
{
if ( m.Alive )
{
int damage = Utility.RandomMinMax( level, level * 2 );
if (!m.Player)
damage *= 2;
if ( !m.Player )
damage *= 2;
m.PlaySound(0x133);
m.Damage(damage, from);
m.PlaySound( 0x133 );
m.Damage( damage, from );
Blood blood = new Blood();
Blood blood = new Blood();
blood.ItemID = Utility.Random(0x122A, 5);
blood.ItemID = Utility.Random( 0x122A, 5 );
blood.MoveToWorld(m.Location, m.Map);
}
else
{
EndBleed(m, false);
}
}
blood.MoveToWorld( m.Location, m.Map );
}
else
{
EndBleed( m, false );
}
}
public static void EndBleed(Mobile m, bool message)
{
Timer t = (Timer)m_Table[m];
public static void EndBleed( Mobile m, bool message )
{
Timer t = (Timer)m_Table[m];
if (t == null)
return;
if ( t == null )
return;
t.Stop();
m_Table.Remove(m);
t.Stop();
m_Table.Remove( m );
if (message)
m.SendLocalizedMessage(1060167); // The bleeding wounds have healed, you are no longer bleeding!
}
if ( message )
m.SendLocalizedMessage( 1060167 ); // The bleeding wounds have healed, you are no longer bleeding!
}
private class InternalTimer : Timer
{
private int m_Count;
private Mobile m_From;
private Mobile m_Mobile;
private class InternalTimer : Timer
{
private Mobile m_From;
private Mobile m_Mobile;
private int m_Count;
public InternalTimer(Mobile from, Mobile m) : base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.0))
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
public InternalTimer( Mobile from, Mobile m ) : base( TimeSpan.FromSeconds( 2.0 ), TimeSpan.FromSeconds( 2.0 ) )
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
{
DoBleed(m_Mobile, m_From, 5 - m_Count);
protected override void OnTick()
{
DoBleed( m_Mobile, m_From, 5 - m_Count );
if ( ++m_Count == 5 )
EndBleed( m_Mobile, true );
}
}
}
}
if (++m_Count == 5)
EndBleed(m_Mobile, true);
}
}
}
}

View file

@ -3,103 +3,101 @@ using System.Collections;
namespace Server.Items
{
/// <summary>
/// Raises your defenses for a short time. Requires Bushido or Ninjitsu skill.
/// </summary>
public class Block : WeaponAbility
{
public Block()
{
}
/// <summary>
/// Raises your defenses for a short time. Requires Bushido or Ninjitsu skill.
/// </summary>
public class Block : WeaponAbility
{
private static Hashtable m_Table = new Hashtable();
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
return base.CheckSkills( from );
}
return base.CheckSkills(from);
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1063345 ); // You block an attack!
defender.SendLocalizedMessage( 1063346 ); // Your attack was blocked!
attacker.SendLocalizedMessage(1063345); // You block an attack!
defender.SendLocalizedMessage(1063346); // Your attack was blocked!
attacker.FixedParticles( 0x37C4, 1, 16, 0x251D, 0x39D, 0x3, EffectLayer.RightHand );
attacker.FixedParticles(0x37C4, 1, 16, 0x251D, 0x39D, 0x3, EffectLayer.RightHand);
int bonus = (int)(10.0 * ((Math.Max( attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value ) - 50.0) / 70.0 + 5));
int bonus = (int)(10.0 * ((Math.Max(attacker.Skills[SkillName.Bushido].Value,
attacker.Skills[SkillName.Ninjitsu].Value) - 50.0) / 70.0 + 5));
BeginBlock( attacker, bonus );
}
BeginBlock(attacker, bonus);
}
private class BlockInfo
{
public Mobile m_Target;
public Timer m_Timer;
public int m_Bonus;
public static bool GetBonus(Mobile targ, ref int bonus)
{
if (!(m_Table[targ] is BlockInfo info))
return false;
public BlockInfo( Mobile target, int bonus )
{
m_Target = target;
m_Bonus = bonus;
}
}
bonus = info.m_Bonus;
return true;
}
private static Hashtable m_Table = new Hashtable();
public static void BeginBlock(Mobile m, int bonus)
{
EndBlock(m);
public static bool GetBonus( Mobile targ, ref int bonus )
{
if ( !(m_Table[targ] is BlockInfo info) )
return false;
BlockInfo info = new BlockInfo(m, bonus);
info.m_Timer = new InternalTimer(m);
bonus = info.m_Bonus;
return true;
}
m_Table[m] = info;
}
public static void BeginBlock( Mobile m, int bonus )
{
EndBlock( m );
public static void EndBlock(Mobile m)
{
if (m_Table[m] is BlockInfo info)
{
info.m_Timer?.Stop();
BlockInfo info = new BlockInfo( m, bonus );
info.m_Timer = new InternalTimer( m );
m_Table.Remove(m);
}
}
m_Table[m] = info;
}
private class BlockInfo
{
public int m_Bonus;
public Mobile m_Target;
public Timer m_Timer;
public static void EndBlock( Mobile m )
{
if ( m_Table[m] is BlockInfo info )
{
info.m_Timer?.Stop();
public BlockInfo(Mobile target, int bonus)
{
m_Target = target;
m_Bonus = bonus;
}
}
m_Table.Remove( m );
}
}
private class InternalTimer : Timer
{
private Mobile m_Mobile;
private class InternalTimer : Timer
{
private Mobile m_Mobile;
public InternalTimer(Mobile m) : base(TimeSpan.FromSeconds(6.0))
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
public InternalTimer( Mobile m ) : base( TimeSpan.FromSeconds( 6.0 ) )
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
{
EndBlock( m_Mobile );
}
}
}
}
protected override void OnTick()
{
EndBlock(m_Mobile);
}
}
}
}

View file

@ -2,51 +2,51 @@ using System;
namespace Server.Items
{
/// <summary>
/// This devastating strike is most effective against those who are in good health and whose reserves of mana are low, or vice versa.
/// </summary>
public class ConcussionBlow : WeaponAbility
{
public ConcussionBlow()
{
}
/// <summary>
/// This devastating strike is most effective against those who are in good health and whose reserves of mana are low, or vice
/// versa.
/// </summary>
public class ConcussionBlow : WeaponAbility
{
public override int BaseMana => 25;
public override int BaseMana => 25;
public override bool OnBeforeDamage(Mobile attacker, Mobile defender)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return false;
public override bool OnBeforeDamage( Mobile attacker, Mobile defender )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return false;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1060165); // You have delivered a concussion!
defender.SendLocalizedMessage(1060166); // You feel disoriented!
attacker.SendLocalizedMessage( 1060165 ); // You have delivered a concussion!
defender.SendLocalizedMessage( 1060166 ); // You feel disoriented!
defender.PlaySound(0x213);
defender.FixedParticles(0x377A, 1, 32, 9949, 1153, 0, EffectLayer.Head);
defender.PlaySound( 0x213 );
defender.FixedParticles( 0x377A, 1, 32, 9949, 1153, 0, EffectLayer.Head );
Effects.SendMovingParticles(
new Entity(Serial.Zero, new Point3D(defender.X, defender.Y, defender.Z + 10), defender.Map),
new Entity(Serial.Zero, new Point3D(defender.X, defender.Y, defender.Z + 20), defender.Map), 0x36FE, 1, 0,
false, false, 1133, 3, 9501, 1, 0, EffectLayer.Waist, 0x100);
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( defender.X, defender.Y, defender.Z + 10 ), defender.Map ), new Entity( Serial.Zero, new Point3D( defender.X, defender.Y, defender.Z + 20 ), defender.Map ), 0x36FE, 1, 0, false, false, 1133, 3, 9501, 1, 0, EffectLayer.Waist, 0x100 );
int damage = 10; // Base damage is 10.
int damage = 10; // Base damage is 10.
if (defender.HitsMax > 0)
{
double hitsPercent = defender.Hits / (double)defender.HitsMax * 100.0;
if ( defender.HitsMax > 0 )
{
double hitsPercent = ( (double)defender.Hits / (double)defender.HitsMax ) * 100.0;
double manaPercent = 0;
double manaPercent = 0;
if (defender.ManaMax > 0)
manaPercent = defender.Mana / (double)defender.ManaMax * 100.0;
if ( defender.ManaMax > 0 )
manaPercent = ( (double)defender.Mana / (double)defender.ManaMax ) * 100.0;
damage += Math.Min((int)(Math.Abs(hitsPercent - manaPercent) / 4), 20);
}
damage += Math.Min( (int)(Math.Abs( hitsPercent - manaPercent ) / 4), 20 );
}
// Total damage is 10 + (0~20) = 10~30, physical, non-resistable.
// Total damage is 10 + (0~20) = 10~30, physical, non-resistable.
defender.Damage(damage, attacker);
defender.Damage( damage, attacker );
return true;
}
}
}
return true;
}
}
}

View file

@ -1,32 +1,31 @@
namespace Server.Items
{
/// <summary>
/// Also known as the Haymaker, this attack dramatically increases the damage done by a weapon reaching its mark.
/// </summary>
public class CrushingBlow : WeaponAbility
{
public CrushingBlow()
{
}
public override int BaseMana => 25;
public override double DamageScalar => 1.5;
/// <summary>
/// Also known as the Haymaker, this attack dramatically increases the damage done by a weapon reaching its mark.
/// </summary>
public class CrushingBlow : WeaponAbility
{
public override int BaseMana => 25;
public override double DamageScalar => 1.5;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1060090 ); // You have delivered a crushing blow!
defender.SendLocalizedMessage( 1060091 ); // You take extra damage from the crushing attack!
attacker.SendLocalizedMessage(1060090); // You have delivered a crushing blow!
defender.SendLocalizedMessage(1060091); // You take extra damage from the crushing attack!
defender.PlaySound( 0x1E1 );
defender.FixedParticles( 0, 1, 0, 9946, EffectLayer.Head );
defender.PlaySound(0x1E1);
defender.FixedParticles(0, 1, 0, 9946, EffectLayer.Head);
Effects.SendMovingParticles( new Entity( Serial.Zero, new Point3D( defender.X, defender.Y, defender.Z + 50 ), defender.Map ), new Entity( Serial.Zero, new Point3D( defender.X, defender.Y, defender.Z + 20 ), defender.Map ), 0xFB4, 1, 0, false, false, 0, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );
}
}
}
Effects.SendMovingParticles(
new Entity(Serial.Zero, new Point3D(defender.X, defender.Y, defender.Z + 50), defender.Map),
new Entity(Serial.Zero, new Point3D(defender.X, defender.Y, defender.Z + 20), defender.Map), 0xFB4, 1, 0,
false, false, 0, 3, 9501, 1, 0, EffectLayer.Head, 0x100);
}
}
}

View file

@ -3,95 +3,96 @@ using System.Collections;
namespace Server.Items
{
/// <summary>
/// Raises your physical resistance for a short time while lowering your ability to inflict damage. Requires Bushido or Ninjitsu skill.
/// </summary>
public class DefenseMastery : WeaponAbility
{
public DefenseMastery()
{
}
/// <summary>
/// Raises your physical resistance for a short time while lowering your ability to inflict damage. Requires Bushido or
/// Ninjitsu skill.
/// </summary>
public class DefenseMastery : WeaponAbility
{
private static Hashtable m_Table = new Hashtable();
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override int BaseMana => 30;
return base.CheckSkills( from );
}
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override int BaseMana => 30;
return base.CheckSkills(from);
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1063353 ); // You perform a masterful defense!
attacker.SendLocalizedMessage(1063353); // You perform a masterful defense!
attacker.FixedParticles( 0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist );
attacker.FixedParticles(0x375A, 1, 17, 0x7F2, 0x3E8, 0x3, EffectLayer.Waist);
int modifier = (int)(30.0 * ((Math.Max( attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value ) - 50.0) / 70.0));
int modifier =
(int)(30.0 *
((Math.Max(attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value) -
50.0) / 70.0));
if ( m_Table[attacker] is DefenseMasteryInfo info )
EndDefense( (object)info );
if (m_Table[attacker] is DefenseMasteryInfo info)
EndDefense(info);
ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, 50 + modifier );
attacker.AddResistanceMod( mod );
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, 50 + modifier);
attacker.AddResistanceMod(mod);
info = new DefenseMasteryInfo( attacker, 80 - modifier, mod );
info.m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 3.0 ), new TimerStateCallback( EndDefense ), info );
info = new DefenseMasteryInfo(attacker, 80 - modifier, mod);
info.m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(3.0), new TimerStateCallback(EndDefense), info);
m_Table[attacker] = info;
m_Table[attacker] = info;
attacker.Delta( MobileDelta.WeaponDamage );
}
attacker.Delta(MobileDelta.WeaponDamage);
}
private class DefenseMasteryInfo
{
public Mobile m_From;
public Timer m_Timer;
public int m_DamageMalus;
public ResistanceMod m_Mod;
public static bool GetMalus(Mobile targ, ref int damageMalus)
{
if (!(m_Table[targ] is DefenseMasteryInfo info))
return false;
public DefenseMasteryInfo( Mobile from, int damageMalus, ResistanceMod mod )
{
m_From = from;
m_DamageMalus = damageMalus;
m_Mod = mod;
}
}
damageMalus = info.m_DamageMalus;
return true;
}
private static Hashtable m_Table = new Hashtable();
private static void EndDefense(object state)
{
DefenseMasteryInfo info = (DefenseMasteryInfo)state;
public static bool GetMalus( Mobile targ, ref int damageMalus )
{
if ( !(m_Table[targ] is DefenseMasteryInfo info) )
return false;
if (info.m_Mod != null)
info.m_From.RemoveResistanceMod(info.m_Mod);
damageMalus = info.m_DamageMalus;
return true;
}
info.m_Timer?.Stop();
private static void EndDefense( object state )
{
DefenseMasteryInfo info = (DefenseMasteryInfo)state;
// No message is sent to the player.
if ( info.m_Mod != null )
info.m_From.RemoveResistanceMod( info.m_Mod );
m_Table.Remove(info.m_From);
info.m_Timer?.Stop();
info.m_From.Delta(MobileDelta.WeaponDamage);
}
// No message is sent to the player.
private class DefenseMasteryInfo
{
public int m_DamageMalus;
public Mobile m_From;
public ResistanceMod m_Mod;
public Timer m_Timer;
m_Table.Remove( info.m_From );
info.m_From.Delta( MobileDelta.WeaponDamage );
}
}
}
public DefenseMasteryInfo(Mobile from, int damageMalus, ResistanceMod mod)
{
m_From = from;
m_DamageMalus = damageMalus;
m_Mod = mod;
}
}
}
}

View file

@ -2,81 +2,77 @@ using System;
namespace Server.Items
{
/// <summary>
/// This attack allows you to disarm your foe.
/// Now in Age of Shadows, a successful Disarm leaves the victim unable to re-arm another weapon for several seconds.
/// </summary>
public class Disarm : WeaponAbility
{
public Disarm()
{
}
/// <summary>
/// This attack allows you to disarm your foe.
/// Now in Age of Shadows, a successful Disarm leaves the victim unable to re-arm another weapon for several seconds.
/// </summary>
public class Disarm : WeaponAbility
{
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds(5.0);
public override int BaseMana => 20;
public override int BaseMana => 20;
// No longer active in pub21:
/*public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )
return false;
// No longer active in pub21:
/*public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )
return false;
if ( !(from.Weapon is Fists) )
return true;
if ( !(from.Weapon is Fists) )
return true;
Skill skill = from.Skills[SkillName.ArmsLore];
Skill skill = from.Skills[SkillName.ArmsLore];
if ( skill != null && skill.Base >= 80.0 )
return true;
if ( skill != null && skill.Base >= 80.0 )
return true;
from.SendLocalizedMessage( 1061812 ); // You lack the required skill in armslore to perform that attack!
from.SendLocalizedMessage( 1061812 ); // You lack the required skill in armslore to perform that attack!
return false;
}*/
return false;
}*/
public override bool RequiresTactics( Mobile from )
{
if ( !(from.Weapon is BaseWeapon weapon) )
return false;
public override bool RequiresTactics(Mobile from)
{
if (!(from.Weapon is BaseWeapon weapon))
return false;
return weapon.Skill != SkillName.Wrestling;
}
return weapon.Skill != SkillName.Wrestling;
}
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds( 5.0 );
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
Item toDisarm = defender.FindItemOnLayer(Layer.OneHanded);
Item toDisarm = defender.FindItemOnLayer( Layer.OneHanded );
if (toDisarm == null || !toDisarm.Movable)
toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
if ( toDisarm == null || !toDisarm.Movable )
toDisarm = defender.FindItemOnLayer( Layer.TwoHanded );
Container pack = defender.Backpack;
Container pack = defender.Backpack;
if (pack == null || toDisarm != null && !toDisarm.Movable)
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
else if (toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook && !Core.ML)
{
attacker.SendLocalizedMessage(1060849); // Your target is already unarmed!
}
else if (CheckMana(attacker, true))
{
attacker.SendLocalizedMessage(1060092); // You disarm their weapon!
defender.SendLocalizedMessage(1060093); // Your weapon has been disarmed!
if ( pack == null || (toDisarm != null && !toDisarm.Movable) )
{
attacker.SendLocalizedMessage( 1004001 ); // You cannot disarm your opponent.
}
else if (toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook && !Core.ML )
{
attacker.SendLocalizedMessage( 1060849 ); // Your target is already unarmed!
}
else if ( CheckMana( attacker, true ) )
{
attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
defender.SendLocalizedMessage( 1060093 ); // Your weapon has been disarmed!
defender.PlaySound(0x3B9);
defender.FixedParticles(0x37BE, 232, 25, 9948, EffectLayer.LeftHand);
defender.PlaySound( 0x3B9 );
defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.LeftHand );
pack.DropItem(toDisarm);
pack.DropItem( toDisarm );
BaseWeapon.BlockEquip( defender, BlockEquipDuration );
}
}
}
}
BaseWeapon.BlockEquip(defender, BlockEquipDuration);
}
}
}
}

View file

@ -1,109 +1,94 @@
using System;
using Server.Mobiles;
using Server.Spells.Ninjitsu;
namespace Server.Items
{
/// <summary>
/// Perfect for the foot-soldier, the Dismount special attack can unseat a mounted opponent.
/// The fighter using this ability must be on his own two feet and not in the saddle of a steed
/// (with one exception: players may use a lance to dismount other players while mounted).
/// If it works, the target will be knocked off his own mount and will take some extra damage from the fall!
/// </summary>
public class Dismount : WeaponAbility
{
public Dismount()
{
}
/// <summary>
/// Perfect for the foot-soldier, the Dismount special attack can unseat a mounted opponent.
/// The fighter using this ability must be on his own two feet and not in the saddle of a steed
/// (with one exception: players may use a lance to dismount other players while mounted).
/// If it works, the target will be knocked off his own mount and will take some extra damage from the fall!
/// </summary>
public class Dismount : WeaponAbility
{
public static readonly TimeSpan RemountDelay = TimeSpan.FromSeconds(10.0);
public override int BaseMana => 20;
public override int BaseMana => 20;
public override bool Validate( Mobile from )
{
if ( !base.Validate( from ) )
return false;
public override bool Validate(Mobile from)
{
if (!base.Validate(from))
return false;
if ( from.Mounted && !(from.Weapon is Lance) )
{
from.SendLocalizedMessage( 1061283 ); // You cannot perform that attack while mounted!
return false;
}
if (from.Mounted && !(from.Weapon is Lance))
{
from.SendLocalizedMessage(1061283); // You cannot perform that attack while mounted!
return false;
}
return true;
}
return true;
}
public static readonly TimeSpan RemountDelay = TimeSpan.FromSeconds( 10.0 );
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
if (defender is ChaosDragoon || defender is ChaosDragoonElite)
return;
if ( defender is ChaosDragoon || defender is ChaosDragoonElite )
return;
if (attacker.Mounted && (!(attacker.Weapon is Lance) || !(defender.Weapon is Lance))
) // TODO: Should there be a message here?
return;
if ( attacker.Mounted && ( !(attacker.Weapon is Lance) || !(defender.Weapon is Lance) ) ) // TODO: Should there be a message here?
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
IMount mount = defender.Mount;
IMount mount = defender.Mount;
if (mount == null && !AnimalForm.UnderTransformation(defender))
{
attacker.SendLocalizedMessage(1060848); // This attack only works on mounted targets
return;
}
if (mount == null && !Spells.Ninjitsu.AnimalForm.UnderTransformation( defender ) )
{
attacker.SendLocalizedMessage( 1060848 ); // This attack only works on mounted targets
return;
}
if (!CheckMana(attacker, true))
return;
if ( !CheckMana( attacker, true ) )
return;
if (Core.ML && attacker is LesserHiryu && 0.8 >= Utility.RandomDouble())
return; //Lesser Hiryu have an 80% chance of missing this attack
if ( Core.ML && attacker is LesserHiryu && 0.8 >= Utility.RandomDouble() )
{
return; //Lesser Hiryu have an 80% chance of missing this attack
}
attacker.SendLocalizedMessage(1060082); // The force of your attack has dislodged them from their mount!
attacker.SendLocalizedMessage( 1060082 ); // The force of your attack has dislodged them from their mount!
if (attacker.Mounted)
defender.SendLocalizedMessage(1062315); // You fall off your mount!
else
defender.SendLocalizedMessage(1060083); // You fall off of your mount and take damage!
if ( attacker.Mounted )
defender.SendLocalizedMessage( 1062315 ); // You fall off your mount!
else
defender.SendLocalizedMessage( 1060083 ); // You fall off of your mount and take damage!
defender.PlaySound(0x140);
defender.FixedParticles(0x3728, 10, 15, 9955, EffectLayer.Waist);
defender.PlaySound( 0x140 );
defender.FixedParticles( 0x3728, 10, 15, 9955, EffectLayer.Waist );
if (defender is PlayerMobile mobile)
{
if (AnimalForm.UnderTransformation(mobile))
mobile.SendLocalizedMessage(1114066, attacker.Name); // ~1_NAME~ knocked you out of animal form!
else if (mobile.Mounted) mobile.SendLocalizedMessage(1040023); // You have been knocked off of your mount!
if (defender is PlayerMobile mobile)
{
if (Spells.Ninjitsu.AnimalForm.UnderTransformation(mobile))
{
mobile.SendLocalizedMessage(1114066, attacker.Name); // ~1_NAME~ knocked you out of animal form!
}
else if (mobile.Mounted)
{
mobile.SendLocalizedMessage(1040023); // You have been knocked off of your mount!
}
mobile.SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(10), true);
}
else
{
defender.Mount.Rider = null;
}
mobile.SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(10), true);
}
else
{
defender.Mount.Rider = null;
}
if (attacker is PlayerMobile playerMobile)
playerMobile.SetMountBlock(BlockMountType.DismountRecovery, RemountDelay, true);
else if (Core.ML && attacker is BaseCreature bc)
if (bc.ControlMaster is PlayerMobile pm)
pm.SetMountBlock(BlockMountType.DismountRecovery, RemountDelay, false);
if ( attacker is PlayerMobile playerMobile )
{
playerMobile.SetMountBlock(BlockMountType.DismountRecovery, RemountDelay, true );
}
else if ( Core.ML && attacker is BaseCreature bc )
{
if ( bc.ControlMaster is PlayerMobile pm )
{
pm.SetMountBlock(BlockMountType.DismountRecovery, RemountDelay, false );
}
}
if ( !attacker.Mounted )
AOS.Damage( defender, attacker, Utility.RandomMinMax( 15, 25 ), 100, 0, 0, 0, 0 );
}
}
}
if (!attacker.Mounted)
AOS.Damage(defender, attacker, Utility.RandomMinMax(15, 25), 100, 0, 0, 0, 0);
}
}
}

View file

@ -2,48 +2,44 @@ using System;
namespace Server.Items
{
/// <summary>
/// This attack allows you to disrobe your foe.
/// </summary>
public class Disrobe : WeaponAbility
{
public Disrobe()
{
}
/// <summary>
/// This attack allows you to disrobe your foe.
/// </summary>
public class Disrobe : WeaponAbility
{
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds(5.0);
public override int BaseMana => 20; // Not Sure what amount of mana a creature uses.
public override int BaseMana => 20; // Not Sure what amount of mana a creature uses.
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds( 5.0 );
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
ClearCurrentAbility(attacker);
Item toDisrobe = defender.FindItemOnLayer(Layer.InnerTorso);
ClearCurrentAbility( attacker );
Item toDisrobe = defender.FindItemOnLayer(Layer.InnerTorso);
if (toDisrobe == null || !toDisrobe.Movable)
toDisrobe = defender.FindItemOnLayer(Layer.OuterTorso);
if ( toDisrobe == null || !toDisrobe.Movable )
toDisrobe = defender.FindItemOnLayer( Layer.OuterTorso );
Container pack = defender.Backpack;
Container pack = defender.Backpack;
if (pack == null || toDisrobe == null || !toDisrobe.Movable)
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
else if (CheckMana(attacker, true))
{
//attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
defender.SendLocalizedMessage(1062002); // You can no longer wear your ~1_ARMOR~
if ( pack == null || toDisrobe == null || !toDisrobe.Movable )
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
else if ( CheckMana( attacker, true ) )
{
//attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
defender.SendLocalizedMessage(1062002); // You can no longer wear your ~1_ARMOR~
defender.PlaySound(0x3B9);
//defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );
defender.PlaySound( 0x3B9 );
//defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );
pack.DropItem(toDisrobe);
pack.DropItem( toDisrobe );
BaseWeapon.BlockEquip( defender, BlockEquipDuration );
}
}
}
}
BaseWeapon.BlockEquip(defender, BlockEquipDuration);
}
}
}
}

View file

@ -1,63 +1,60 @@
namespace Server.Items
{
/// <summary>
/// Send two arrows flying at your opponent if you're mounted. Requires Bushido or Ninjitsu skill.
/// </summary>
public class DoubleShot : WeaponAbility
{
public DoubleShot()
{
}
/// <summary>
/// Send two arrows flying at your opponent if you're mounted. Requires Bushido or Ninjitsu skill.
/// </summary>
public class DoubleShot : WeaponAbility
{
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
Use(attacker, defender);
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
Use( attacker, defender );
}
public override void OnMiss(Mobile attacker, Mobile defender)
{
Use(attacker, defender);
}
public override void OnMiss( Mobile attacker, Mobile defender )
{
Use( attacker, defender );
}
public override bool Validate(Mobile from)
{
if (base.Validate(from))
{
if (from.Mounted)
return true;
from.SendLocalizedMessage(1070770); // You can only execute this attack while mounted!
ClearCurrentAbility(from);
}
public override bool Validate( Mobile from )
{
if ( base.Validate( from ) )
{
if ( from.Mounted )
return true;
from.SendLocalizedMessage( 1070770 ); // You can only execute this attack while mounted!
ClearCurrentAbility( from );
}
return false;
}
return false;
}
public void Use(Mobile attacker, Mobile defender)
{
if (!Validate(attacker) || !CheckMana(attacker, true) || attacker.Weapon == null) //sanity
return;
public void Use( Mobile attacker, Mobile defender )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) || attacker.Weapon == null ) //sanity
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1063348); // You launch two shots at once!
defender.SendLocalizedMessage(1063349); // You're attacked with a barrage of shots!
attacker.SendLocalizedMessage( 1063348 ); // You launch two shots at once!
defender.SendLocalizedMessage( 1063349 ); // You're attacked with a barrage of shots!
defender.FixedParticles(0x37B9, 1, 19, 0x251D, EffectLayer.Waist);
defender.FixedParticles( 0x37B9, 1, 19, 0x251D, EffectLayer.Waist );
attacker.Weapon.OnSwing( attacker, defender );
}
}
}
attacker.Weapon.OnSwing(attacker, defender);
}
}
}

View file

@ -1,55 +1,52 @@
namespace Server.Items
{
/// <summary>
/// The highly skilled warrior can use this special attack to make two quick swings in succession.
/// Landing both blows would be devastating!
/// </summary>
public class DoubleStrike : WeaponAbility
{
public DoubleStrike()
{
}
/// <summary>
/// The highly skilled warrior can use this special attack to make two quick swings in succession.
/// Landing both blows would be devastating!
/// </summary>
public class DoubleStrike : WeaponAbility
{
public override int BaseMana => 30;
public override double DamageScalar => 0.9;
public override int BaseMana => 30;
public override double DamageScalar => 0.9;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1060084); // You attack with lightning speed!
defender.SendLocalizedMessage(1060085); // Your attacker strikes with lightning speed!
attacker.SendLocalizedMessage( 1060084 ); // You attack with lightning speed!
defender.SendLocalizedMessage( 1060085 ); // Your attacker strikes with lightning speed!
defender.PlaySound(0x3BB);
defender.FixedEffect(0x37B9, 244, 25);
defender.PlaySound( 0x3BB );
defender.FixedEffect( 0x37B9, 244, 25 );
// Swing again:
// Swing again:
// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
if (defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map ||
!defender.Alive || !attacker.Alive || !attacker.CanSee(defender))
{
attacker.Combatant = null;
return;
}
// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
if ( defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map || !defender.Alive || !attacker.Alive || !attacker.CanSee( defender ) )
{
attacker.Combatant = null;
return;
}
IWeapon weapon = attacker.Weapon;
IWeapon weapon = attacker.Weapon;
if (weapon == null)
return;
if ( weapon == null )
return;
if (!attacker.InRange(defender, weapon.MaxRange))
return;
if ( !attacker.InRange( defender, weapon.MaxRange ) )
return;
if ( attacker.InLOS( defender ) )
{
BaseWeapon.InDoubleStrike = true;
attacker.RevealingAction();
attacker.NextCombatTime = Core.TickCount + (int)weapon.OnSwing(attacker, defender).TotalMilliseconds;
BaseWeapon.InDoubleStrike = false;
}
}
}
}
if (attacker.InLOS(defender))
{
BaseWeapon.InDoubleStrike = true;
attacker.RevealingAction();
attacker.NextCombatTime = Core.TickCount + (int)weapon.OnSwing(attacker, defender).TotalMilliseconds;
BaseWeapon.InDoubleStrike = false;
}
}
}
}

View file

@ -1,75 +1,72 @@
using System;
using System.Collections;
namespace Server.Items
{
/// <summary>
/// Attack faster as you swing with both weapons.
/// </summary>
public class DualWield : WeaponAbility
{
public static Hashtable Registry { get; } = new Hashtable();
/// <summary>
/// Attack faster as you swing with both weapons.
/// </summary>
public class DualWield : WeaponAbility
{
public static Hashtable Registry{ get; } = new Hashtable();
public DualWield()
{
}
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0)
{
from.SendLocalizedMessage(1063352,
"50"); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 )
{
from.SendLocalizedMessage( 1063352, "50" ); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
if (Registry.Contains(attacker))
{
DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker];
existingtimer.Stop();
Registry.Remove(attacker);
}
if ( Registry.Contains( attacker ) )
{
DualWieldTimer existingtimer = (DualWieldTimer)Registry[attacker];
existingtimer.Stop();
Registry.Remove( attacker );
}
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1063362); // You dually wield for increased speed!
attacker.SendLocalizedMessage( 1063362 ); // You dually wield for increased speed!
attacker.FixedParticles(0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand);
attacker.FixedParticles( 0x3779, 1, 15, 0x7F6, 0x3E8, 3, EffectLayer.LeftHand );
Timer t = new DualWieldTimer(attacker,
(int)(20.0 + 3.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 7.0)); //20-50 % increase
Timer t = new DualWieldTimer( attacker, (int)(20.0 + 3.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 7.0) ); //20-50 % increase
t.Start();
Registry.Add(attacker, t);
}
t.Start();
Registry.Add( attacker, t );
}
public class DualWieldTimer : Timer
{
private Mobile m_Owner;
public class DualWieldTimer : Timer
{
private Mobile m_Owner;
public DualWieldTimer(Mobile owner, int bonusSwingSpeed)
: base(TimeSpan.FromSeconds(6.0))
{
m_Owner = owner;
BonusSwingSpeed = bonusSwingSpeed;
Priority = TimerPriority.FiftyMS;
}
public int BonusSwingSpeed { get; }
public int BonusSwingSpeed{ get; }
public DualWieldTimer( Mobile owner, int bonusSwingSpeed )
: base( TimeSpan.FromSeconds( 6.0 ) )
{
m_Owner = owner;
BonusSwingSpeed = bonusSwingSpeed;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()
{
Registry.Remove( m_Owner );
}
}
}
}
protected override void OnTick()
{
Registry.Remove(m_Owner);
}
}
}
}

View file

@ -1,76 +1,74 @@
using System;
using System.Collections;
namespace Server.Items
{
/// <summary>
/// Gain a defensive advantage over your primary opponent for a short time.
/// </summary>
public class Feint : WeaponAbility
{
public static Hashtable Registry { get; } = new Hashtable();
/// <summary>
/// Gain a defensive advantage over your primary opponent for a short time.
/// </summary>
public class Feint : WeaponAbility
{
public static Hashtable Registry{ get; } = new Hashtable();
public Feint()
{
}
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
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);
}
if ( Registry.Contains( defender ) )
{
FeintTimer existingtimer = (FeintTimer)Registry[defender];
existingtimer.Stop();
Registry.Remove( defender );
}
ClearCurrentAbility(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.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);
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
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);
}
t.Start();
Registry.Add( defender, t );
}
public class FeintTimer : Timer
{
private Mobile m_Defender;
public class FeintTimer : Timer
{
private Mobile m_Defender;
public FeintTimer(Mobile defender, int swingSpeedReduction)
: base(TimeSpan.FromSeconds(6.0))
{
m_Defender = defender;
SwingSpeedReduction = swingSpeedReduction;
Priority = TimerPriority.FiftyMS;
}
public int SwingSpeedReduction { get; }
public int SwingSpeedReduction{ get; }
public FeintTimer( Mobile defender, int swingSpeedReduction )
: base( TimeSpan.FromSeconds( 6.0 ) )
{
m_Defender = defender;
SwingSpeedReduction = swingSpeedReduction;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()
{
Registry.Remove( m_Defender );
}
}
}
}
protected override void OnTick()
{
Registry.Remove(m_Defender);
}
}
}
}

View file

@ -4,158 +4,157 @@ using Server.Spells;
namespace Server.Items
{
/// <summary>
/// A quick attack to all enemies in range of your weapon that causes damage over time. Requires Bushido or Ninjitsu skill.
/// </summary>
public class FrenziedWhirlwind : WeaponAbility
{
public FrenziedWhirlwind()
{
}
/// <summary>
/// A quick attack to all enemies in range of your weapon that causes damage over time. Requires Bushido or Ninjitsu skill.
/// </summary>
public class FrenziedWhirlwind : WeaponAbility
{
public override int BaseMana => 30;
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 && GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1063347, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public static Hashtable Registry{ get; } = new Hashtable();
return base.CheckSkills( from );
}
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1063347,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
return false;
}
public override int BaseMana => 30;
return base.CheckSkills(from);
}
public static Hashtable Registry { get; } = new Hashtable();
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker)) //Mana check after check that there are targets
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) ) //Mana check after check that there are targets
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
Map map = attacker.Map;
Map map = attacker.Map;
if (map == null)
return;
if ( map == null )
return;
if (!(attacker.Weapon is BaseWeapon weapon))
return;
if ( !(attacker.Weapon is BaseWeapon weapon) )
return;
ArrayList list = new ArrayList();
ArrayList list = new ArrayList();
foreach (Mobile m in attacker.GetMobilesInRange(1))
list.Add(m);
foreach( Mobile m in attacker.GetMobilesInRange( 1 ) )
list.Add( m );
ArrayList targets = new ArrayList();
ArrayList targets = new ArrayList();
for (int i = 0; i < list.Count; ++i)
{
Mobile m = (Mobile)list[i];
for( int i = 0; i < list.Count; ++i )
{
Mobile m = (Mobile)list[i];
if (m != defender && m != attacker && SpellHelper.ValidIndirectTarget(attacker, m))
{
if (m == null || m.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.CanSee(m) ||
!attacker.CanBeHarmful(m))
continue;
if ( m != defender && m != attacker && SpellHelper.ValidIndirectTarget( attacker, m ) )
{
if ( m == null || m.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.CanSee( m ) || !attacker.CanBeHarmful( m ) )
continue;
if (!attacker.InRange(m, weapon.MaxRange))
continue;
if ( !attacker.InRange( m, weapon.MaxRange ) )
continue;
if (attacker.InLOS(m))
targets.Add(m);
}
}
if ( attacker.InLOS( m ) )
targets.Add( m );
}
}
if (targets.Count > 0)
{
if (!CheckMana(attacker, true))
return;
if ( targets.Count > 0 )
{
if ( !CheckMana( attacker, true ) )
return;
attacker.FixedEffect(0x3728, 10, 15);
attacker.PlaySound(0x2A1);
attacker.FixedEffect( 0x3728, 10, 15 );
attacker.PlaySound( 0x2A1 );
// 5-15 damage
int amount = (int)(10.0 * ((Math.Max(attacker.Skills[SkillName.Bushido].Value,
attacker.Skills[SkillName.Ninjitsu].Value) - 50.0) / 70.0 + 5));
// 5-15 damage
int amount = (int)(10.0 * ((Math.Max( attacker.Skills[SkillName.Bushido].Value, attacker.Skills[SkillName.Ninjitsu].Value ) - 50.0) / 70.0 + 5));
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
attacker.DoHarmful(m, true);
for( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
attacker.DoHarmful( m, true );
if (Registry[m] is Timer t)
{
t.Stop();
Registry.Remove(m);
}
if ( Registry[m] is Timer t )
{
t.Stop();
Registry.Remove( m );
}
t = new InternalTimer(attacker, m, amount);
t.Start();
Registry.Add(m, t);
}
t = new InternalTimer( attacker, m, amount );
t.Start();
Registry.Add( m, t );
}
Timer.DelayCall(TimeSpan.FromSeconds(2.0), new TimerStateCallback(RepeatEffect), attacker);
}
}
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( RepeatEffect ), attacker );
}
}
private void RepeatEffect(object state)
{
Mobile attacker = (Mobile)state;
private void RepeatEffect( object state )
{
Mobile attacker = (Mobile)state;
attacker.FixedEffect(0x3728, 10, 15);
attacker.PlaySound(0x2A1);
}
attacker.FixedEffect( 0x3728, 10, 15 );
attacker.PlaySound( 0x2A1 );
}
private class InternalTimer : Timer
{
private readonly double DamagePerTick;
private Mobile m_Attacker;
private double m_DamageRemaining;
private double m_DamageToDo;
private Mobile m_Defender;
private class InternalTimer : Timer
{
private Mobile m_Attacker;
private Mobile m_Defender;
private double m_DamageRemaining;
private double m_DamageToDo;
public InternalTimer(Mobile attacker, Mobile defender, int totalDamage)
: base(TimeSpan.Zero, TimeSpan.FromSeconds(0.25),
12) // 3 seconds at .25 seconds apart = 12. Confirm delay inbetween of .25 each.
{
m_Attacker = attacker;
m_Defender = defender;
private readonly double DamagePerTick;
m_DamageRemaining = totalDamage;
DamagePerTick = (double)totalDamage / 12 + 0.01;
public InternalTimer( Mobile attacker, Mobile defender, int totalDamage )
: base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.25 ), 12 ) // 3 seconds at .25 seconds apart = 12. Confirm delay inbetween of .25 each.
{
m_Attacker = attacker;
m_Defender = defender;
Priority = TimerPriority.TwentyFiveMS;
}
m_DamageRemaining = (double)totalDamage;
DamagePerTick = (double)totalDamage / 12 + 0.01;
protected override void OnTick()
{
if (!m_Defender.Alive || m_DamageRemaining <= 0)
{
Stop();
Registry.Remove(m_Defender);
return;
}
Priority = TimerPriority.TwentyFiveMS;
}
m_DamageRemaining -= DamagePerTick;
m_DamageToDo += DamagePerTick;
protected override void OnTick()
{
if ( !m_Defender.Alive || m_DamageRemaining <= 0 )
{
Stop();
Registry.Remove( m_Defender );
return;
}
if (m_DamageRemaining <= 0 && m_DamageToDo < 1)
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
m_DamageRemaining -= DamagePerTick;
m_DamageToDo += DamagePerTick;
int damage = (int)m_DamageToDo;
if ( m_DamageRemaining <= 0 && m_DamageToDo < 1 )
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
if (damage > 0)
{
m_Defender.Damage(damage, m_Attacker);
m_DamageToDo -= damage;
}
int damage = (int)m_DamageToDo;
if ( damage > 0 )
{
m_Defender.Damage( damage, m_Attacker );
m_DamageToDo -= damage;
}
if ( !m_Defender.Alive || m_DamageRemaining <= 0 )
{
Stop();
Registry.Remove( m_Defender );
}
}
}
}
}
if (!m_Defender.Alive || m_DamageRemaining <= 0)
{
Stop();
Registry.Remove(m_Defender);
}
}
}
}
}

View file

@ -1,78 +1,78 @@
namespace Server.Items
{
/// <summary>
/// This special move represents a significant change to the use of poisons in Age of Shadows.
/// Now, only certain weapon types <20> those that have Infectious Strike as an available special move <20> will be able to be poisoned.
/// Targets will no longer be poisoned at random when hit by poisoned weapons.
/// Instead, the wielder must use this ability to deliver the venom.
/// While no skill in Poisoning is directly required to use this ability, being knowledgeable in the application and use of toxins
/// will allow a character to use Infectious Strike at reduced mana cost and with a chance to inflict more deadly poison on his victim.
/// With this change, weapons will no longer be corroded by poison.
/// Level 5 poison will be possible when using this special move.
/// </summary>
public class InfectiousStrike : WeaponAbility
{
public InfectiousStrike()
{
}
/// <summary>
/// This special move represents a significant change to the use of poisons in Age of Shadows.
/// Now, only certain weapon types <20> those that have Infectious Strike as an available special move <20> will be able to be
/// poisoned.
/// Targets will no longer be poisoned at random when hit by poisoned weapons.
/// Instead, the wielder must use this ability to deliver the venom.
/// While no skill in Poisoning is directly required to use this ability, being knowledgeable in the application and use of
/// toxins
/// will allow a character to use Infectious Strike at reduced mana cost and with a chance to inflict more deadly poison on
/// his victim.
/// With this change, weapons will no longer be corroded by poison.
/// Level 5 poison will be possible when using this special move.
/// </summary>
public class InfectiousStrike : WeaponAbility
{
public override int BaseMana => 15;
public override int BaseMana => 15;
public override bool RequiresTactics(Mobile from)
{
return false;
}
public override bool RequiresTactics( Mobile from )
{
return false;
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
if (!(attacker.Weapon is BaseWeapon weapon))
return;
if ( !(attacker.Weapon is BaseWeapon weapon) )
return;
Poison p = weapon.Poison;
Poison p = weapon.Poison;
if (p == null || weapon.PoisonCharges <= 0)
{
attacker.SendLocalizedMessage(
1061141); // Your weapon must have a dose of poison to perform an infectious strike!
return;
}
if ( p == null || weapon.PoisonCharges <= 0 )
{
attacker.SendLocalizedMessage( 1061141 ); // Your weapon must have a dose of poison to perform an infectious strike!
return;
}
if (!CheckMana(attacker, true))
return;
if ( !CheckMana( attacker, true ) )
return;
--weapon.PoisonCharges;
--weapon.PoisonCharges;
// Infectious strike special move now uses poisoning skill to help determine potency
int maxLevel = attacker.Skills[SkillName.Poisoning].Fixed / 200;
if (maxLevel < 0) maxLevel = 0;
if (p.Level > maxLevel) p = Poison.GetPoison(maxLevel);
// Infectious strike special move now uses poisoning skill to help determine potency
int maxLevel = attacker.Skills[SkillName.Poisoning].Fixed / 200;
if ( maxLevel < 0 ) maxLevel = 0;
if ( p.Level > maxLevel ) p = Poison.GetPoison( maxLevel );
if (attacker.Skills[SkillName.Poisoning].Value / 100.0 > Utility.RandomDouble())
{
int level = p.Level + 1;
Poison newPoison = Poison.GetPoison(level);
if ( (attacker.Skills[SkillName.Poisoning].Value / 100.0) > Utility.RandomDouble() )
{
int level = p.Level + 1;
Poison newPoison = Poison.GetPoison( level );
if (newPoison != null)
{
p = newPoison;
if ( newPoison != null )
{
p = newPoison;
attacker.SendLocalizedMessage(1060080); // Your precise strike has increased the level of the poison by 1
defender.SendLocalizedMessage(1060081); // The poison seems extra effective!
}
}
attacker.SendLocalizedMessage( 1060080 ); // Your precise strike has increased the level of the poison by 1
defender.SendLocalizedMessage( 1060081 ); // The poison seems extra effective!
}
}
defender.PlaySound(0xDD);
defender.FixedParticles(0x3728, 244, 25, 9941, 1266, 0, EffectLayer.Waist);
defender.PlaySound( 0xDD );
defender.FixedParticles( 0x3728, 244, 25, 9941, 1266, 0, EffectLayer.Waist );
if ( defender.ApplyPoison( attacker, p ) != ApplyPoisonResult.Immune )
{
attacker.SendLocalizedMessage( 1008096, true, defender.Name ); // You have poisoned your target :
defender.SendLocalizedMessage( 1008097, false, attacker.Name ); // : poisoned you!
}
}
}
}
if (defender.ApplyPoison(attacker, p) != ApplyPoisonResult.Immune)
{
attacker.SendLocalizedMessage(1008096, true, defender.Name); // You have poisoned your target :
defender.SendLocalizedMessage(1008097, false, attacker.Name); // : poisoned you!
}
}
}
}

View file

@ -3,92 +3,85 @@ using System.Collections;
namespace Server.Items
{
/// <summary>
/// The assassin's friend.
/// A successful Mortal Strike will render its victim unable to heal any damage for several seconds.
/// Use a gruesome follow-up to finish off your foe.
/// </summary>
public class MortalStrike : WeaponAbility
{
public MortalStrike()
{
}
/// <summary>
/// The assassin's friend.
/// A successful Mortal Strike will render its victim unable to heal any damage for several seconds.
/// Use a gruesome follow-up to finish off your foe.
/// </summary>
public class MortalStrike : WeaponAbility
{
public static readonly TimeSpan PlayerDuration = TimeSpan.FromSeconds(6.0);
public static readonly TimeSpan NPCDuration = TimeSpan.FromSeconds(12.0);
public override int BaseMana => 30;
private static Hashtable m_Table = new Hashtable();
public static readonly TimeSpan PlayerDuration = TimeSpan.FromSeconds( 6.0 );
public static readonly TimeSpan NPCDuration = TimeSpan.FromSeconds( 12.0 );
public override int BaseMana => 30;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
{
return;
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true)) return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1060086 ); // You deliver a mortal wound!
defender.SendLocalizedMessage( 1060087 ); // You have been mortally wounded!
attacker.SendLocalizedMessage(1060086); // You deliver a mortal wound!
defender.SendLocalizedMessage(1060087); // You have been mortally wounded!
defender.PlaySound( 0x1E1 );
defender.FixedParticles( 0x37B9, 244, 25, 9944, 31, 0, EffectLayer.Waist );
defender.PlaySound(0x1E1);
defender.FixedParticles(0x37B9, 244, 25, 9944, 31, 0, EffectLayer.Waist);
// Do not reset timer if one is already in place.
if ( !IsWounded( defender ) )
BeginWound( defender, defender.Player ? PlayerDuration : NPCDuration );
}
// Do not reset timer if one is already in place.
if (!IsWounded(defender))
BeginWound(defender, defender.Player ? PlayerDuration : NPCDuration);
}
private static Hashtable m_Table = new Hashtable();
public static bool IsWounded(Mobile m)
{
return m_Table.Contains(m);
}
public static bool IsWounded( Mobile m )
{
return m_Table.Contains( m );
}
public static void BeginWound(Mobile m, TimeSpan duration)
{
Timer t = (Timer)m_Table[m];
public static void BeginWound( Mobile m, TimeSpan duration )
{
Timer t = (Timer)m_Table[m];
t?.Stop();
t?.Stop();
t = new InternalTimer(m, duration);
m_Table[m] = t;
t = new InternalTimer( m, duration );
m_Table[m] = t;
t.Start();
t.Start();
m.YellowHealthbar = true;
}
m.YellowHealthbar = true;
}
public static void EndWound(Mobile m)
{
if (!IsWounded(m))
return;
public static void EndWound( Mobile m )
{
if ( !IsWounded( m ) )
return;
Timer t = (Timer)m_Table[m];
Timer t = (Timer)m_Table[m];
t?.Stop();
t?.Stop();
m_Table.Remove(m);
m_Table.Remove( m );
m.YellowHealthbar = false;
m.SendLocalizedMessage(1060208); // You are no longer mortally wounded.
}
m.YellowHealthbar = false;
m.SendLocalizedMessage( 1060208 ); // You are no longer mortally wounded.
}
private class InternalTimer : Timer
{
private Mobile m_Mobile;
private class InternalTimer : Timer
{
private Mobile m_Mobile;
public InternalTimer(Mobile m, TimeSpan duration) : base(duration)
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
public InternalTimer( Mobile m, TimeSpan duration ) : base( duration )
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
{
EndWound( m_Mobile );
}
}
}
}
protected override void OnTick()
{
EndWound(m_Mobile);
}
}
}
}

View file

@ -1,41 +1,37 @@
namespace Server.Items
{
/// <summary>
/// Available on some crossbows, this special move allows archers to fire while on the move.
/// This shot is somewhat less accurate than normal, but the ability to fire while running is a clear advantage.
/// </summary>
public class MovingShot : WeaponAbility
{
public MovingShot()
{
}
/// <summary>
/// Available on some crossbows, this special move allows archers to fire while on the move.
/// This shot is somewhat less accurate than normal, but the ability to fire while running is a clear advantage.
/// </summary>
public class MovingShot : WeaponAbility
{
public override int BaseMana => 15;
public override int AccuracyBonus => -25;
public override int BaseMana => 15;
public override int AccuracyBonus => -25;
public override bool ValidatesDuringHit => false;
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
return ( Validate( attacker ) && CheckMana( attacker, true ) );
}
public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
{
return Validate(attacker) && CheckMana(attacker, true);
}
public override void OnMiss( Mobile attacker, Mobile defender )
{
//Validates in OnSwing for accuracy scalar
public override void OnMiss(Mobile attacker, Mobile defender)
{
//Validates in OnSwing for accuracy scalar
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1060089 ); // You fail to execute your special move
}
attacker.SendLocalizedMessage(1060089); // You fail to execute your special move
}
public override bool ValidatesDuringHit => false;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
//Validates in OnSwing for accuracy scalar
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
//Validates in OnSwing for accuracy scalar
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage( 1060216 ); // Your shot was successful
}
}
}
attacker.SendLocalizedMessage(1060216); // Your shot was successful
}
}
}

View file

@ -2,79 +2,80 @@ using System;
namespace Server.Items
{
/// <summary>
/// Does damage and paralyses your opponent for a short time.
/// </summary>
public class NerveStrike : WeaponAbility
{
public NerveStrike()
{
}
/// <summary>
/// Does damage and paralyses your opponent for a short time.
/// </summary>
public class NerveStrike : WeaponAbility
{
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1070768,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1070768, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
{
if (defender.Paralyzed)
{
attacker.SendLocalizedMessage(1061923); // The target is already frozen.
return false;
}
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
if ( defender.Paralyzed )
{
attacker.SendLocalizedMessage( 1061923 ); // The target is already frozen.
return false;
}
return true;
}
return true;
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
bool cantpara = Items.ParalyzingBlow.IsImmune(defender);
bool cantpara = Server.Items.ParalyzingBlow.IsImmune(defender);
if (cantpara)
{
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
defender.SendLocalizedMessage(1070813); // You resist paralysis.
}
else
{
attacker.SendLocalizedMessage(1063356); // You cripple your target with a nerve strike!
defender.SendLocalizedMessage(1063357); // Your attacker dealt a crippling nerve strike!
}
if ( cantpara )
{
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
defender.SendLocalizedMessage(1070813); // You resist paralysis.
}
else
{
attacker.SendLocalizedMessage(1063356); // You cripple your target with a nerve strike!
defender.SendLocalizedMessage(1063357); // Your attacker dealt a crippling nerve strike!
}
attacker.PlaySound(0x204);
defender.FixedEffect(0x376A, 9, 32);
defender.FixedParticles(0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist);
attacker.PlaySound(0x204);
defender.FixedEffect(0x376A, 9, 32);
defender.FixedParticles(0x37C4, 1, 8, 0x13AF, 0, 0, EffectLayer.Waist);
if (Core.ML)
{
AOS.Damage(defender, attacker,
(int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + Utility.Random(10)), true, 100,
0, 0, 0, 0); //0-25
if ( Core.ML )
{
AOS.Damage( defender, attacker, (int)( 15.0 * ( attacker.Skills[SkillName.Bushido].Value - 50.0 ) / 70.0 + Utility.Random( 10 ) ), true, 100, 0, 0, 0, 0 ); //0-25
if (!cantpara && ((150.0 / 7.0 + (4.0 * attacker.Skills[SkillName.Bushido].Value) / 7.0) / 100.0) > Utility.RandomDouble())
{
defender.Paralyze( TimeSpan.FromSeconds( 2.0 ) );
Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );
}
}
else if ( !cantpara )
{
AOS.Damage( defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10), true, 100, 0, 0, 0, 0 ); //10-25
defender.Freeze(TimeSpan.FromSeconds(2.0));
Server.Items.ParalyzingBlow.BeginImmunity(defender, Server.Items.ParalyzingBlow.FreezeDelayDuration);
}
}
}
}
if (!cantpara && (150.0 / 7.0 + 4.0 * attacker.Skills[SkillName.Bushido].Value / 7.0) / 100.0 >
Utility.RandomDouble())
{
defender.Paralyze(TimeSpan.FromSeconds(2.0));
Items.ParalyzingBlow.BeginImmunity(defender, Items.ParalyzingBlow.FreezeDelayDuration);
}
}
else if (!cantpara)
{
AOS.Damage(defender, attacker, (int)(15.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 10),
true, 100, 0, 0, 0, 0); //10-25
defender.Freeze(TimeSpan.FromSeconds(2.0));
Items.ParalyzingBlow.BeginImmunity(defender, Items.ParalyzingBlow.FreezeDelayDuration);
}
}
}
}

View file

@ -3,130 +3,126 @@ using System.Collections;
namespace Server.Items
{
/// <summary>
/// A successful Paralyzing Blow will leave the target stunned, unable to move, attack, or cast spells, for a few seconds.
/// </summary>
public class ParalyzingBlow : WeaponAbility
{
public ParalyzingBlow()
{
}
/// <summary>
/// A successful Paralyzing Blow will leave the target stunned, unable to move, attack, or cast spells, for a few seconds.
/// </summary>
public class ParalyzingBlow : WeaponAbility
{
public static readonly TimeSpan PlayerFreezeDuration = TimeSpan.FromSeconds(3.0);
public static readonly TimeSpan NPCFreezeDuration = TimeSpan.FromSeconds(6.0);
public override int BaseMana => 30;
public static readonly TimeSpan FreezeDelayDuration = TimeSpan.FromSeconds(8.0);
public static readonly TimeSpan PlayerFreezeDuration = TimeSpan.FromSeconds( 3.0 );
public static readonly TimeSpan NPCFreezeDuration = TimeSpan.FromSeconds( 6.0 );
private static Hashtable m_Table = new Hashtable();
public static readonly TimeSpan FreezeDelayDuration = TimeSpan.FromSeconds( 8.0 );
public override int BaseMana => 30;
// No longer active in pub21:
/*public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )
return false;
// No longer active in pub21:
/*public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )
return false;
if ( !(from.Weapon is Fists) )
return true;
if ( !(from.Weapon is Fists) )
return true;
Skill skill = from.Skills[SkillName.Anatomy];
Skill skill = from.Skills[SkillName.Anatomy];
if ( skill != null && skill.Base >= 80.0 )
return true;
if ( skill != null && skill.Base >= 80.0 )
return true;
from.SendLocalizedMessage( 1061811 ); // You lack the required anatomy skill to perform that attack!
from.SendLocalizedMessage( 1061811 ); // You lack the required anatomy skill to perform that attack!
return false;
}*/
return false;
}*/
public override bool RequiresTactics( Mobile from )
{
if ( !(from.Weapon is BaseWeapon weapon) )
return true;
public override bool RequiresTactics(Mobile from)
{
if (!(from.Weapon is BaseWeapon weapon))
return true;
return weapon.Skill != SkillName.Wrestling;
}
return weapon.Skill != SkillName.Wrestling;
}
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
if ( defender.Paralyzed )
{
attacker.SendLocalizedMessage( 1061923 ); // The target is already frozen.
return false;
}
public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
{
if (defender.Paralyzed)
{
attacker.SendLocalizedMessage(1061923); // The target is already frozen.
return false;
}
return true;
}
return true;
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
if ( IsImmune( defender ) ) //Intentionally going after Mana consumption
{
attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
return;
}
if (IsImmune(defender)) //Intentionally going after Mana consumption
{
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
defender.SendLocalizedMessage(1070813); // You resist paralysis.
return;
}
defender.FixedEffect( 0x376A, 9, 32 );
defender.PlaySound( 0x204 );
defender.FixedEffect(0x376A, 9, 32);
defender.PlaySound(0x204);
attacker.SendLocalizedMessage( 1060163 ); // You deliver a paralyzing blow!
defender.SendLocalizedMessage( 1060164 ); // The attack has temporarily paralyzed you!
attacker.SendLocalizedMessage(1060163); // You deliver a paralyzing blow!
defender.SendLocalizedMessage(1060164); // The attack has temporarily paralyzed you!
TimeSpan duration = defender.Player ? PlayerFreezeDuration : NPCFreezeDuration;
TimeSpan duration = defender.Player ? PlayerFreezeDuration : NPCFreezeDuration;
// Treat it as paralyze not as freeze, effect must be removed when damaged.
defender.Paralyze( duration );
// Treat it as paralyze not as freeze, effect must be removed when damaged.
defender.Paralyze(duration);
BeginImmunity( defender, duration + FreezeDelayDuration );
}
BeginImmunity(defender, duration + FreezeDelayDuration);
}
private static Hashtable m_Table = new Hashtable();
public static bool IsImmune(Mobile m)
{
return m_Table.Contains(m);
}
public static bool IsImmune( Mobile m )
{
return m_Table.Contains( m );
}
public static void BeginImmunity(Mobile m, TimeSpan duration)
{
Timer t = (Timer)m_Table[m];
public static void BeginImmunity( Mobile m, TimeSpan duration )
{
Timer t = (Timer)m_Table[m];
t?.Stop();
t?.Stop();
t = new InternalTimer(m, duration);
m_Table[m] = t;
t = new InternalTimer( m, duration );
m_Table[m] = t;
t.Start();
}
t.Start();
}
public static void EndImmunity(Mobile m)
{
Timer t = (Timer)m_Table[m];
public static void EndImmunity( Mobile m )
{
Timer t = (Timer)m_Table[m];
t?.Stop();
t?.Stop();
m_Table.Remove(m);
}
m_Table.Remove( m );
}
private class InternalTimer : Timer
{
private Mobile m_Mobile;
private class InternalTimer : Timer
{
private Mobile m_Mobile;
public InternalTimer(Mobile m, TimeSpan duration) : base(duration)
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
public InternalTimer( Mobile m, TimeSpan duration ) : base( duration )
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
{
EndImmunity( m_Mobile );
}
}
}
}
protected override void OnTick()
{
EndImmunity(m_Mobile);
}
}
}
}

View file

@ -1,80 +1,77 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
/// <summary>
/// If you are on foot, dismounts your opponent and damage the ethereal's rider or the
/// living mount(which must be healed before ridden again). If you are mounted, damages
/// and stuns the mounted opponent.
/// </summary>
public class RidingSwipe : WeaponAbility
{
public RidingSwipe()
{
}
/// <summary>
/// If you are on foot, dismounts your opponent and damage the ethereal's rider or the
/// living mount(which must be healed before ridden again). If you are mounted, damages
/// and stuns the mounted opponent.
/// </summary>
public class RidingSwipe : WeaponAbility
{
public override int BaseMana => 30;
public override int BaseMana => 30;
public override bool RequiresSE => true;
public override bool RequiresSE => true;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Bushido) < 50.0)
{
from.SendLocalizedMessage(1070768,
"50"); // You need ~1_SKILL_REQUIREMENT~ Bushido skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Bushido ) < 50.0 )
{
from.SendLocalizedMessage( 1070768, "50" ); // You need ~1_SKILL_REQUIREMENT~ Bushido skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!defender.Mounted)
{
attacker.SendLocalizedMessage(1060848); // This attack only works on mounted targets
ClearCurrentAbility(attacker);
return;
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !defender.Mounted )
{
attacker.SendLocalizedMessage( 1060848 ); // This attack only works on mounted targets
ClearCurrentAbility( attacker );
return;
}
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
if (!attacker.Mounted)
{
Mobile mount = defender.Mount as Mobile;
BaseMount.Dismount(defender);
if ( !attacker.Mounted )
{
Mobile mount = defender.Mount as Mobile;
BaseMount.Dismount( defender );
if (mount != null) //Ethy mounts don't take damage
{
int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
if ( mount != null ) //Ethy mounts don't take damage
{
int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
AOS.Damage(mount, null, amount, 100, 0, 0, 0,
0); //The mount just takes damage, there's no flagging as if it was attacking the mount directly
AOS.Damage( mount, null, amount, 100, 0, 0, 0, 0 ); //The mount just takes damage, there's no flagging as if it was attacking the mount directly
//TODO: Mount prevention until mount healed
}
}
else
{
int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
//TODO: Mount prevention until mount healed
}
}
else
{
int amount = 10 + (int)(10.0 * (attacker.Skills[SkillName.Bushido].Value - 50.0) / 70.0 + 5);
AOS.Damage(defender, attacker, amount, 100, 0, 0, 0, 0);
AOS.Damage( defender, attacker, amount, 100, 0, 0, 0, 0 );
if ( Server.Items.ParalyzingBlow.IsImmune( defender ) ) //Does it still do damage?
{
attacker.SendLocalizedMessage( 1070804 ); // Your target resists paralysis.
defender.SendLocalizedMessage( 1070813 ); // You resist paralysis.
}
else
{
defender.Paralyze( TimeSpan.FromSeconds( 3.0 ) );
Server.Items.ParalyzingBlow.BeginImmunity( defender, Server.Items.ParalyzingBlow.FreezeDelayDuration );
}
}
}
}
}
if (Items.ParalyzingBlow.IsImmune(defender)) //Does it still do damage?
{
attacker.SendLocalizedMessage(1070804); // Your target resists paralysis.
defender.SendLocalizedMessage(1070813); // You resist paralysis.
}
else
{
defender.Paralyze(TimeSpan.FromSeconds(3.0));
Items.ParalyzingBlow.BeginImmunity(defender, Items.ParalyzingBlow.FreezeDelayDuration);
}
}
}
}
}

View file

@ -1,57 +1,54 @@
namespace Server.Items
{
/// <summary>
/// This powerful ability requires secondary skills to activate.
/// Successful use of Shadowstrike deals extra damage to the target <20> and renders the attacker invisible!
/// Only those who are adept at the art of stealth will be able to use this ability.
/// </summary>
public class ShadowStrike : WeaponAbility
{
public ShadowStrike()
{
}
/// <summary>
/// This powerful ability requires secondary skills to activate.
/// Successful use of Shadowstrike deals extra damage to the target <20> and renders the attacker invisible!
/// Only those who are adept at the art of stealth will be able to use this ability.
/// </summary>
public class ShadowStrike : WeaponAbility
{
public override int BaseMana => 20;
public override double DamageScalar => 1.25;
public override int BaseMana => 20;
public override double DamageScalar => 1.25;
public override bool RequiresTactics(Mobile from)
{
return false;
}
public override bool RequiresTactics( Mobile from )
{
return false;
}
public override bool CheckSkills(Mobile from)
{
if (!base.CheckSkills(from))
return false;
public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )
return false;
Skill skill = from.Skills[SkillName.Stealth];
Skill skill = from.Skills[SkillName.Stealth];
if (skill != null && skill.Value >= 80.0)
return true;
if ( skill != null && skill.Value >= 80.0 )
return true;
from.SendLocalizedMessage(1060183); // You lack the required stealth to perform that attack
from.SendLocalizedMessage( 1060183 ); // You lack the required stealth to perform that attack
return false;
}
return false;
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1060078); // You strike and hide in the shadows!
defender.SendLocalizedMessage(1060079); // You are dazed by the attack and your attacker vanishes!
attacker.SendLocalizedMessage( 1060078 ); // You strike and hide in the shadows!
defender.SendLocalizedMessage( 1060079 ); // You are dazed by the attack and your attacker vanishes!
Effects.SendLocationParticles(EffectItem.Create(attacker.Location, attacker.Map, EffectItem.DefaultDuration),
0x376A, 8, 12, 9943);
attacker.PlaySound(0x482);
Effects.SendLocationParticles( EffectItem.Create( attacker.Location, attacker.Map, EffectItem.DefaultDuration ), 0x376A, 8, 12, 9943 );
attacker.PlaySound( 0x482 );
defender.FixedEffect(0x37BE, 20, 25);
defender.FixedEffect( 0x37BE, 20, 25 );
attacker.Combatant = null;
attacker.Warmode = false;
attacker.Hidden = true;
}
}
}
attacker.Combatant = null;
attacker.Warmode = false;
attacker.Hidden = true;
}
}
}

View file

@ -1,104 +1,101 @@
using System;
using System.Collections;
namespace Server.Items
{
/// <summary>
/// Attack with increased damage with additional damage over time.
/// </summary>
public class TalonStrike : WeaponAbility
{
public static Hashtable Registry { get; } = new Hashtable();
/// <summary>
/// Attack with increased damage with additional damage over time.
/// </summary>
public class TalonStrike : WeaponAbility
{
public static Hashtable Registry{ get; } = new Hashtable();
public TalonStrike()
{
}
public override int BaseMana => 30;
public override double DamageScalar => 1.2;
public override int BaseMana => 30;
public override double DamageScalar => 1.2;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0)
{
from.SendLocalizedMessage(1063352,
"50"); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack!
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( GetSkill( from, SkillName.Ninjitsu ) < 50.0 )
{
from.SendLocalizedMessage( 1063352, "50" ); // You need ~1_SKILL_REQUIREMENT~ Ninjitsu skill to perform that attack!
return false;
}
return base.CheckSkills(from);
}
return base.CheckSkills( from );
}
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (Registry.Contains(defender) || !Validate(attacker) || !CheckMana(attacker, true))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( Registry.Contains( defender ) || !Validate( attacker ) || !CheckMana( attacker, true ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage(1063358); // You deliver a talon strike!
defender.SendLocalizedMessage(1063359); // Your attacker delivers a talon strike!
attacker.SendLocalizedMessage( 1063358 ); // You deliver a talon strike!
defender.SendLocalizedMessage( 1063359 ); // Your attacker delivers a talon strike!
defender.FixedParticles(0x373A, 1, 17, 0x26BC, 0x662, 0, EffectLayer.Waist);
defender.FixedParticles( 0x373A, 1, 17, 0x26BC, 0x662, 0, EffectLayer.Waist );
Timer t = new InternalTimer(defender,
(int)(10.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 70.0 + 5), attacker); //5 - 15 damage
Timer t = new InternalTimer( defender, (int)(10.0 * (attacker.Skills[SkillName.Ninjitsu].Value - 50.0) / 70.0 + 5), attacker ); //5 - 15 damage
t.Start();
t.Start();
Registry.Add(defender, t);
}
Registry.Add( defender, t );
}
private class InternalTimer : Timer
{
private readonly double DamagePerTick;
private Mobile m_Attacker;
private double m_DamageRemaining;
private double m_DamageToDo;
private Mobile m_Defender;
private class InternalTimer : Timer
{
private Mobile m_Defender;
private double m_DamageRemaining;
private double m_DamageToDo;
private Mobile m_Attacker;
public InternalTimer(Mobile defender, int totalDamage, Mobile attacker)
: base(TimeSpan.Zero, TimeSpan.FromSeconds(0.25),
12) // 3 seconds at .25 seconds apart = 12. Confirm delay inbetween of .25 each.
{
m_Defender = defender;
m_DamageRemaining = totalDamage;
Priority = TimerPriority.TwentyFiveMS;
private readonly double DamagePerTick;
m_Attacker = attacker;
public InternalTimer( Mobile defender, int totalDamage, Mobile attacker )
: base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.25 ), 12 ) // 3 seconds at .25 seconds apart = 12. Confirm delay inbetween of .25 each.
{
m_Defender = defender;
m_DamageRemaining = (double)totalDamage;
Priority = TimerPriority.TwentyFiveMS;
DamagePerTick = (double)totalDamage / 12 + .01;
}
m_Attacker = attacker;
protected override void OnTick()
{
if (!m_Defender.Alive || m_DamageRemaining <= 0)
{
Stop();
Registry.Remove(m_Defender);
return;
}
DamagePerTick = (double)totalDamage / 12+.01;
}
m_DamageRemaining -= DamagePerTick;
m_DamageToDo += DamagePerTick;
protected override void OnTick()
{
if ( !m_Defender.Alive || m_DamageRemaining <= 0 )
{
Stop();
Registry.Remove( m_Defender );
return;
}
if (m_DamageRemaining <= 0 && m_DamageToDo < 1)
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
m_DamageRemaining -= DamagePerTick;
m_DamageToDo += DamagePerTick;
int damage = (int)m_DamageToDo;
if ( m_DamageRemaining <= 0 && m_DamageToDo < 1 )
m_DamageToDo = 1.0; //Confirm this 'round up' at the end
if (damage > 0)
{
//m_Defender.Damage( damage, m_Attacker, false );
m_Defender.Hits -= damage; //Don't show damage, don't disrupt
m_DamageToDo -= damage;
}
int damage = (int)m_DamageToDo;
if ( damage > 0 )
{
//m_Defender.Damage( damage, m_Attacker, false );
m_Defender.Hits -= damage; //Don't show damage, don't disrupt
m_DamageToDo -= damage;
}
if ( !m_Defender.Alive || m_DamageRemaining <= 0 )
{
Stop();
Registry.Remove( m_Defender );
}
}
}
}
}
if (!m_Defender.Alive || m_DamageRemaining <= 0)
{
Stop();
Registry.Remove(m_Defender);
}
}
}
}
}

View file

@ -1,478 +1,484 @@
using System;
using System.Collections;
using Server.Engines.ConPVP;
using Server.Mobiles;
using Server.Network;
using Server.Spells;
using Server.Mobiles;
using Server.Spells.Bushido;
using Server.Spells.Necromancy;
using Server.Spells.Ninjitsu;
namespace Server.Items
{
public abstract class WeaponAbility
{
public virtual int BaseMana => 0;
public virtual int AccuracyBonus => 0;
public virtual double DamageScalar => 1.0;
public virtual bool RequiresSE => false;
public virtual void OnHit( Mobile attacker, Mobile defender, int damage )
{
}
public virtual void OnMiss( Mobile attacker, Mobile defender )
{
}
public virtual bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
// Here because you must be sure you can use the skill before calling CheckHit if the ability has a HCI bonus for example
return true;
}
public virtual bool OnBeforeDamage( Mobile attacker, Mobile defender )
{
return true;
}
public virtual bool RequiresTactics( Mobile from )
{
return true;
}
public virtual double GetRequiredSkill( Mobile from )
{
BaseWeapon weapon = from.Weapon as BaseWeapon;
if ( weapon != null && weapon.PrimaryAbility == this )
return 70.0;
if ( weapon != null && weapon.SecondaryAbility == this )
return 90.0;
return 200.0;
}
public virtual int CalculateMana( Mobile from )
{
int mana = BaseMana;
double skillTotal = GetSkill( from, SkillName.Swords ) + GetSkill( from, SkillName.Macing )
+ GetSkill( from, SkillName.Fencing ) + GetSkill( from, SkillName.Archery ) + GetSkill( from, SkillName.Parry )
+ GetSkill( from, SkillName.Lumberjacking ) + GetSkill( from, SkillName.Stealth )
+ GetSkill( from, SkillName.Poisoning ) + GetSkill( from, SkillName.Bushido ) + GetSkill( from, SkillName.Ninjitsu );
if ( skillTotal >= 300.0 )
mana -= 10;
else if ( skillTotal >= 200.0 )
mana -= 5;
double scalar = 1.0;
if ( !Spells.Necromancy.MindRotSpell.GetMindRotScalar( from, ref scalar ) )
scalar = 1.0;
// Lower Mana Cost = 40%
int lmc = Math.Min( AosAttributes.GetValue( from, AosAttribute.LowerManaCost ), 40 );
scalar -= (double)lmc / 100;
mana = (int)(mana * scalar);
// Using a special move within 3 seconds of the previous special move costs double mana
if ( GetContext( from ) != null )
mana *= 2;
return mana;
}
public virtual bool CheckWeaponSkill( Mobile from )
{
if ( !(from.Weapon is BaseWeapon weapon) )
return false;
Skill skill = from.Skills[weapon.Skill];
double reqSkill = GetRequiredSkill( from );
bool reqTactics = Core.ML && RequiresTactics( from );
if ( Core.ML && reqTactics && from.Skills[SkillName.Tactics].Base < reqSkill )
{
from.SendLocalizedMessage( 1079308, reqSkill.ToString() ); // You need ~1_SKILL_REQUIREMENT~ weapon and tactics skill to perform that attack
return false;
}
if ( skill != null && skill.Base >= reqSkill )
return true;
/* <UBWS> */
if ( weapon.WeaponAttributes.UseBestSkill > 0 && (from.Skills[SkillName.Swords].Base >= reqSkill || from.Skills[SkillName.Macing].Base >= reqSkill || from.Skills[SkillName.Fencing].Base >= reqSkill) )
return true;
/* </UBWS> */
if ( reqTactics )
{
from.SendLocalizedMessage( 1079308, reqSkill.ToString() ); // You need ~1_SKILL_REQUIREMENT~ weapon and tactics skill to perform that attack
}
else
{
from.SendLocalizedMessage( 1060182, reqSkill.ToString() ); // You need ~1_SKILL_REQUIREMENT~ weapon skill to perform that attack
}
return false;
}
public virtual bool CheckSkills( Mobile from )
{
return CheckWeaponSkill( from );
}
public virtual double GetSkill( Mobile from, SkillName skillName )
{
Skill skill = from.Skills[skillName];
if ( skill == null )
return 0.0;
return skill.Value;
}
public virtual bool CheckMana( Mobile from, bool consume )
{
int mana = CalculateMana( from );
if ( from.Mana < mana )
{
if ( from is BaseCreature creature && creature.HasManaOveride )
{
return true;
}
from.SendLocalizedMessage( 1060181, mana.ToString() ); // You need ~1_MANA_REQUIREMENT~ mana to perform that attack
return false;
}
if ( consume )
{
if ( GetContext( from ) == null )
{
Timer timer = new WeaponAbilityTimer( from );
timer.Start();
AddContext( from, new WeaponAbilityContext( timer ) );
}
from.Mana -= mana;
}
return true;
}
public virtual bool Validate( Mobile from )
{
if ( !from.Player )
return true;
NetState state = from.NetState;
if ( state == null )
return false;
if ( RequiresSE && !state.SupportsExpansion( Expansion.SE ) )
{
from.SendLocalizedMessage( 1063456 ); // You must upgrade to Samurai Empire in order to use that ability.
return false;
}
if ( Spells.Bushido.HonorableExecution.IsUnderPenalty( from ) || Spells.Ninjitsu.AnimalForm.UnderTransformation( from ) )
{
from.SendLocalizedMessage( 1063024 ); // You cannot perform this special move right now.
return false;
}
if ( Core.ML && from.Spell != null )
{
from.SendLocalizedMessage( 1063024 ); // You cannot perform this special move right now.
return false;
}
#region Dueling
string option = null;
if ( this is ArmorIgnore )
option = "Armor Ignore";
else if ( this is BleedAttack )
option = "Bleed Attack";
else if ( this is ConcussionBlow )
option = "Concussion Blow";
else if ( this is CrushingBlow )
option = "Crushing Blow";
else if ( this is Disarm )
option = "Disarm";
else if ( this is Dismount )
option = "Dismount";
else if ( this is DoubleStrike )
option = "Double Strike";
else if ( this is InfectiousStrike )
option = "Infectious Strike";
else if ( this is MortalStrike )
option = "Mortal Strike";
else if ( this is MovingShot )
option = "Moving Shot";
else if ( this is ParalyzingBlow )
option = "Paralyzing Blow";
else if ( this is ShadowStrike )
option = "Shadow Strike";
else if ( this is WhirlwindAttack )
option = "Whirlwind Attack";
else if ( this is RidingSwipe )
option = "Riding Swipe";
else if ( this is FrenziedWhirlwind )
option = "Frenzied Whirlwind";
else if ( this is Block )
option = "Block";
else if ( this is DefenseMastery )
option = "Defense Mastery";
else if ( this is NerveStrike )
option = "Nerve Strike";
else if ( this is TalonStrike )
option = "Talon Strike";
else if ( this is Feint )
option = "Feint";
else if ( this is DualWield )
option = "Dual Wield";
else if ( this is DoubleShot )
option = "Double Shot";
else if ( this is ArmorPierce )
option = "Armor Pierce";
if ( option != null && !Engines.ConPVP.DuelContext.AllowSpecialAbility( from, option, true ) )
return false;
#endregion
return CheckSkills( from ) && CheckMana( from, false );
}
public static WeaponAbility[] Abilities { get; } = new WeaponAbility[31]
{
null,
new ArmorIgnore(),
new BleedAttack(),
new ConcussionBlow(),
new CrushingBlow(),
new Disarm(),
new Dismount(),
new DoubleStrike(),
new InfectiousStrike(),
new MortalStrike(),
new MovingShot(),
new ParalyzingBlow(),
new ShadowStrike(),
new WhirlwindAttack(),
new RidingSwipe(),
new FrenziedWhirlwind(),
new Block(),
new DefenseMastery(),
new NerveStrike(),
new TalonStrike(),
new Feint(),
new DualWield(),
new DoubleShot(),
new ArmorPierce(),
null,
null,
null,
null,
null,
null,
new Disrobe()
};
public static Hashtable Table { get; } = new Hashtable();
public static readonly WeaponAbility ArmorIgnore = Abilities[ 1];
public static readonly WeaponAbility BleedAttack = Abilities[ 2];
public static readonly WeaponAbility ConcussionBlow = Abilities[ 3];
public static readonly WeaponAbility CrushingBlow = Abilities[ 4];
public static readonly WeaponAbility Disarm = Abilities[ 5];
public static readonly WeaponAbility Dismount = Abilities[ 6];
public static readonly WeaponAbility DoubleStrike = Abilities[ 7];
public static readonly WeaponAbility InfectiousStrike = Abilities[ 8];
public static readonly WeaponAbility MortalStrike = Abilities[ 9];
public static readonly WeaponAbility MovingShot = Abilities[10];
public static readonly WeaponAbility ParalyzingBlow = Abilities[11];
public static readonly WeaponAbility ShadowStrike = Abilities[12];
public static readonly WeaponAbility WhirlwindAttack = Abilities[13];
public static readonly WeaponAbility RidingSwipe = Abilities[14];
public static readonly WeaponAbility FrenziedWhirlwind = Abilities[15];
public static readonly WeaponAbility Block = Abilities[16];
public static readonly WeaponAbility DefenseMastery = Abilities[17];
public static readonly WeaponAbility NerveStrike = Abilities[18];
public static readonly WeaponAbility TalonStrike = Abilities[19];
public static readonly WeaponAbility Feint = Abilities[20];
public static readonly WeaponAbility DualWield = Abilities[21];
public static readonly WeaponAbility DoubleShot = Abilities[22];
public static readonly WeaponAbility ArmorPierce = Abilities[23];
public static readonly WeaponAbility Bladeweave = Abilities[24];
public static readonly WeaponAbility ForceArrow = Abilities[25];
public static readonly WeaponAbility LightningArrow = Abilities[26];
public static readonly WeaponAbility PsychicAttack = Abilities[27];
public static readonly WeaponAbility SerpentArrow = Abilities[28];
public static readonly WeaponAbility ForceOfNature = Abilities[29];
public static readonly WeaponAbility Disrobe = Abilities[30];
public static bool IsWeaponAbility( Mobile m, WeaponAbility a )
{
if ( a == null )
return true;
if ( !m.Player )
return true;
return ( m.Weapon is BaseWeapon weapon && (weapon.PrimaryAbility == a || weapon.SecondaryAbility == a) );
}
public virtual bool ValidatesDuringHit => true;
public static WeaponAbility GetCurrentAbility( Mobile m )
{
if ( !Core.AOS )
{
ClearCurrentAbility( m );
return null;
}
WeaponAbility a = (WeaponAbility)Table[m];
if ( !IsWeaponAbility( m, a ) )
{
ClearCurrentAbility( m );
return null;
}
if ( a != null && a.ValidatesDuringHit && !a.Validate( m ) )
{
ClearCurrentAbility( m );
return null;
}
return a;
}
public static bool SetCurrentAbility( Mobile m, WeaponAbility a )
{
if ( !Core.AOS )
{
ClearCurrentAbility( m );
return false;
}
if ( !IsWeaponAbility( m, a ) )
{
ClearCurrentAbility( m );
return false;
}
if ( a != null && !a.Validate( m ) )
{
ClearCurrentAbility( m );
return false;
}
if ( a == null )
{
Table.Remove( m );
}
else
{
SpecialMove.ClearCurrentMove( m );
Table[m] = a;
}
return true;
}
public static void ClearCurrentAbility( Mobile m )
{
Table.Remove( m );
if ( Core.AOS && m.NetState != null )
m.Send( ClearWeaponAbility.Instance );
}
public static void Initialize()
{
EventSink.SetAbility += EventSink_SetAbility;
}
public WeaponAbility()
{
}
private static void EventSink_SetAbility( SetAbilityEventArgs e )
{
int index = e.Index;
if ( index == 0 )
ClearCurrentAbility( e.Mobile );
else if ( index >= 1 && index < Abilities.Length )
SetCurrentAbility( e.Mobile, Abilities[index] );
}
private static Hashtable m_PlayersTable = new Hashtable();
private static void AddContext( Mobile m, WeaponAbilityContext context )
{
m_PlayersTable[m] = context;
}
private static void RemoveContext( Mobile m )
{
WeaponAbilityContext context = GetContext( m );
if ( context != null )
RemoveContext( m, context );
}
private static void RemoveContext( Mobile m, WeaponAbilityContext context )
{
m_PlayersTable.Remove( m );
context.Timer.Stop();
}
private static WeaponAbilityContext GetContext( Mobile m )
{
return ( m_PlayersTable[m] as WeaponAbilityContext );
}
private class WeaponAbilityTimer : Timer
{
private Mobile m_Mobile;
public WeaponAbilityTimer( Mobile from ) : base ( TimeSpan.FromSeconds( 3.0 ) )
{
m_Mobile = from;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()
{
RemoveContext( m_Mobile );
}
}
private class WeaponAbilityContext
{
public Timer Timer { get; }
public WeaponAbilityContext( Timer timer )
{
Timer = timer;
}
}
}
}
public abstract class WeaponAbility
{
public static readonly WeaponAbility ArmorIgnore = Abilities[1];
public static readonly WeaponAbility BleedAttack = Abilities[2];
public static readonly WeaponAbility ConcussionBlow = Abilities[3];
public static readonly WeaponAbility CrushingBlow = Abilities[4];
public static readonly WeaponAbility Disarm = Abilities[5];
public static readonly WeaponAbility Dismount = Abilities[6];
public static readonly WeaponAbility DoubleStrike = Abilities[7];
public static readonly WeaponAbility InfectiousStrike = Abilities[8];
public static readonly WeaponAbility MortalStrike = Abilities[9];
public static readonly WeaponAbility MovingShot = Abilities[10];
public static readonly WeaponAbility ParalyzingBlow = Abilities[11];
public static readonly WeaponAbility ShadowStrike = Abilities[12];
public static readonly WeaponAbility WhirlwindAttack = Abilities[13];
public static readonly WeaponAbility RidingSwipe = Abilities[14];
public static readonly WeaponAbility FrenziedWhirlwind = Abilities[15];
public static readonly WeaponAbility Block = Abilities[16];
public static readonly WeaponAbility DefenseMastery = Abilities[17];
public static readonly WeaponAbility NerveStrike = Abilities[18];
public static readonly WeaponAbility TalonStrike = Abilities[19];
public static readonly WeaponAbility Feint = Abilities[20];
public static readonly WeaponAbility DualWield = Abilities[21];
public static readonly WeaponAbility DoubleShot = Abilities[22];
public static readonly WeaponAbility ArmorPierce = Abilities[23];
public static readonly WeaponAbility Bladeweave = Abilities[24];
public static readonly WeaponAbility ForceArrow = Abilities[25];
public static readonly WeaponAbility LightningArrow = Abilities[26];
public static readonly WeaponAbility PsychicAttack = Abilities[27];
public static readonly WeaponAbility SerpentArrow = Abilities[28];
public static readonly WeaponAbility ForceOfNature = Abilities[29];
public static readonly WeaponAbility Disrobe = Abilities[30];
private static Hashtable m_PlayersTable = new Hashtable();
public virtual int BaseMana => 0;
public virtual int AccuracyBonus => 0;
public virtual double DamageScalar => 1.0;
public virtual bool RequiresSE => false;
public static WeaponAbility[] Abilities{ get; } = new WeaponAbility[31]
{
null,
new ArmorIgnore(),
new BleedAttack(),
new ConcussionBlow(),
new CrushingBlow(),
new Disarm(),
new Dismount(),
new DoubleStrike(),
new InfectiousStrike(),
new MortalStrike(),
new MovingShot(),
new ParalyzingBlow(),
new ShadowStrike(),
new WhirlwindAttack(),
new RidingSwipe(),
new FrenziedWhirlwind(),
new Block(),
new DefenseMastery(),
new NerveStrike(),
new TalonStrike(),
new Feint(),
new DualWield(),
new DoubleShot(),
new ArmorPierce(),
null,
null,
null,
null,
null,
null,
new Disrobe()
};
public static Hashtable Table{ get; } = new Hashtable();
public virtual bool ValidatesDuringHit => true;
public virtual void OnHit(Mobile attacker, Mobile defender, int damage)
{
}
public virtual void OnMiss(Mobile attacker, Mobile defender)
{
}
public virtual bool OnBeforeSwing(Mobile attacker, Mobile defender)
{
// Here because you must be sure you can use the skill before calling CheckHit if the ability has a HCI bonus for example
return true;
}
public virtual bool OnBeforeDamage(Mobile attacker, Mobile defender)
{
return true;
}
public virtual bool RequiresTactics(Mobile from)
{
return true;
}
public virtual double GetRequiredSkill(Mobile from)
{
BaseWeapon weapon = from.Weapon as BaseWeapon;
if (weapon != null && weapon.PrimaryAbility == this)
return 70.0;
if (weapon != null && weapon.SecondaryAbility == this)
return 90.0;
return 200.0;
}
public virtual int CalculateMana(Mobile from)
{
int mana = BaseMana;
double skillTotal = GetSkill(from, SkillName.Swords) + GetSkill(from, SkillName.Macing)
+ GetSkill(from, SkillName.Fencing) +
GetSkill(from, SkillName.Archery) +
GetSkill(from, SkillName.Parry)
+ GetSkill(from, SkillName.Lumberjacking) +
GetSkill(from, SkillName.Stealth)
+ GetSkill(from, SkillName.Poisoning) +
GetSkill(from, SkillName.Bushido) +
GetSkill(from, SkillName.Ninjitsu);
if (skillTotal >= 300.0)
mana -= 10;
else if (skillTotal >= 200.0)
mana -= 5;
double scalar = 1.0;
if (!MindRotSpell.GetMindRotScalar(from, ref scalar))
scalar = 1.0;
// Lower Mana Cost = 40%
int lmc = Math.Min(AosAttributes.GetValue(from, AosAttribute.LowerManaCost), 40);
scalar -= (double)lmc / 100;
mana = (int)(mana * scalar);
// Using a special move within 3 seconds of the previous special move costs double mana
if (GetContext(from) != null)
mana *= 2;
return mana;
}
public virtual bool CheckWeaponSkill(Mobile from)
{
if (!(from.Weapon is BaseWeapon weapon))
return false;
Skill skill = from.Skills[weapon.Skill];
double reqSkill = GetRequiredSkill(from);
bool reqTactics = Core.ML && RequiresTactics(from);
if (Core.ML && reqTactics && from.Skills[SkillName.Tactics].Base < reqSkill)
{
from.SendLocalizedMessage(1079308,
reqSkill.ToString()); // You need ~1_SKILL_REQUIREMENT~ weapon and tactics skill to perform that attack
return false;
}
if (skill != null && skill.Base >= reqSkill)
return true;
/* <UBWS> */
if (weapon.WeaponAttributes.UseBestSkill > 0 && (from.Skills[SkillName.Swords].Base >= reqSkill ||
from.Skills[SkillName.Macing].Base >= reqSkill ||
from.Skills[SkillName.Fencing].Base >= reqSkill))
return true;
/* </UBWS> */
if (reqTactics)
from.SendLocalizedMessage(1079308,
reqSkill.ToString()); // You need ~1_SKILL_REQUIREMENT~ weapon and tactics skill to perform that attack
else
from.SendLocalizedMessage(1060182,
reqSkill.ToString()); // You need ~1_SKILL_REQUIREMENT~ weapon skill to perform that attack
return false;
}
public virtual bool CheckSkills(Mobile from)
{
return CheckWeaponSkill(from);
}
public virtual double GetSkill(Mobile from, SkillName skillName)
{
Skill skill = from.Skills[skillName];
if (skill == null)
return 0.0;
return skill.Value;
}
public virtual bool CheckMana(Mobile from, bool consume)
{
int mana = CalculateMana(from);
if (from.Mana < mana)
{
if (from is BaseCreature creature && creature.HasManaOveride) return true;
from.SendLocalizedMessage(1060181,
mana.ToString()); // You need ~1_MANA_REQUIREMENT~ mana to perform that attack
return false;
}
if (consume)
{
if (GetContext(from) == null)
{
Timer timer = new WeaponAbilityTimer(from);
timer.Start();
AddContext(from, new WeaponAbilityContext(timer));
}
from.Mana -= mana;
}
return true;
}
public virtual bool Validate(Mobile from)
{
if (!from.Player)
return true;
NetState state = from.NetState;
if (state == null)
return false;
if (RequiresSE && !state.SupportsExpansion(Expansion.SE))
{
from.SendLocalizedMessage(1063456); // You must upgrade to Samurai Empire in order to use that ability.
return false;
}
if (HonorableExecution.IsUnderPenalty(from) || AnimalForm.UnderTransformation(from))
{
from.SendLocalizedMessage(1063024); // You cannot perform this special move right now.
return false;
}
if (Core.ML && from.Spell != null)
{
from.SendLocalizedMessage(1063024); // You cannot perform this special move right now.
return false;
}
#region Dueling
string option = null;
if (this is ArmorIgnore)
option = "Armor Ignore";
else if (this is BleedAttack)
option = "Bleed Attack";
else if (this is ConcussionBlow)
option = "Concussion Blow";
else if (this is CrushingBlow)
option = "Crushing Blow";
else if (this is Disarm)
option = "Disarm";
else if (this is Dismount)
option = "Dismount";
else if (this is DoubleStrike)
option = "Double Strike";
else if (this is InfectiousStrike)
option = "Infectious Strike";
else if (this is MortalStrike)
option = "Mortal Strike";
else if (this is MovingShot)
option = "Moving Shot";
else if (this is ParalyzingBlow)
option = "Paralyzing Blow";
else if (this is ShadowStrike)
option = "Shadow Strike";
else if (this is WhirlwindAttack)
option = "Whirlwind Attack";
else if (this is RidingSwipe)
option = "Riding Swipe";
else if (this is FrenziedWhirlwind)
option = "Frenzied Whirlwind";
else if (this is Block)
option = "Block";
else if (this is DefenseMastery)
option = "Defense Mastery";
else if (this is NerveStrike)
option = "Nerve Strike";
else if (this is TalonStrike)
option = "Talon Strike";
else if (this is Feint)
option = "Feint";
else if (this is DualWield)
option = "Dual Wield";
else if (this is DoubleShot)
option = "Double Shot";
else if (this is ArmorPierce)
option = "Armor Pierce";
if (option != null && !DuelContext.AllowSpecialAbility(from, option, true))
return false;
#endregion
return CheckSkills(from) && CheckMana(from, false);
}
public static bool IsWeaponAbility(Mobile m, WeaponAbility a)
{
if (a == null)
return true;
if (!m.Player)
return true;
return m.Weapon is BaseWeapon weapon && (weapon.PrimaryAbility == a || weapon.SecondaryAbility == a);
}
public static WeaponAbility GetCurrentAbility(Mobile m)
{
if (!Core.AOS)
{
ClearCurrentAbility(m);
return null;
}
WeaponAbility a = (WeaponAbility)Table[m];
if (!IsWeaponAbility(m, a))
{
ClearCurrentAbility(m);
return null;
}
if (a != null && a.ValidatesDuringHit && !a.Validate(m))
{
ClearCurrentAbility(m);
return null;
}
return a;
}
public static bool SetCurrentAbility(Mobile m, WeaponAbility a)
{
if (!Core.AOS)
{
ClearCurrentAbility(m);
return false;
}
if (!IsWeaponAbility(m, a))
{
ClearCurrentAbility(m);
return false;
}
if (a != null && !a.Validate(m))
{
ClearCurrentAbility(m);
return false;
}
if (a == null)
{
Table.Remove(m);
}
else
{
SpecialMove.ClearCurrentMove(m);
Table[m] = a;
}
return true;
}
public static void ClearCurrentAbility(Mobile m)
{
Table.Remove(m);
if (Core.AOS && m.NetState != null)
m.Send(ClearWeaponAbility.Instance);
}
public static void Initialize()
{
EventSink.SetAbility += EventSink_SetAbility;
}
private static void EventSink_SetAbility(SetAbilityEventArgs e)
{
int index = e.Index;
if (index == 0)
ClearCurrentAbility(e.Mobile);
else if (index >= 1 && index < Abilities.Length)
SetCurrentAbility(e.Mobile, Abilities[index]);
}
private static void AddContext(Mobile m, WeaponAbilityContext context)
{
m_PlayersTable[m] = context;
}
private static void RemoveContext(Mobile m)
{
WeaponAbilityContext context = GetContext(m);
if (context != null)
RemoveContext(m, context);
}
private static void RemoveContext(Mobile m, WeaponAbilityContext context)
{
m_PlayersTable.Remove(m);
context.Timer.Stop();
}
private static WeaponAbilityContext GetContext(Mobile m)
{
return m_PlayersTable[m] as WeaponAbilityContext;
}
private class WeaponAbilityTimer : Timer
{
private Mobile m_Mobile;
public WeaponAbilityTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
{
m_Mobile = from;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()
{
RemoveContext(m_Mobile);
}
}
private class WeaponAbilityContext
{
public WeaponAbilityContext(Timer timer)
{
Timer = timer;
}
public Timer Timer{ get; }
}
}
}

View file

@ -4,82 +4,80 @@ using Server.Spells;
namespace Server.Items
{
/// <summary>
/// A godsend to a warrior surrounded, the Whirlwind Attack allows the fighter to strike at all nearby targets in one mighty spinning swing.
/// </summary>
public class WhirlwindAttack : WeaponAbility
{
public WhirlwindAttack()
{
}
/// <summary>
/// A godsend to a warrior surrounded, the Whirlwind Attack allows the fighter to strike at all nearby targets in one mighty
/// spinning swing.
/// </summary>
public class WhirlwindAttack : WeaponAbility
{
public override int BaseMana => 15;
public override int BaseMana => 15;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
if (!Validate(attacker))
return;
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
Map map = attacker.Map;
Map map = attacker.Map;
if (map == null)
return;
if ( map == null )
return;
if (!(attacker.Weapon is BaseWeapon weapon))
return;
if ( !(attacker.Weapon is BaseWeapon weapon) )
return;
if (!CheckMana(attacker, true))
return;
if ( !CheckMana( attacker, true ) )
return;
attacker.FixedEffect(0x3728, 10, 15);
attacker.PlaySound(0x2A1);
attacker.FixedEffect( 0x3728, 10, 15 );
attacker.PlaySound( 0x2A1 );
ArrayList list = new ArrayList();
ArrayList list = new ArrayList();
foreach (Mobile m in attacker.GetMobilesInRange(1))
list.Add(m);
foreach ( Mobile m in attacker.GetMobilesInRange( 1 ) )
list.Add( m );
ArrayList targets = new ArrayList();
ArrayList targets = new ArrayList();
for (int i = 0; i < list.Count; ++i)
{
Mobile m = (Mobile)list[i];
for ( int i = 0; i < list.Count; ++i )
{
Mobile m = (Mobile)list[i];
if (m != defender && m != attacker && SpellHelper.ValidIndirectTarget(attacker, m))
{
if (m == null || m.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.CanSee(m) ||
!attacker.CanBeHarmful(m))
continue;
if ( m != defender && m != attacker && SpellHelper.ValidIndirectTarget( attacker, m ) )
{
if ( m == null || m.Deleted || m.Map != attacker.Map || !m.Alive || !attacker.CanSee( m ) || !attacker.CanBeHarmful( m ) )
continue;
if (!attacker.InRange(m, weapon.MaxRange))
continue;
if ( !attacker.InRange( m, weapon.MaxRange ) )
continue;
if (attacker.InLOS(m))
targets.Add(m);
}
}
if ( attacker.InLOS( m ) )
targets.Add( m );
}
}
if (targets.Count > 0)
{
double bushido = attacker.Skills.Bushido.Value;
double damageBonus = 1.0 + Math.Pow(targets.Count * bushido / 60, 2) / 100;
if ( targets.Count > 0 )
{
double bushido = attacker.Skills.Bushido.Value;
double damageBonus = 1.0 + Math.Pow( (targets.Count * bushido) / 60, 2 ) / 100;
if (damageBonus > 2.0)
damageBonus = 2.0;
if ( damageBonus > 2.0 )
damageBonus = 2.0;
attacker.RevealingAction();
attacker.RevealingAction();
for (int i = 0; i < targets.Count; ++i)
{
Mobile m = (Mobile)targets[i];
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
attacker.SendLocalizedMessage(1060161); // The whirling attack strikes a target!
m.SendLocalizedMessage(1060162); // You are struck by the whirling attack and take damage!
attacker.SendLocalizedMessage( 1060161 ); // The whirling attack strikes a target!
m.SendLocalizedMessage( 1060162 ); // You are struck by the whirling attack and take damage!
weapon.OnHit( attacker, m, damageBonus );
}
}
}
}
}
weapon.OnHit(attacker, m, damageBonus);
}
}
}
}
}

View file

@ -1,39 +1,39 @@
namespace Server.Items
{
public class AxeOfTheHeavens : DoubleAxe
{
public override int LabelNumber => 1061106; // Axe of the Heavens
public override int ArtifactRarity => 11;
public class AxeOfTheHeavens : DoubleAxe
{
[Constructible]
public AxeOfTheHeavens()
{
Hue = 0x4D5;
WeaponAttributes.HitLightning = 50;
Attributes.AttackChance = 15;
Attributes.DefendChance = 15;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public AxeOfTheHeavens(Serial serial) : base(serial)
{
}
[Constructible]
public AxeOfTheHeavens()
{
Hue = 0x4D5;
WeaponAttributes.HitLightning = 50;
Attributes.AttackChance = 15;
Attributes.DefendChance = 15;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061106; // Axe of the Heavens
public override int ArtifactRarity => 11;
public AxeOfTheHeavens( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,42 +1,42 @@
namespace Server.Items
{
public class BladeOfInsanity : Katana
{
public override int LabelNumber => 1061088; // Blade of Insanity
public override int ArtifactRarity => 11;
public class BladeOfInsanity : Katana
{
[Constructible]
public BladeOfInsanity()
{
Hue = 0x76D;
WeaponAttributes.HitLeechStam = 100;
Attributes.RegenStam = 2;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public BladeOfInsanity(Serial serial) : base(serial)
{
}
[Constructible]
public BladeOfInsanity()
{
Hue = 0x76D;
WeaponAttributes.HitLeechStam = 100;
Attributes.RegenStam = 2;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061088; // Blade of Insanity
public override int ArtifactRarity => 11;
public BladeOfInsanity( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Hue == 0x44F )
Hue = 0x76D;
}
}
}
if (Hue == 0x44F)
Hue = 0x76D;
}
}
}

View file

@ -1,44 +1,44 @@
namespace Server.Items
{
public class BladeOfTheRighteous : Longsword
{
public override int LabelNumber => 1061107; // Blade of the Righteous
public override int ArtifactRarity => 10;
public class BladeOfTheRighteous : Longsword
{
[Constructible]
public BladeOfTheRighteous()
{
Hue = 0x47E;
//Slayer = SlayerName.DaemonDismissal;
Slayer = SlayerName.Exorcism;
WeaponAttributes.HitLeechHits = 50;
WeaponAttributes.UseBestSkill = 1;
Attributes.BonusHits = 10;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public BladeOfTheRighteous(Serial serial) : base(serial)
{
}
[Constructible]
public BladeOfTheRighteous()
{
Hue = 0x47E;
//Slayer = SlayerName.DaemonDismissal;
Slayer = SlayerName.Exorcism;
WeaponAttributes.HitLeechHits = 50;
WeaponAttributes.UseBestSkill = 1;
Attributes.BonusHits = 10;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061107; // Blade of the Righteous
public override int ArtifactRarity => 10;
public BladeOfTheRighteous( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Slayer == SlayerName.None )
Slayer = SlayerName.Exorcism;
}
}
}
if (Slayer == SlayerName.None)
Slayer = SlayerName.Exorcism;
}
}
}

View file

@ -1,45 +1,45 @@
namespace Server.Items
{
public class BoneCrusher : WarMace
{
public override int LabelNumber => 1061596; // Bone Crusher
public override int ArtifactRarity => 11;
public class BoneCrusher : WarMace
{
[Constructible]
public BoneCrusher()
{
ItemID = 0x1406;
Hue = 0x60C;
WeaponAttributes.HitLowerDefend = 50;
Attributes.BonusStr = 10;
Attributes.WeaponDamage = 75;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public BoneCrusher(Serial serial) : base(serial)
{
}
[Constructible]
public BoneCrusher()
{
ItemID = 0x1406;
Hue = 0x60C;
WeaponAttributes.HitLowerDefend = 50;
Attributes.BonusStr = 10;
Attributes.WeaponDamage = 75;
}
public override int LabelNumber => 1061596; // Bone Crusher
public override int ArtifactRarity => 11;
public BoneCrusher( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Hue == 0x604 )
Hue = 0x60C;
if (Hue == 0x604)
Hue = 0x60C;
if ( ItemID == 0x1407 )
ItemID = 0x1406;
}
}
}
if (ItemID == 0x1407)
ItemID = 0x1406;
}
}
}

View file

@ -1,39 +1,39 @@
namespace Server.Items
{
public class BreathOfTheDead : BoneHarvester
{
public override int LabelNumber => 1061109; // Breath of the Dead
public override int ArtifactRarity => 11;
public class BreathOfTheDead : BoneHarvester
{
[Constructible]
public BreathOfTheDead()
{
Hue = 0x455;
WeaponAttributes.HitLeechHits = 100;
WeaponAttributes.HitHarm = 25;
Attributes.SpellDamage = 5;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public BreathOfTheDead(Serial serial) : base(serial)
{
}
[Constructible]
public BreathOfTheDead()
{
Hue = 0x455;
WeaponAttributes.HitLeechHits = 100;
WeaponAttributes.HitHarm = 25;
Attributes.SpellDamage = 5;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061109; // Breath of the Dead
public override int ArtifactRarity => 11;
public BreathOfTheDead( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,44 +1,45 @@
namespace Server.Items
{
public class Frostbringer : Bow
{
public override int LabelNumber => 1061111; // Frostbringer
public override int ArtifactRarity => 11;
public class Frostbringer : Bow
{
[Constructible]
public Frostbringer()
{
Hue = 0x4F2;
WeaponAttributes.HitDispel = 50;
Attributes.RegenStam = 10;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public Frostbringer(Serial serial) : base(serial)
{
}
[Constructible]
public Frostbringer()
{
Hue = 0x4F2;
WeaponAttributes.HitDispel = 50;
Attributes.RegenStam = 10;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061111; // Frostbringer
public override int ArtifactRarity => 11;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public Frostbringer( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,45 +1,45 @@
namespace Server.Items
{
public class LegacyOfTheDreadLord : Bardiche
{
public override int LabelNumber => 1060860; // Legacy of the Dread Lord
public override int ArtifactRarity => 10;
public class LegacyOfTheDreadLord : Bardiche
{
[Constructible]
public LegacyOfTheDreadLord()
{
Hue = 0x676;
Attributes.SpellChanneling = 1;
Attributes.CastRecovery = 3;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public LegacyOfTheDreadLord(Serial serial) : base(serial)
{
}
[Constructible]
public LegacyOfTheDreadLord()
{
Hue = 0x676;
Attributes.SpellChanneling = 1;
Attributes.CastRecovery = 3;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1060860; // Legacy of the Dread Lord
public override int ArtifactRarity => 10;
public LegacyOfTheDreadLord( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Attributes.CastSpeed == 3 )
Attributes.CastRecovery = 3;
if (Attributes.CastSpeed == 3)
Attributes.CastRecovery = 3;
if ( Hue == 0x4B9 )
Hue = 0x676;
}
}
}
if (Hue == 0x4B9)
Hue = 0x676;
}
}
}

View file

@ -1,50 +1,51 @@
namespace Server.Items
{
public class SerpentsFang : Kryss
{
public override int LabelNumber => 1061601; // Serpent's Fang
public override int ArtifactRarity => 11;
public class SerpentsFang : Kryss
{
[Constructible]
public SerpentsFang()
{
ItemID = 0x1400;
Hue = 0x488;
WeaponAttributes.HitPoisonArea = 100;
WeaponAttributes.ResistPoisonBonus = 20;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public SerpentsFang(Serial serial) : base(serial)
{
}
[Constructible]
public SerpentsFang()
{
ItemID = 0x1400;
Hue = 0x488;
WeaponAttributes.HitPoisonArea = 100;
WeaponAttributes.ResistPoisonBonus = 20;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061601; // Serpent's Fang
public override int ArtifactRarity => 11;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
fire = cold = nrgy = chaos = direct = 0;
phys = 25;
pois = 75;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public SerpentsFang( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
fire = cold = nrgy = chaos = direct = 0;
phys = 25;
pois = 75;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( ItemID == 0x1401 )
ItemID = 0x1400;
}
}
}
if (ItemID == 0x1401)
ItemID = 0x1400;
}
}
}

View file

@ -1,51 +1,52 @@
namespace Server.Items
{
public class StaffOfTheMagi : BlackStaff
{
public override int LabelNumber => 1061600; // Staff of the Magi
public override int ArtifactRarity => 11;
public class StaffOfTheMagi : BlackStaff
{
[Constructible]
public StaffOfTheMagi()
{
Hue = 0x481;
WeaponAttributes.MageWeapon = 30;
Attributes.SpellChanneling = 1;
Attributes.CastSpeed = 1;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public StaffOfTheMagi(Serial serial) : base(serial)
{
}
[Constructible]
public StaffOfTheMagi()
{
Hue = 0x481;
WeaponAttributes.MageWeapon = 30;
Attributes.SpellChanneling = 1;
Attributes.CastSpeed = 1;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061600; // Staff of the Magi
public override int ArtifactRarity => 11;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public StaffOfTheMagi( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( WeaponAttributes.MageWeapon == 0 )
WeaponAttributes.MageWeapon = 30;
if (WeaponAttributes.MageWeapon == 0)
WeaponAttributes.MageWeapon = 30;
if ( ItemID == 0xDF1 )
ItemID = 0xDF0;
}
}
}
if (ItemID == 0xDF1)
ItemID = 0xDF0;
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class TheBeserkersMaul : Maul
{
public override int LabelNumber => 1061108; // The Berserker's Maul
public override int ArtifactRarity => 11;
public class TheBeserkersMaul : Maul
{
[Constructible]
public TheBeserkersMaul()
{
Hue = 0x21;
Attributes.WeaponSpeed = 75;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TheBeserkersMaul(Serial serial) : base(serial)
{
}
[Constructible]
public TheBeserkersMaul()
{
Hue = 0x21;
Attributes.WeaponSpeed = 75;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061108; // The Berserker's Maul
public override int ArtifactRarity => 11;
public TheBeserkersMaul( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,49 +1,50 @@
namespace Server.Items
{
public class TheDragonSlayer : Lance
{
public override int LabelNumber => 1061248; // The Dragon Slayer
public override int ArtifactRarity => 11;
public class TheDragonSlayer : Lance
{
[Constructible]
public TheDragonSlayer()
{
Hue = 0x530;
Slayer = SlayerName.DragonSlaying;
Attributes.Luck = 110;
Attributes.WeaponDamage = 50;
WeaponAttributes.ResistFireBonus = 20;
WeaponAttributes.UseBestSkill = 1;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TheDragonSlayer(Serial serial) : base(serial)
{
}
[Constructible]
public TheDragonSlayer()
{
Hue = 0x530;
Slayer = SlayerName.DragonSlaying;
Attributes.Luck = 110;
Attributes.WeaponDamage = 50;
WeaponAttributes.ResistFireBonus = 20;
WeaponAttributes.UseBestSkill = 1;
}
public override int LabelNumber => 1061248; // The Dragon Slayer
public override int ArtifactRarity => 11;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TheDragonSlayer( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Slayer == SlayerName.None )
Slayer = SlayerName.DragonSlaying;
}
}
}
if (Slayer == SlayerName.None)
Slayer = SlayerName.DragonSlaying;
}
}
}

View file

@ -1,53 +1,56 @@
namespace Server.Items
{
public class TheDryadBow : Bow
{
public override int LabelNumber => 1061090; // The Dryad Bow
public override int ArtifactRarity => 11;
public class TheDryadBow : Bow
{
private static SkillName[] m_PossibleBonusSkills =
{
SkillName.Archery,
SkillName.Healing,
SkillName.MagicResist,
SkillName.Peacemaking,
SkillName.Chivalry,
SkillName.Ninjitsu
};
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
[Constructible]
public TheDryadBow()
{
ItemID = 0x13B1;
Hue = 0x48F;
SkillBonuses.SetValues(0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)],
Utility.Random(4) == 0 ? 10.0 : 5.0);
WeaponAttributes.SelfRepair = 5;
Attributes.WeaponSpeed = 50;
Attributes.WeaponDamage = 35;
WeaponAttributes.ResistPoisonBonus = 15;
}
[Constructible]
public TheDryadBow()
{
ItemID = 0x13B1;
Hue = 0x48F;
SkillBonuses.SetValues( 0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 4 ) == 0 ? 10.0 : 5.0) );
WeaponAttributes.SelfRepair = 5;
Attributes.WeaponSpeed = 50;
Attributes.WeaponDamage = 35;
WeaponAttributes.ResistPoisonBonus = 15;
}
public TheDryadBow(Serial serial) : base(serial)
{
}
private static SkillName[] m_PossibleBonusSkills = {
SkillName.Archery,
SkillName.Healing,
SkillName.MagicResist,
SkillName.Peacemaking,
SkillName.Chivalry,
SkillName.Ninjitsu
};
public override int LabelNumber => 1061090; // The Dryad Bow
public override int ArtifactRarity => 11;
public TheDryadBow( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 1 );
}
writer.Write(1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( version < 1 )
SkillBonuses.SetValues( 0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)], (Utility.Random( 4 ) == 0 ? 10.0 : 5.0) );
}
}
}
if (version < 1)
SkillBonuses.SetValues(0, m_PossibleBonusSkills[Utility.Random(m_PossibleBonusSkills.Length)],
Utility.Random(4) == 0 ? 10.0 : 5.0);
}
}
}

View file

@ -1,45 +1,46 @@
namespace Server.Items
{
public class TheTaskmaster : WarFork
{
public override int LabelNumber => 1061110; // The Taskmaster
public override int ArtifactRarity => 10;
public class TheTaskmaster : WarFork
{
[Constructible]
public TheTaskmaster()
{
Hue = 0x4F8;
WeaponAttributes.HitPoisonArea = 100;
Attributes.BonusDex = 5;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TheTaskmaster(Serial serial) : base(serial)
{
}
[Constructible]
public TheTaskmaster()
{
Hue = 0x4F8;
WeaponAttributes.HitPoisonArea = 100;
Attributes.BonusDex = 5;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061110; // The Taskmaster
public override int ArtifactRarity => 10;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = nrgy = chaos = direct = 0;
pois = 100;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TheTaskmaster( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = nrgy = chaos = direct = 0;
pois = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,39 +1,39 @@
namespace Server.Items
{
public class TitansHammer : WarHammer
{
public override int LabelNumber => 1060024; // Titan's Hammer
public override int ArtifactRarity => 10;
public class TitansHammer : WarHammer
{
[Constructible]
public TitansHammer()
{
Hue = 0x482;
WeaponAttributes.HitEnergyArea = 100;
Attributes.BonusStr = 15;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public TitansHammer(Serial serial) : base(serial)
{
}
[Constructible]
public TitansHammer()
{
Hue = 0x482;
WeaponAttributes.HitEnergyArea = 100;
Attributes.BonusStr = 15;
Attributes.AttackChance = 15;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1060024; // Titan's Hammer
public override int ArtifactRarity => 10;
public TitansHammer( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,48 +1,49 @@
namespace Server.Items
{
public class ZyronicClaw : ExecutionersAxe
{
public override int LabelNumber => 1061593; // Zyronic Claw
public override int ArtifactRarity => 10;
public class ZyronicClaw : ExecutionersAxe
{
[Constructible]
public ZyronicClaw()
{
Hue = 0x485;
Slayer = SlayerName.ElementalBan;
WeaponAttributes.HitLeechMana = 50;
Attributes.AttackChance = 30;
Attributes.WeaponDamage = 50;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public ZyronicClaw(Serial serial) : base(serial)
{
}
[Constructible]
public ZyronicClaw()
{
Hue = 0x485;
Slayer = SlayerName.ElementalBan;
WeaponAttributes.HitLeechMana = 50;
Attributes.AttackChance = 30;
Attributes.WeaponDamage = 50;
}
public override int LabelNumber => 1061593; // Zyronic Claw
public override int ArtifactRarity => 10;
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
chaos = direct = 0;
phys = fire = cold = pois = nrgy = 20;
}
public override int InitMinHits => 255;
public override int InitMaxHits => 255;
public ZyronicClaw( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
chaos = direct = 0;
phys = fire = cold = pois = nrgy = 20;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 );
}
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Slayer == SlayerName.None )
Slayer = SlayerName.ElementalBan;
}
}
}
if (Slayer == SlayerName.None)
Slayer = SlayerName.ElementalBan;
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xF49, 0xF4a )]
public class Axe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.Dismount;
[Flippable(0xF49, 0xF4a)]
public class Axe : BaseAxe
{
[Constructible]
public Axe() : base(0xF49)
{
Weight = 4.0;
}
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 16;
public override int AosSpeed => 37;
public override float MlSpeed => 3.00f;
public Axe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 37;
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.Dismount;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 16;
public override int AosSpeed => 37;
public override float MlSpeed => 3.00f;
[Constructible]
public Axe() : base( 0xF49 )
{
Weight = 4.0;
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 37;
public Axe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,170 +1,184 @@
using System;
using System.Collections.Generic;
using Server.Engines.Harvest;
using Server.ContextMenus;
using Server.Engines.ConPVP;
using Server.Engines.Harvest;
using Server.Network;
namespace Server.Items
{
public interface IAxe
{
bool Axe( Mobile from, BaseAxe axe );
}
public interface IAxe
{
bool Axe(Mobile from, BaseAxe axe);
}
public abstract class BaseAxe : BaseMeleeWeapon
{
public override int DefHitSound => 0x232;
public override int DefMissSound => 0x23A;
public abstract class BaseAxe : BaseMeleeWeapon
{
private bool m_ShowUsesRemaining;
public override SkillName DefSkill => SkillName.Swords;
public override WeaponType DefType => WeaponType.Axe;
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash2H;
private int m_UsesRemaining;
public virtual HarvestSystem HarvestSystem => Lumberjacking.System;
public BaseAxe(int itemID) : base(itemID)
{
m_UsesRemaining = 150;
}
private int m_UsesRemaining;
private bool m_ShowUsesRemaining;
public BaseAxe(Serial serial) : base(serial)
{
}
[CommandProperty( AccessLevel.GameMaster )]
public int UsesRemaining
{
get => m_UsesRemaining;
set { m_UsesRemaining = value; InvalidateProperties(); }
}
public override int DefHitSound => 0x232;
public override int DefMissSound => 0x23A;
[CommandProperty( AccessLevel.GameMaster )]
public bool ShowUsesRemaining
{
get => m_ShowUsesRemaining;
set { m_ShowUsesRemaining = value; InvalidateProperties(); }
}
public override SkillName DefSkill => SkillName.Swords;
public override WeaponType DefType => WeaponType.Axe;
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash2H;
public virtual int GetUsesScalar()
{
if ( Quality == WeaponQuality.Exceptional )
return 200;
public virtual HarvestSystem HarvestSystem => Lumberjacking.System;
return 100;
}
[CommandProperty(AccessLevel.GameMaster)]
public int UsesRemaining
{
get => m_UsesRemaining;
set
{
m_UsesRemaining = value;
InvalidateProperties();
}
}
public override void UnscaleDurability()
{
base.UnscaleDurability();
[CommandProperty(AccessLevel.GameMaster)]
public bool ShowUsesRemaining
{
get => m_ShowUsesRemaining;
set
{
m_ShowUsesRemaining = value;
InvalidateProperties();
}
}
int scale = GetUsesScalar();
public virtual int GetUsesScalar()
{
if (Quality == WeaponQuality.Exceptional)
return 200;
m_UsesRemaining = ((m_UsesRemaining * 100) + (scale - 1)) / scale;
InvalidateProperties();
}
return 100;
}
public override void ScaleDurability()
{
base.ScaleDurability();
public override void UnscaleDurability()
{
base.UnscaleDurability();
int scale = GetUsesScalar();
int scale = GetUsesScalar();
m_UsesRemaining = ((m_UsesRemaining * scale) + 99) / 100;
InvalidateProperties();
}
m_UsesRemaining = (m_UsesRemaining * 100 + (scale - 1)) / scale;
InvalidateProperties();
}
public BaseAxe( int itemID ) : base( itemID )
{
m_UsesRemaining = 150;
}
public override void ScaleDurability()
{
base.ScaleDurability();
public BaseAxe( Serial serial ) : base( serial )
{
}
int scale = GetUsesScalar();
public override void OnDoubleClick( Mobile from )
{
if ( HarvestSystem == null || Deleted )
return;
m_UsesRemaining = (m_UsesRemaining * scale + 99) / 100;
InvalidateProperties();
}
Point3D loc = GetWorldLocation();
public override void OnDoubleClick(Mobile from)
{
if (HarvestSystem == null || Deleted)
return;
if ( !from.InLOS( loc ) || !from.InRange( loc, 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3E9, 1019045 ); // I can't reach that
return;
}
Point3D loc = GetWorldLocation();
if ( !IsAccessibleTo( from ) )
{
PublicOverheadMessage( MessageType.Regular, 0x3E9, 1061637 ); // You are not allowed to access this.
return;
}
if (!from.InLOS(loc) || !from.InRange(loc, 2))
{
from.LocalOverheadMessage(MessageType.Regular, 0x3E9, 1019045); // I can't reach that
return;
}
if ( !(HarvestSystem is Mining) )
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
if (!IsAccessibleTo(from))
{
PublicOverheadMessage(MessageType.Regular, 0x3E9, 1061637); // You are not allowed to access this.
return;
}
HarvestSystem.BeginHarvesting( from, this );
}
if (!(HarvestSystem is Mining))
from.SendLocalizedMessage(1010018); // What do you want to use this item on?
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
HarvestSystem.BeginHarvesting(from, this);
}
if ( HarvestSystem != null )
BaseHarvestTool.AddContextMenuEntries( from, this, list, HarvestSystem );
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
if (HarvestSystem != null)
BaseHarvestTool.AddContextMenuEntries(from, this, list, HarvestSystem);
}
writer.Write( (int) 2 ); // version
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (bool) m_ShowUsesRemaining );
writer.Write(2); // version
writer.Write( (int) m_UsesRemaining );
}
writer.Write(m_ShowUsesRemaining);
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
writer.Write(m_UsesRemaining);
}
int version = reader.ReadInt();
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
switch ( version )
{
case 2:
{
m_ShowUsesRemaining = reader.ReadBool();
goto case 1;
}
case 1:
{
m_UsesRemaining = reader.ReadInt();
goto case 0;
}
case 0:
{
if ( m_UsesRemaining < 1 )
m_UsesRemaining = 150;
int version = reader.ReadInt();
break;
}
}
}
switch (version)
{
case 2:
{
m_ShowUsesRemaining = reader.ReadBool();
goto case 1;
}
case 1:
{
m_UsesRemaining = reader.ReadInt();
goto case 0;
}
case 0:
{
if (m_UsesRemaining < 1)
m_UsesRemaining = 150;
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1 )
{
base.OnHit( attacker, defender, damageBonus );
break;
}
}
}
if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && attacker.Skills[SkillName.Anatomy].Value >= 80 && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility(attacker, "Concussion Blow", false))
{
StatMod mod = defender.GetStatMod( "Concussion" );
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
{
base.OnHit(attacker, defender, damageBonus);
if ( mod == null )
{
defender.SendMessage( "You receive a concussion blow!" );
defender.AddStatMod( new StatMod( StatType.Int, "Concussion", -(defender.RawInt / 2), TimeSpan.FromSeconds( 30.0 ) ) );
if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded &&
attacker.Skills[SkillName.Anatomy].Value >= 80 &&
attacker.Skills[SkillName.Anatomy].Value / 400.0 >= Utility.RandomDouble() &&
DuelContext.AllowSpecialAbility(attacker, "Concussion Blow", false))
{
StatMod mod = defender.GetStatMod("Concussion");
attacker.SendMessage( "You deliver a concussion blow!" );
attacker.PlaySound( 0x308 );
}
}
}
}
}
if (mod == null)
{
defender.SendMessage("You receive a concussion blow!");
defender.AddStatMod(new StatMod(StatType.Int, "Concussion", -(defender.RawInt / 2),
TimeSpan.FromSeconds(30.0)));
attacker.SendMessage("You deliver a concussion blow!");
attacker.PlaySound(0x308);
}
}
}
}
}

View file

@ -1,48 +1,48 @@
namespace Server.Items
{
[FlippableAttribute( 0xF47, 0xF48 )]
public class BattleAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.ConcussionBlow;
[Flippable(0xF47, 0xF48)]
public class BattleAxe : BaseAxe
{
[Constructible]
public BattleAxe() : base(0xF47)
{
Weight = 4.0;
Layer = Layer.TwoHanded;
}
public override int AosStrengthReq => 35;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 31;
public override float MlSpeed => 3.50f;
public BattleAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 38;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.ConcussionBlow;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 35;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 31;
public override float MlSpeed => 3.50f;
[Constructible]
public BattleAxe() : base( 0xF47 )
{
Weight = 4.0;
Layer = Layer.TwoHanded;
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 38;
public override int OldSpeed => 30;
public BattleAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xf4b, 0xf4c )]
public class DoubleAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.WhirlwindAttack;
[Flippable(0xf4b, 0xf4c)]
public class DoubleAxe : BaseAxe
{
[Constructible]
public DoubleAxe() : base(0xF4B)
{
Weight = 8.0;
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
public DoubleAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 45;
public override int OldMinDamage => 5;
public override int OldMaxDamage => 35;
public override int OldSpeed => 37;
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.WhirlwindAttack;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
[Constructible]
public DoubleAxe() : base( 0xF4B )
{
Weight = 8.0;
}
public override int OldStrengthReq => 45;
public override int OldMinDamage => 5;
public override int OldMaxDamage => 35;
public override int OldSpeed => 37;
public DoubleAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xf45, 0xf46 )]
public class ExecutionersAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
[Flippable(0xf45, 0xf46)]
public class ExecutionersAxe : BaseAxe
{
[Constructible]
public ExecutionersAxe() : base(0xF45)
{
Weight = 8.0;
}
public override int AosStrengthReq => 40;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
public ExecutionersAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 37;
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 40;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
[Constructible]
public ExecutionersAxe() : base( 0xF45 )
{
Weight = 8.0;
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 37;
public ExecutionersAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,32 +1,32 @@
namespace Server.Items
{
public class GuardianAxe : OrnateAxe
{
public override int LabelNumber => 1073545; // guardian axe
public class GuardianAxe : OrnateAxe
{
[Constructible]
public GuardianAxe()
{
Attributes.BonusHits = 4;
Attributes.RegenHits = 1;
}
[Constructible]
public GuardianAxe()
{
Attributes.BonusHits = 4;
Attributes.RegenHits = 1;
}
public GuardianAxe(Serial serial) : base(serial)
{
}
public GuardianAxe( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073545; // guardian axe
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xF43, 0xF44 )]
public class Hatchet : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
[Flippable(0xF43, 0xF44)]
public class Hatchet : BaseAxe
{
[Constructible]
public Hatchet() : base(0xF43)
{
Weight = 4.0;
}
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 41;
public override float MlSpeed => 2.75f;
public Hatchet(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 17;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 80;
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 41;
public override float MlSpeed => 2.75f;
[Constructible]
public Hatchet() : base( 0xF43 )
{
Weight = 4.0;
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 17;
public override int OldSpeed => 40;
public Hatchet( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 80;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class HeavyOrnateAxe : OrnateAxe
{
public override int LabelNumber => 1073548; // heavy ornate axe
public class HeavyOrnateAxe : OrnateAxe
{
[Constructible]
public HeavyOrnateAxe()
{
Attributes.WeaponDamage = 8;
}
[Constructible]
public HeavyOrnateAxe()
{
Attributes.WeaponDamage = 8;
}
public HeavyOrnateAxe(Serial serial) : base(serial)
{
}
public HeavyOrnateAxe( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073548; // heavy ornate axe
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x13FB, 0x13FA )]
public class LargeBattleAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
[Flippable(0x13FB, 0x13FA)]
public class LargeBattleAxe : BaseAxe
{
[Constructible]
public LargeBattleAxe() : base(0x13FB)
{
Weight = 6.0;
}
public override int AosStrengthReq => 80;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 29;
public override float MlSpeed => 3.75f;
public LargeBattleAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 38;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 80;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 29;
public override float MlSpeed => 3.75f;
[Constructible]
public LargeBattleAxe() : base( 0x13FB )
{
Weight = 6.0;
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 38;
public override int OldSpeed => 30;
public LargeBattleAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,55 +2,55 @@ using Server.Engines.Harvest;
namespace Server.Items
{
[FlippableAttribute( 0xE86, 0xE85 )]
public class Pickaxe : BaseAxe, IUsesRemaining
{
public override HarvestSystem HarvestSystem => Mining.System;
[Flippable(0xE86, 0xE85)]
public class Pickaxe : BaseAxe, IUsesRemaining
{
[Constructible]
public Pickaxe() : base(0xE86)
{
Weight = 11.0;
UsesRemaining = 50;
ShowUsesRemaining = true;
}
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public Pickaxe(Serial serial) : base(serial)
{
}
public override int AosStrengthReq => 50;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 35;
public override float MlSpeed => 3.00f;
public override HarvestSystem HarvestSystem => Mining.System;
public override int OldStrengthReq => 25;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 15;
public override int OldSpeed => 35;
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 60;
public override int AosStrengthReq => 50;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 35;
public override float MlSpeed => 3.00f;
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
public override int OldStrengthReq => 25;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 15;
public override int OldSpeed => 35;
[Constructible]
public Pickaxe() : base( 0xE86 )
{
Weight = 11.0;
UsesRemaining = 50;
ShowUsesRemaining = true;
}
public override int InitMinHits => 31;
public override int InitMaxHits => 60;
public Pickaxe( Serial serial ) : base( serial )
{
}
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
ShowUsesRemaining = true;
}
}
}
int version = reader.ReadInt();
ShowUsesRemaining = true;
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class SingingAxe : OrnateAxe
{
public override int LabelNumber => 1073546; // singing axe
public class SingingAxe : OrnateAxe
{
[Constructible]
public SingingAxe()
{
SkillBonuses.SetValues(0, SkillName.Musicianship, 5);
}
[Constructible]
public SingingAxe()
{
SkillBonuses.SetValues( 0, SkillName.Musicianship, 5 );
}
public SingingAxe(Serial serial) : base(serial)
{
}
public SingingAxe( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073546; // singing axe
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class ThunderingAxe : OrnateAxe
{
public override int LabelNumber => 1073547; // thundering axe
public class ThunderingAxe : OrnateAxe
{
[Constructible]
public ThunderingAxe()
{
WeaponAttributes.HitLightning = 10;
}
[Constructible]
public ThunderingAxe()
{
WeaponAttributes.HitLightning = 10;
}
public ThunderingAxe(Serial serial) : base(serial)
{
}
public ThunderingAxe( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073547; // thundering axe
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x1443, 0x1442 )]
public class TwoHandedAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
[Flippable(0x1443, 0x1442)]
public class TwoHandedAxe : BaseAxe
{
[Constructible]
public TwoHandedAxe() : base(0x1443)
{
Weight = 8.0;
}
public override int AosStrengthReq => 40;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 31;
public override float MlSpeed => 3.50f;
public TwoHandedAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 5;
public override int OldMaxDamage => 39;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.DoubleStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 90;
public override int AosStrengthReq => 40;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 31;
public override float MlSpeed => 3.50f;
[Constructible]
public TwoHandedAxe() : base( 0x1443 )
{
Weight = 8.0;
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 5;
public override int OldMaxDamage => 39;
public override int OldSpeed => 30;
public TwoHandedAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 90;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,57 +2,57 @@ using Server.Engines.Harvest;
namespace Server.Items
{
[FlippableAttribute( 0x13B0, 0x13AF )]
public class WarAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
[Flippable(0x13B0, 0x13AF)]
public class WarAxe : BaseAxe
{
[Constructible]
public WarAxe() : base(0x13B0)
{
Weight = 8.0;
}
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 15;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
public WarAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 27;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
public override int DefHitSound => 0x233;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 15;
public override int AosSpeed => 33;
public override float MlSpeed => 3.25f;
public override int InitMinHits => 31;
public override int InitMaxHits => 80;
public override int OldStrengthReq => 35;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 27;
public override int OldSpeed => 40;
public override SkillName DefSkill => SkillName.Macing;
public override WeaponType DefType => WeaponType.Bashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash1H;
public override int DefHitSound => 0x233;
public override int DefMissSound => 0x239;
public override HarvestSystem HarvestSystem => null;
public override int InitMinHits => 31;
public override int InitMaxHits => 80;
[Constructible]
public WarAxe() : base( 0x13B0 )
{
Weight = 8.0;
}
public override SkillName DefSkill => SkillName.Macing;
public override WeaponType DefType => WeaponType.Bashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash1H;
public WarAxe( Serial serial ) : base( serial )
{
}
public override HarvestSystem HarvestSystem => null;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,63 +2,63 @@ using Server.Spells.Spellweaving;
namespace Server.Items
{
public abstract class BaseMeleeWeapon : BaseWeapon
{
public BaseMeleeWeapon( int itemID ) : base( itemID )
{
}
public abstract class BaseMeleeWeapon : BaseWeapon
{
public BaseMeleeWeapon(int itemID) : base(itemID)
{
}
public BaseMeleeWeapon( Serial serial ) : base( serial )
{
}
public BaseMeleeWeapon(Serial serial) : base(serial)
{
}
public override int AbsorbDamage( Mobile attacker, Mobile defender, int damage )
{
damage = base.AbsorbDamage( attacker, defender, damage );
public override int AbsorbDamage(Mobile attacker, Mobile defender, int damage)
{
damage = base.AbsorbDamage(attacker, defender, damage);
AttuneWeaponSpell.TryAbsorb( defender, ref damage );
AttuneWeaponSpell.TryAbsorb(defender, ref damage);
if ( Core.AOS )
return damage;
if (Core.AOS)
return damage;
int absorb = defender.MeleeDamageAbsorb;
int absorb = defender.MeleeDamageAbsorb;
if ( absorb > 0 )
{
if ( absorb > damage )
{
int react = damage / 5;
if (absorb > 0)
{
if (absorb > damage)
{
int react = damage / 5;
if ( react <= 0 )
react = 1;
if (react <= 0)
react = 1;
defender.MeleeDamageAbsorb -= damage;
damage = 0;
defender.MeleeDamageAbsorb -= damage;
damage = 0;
attacker.Damage( react, defender );
attacker.Damage(react, defender);
attacker.PlaySound( 0x1F1 );
attacker.FixedEffect( 0x374A, 10, 16 );
}
else
{
defender.MeleeDamageAbsorb = 0;
defender.SendLocalizedMessage( 1005556 ); // Your reactive armor spell has been nullified.
DefensiveSpell.Nullify( defender );
}
}
attacker.PlaySound(0x1F1);
attacker.FixedEffect(0x374A, 10, 16);
}
else
{
defender.MeleeDamageAbsorb = 0;
defender.SendLocalizedMessage(1005556); // Your reactive armor spell has been nullified.
DefensiveSpell.Nullify(defender);
}
}
return damage;
}
return damage;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -1,309 +1,316 @@
using System;
using Server.Engines.ConPVP;
namespace Server.Items
{
public class Fists : BaseMeleeWeapon
{
public static void Initialize()
{
Mobile.DefaultWeapon = new Fists();
public class Fists : BaseMeleeWeapon
{
public Fists() : base(0)
{
Visible = false;
Movable = false;
Quality = WeaponQuality.Regular;
}
EventSink.DisarmRequest += EventSink_DisarmRequest;
EventSink.StunRequest += EventSink_StunRequest;
}
public Fists(Serial serial) : base(serial)
{
}
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.ParalyzingBlow;
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.ParalyzingBlow;
public override int AosStrengthReq => 0;
public override int AosMinDamage => 1;
public override int AosMaxDamage => 4;
public override int AosSpeed => 50;
public override float MlSpeed => 2.50f;
public override int AosStrengthReq => 0;
public override int AosMinDamage => 1;
public override int AosMaxDamage => 4;
public override int AosSpeed => 50;
public override float MlSpeed => 2.50f;
public override int OldStrengthReq => 0;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 8;
public override int OldSpeed => 30;
public override int OldStrengthReq => 0;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 8;
public override int OldSpeed => 30;
public override int DefHitSound => -1;
public override int DefMissSound => -1;
public override int DefHitSound => -1;
public override int DefMissSound => -1;
public override SkillName DefSkill => SkillName.Wrestling;
public override WeaponType DefType => WeaponType.Fists;
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
public override SkillName DefSkill => SkillName.Wrestling;
public override WeaponType DefType => WeaponType.Fists;
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
public Fists() : base( 0 )
{
Visible = false;
Movable = false;
Quality = WeaponQuality.Regular;
}
public static void Initialize()
{
Mobile.DefaultWeapon = new Fists();
public Fists( Serial serial ) : base( serial )
{
}
EventSink.DisarmRequest += EventSink_DisarmRequest;
EventSink.StunRequest += EventSink_StunRequest;
}
public override double GetDefendSkillValue( Mobile attacker, Mobile defender )
{
double wresValue = defender.Skills[SkillName.Wrestling].Value;
double anatValue = defender.Skills[SkillName.Anatomy].Value;
double evalValue = defender.Skills[SkillName.EvalInt].Value;
double incrValue = (anatValue + evalValue + 20.0) * 0.5;
public override double GetDefendSkillValue(Mobile attacker, Mobile defender)
{
double wresValue = defender.Skills[SkillName.Wrestling].Value;
double anatValue = defender.Skills[SkillName.Anatomy].Value;
double evalValue = defender.Skills[SkillName.EvalInt].Value;
double incrValue = (anatValue + evalValue + 20.0) * 0.5;
if ( incrValue > 120.0 )
incrValue = 120.0;
if (incrValue > 120.0)
incrValue = 120.0;
if ( wresValue > incrValue )
return wresValue;
return incrValue;
}
if (wresValue > incrValue)
return wresValue;
return incrValue;
}
private void CheckPreAOSMoves( Mobile attacker, Mobile defender )
{
if ( attacker.StunReady )
{
if ( attacker.CanBeginAction( typeof( Fists ) ) )
{
if ( attacker.Skills[SkillName.Anatomy].Value >= 80.0 && attacker.Skills[SkillName.Wrestling].Value >= 80.0 )
{
if ( attacker.Stam >= 15 )
{
attacker.Stam -= 15;
private void CheckPreAOSMoves(Mobile attacker, Mobile defender)
{
if (attacker.StunReady)
{
if (attacker.CanBeginAction(typeof(Fists)))
{
if (attacker.Skills[SkillName.Anatomy].Value >= 80.0 &&
attacker.Skills[SkillName.Wrestling].Value >= 80.0)
{
if (attacker.Stam >= 15)
{
attacker.Stam -= 15;
if ( CheckMove( attacker, SkillName.Anatomy ) )
{
StartMoveDelay( attacker );
if (CheckMove(attacker, SkillName.Anatomy))
{
StartMoveDelay(attacker);
attacker.StunReady = false;
attacker.StunReady = false;
attacker.SendLocalizedMessage( 1004013 ); // You successfully stun your opponent!
defender.SendLocalizedMessage( 1004014 ); // You have been stunned!
attacker.SendLocalizedMessage(1004013); // You successfully stun your opponent!
defender.SendLocalizedMessage(1004014); // You have been stunned!
defender.Freeze( TimeSpan.FromSeconds( 4.0 ) );
}
else
{
attacker.SendLocalizedMessage( 1004010 ); // You failed in your attempt to stun.
defender.SendLocalizedMessage( 1004011 ); // Your opponent tried to stun you and failed.
}
}
else
{
attacker.SendLocalizedMessage( 1004009 ); // You are too fatigued to attempt anything.
}
}
else
{
attacker.SendLocalizedMessage( 1004008 ); // You are not skilled enough to stun your opponent.
attacker.StunReady = false;
}
}
}
else if ( attacker.DisarmReady )
{
if ( attacker.CanBeginAction( typeof( Fists ) ) )
{
if ( defender.Player || defender.Body.IsHuman )
{
if ( attacker.Skills[SkillName.ArmsLore].Value >= 80.0 && attacker.Skills[SkillName.Wrestling].Value >= 80.0 )
{
if ( attacker.Stam >= 15 )
{
Item toDisarm = defender.FindItemOnLayer( Layer.OneHanded );
defender.Freeze(TimeSpan.FromSeconds(4.0));
}
else
{
attacker.SendLocalizedMessage(1004010); // You failed in your attempt to stun.
defender.SendLocalizedMessage(1004011); // Your opponent tried to stun you and failed.
}
}
else
{
attacker.SendLocalizedMessage(1004009); // You are too fatigued to attempt anything.
}
}
else
{
attacker.SendLocalizedMessage(1004008); // You are not skilled enough to stun your opponent.
attacker.StunReady = false;
}
}
}
else if (attacker.DisarmReady)
{
if (attacker.CanBeginAction(typeof(Fists)))
{
if (defender.Player || defender.Body.IsHuman)
{
if (attacker.Skills[SkillName.ArmsLore].Value >= 80.0 &&
attacker.Skills[SkillName.Wrestling].Value >= 80.0)
{
if (attacker.Stam >= 15)
{
Item toDisarm = defender.FindItemOnLayer(Layer.OneHanded);
if ( toDisarm == null || !toDisarm.Movable )
toDisarm = defender.FindItemOnLayer( Layer.TwoHanded );
if (toDisarm == null || !toDisarm.Movable)
toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
Container pack = defender.Backpack;
Container pack = defender.Backpack;
if ( pack == null || toDisarm == null || !toDisarm.Movable )
{
attacker.SendLocalizedMessage( 1004001 ); // You cannot disarm your opponent.
}
else if ( CheckMove( attacker, SkillName.ArmsLore ) )
{
StartMoveDelay( attacker );
if (pack == null || toDisarm == null || !toDisarm.Movable)
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
else if (CheckMove(attacker, SkillName.ArmsLore))
{
StartMoveDelay(attacker);
attacker.Stam -= 15;
attacker.DisarmReady = false;
attacker.Stam -= 15;
attacker.DisarmReady = false;
attacker.SendLocalizedMessage( 1004006 ); // You successfully disarm your opponent!
defender.SendLocalizedMessage( 1004007 ); // You have been disarmed!
attacker.SendLocalizedMessage(1004006); // You successfully disarm your opponent!
defender.SendLocalizedMessage(1004007); // You have been disarmed!
pack.DropItem( toDisarm );
}
else
{
attacker.Stam -= 15;
pack.DropItem(toDisarm);
}
else
{
attacker.Stam -= 15;
attacker.SendLocalizedMessage( 1004004 ); // You failed in your attempt to disarm.
defender.SendLocalizedMessage( 1004005 ); // Your opponent tried to disarm you but failed.
}
}
else
{
attacker.SendLocalizedMessage( 1004003 ); // You are too fatigued to attempt anything.
}
}
else
{
attacker.SendLocalizedMessage( 1004002 ); // You are not skilled enough to disarm your opponent.
attacker.DisarmReady = false;
}
}
else
{
attacker.SendLocalizedMessage( 1004001 ); // You cannot disarm your opponent.
}
}
}
}
attacker.SendLocalizedMessage(1004004); // You failed in your attempt to disarm.
defender.SendLocalizedMessage(1004005); // Your opponent tried to disarm you but failed.
}
}
else
{
attacker.SendLocalizedMessage(1004003); // You are too fatigued to attempt anything.
}
}
else
{
attacker.SendLocalizedMessage(1004002); // You are not skilled enough to disarm your opponent.
attacker.DisarmReady = false;
}
}
else
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
}
}
}
public override TimeSpan OnSwing( Mobile attacker, Mobile defender )
{
if ( !Core.AOS )
CheckPreAOSMoves( attacker, defender );
public override TimeSpan OnSwing(Mobile attacker, Mobile defender)
{
if (!Core.AOS)
CheckPreAOSMoves(attacker, defender);
return base.OnSwing( attacker, defender );
}
return base.OnSwing(attacker, defender);
}
/*public override void OnMiss( Mobile attacker, Mobile defender )
{
base.PlaySwingAnimation( attacker );
}*/
/*public override void OnMiss( Mobile attacker, Mobile defender )
{
base.PlaySwingAnimation( attacker );
}*/
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
Delete();
}
Delete();
}
/* Wrestling moves */
/* Wrestling moves */
private static bool CheckMove( Mobile m, SkillName other )
{
double wresValue = m.Skills[SkillName.Wrestling].Value;
double scndValue = m.Skills[other].Value;
private static bool CheckMove(Mobile m, SkillName other)
{
double wresValue = m.Skills[SkillName.Wrestling].Value;
double scndValue = m.Skills[other].Value;
/* 40% chance at 80, 80
* 50% chance at 100, 100
* 60% chance at 120, 120
*/
/* 40% chance at 80, 80
* 50% chance at 100, 100
* 60% chance at 120, 120
*/
double chance = (wresValue + scndValue) / 400.0;
double chance = (wresValue + scndValue) / 400.0;
return ( chance >= Utility.RandomDouble() );
}
return chance >= Utility.RandomDouble();
}
private static bool HasFreeHands( Mobile m )
{
Item item = m.FindItemOnLayer( Layer.OneHanded );
private static bool HasFreeHands(Mobile m)
{
Item item = m.FindItemOnLayer(Layer.OneHanded);
if ( item != null && !(item is Spellbook) )
return false;
if (item != null && !(item is Spellbook))
return false;
return m.FindItemOnLayer( Layer.TwoHanded ) == null;
}
return m.FindItemOnLayer(Layer.TwoHanded) == null;
}
private static void EventSink_DisarmRequest( DisarmRequestEventArgs e )
{
if ( Core.AOS )
return;
private static void EventSink_DisarmRequest(DisarmRequestEventArgs e)
{
if (Core.AOS)
return;
Mobile m = e.Mobile;
Mobile m = e.Mobile;
#region Dueling
if ( !Engines.ConPVP.DuelContext.AllowSpecialAbility( m, "Disarm", true ) )
return;
#endregion
#region Dueling
double armsValue = m.Skills[SkillName.ArmsLore].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;
if (!DuelContext.AllowSpecialAbility(m, "Disarm", true))
return;
if ( !HasFreeHands( m ) )
{
m.SendLocalizedMessage( 1004029 ); // You must have your hands free to attempt to disarm your opponent.
m.DisarmReady = false;
}
else if ( armsValue >= 80.0 && wresValue >= 80.0 )
{
m.DisruptiveAction();
m.DisarmReady = !m.DisarmReady;
m.SendLocalizedMessage( m.DisarmReady ? 1019013 : 1019014 );
}
else
{
m.SendLocalizedMessage( 1004002 ); // You are not skilled enough to disarm your opponent.
m.DisarmReady = false;
}
}
#endregion
private static void EventSink_StunRequest( StunRequestEventArgs e )
{
if ( Core.AOS )
return;
double armsValue = m.Skills[SkillName.ArmsLore].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;
Mobile m = e.Mobile;
if (!HasFreeHands(m))
{
m.SendLocalizedMessage(1004029); // You must have your hands free to attempt to disarm your opponent.
m.DisarmReady = false;
}
else if (armsValue >= 80.0 && wresValue >= 80.0)
{
m.DisruptiveAction();
m.DisarmReady = !m.DisarmReady;
m.SendLocalizedMessage(m.DisarmReady ? 1019013 : 1019014);
}
else
{
m.SendLocalizedMessage(1004002); // You are not skilled enough to disarm your opponent.
m.DisarmReady = false;
}
}
#region Dueling
if ( !Engines.ConPVP.DuelContext.AllowSpecialAbility( m, "Stun", true ) )
return;
#endregion
private static void EventSink_StunRequest(StunRequestEventArgs e)
{
if (Core.AOS)
return;
double anatValue = m.Skills[SkillName.Anatomy].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;
Mobile m = e.Mobile;
if ( !HasFreeHands( m ) )
{
m.SendLocalizedMessage( 1004031 ); // You must have your hands free to attempt to stun your opponent.
m.StunReady = false;
}
else if ( anatValue >= 80.0 && wresValue >= 80.0 )
{
m.DisruptiveAction();
m.StunReady = !m.StunReady;
m.SendLocalizedMessage( m.StunReady ? 1019011 : 1019012 );
}
else
{
m.SendLocalizedMessage( 1004008 ); // You are not skilled enough to stun your opponent.
m.StunReady = false;
}
}
#region Dueling
private class MoveDelayTimer : Timer
{
private Mobile m_Mobile;
if (!DuelContext.AllowSpecialAbility(m, "Stun", true))
return;
public MoveDelayTimer( Mobile m ) : base( TimeSpan.FromSeconds( 10.0 ) )
{
m_Mobile = m;
#endregion
Priority = TimerPriority.TwoFiftyMS;
double anatValue = m.Skills[SkillName.Anatomy].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;
m_Mobile.BeginAction( typeof( Fists ) );
}
if (!HasFreeHands(m))
{
m.SendLocalizedMessage(1004031); // You must have your hands free to attempt to stun your opponent.
m.StunReady = false;
}
else if (anatValue >= 80.0 && wresValue >= 80.0)
{
m.DisruptiveAction();
m.StunReady = !m.StunReady;
m.SendLocalizedMessage(m.StunReady ? 1019011 : 1019012);
}
else
{
m.SendLocalizedMessage(1004008); // You are not skilled enough to stun your opponent.
m.StunReady = false;
}
}
protected override void OnTick()
{
m_Mobile.EndAction( typeof( Fists ) );
}
}
private static void StartMoveDelay(Mobile m)
{
new MoveDelayTimer(m).Start();
}
private static void StartMoveDelay( Mobile m )
{
new MoveDelayTimer( m ).Start();
}
}
}
private class MoveDelayTimer : Timer
{
private Mobile m_Mobile;
public MoveDelayTimer(Mobile m) : base(TimeSpan.FromSeconds(10.0))
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
m_Mobile.BeginAction(typeof(Fists));
}
protected override void OnTick()
{
m_Mobile.EndAction(typeof(Fists));
}
}
}
}

View file

@ -3,93 +3,93 @@ using System.Collections;
namespace Server.Items
{
public class HitLower
{
public static readonly TimeSpan AttackEffectDuration = TimeSpan.FromSeconds( 10.0 );
public static readonly TimeSpan DefenseEffectDuration = TimeSpan.FromSeconds( 8.0 );
public class HitLower
{
public static readonly TimeSpan AttackEffectDuration = TimeSpan.FromSeconds(10.0);
public static readonly TimeSpan DefenseEffectDuration = TimeSpan.FromSeconds(8.0);
private static Hashtable m_AttackTable = new Hashtable();
private static Hashtable m_AttackTable = new Hashtable();
public static bool IsUnderAttackEffect( Mobile m )
{
return m_AttackTable.Contains( m );
}
private static Hashtable m_DefenseTable = new Hashtable();
public static bool ApplyAttack( Mobile m )
{
if ( IsUnderAttackEffect( m ) )
return false;
public static bool IsUnderAttackEffect(Mobile m)
{
return m_AttackTable.Contains(m);
}
m_AttackTable[m] = new AttackTimer( m );
m.SendLocalizedMessage( 1062319 ); // Your attack chance has been reduced!
return true;
}
public static bool ApplyAttack(Mobile m)
{
if (IsUnderAttackEffect(m))
return false;
private static void RemoveAttack( Mobile m )
{
m_AttackTable.Remove( m );
m.SendLocalizedMessage( 1062320 ); // Your attack chance has returned to normal.
}
m_AttackTable[m] = new AttackTimer(m);
m.SendLocalizedMessage(1062319); // Your attack chance has been reduced!
return true;
}
private class AttackTimer : Timer
{
private Mobile m_Player;
private static void RemoveAttack(Mobile m)
{
m_AttackTable.Remove(m);
m.SendLocalizedMessage(1062320); // Your attack chance has returned to normal.
}
public AttackTimer( Mobile player ) : base( AttackEffectDuration )
{
m_Player = player;
public static bool IsUnderDefenseEffect(Mobile m)
{
return m_DefenseTable.Contains(m);
}
Priority = TimerPriority.TwoFiftyMS;
public static bool ApplyDefense(Mobile m)
{
if (IsUnderDefenseEffect(m))
return false;
Start();
}
m_DefenseTable[m] = new DefenseTimer(m);
m.SendLocalizedMessage(1062318); // Your defense chance has been reduced!
return true;
}
protected override void OnTick()
{
RemoveAttack( m_Player );
}
}
private static void RemoveDefense(Mobile m)
{
m_DefenseTable.Remove(m);
m.SendLocalizedMessage(1062321); // Your defense chance has returned to normal.
}
private static Hashtable m_DefenseTable = new Hashtable();
private class AttackTimer : Timer
{
private Mobile m_Player;
public static bool IsUnderDefenseEffect( Mobile m )
{
return m_DefenseTable.Contains( m );
}
public AttackTimer(Mobile player) : base(AttackEffectDuration)
{
m_Player = player;
public static bool ApplyDefense( Mobile m )
{
if ( IsUnderDefenseEffect( m ) )
return false;
Priority = TimerPriority.TwoFiftyMS;
m_DefenseTable[m] = new DefenseTimer( m );
m.SendLocalizedMessage( 1062318 ); // Your defense chance has been reduced!
return true;
}
Start();
}
private static void RemoveDefense( Mobile m )
{
m_DefenseTable.Remove( m );
m.SendLocalizedMessage( 1062321 ); // Your defense chance has returned to normal.
}
protected override void OnTick()
{
RemoveAttack(m_Player);
}
}
private class DefenseTimer : Timer
{
private Mobile m_Player;
private class DefenseTimer : Timer
{
private Mobile m_Player;
public DefenseTimer( Mobile player ) : base( DefenseEffectDuration )
{
m_Player = player;
public DefenseTimer(Mobile player) : base(DefenseEffectDuration)
{
m_Player = player;
Priority = TimerPriority.TwoFiftyMS;
Priority = TimerPriority.TwoFiftyMS;
Start();
}
Start();
}
protected override void OnTick()
{
RemoveDefense( m_Player );
}
}
}
protected override void OnTick()
{
RemoveDefense(m_Player);
}
}
}
}

View file

@ -2,55 +2,55 @@ using Server.Targets;
namespace Server.Items
{
public abstract class BaseKnife : BaseMeleeWeapon
{
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x238;
public abstract class BaseKnife : BaseMeleeWeapon
{
public BaseKnife(int itemID) : base(itemID)
{
}
public override SkillName DefSkill => SkillName.Swords;
public override WeaponType DefType => WeaponType.Slashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
public BaseKnife(Serial serial) : base(serial)
{
}
public BaseKnife( int itemID ) : base( itemID )
{
}
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x238;
public BaseKnife( Serial serial ) : base( serial )
{
}
public override SkillName DefSkill => SkillName.Swords;
public override WeaponType DefType => WeaponType.Slashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Slash1H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
int version = reader.ReadInt();
}
public override void OnDoubleClick( Mobile from )
{
from.SendLocalizedMessage( 1010018 ); // What do you want to use this item on?
public override void OnDoubleClick(Mobile from)
{
from.SendLocalizedMessage(1010018); // What do you want to use this item on?
from.Target = new BladedItemTarget( this );
}
from.Target = new BladedItemTarget(this);
}
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1 )
{
base.OnHit( attacker, defender, damageBonus );
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
{
base.OnHit(attacker, defender, damageBonus);
if ( !Core.AOS && Poison != null && PoisonCharges > 0 )
{
--PoisonCharges;
if (!Core.AOS && Poison != null && PoisonCharges > 0)
{
--PoisonCharges;
if ( Utility.RandomDouble() >= 0.5 ) // 50% chance to poison
defender.ApplyPoison( attacker, Poison );
}
}
}
}
if (Utility.RandomDouble() >= 0.5) // 50% chance to poison
defender.ApplyPoison(attacker, Poison);
}
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x13F6, 0x13F7 )]
public class ButcherKnife : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
[Flippable(0x13F6, 0x13F7)]
public class ButcherKnife : BaseKnife
{
[Constructible]
public ButcherKnife() : base(0x13F6)
{
Weight = 1.0;
}
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 49;
public override float MlSpeed => 2.25f;
public ButcherKnife(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 5;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 14;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 49;
public override float MlSpeed => 2.25f;
[Constructible]
public ButcherKnife() : base( 0x13F6 )
{
Weight = 1.0;
}
public override int OldStrengthReq => 5;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 14;
public override int OldSpeed => 40;
public ButcherKnife( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0xEC3, 0xEC2 )]
public class Cleaver : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.InfectiousStrike;
[Flippable(0xEC3, 0xEC2)]
public class Cleaver : BaseKnife
{
[Constructible]
public Cleaver() : base(0xEC3)
{
Weight = 2.0;
}
public override int AosStrengthReq => 10;
public override int AosMinDamage => 11;
public override int AosMaxDamage => 13;
public override int AosSpeed => 46;
public override float MlSpeed => 2.50f;
public Cleaver(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 10;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 13;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.BleedAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.InfectiousStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 50;
public override int AosStrengthReq => 10;
public override int AosMinDamage => 11;
public override int AosMaxDamage => 13;
public override int AosSpeed => 46;
public override float MlSpeed => 2.50f;
[Constructible]
public Cleaver() : base( 0xEC3 )
{
Weight = 2.0;
}
public override int OldStrengthReq => 10;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 13;
public override int OldSpeed => 40;
public Cleaver( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 50;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Weight == 1.0 )
Weight = 2.0;
}
}
}
if (Weight == 1.0)
Weight = 2.0;
}
}
}

View file

@ -1,51 +1,51 @@
namespace Server.Items
{
[FlippableAttribute( 0xF52, 0xF51 )]
public class Dagger : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
[Flippable(0xF52, 0xF51)]
public class Dagger : BaseKnife
{
[Constructible]
public Dagger() : base(0xF52)
{
Weight = 1.0;
}
public override int AosStrengthReq => 10;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 11;
public override int AosSpeed => 56;
public override float MlSpeed => 2.00f;
public Dagger(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 1;
public override int OldMinDamage => 3;
public override int OldMaxDamage => 15;
public override int OldSpeed => 55;
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override int AosStrengthReq => 10;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 11;
public override int AosSpeed => 56;
public override float MlSpeed => 2.00f;
public override SkillName DefSkill => SkillName.Fencing;
public override WeaponType DefType => WeaponType.Piercing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Pierce1H;
public override int OldStrengthReq => 1;
public override int OldMinDamage => 3;
public override int OldMaxDamage => 15;
public override int OldSpeed => 55;
[Constructible]
public Dagger() : base( 0xF52 )
{
Weight = 1.0;
}
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public Dagger( Serial serial ) : base( serial )
{
}
public override SkillName DefSkill => SkillName.Fencing;
public override WeaponType DefType => WeaponType.Piercing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Pierce1H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xEC4, 0xEC5 )]
public class SkinningKnife : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ShadowStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
[Flippable(0xEC4, 0xEC5)]
public class SkinningKnife : BaseKnife
{
[Constructible]
public SkinningKnife() : base(0xEC4)
{
Weight = 1.0;
}
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 49;
public override float MlSpeed => 2.25f;
public SkinningKnife(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 5;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 10;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.ShadowStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 49;
public override float MlSpeed => 2.25f;
[Constructible]
public SkinningKnife() : base( 0xEC4 )
{
Weight = 1.0;
}
public override int OldStrengthReq => 5;
public override int OldMinDamage => 1;
public override int OldMaxDamage => 10;
public override int OldSpeed => 40;
public SkinningKnife( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -3,118 +3,131 @@ using Server.Targeting;
namespace Server.Items
{
[FlippableAttribute( 0xF52, 0xF51 )]
public class ThrowingDagger : Item
{
public override string DefaultName => "a throwing dagger";
[Flippable(0xF52, 0xF51)]
public class ThrowingDagger : Item
{
[Constructible]
public ThrowingDagger() : base(0xF52)
{
Weight = 1.0;
Layer = Layer.OneHanded;
}
[Constructible]
public ThrowingDagger() : base( 0xF52 )
{
Weight = 1.0;
Layer = Layer.OneHanded;
}
public ThrowingDagger(Serial serial) : base(serial)
{
}
public ThrowingDagger( Serial serial ) : base( serial )
{
}
public override string DefaultName => "a throwing dagger";
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
int version = reader.ReadInt();
}
public override void OnDoubleClick( Mobile from )
{
if ( from.Items.Contains( this ) )
{
InternalTarget t = new InternalTarget( this );
from.Target = t;
}
else
{
from.SendMessage( "You must be holding that weapon to use it." );
}
}
public override void OnDoubleClick(Mobile from)
{
if (from.Items.Contains(this))
{
InternalTarget t = new InternalTarget(this);
from.Target = t;
}
else
{
from.SendMessage("You must be holding that weapon to use it.");
}
}
private class InternalTarget : Target
{
private ThrowingDagger m_Dagger;
private class InternalTarget : Target
{
private ThrowingDagger m_Dagger;
public InternalTarget( ThrowingDagger dagger ) : base( 10, false, TargetFlags.Harmful )
{
m_Dagger = dagger;
}
public InternalTarget(ThrowingDagger dagger) : base(10, false, TargetFlags.Harmful)
{
m_Dagger = dagger;
}
protected override void OnTarget( Mobile from, object targeted )
{
if ( m_Dagger.Deleted )
{
return;
}
protected override void OnTarget(Mobile from, object targeted)
{
if (m_Dagger.Deleted) return;
if ( !from.Items.Contains( m_Dagger ) )
{
from.SendMessage( "You must be holding that weapon to use it." );
}
else if ( targeted is Mobile m )
{
if ( m != from && from.HarmfulCheck( m ) )
{
Direction to = from.GetDirectionTo( m );
if (!from.Items.Contains(m_Dagger))
from.SendMessage("You must be holding that weapon to use it.");
else if (targeted is Mobile m)
if (m != from && from.HarmfulCheck(m))
{
Direction to = from.GetDirectionTo(m);
from.Direction = to;
from.Direction = to;
from.Animate( from.Mounted ? 26 : 9, 7, 1, true, false, 0 );
from.Animate(from.Mounted ? 26 : 9, 7, 1, true, false, 0);
if ( Utility.RandomDouble() >= (Math.Sqrt( m.Dex / 100.0 ) * 0.8) )
{
from.MovingEffect( m, 0x1BFE, 7, 1, false, false, 0x481, 0 );
if (Utility.RandomDouble() >= Math.Sqrt(m.Dex / 100.0) * 0.8)
{
from.MovingEffect(m, 0x1BFE, 7, 1, false, false, 0x481, 0);
AOS.Damage( m, from, Utility.Random( 5, from.Str / 10 ), 100, 0, 0, 0, 0 );
AOS.Damage(m, from, Utility.Random(5, from.Str / 10), 100, 0, 0, 0, 0);
m_Dagger.MoveToWorld( m.Location, m.Map );
}
else
{
int x = 0, y = 0;
m_Dagger.MoveToWorld(m.Location, m.Map);
}
else
{
int x = 0, y = 0;
switch ( to & Direction.Mask )
{
case Direction.North: --y; break;
case Direction.South: ++y; break;
case Direction.West: --x; break;
case Direction.East: ++x; break;
case Direction.Up: --x; --y; break;
case Direction.Down: ++x; ++y; break;
case Direction.Left: --x; ++y; break;
case Direction.Right: ++x; --y; break;
}
switch (to & Direction.Mask)
{
case Direction.North:
--y;
break;
case Direction.South:
++y;
break;
case Direction.West:
--x;
break;
case Direction.East:
++x;
break;
case Direction.Up:
--x;
--y;
break;
case Direction.Down:
++x;
++y;
break;
case Direction.Left:
--x;
++y;
break;
case Direction.Right:
++x;
--y;
break;
}
x += Utility.Random( -1, 3 );
y += Utility.Random( -1, 3 );
x += Utility.Random(-1, 3);
y += Utility.Random(-1, 3);
x += m.X;
y += m.Y;
x += m.X;
y += m.Y;
m_Dagger.MoveToWorld( new Point3D( x, y, m.Z ), m.Map );
m_Dagger.MoveToWorld(new Point3D(x, y, m.Z), m.Map);
from.MovingEffect( m_Dagger, 0x1BFE, 7, 1, false, false, 0x481, 0 );
from.MovingEffect(m_Dagger, 0x1BFE, 7, 1, false, false, 0x481, 0);
from.SendMessage( "You miss." );
}
}
}
}
}
}
}
from.SendMessage("You miss.");
}
}
}
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class BlightGrippedLongbow : ElvenCompositeLongbow
{
public override int LabelNumber => 1072907; // Blight Gripped Longbow
public class BlightGrippedLongbow : ElvenCompositeLongbow
{
[Constructible]
public BlightGrippedLongbow()
{
Hue = 0x8A4;
[Constructible]
public BlightGrippedLongbow()
{
Hue = 0x8A4;
WeaponAttributes.HitPoisonArea = 20;
Attributes.RegenStam = 3;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 20;
Attributes.WeaponDamage = 35;
}
WeaponAttributes.HitPoisonArea = 20;
Attributes.RegenStam = 3;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 20;
Attributes.WeaponDamage = 35;
}
public BlightGrippedLongbow(Serial serial) : base(serial)
{
}
public BlightGrippedLongbow( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1072907; // Blight Gripped Longbow
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,43 +1,44 @@
namespace Server.Items
{
public class ColdForgedBlade : ElvenSpellblade
{
public override int LabelNumber => 1072916; // Cold Forged Blade
public class ColdForgedBlade : ElvenSpellblade
{
[Constructible]
public ColdForgedBlade()
{
WeaponAttributes.HitHarm = 40;
Attributes.SpellChanneling = 1;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 50;
[Constructible]
public ColdForgedBlade()
{
WeaponAttributes.HitHarm = 40;
Attributes.SpellChanneling = 1;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 50;
Hue = GetElementalDamageHue();
}
Hue = GetElementalDamageHue();
}
public ColdForgedBlade(Serial serial) : base(serial)
{
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}
public override int LabelNumber => 1072916; // Cold Forged Blade
public ColdForgedBlade( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,43 +1,44 @@
namespace Server.Items
{
public class LuminousRuneBlade : RuneBlade
{
public override int LabelNumber => 1072922; // Luminous Rune Blade
public class LuminousRuneBlade : RuneBlade
{
[Constructible]
public LuminousRuneBlade()
{
WeaponAttributes.HitLightning = 40;
WeaponAttributes.SelfRepair = 5;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 55;
[Constructible]
public LuminousRuneBlade()
{
WeaponAttributes.HitLightning = 40;
WeaponAttributes.SelfRepair = 5;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 55;
Hue = GetElementalDamageHue();
}
Hue = GetElementalDamageHue();
}
public LuminousRuneBlade(Serial serial) : base(serial)
{
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override int LabelNumber => 1072922; // Luminous Rune Blade
public LuminousRuneBlade( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,45 +1,46 @@
namespace Server.Items
{
public class OverseerSunderedBlade : RadiantScimitar
{
public override int LabelNumber => 1072920; // Overseer Sundered Blade
public class OverseerSunderedBlade : RadiantScimitar
{
[Constructible]
public OverseerSunderedBlade()
{
ItemID = 0x2D27;
Hue = 0x485;
[Constructible]
public OverseerSunderedBlade()
{
ItemID = 0x2D27;
Hue = 0x485;
Attributes.RegenStam = 2;
Attributes.AttackChance = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 45;
Attributes.RegenStam = 2;
Attributes.AttackChance = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 45;
Hue = GetElementalDamageHue();
}
Hue = GetElementalDamageHue();
}
public OverseerSunderedBlade(Serial serial) : base(serial)
{
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = cold = pois = nrgy = chaos = direct = 0;
fire = 100;
}
public override int LabelNumber => 1072920; // Overseer Sundered Blade
public OverseerSunderedBlade( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = cold = pois = nrgy = chaos = direct = 0;
fire = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,41 +1,42 @@
namespace Server.Items
{
public class PhantomStaff : WildStaff
{
public override int LabelNumber => 1072919; // Phantom Staff
public class PhantomStaff : WildStaff
{
[Constructible]
public PhantomStaff()
{
Hue = 0x1;
Attributes.RegenHits = 2;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 20;
Attributes.WeaponDamage = 60;
}
[Constructible]
public PhantomStaff()
{
Hue = 0x1;
Attributes.RegenHits = 2;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 20;
Attributes.WeaponDamage = 60;
}
public PhantomStaff(Serial serial) : base(serial)
{
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = nrgy = chaos = direct = 0;
cold = pois = 50;
}
public override int LabelNumber => 1072919; // Phantom Staff
public PhantomStaff( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = nrgy = chaos = direct = 0;
cold = pois = 50;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class RuneCarvingKnife : AssassinSpike
{
public override int LabelNumber => 1072915; // Rune Carving Knife
public class RuneCarvingKnife : AssassinSpike
{
[Constructible]
public RuneCarvingKnife()
{
Hue = 0x48D;
[Constructible]
public RuneCarvingKnife()
{
Hue = 0x48D;
WeaponAttributes.HitLeechMana = 40;
Attributes.RegenStam = 2;
Attributes.LowerManaCost = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 30;
}
WeaponAttributes.HitLeechMana = 40;
Attributes.RegenStam = 2;
Attributes.LowerManaCost = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 30;
}
public RuneCarvingKnife(Serial serial) : base(serial)
{
}
public RuneCarvingKnife( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1072915; // Rune Carving Knife
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class ShardThrasher : DiamondMace
{
public override int LabelNumber => 1072918; // Shard Thrasher
public class ShardThrasher : DiamondMace
{
[Constructible]
public ShardThrasher()
{
Hue = 0x4F2;
[Constructible]
public ShardThrasher()
{
Hue = 0x4F2;
WeaponAttributes.HitPhysicalArea = 30;
Attributes.BonusStam = 8;
Attributes.AttackChance = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 40;
}
WeaponAttributes.HitPhysicalArea = 30;
Attributes.BonusStam = 8;
Attributes.AttackChance = 10;
Attributes.WeaponSpeed = 35;
Attributes.WeaponDamage = 40;
}
public ShardThrasher(Serial serial) : base(serial)
{
}
public ShardThrasher( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1072918; // Shard Thrasher
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,42 +1,43 @@
namespace Server.Items
{
public class SilvanisFeywoodBow : ElvenCompositeLongbow
{
public override int LabelNumber => 1072955; // Silvani's Feywood Bow
public class SilvanisFeywoodBow : ElvenCompositeLongbow
{
[Constructible]
public SilvanisFeywoodBow()
{
Hue = 0x1A;
[Constructible]
public SilvanisFeywoodBow()
{
Hue = 0x1A;
Attributes.SpellChanneling = 1;
Attributes.AttackChance = 12;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 35;
}
Attributes.SpellChanneling = 1;
Attributes.AttackChance = 12;
Attributes.WeaponSpeed = 30;
Attributes.WeaponDamage = 35;
}
public SilvanisFeywoodBow(Serial serial) : base(serial)
{
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override int LabelNumber => 1072955; // Silvani's Feywood Bow
public SilvanisFeywoodBow( Serial serial ) : base( serial )
{
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois,
out int nrgy, out int chaos, out int direct)
{
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class TheNightReaper : RepeatingCrossbow
{
public override int LabelNumber => 1072912; // The Night Reaper
public class TheNightReaper : RepeatingCrossbow
{
[Constructible]
public TheNightReaper()
{
ItemID = 0x26CD;
Hue = 0x41C;
[Constructible]
public TheNightReaper()
{
ItemID = 0x26CD;
Hue = 0x41C;
Slayer = SlayerName.Exorcism;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 55;
}
Slayer = SlayerName.Exorcism;
Attributes.NightSight = 1;
Attributes.WeaponSpeed = 25;
Attributes.WeaponDamage = 55;
}
public TheNightReaper(Serial serial) : base(serial)
{
}
public TheNightReaper( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1072912; // The Night Reaper
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D21, 0x2D2D )]
public class AssassinSpike : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
[Flippable(0x2D21, 0x2D2D)]
public class AssassinSpike : BaseKnife
{
[Constructible]
public AssassinSpike() : base(0x2D21)
{
Weight = 4.0;
}
public override int AosStrengthReq => 15;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 12;
public override int AosSpeed => 50;
public override float MlSpeed => 2.00f;
public AssassinSpike(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 12;
public override int OldSpeed => 50;
public override WeaponAbility PrimaryAbility => WeaponAbility.InfectiousStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.ShadowStrike;
public override int DefMissSound => 0x239;
public override SkillName DefSkill => SkillName.Fencing;
public override int AosStrengthReq => 15;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 12;
public override int AosSpeed => 50;
public override float MlSpeed => 2.00f;
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override int OldStrengthReq => 15;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 12;
public override int OldSpeed => 50;
[Constructible]
public AssassinSpike() : base( 0x2D21 )
{
Weight = 4.0;
}
public override int DefMissSound => 0x239;
public override SkillName DefSkill => SkillName.Fencing;
public AssassinSpike( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,37 +1,37 @@
namespace Server.Items
{
public class ButchersWarCleaver : WarCleaver
{
public override int LabelNumber => 1073526; // butcher's war cleaver
public class ButchersWarCleaver : WarCleaver
{
[Constructible]
public ButchersWarCleaver()
{
}
[Constructible]
public ButchersWarCleaver()
{
}
public ButchersWarCleaver(Serial serial) : base(serial)
{
}
public ButchersWarCleaver( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073526; // butcher's war cleaver
public override void AppendChildNameProperties( ObjectPropertyList list )
{
base.AppendChildNameProperties( list );
public override void AppendChildNameProperties(ObjectPropertyList list)
{
base.AppendChildNameProperties(list);
list.Add( 1072512 ); // Bovine Slayer
}
list.Add(1072512); // Bovine Slayer
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D24, 0x2D30 )]
public class DiamondMace : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
[Flippable(0x2D24, 0x2D30)]
public class DiamondMace : BaseBashing
{
[Constructible]
public DiamondMace() : base(0x2D24)
{
Weight = 10.0;
}
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 17;
public override int AosSpeed => 37;
public override float MlSpeed => 3.00f;
public DiamondMace(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 14;
public override int OldMaxDamage => 17;
public override int OldSpeed => 37;
public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override int AosStrengthReq => 35;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 17;
public override int AosSpeed => 37;
public override float MlSpeed => 3.00f;
[Constructible]
public DiamondMace() : base( 0x2D24 )
{
Weight = 10.0;
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 14;
public override int OldMaxDamage => 17;
public override int OldSpeed => 37;
public DiamondMace( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -2,56 +2,56 @@ using System;
namespace Server.Items
{
[FlippableAttribute( 0x2D1E, 0x2D2A )]
public class ElvenCompositeLongbow : BaseRanged
{
public override int EffectID => 0xF42;
public override Type AmmoType => typeof( Arrow );
public override Item Ammo => new Arrow();
[Flippable(0x2D1E, 0x2D2A)]
public class ElvenCompositeLongbow : BaseRanged
{
[Constructible]
public ElvenCompositeLongbow() : base(0x2D1E)
{
Weight = 8.0;
}
public override WeaponAbility PrimaryAbility => WeaponAbility.ForceArrow;
public override WeaponAbility SecondaryAbility => WeaponAbility.SerpentArrow;
public ElvenCompositeLongbow(Serial serial) : base(serial)
{
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 16;
public override int AosSpeed => 27;
public override float MlSpeed => 4.00f;
public override int EffectID => 0xF42;
public override Type AmmoType => typeof(Arrow);
public override Item Ammo => new Arrow();
public override int OldStrengthReq => 45;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 16;
public override int OldSpeed => 27;
public override WeaponAbility PrimaryAbility => WeaponAbility.ForceArrow;
public override WeaponAbility SecondaryAbility => WeaponAbility.SerpentArrow;
public override int DefMaxRange => 10;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 16;
public override int AosSpeed => 27;
public override float MlSpeed => 4.00f;
public override int InitMinHits => 41;
public override int InitMaxHits => 90;
public override int OldStrengthReq => 45;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 16;
public override int OldSpeed => 27;
public override WeaponAnimation DefAnimation => WeaponAnimation.ShootBow;
public override int DefMaxRange => 10;
[Constructible]
public ElvenCompositeLongbow() : base( 0x2D1E )
{
Weight = 8.0;
}
public override int InitMinHits => 41;
public override int InitMaxHits => 90;
public ElvenCompositeLongbow( Serial serial ) : base( serial )
{
}
public override WeaponAnimation DefAnimation => WeaponAnimation.ShootBow;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D35, 0x2D29 )]
public class ElvenMachete : BaseSword
{
public override WeaponAbility PrimaryAbility => WeaponAbility.DefenseMastery;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
[Flippable(0x2D35, 0x2D29)]
public class ElvenMachete : BaseSword
{
[Constructible]
public ElvenMachete() : base(0x2D35)
{
Weight = 6.0;
}
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 41;
public override float MlSpeed => 2.75f;
public ElvenMachete(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 13;
public override int OldMaxDamage => 15;
public override int OldSpeed => 41;
public override WeaponAbility PrimaryAbility => WeaponAbility.DefenseMastery;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 41;
public override float MlSpeed => 2.75f;
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override int OldStrengthReq => 20;
public override int OldMinDamage => 13;
public override int OldMaxDamage => 15;
public override int OldSpeed => 41;
[Constructible]
public ElvenMachete() : base( 0x2D35 )
{
Weight = 6.0;
}
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public ElvenMachete( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D20, 0x2D2C )]
public class ElvenSpellblade : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.PsychicAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
[Flippable(0x2D20, 0x2D2C)]
public class ElvenSpellblade : BaseKnife
{
[Constructible]
public ElvenSpellblade() : base(0x2D20)
{
Weight = 5.0;
Layer = Layer.TwoHanded;
}
public override int AosStrengthReq => 35;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 44;
public override float MlSpeed => 2.50f;
public ElvenSpellblade(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 14;
public override int OldSpeed => 44;
public override WeaponAbility PrimaryAbility => WeaponAbility.PsychicAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.BleedAttack;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 35;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 44;
public override float MlSpeed => 2.50f;
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override int OldStrengthReq => 35;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 14;
public override int OldSpeed => 44;
[Constructible]
public ElvenSpellblade() : base( 0x2D20 )
{
Weight = 5.0;
Layer = Layer.TwoHanded;
}
public override int DefMissSound => 0x239;
public ElvenSpellblade( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D22, 0x2D2E )]
public class Leafblade : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Feint;
public override WeaponAbility SecondaryAbility => WeaponAbility.ArmorIgnore;
[Flippable(0x2D22, 0x2D2E)]
public class Leafblade : BaseKnife
{
[Constructible]
public Leafblade() : base(0x2D22)
{
Weight = 8.0;
}
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 42;
public override float MlSpeed => 2.75f;
public Leafblade(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 13;
public override int OldMaxDamage => 15;
public override int OldSpeed => 42;
public override WeaponAbility PrimaryAbility => WeaponAbility.Feint;
public override WeaponAbility SecondaryAbility => WeaponAbility.ArmorIgnore;
public override int DefMissSound => 0x239;
public override SkillName DefSkill => SkillName.Fencing;
public override int AosStrengthReq => 20;
public override int AosMinDamage => 13;
public override int AosMaxDamage => 15;
public override int AosSpeed => 42;
public override float MlSpeed => 2.75f;
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override int OldStrengthReq => 20;
public override int OldMinDamage => 13;
public override int OldMaxDamage => 15;
public override int OldSpeed => 42;
[Constructible]
public Leafblade() : base( 0x2D22 )
{
Weight = 8.0;
}
public override int DefMissSound => 0x239;
public override SkillName DefSkill => SkillName.Fencing;
public Leafblade( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -2,54 +2,54 @@ using System;
namespace Server.Items
{
[FlippableAttribute( 0x2D2B, 0x2D1F )]
public class MagicalShortbow : BaseRanged
{
public override int EffectID => 0xF42;
public override Type AmmoType => typeof( Arrow );
public override Item Ammo => new Arrow();
[Flippable(0x2D2B, 0x2D1F)]
public class MagicalShortbow : BaseRanged
{
[Constructible]
public MagicalShortbow() : base(0x2D2B)
{
Weight = 6.0;
}
public override WeaponAbility PrimaryAbility => WeaponAbility.LightningArrow;
public override WeaponAbility SecondaryAbility => WeaponAbility.PsychicAttack;
public MagicalShortbow(Serial serial) : base(serial)
{
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 13;
public override int AosSpeed => 38;
public override float MlSpeed => 3.00f;
public override int EffectID => 0xF42;
public override Type AmmoType => typeof(Arrow);
public override Item Ammo => new Arrow();
public override int OldStrengthReq => 45;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 13;
public override int OldSpeed => 38;
public override WeaponAbility PrimaryAbility => WeaponAbility.LightningArrow;
public override WeaponAbility SecondaryAbility => WeaponAbility.PsychicAttack;
public override int DefMaxRange => 10;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 13;
public override int AosSpeed => 38;
public override float MlSpeed => 3.00f;
public override int InitMinHits => 41;
public override int InitMaxHits => 90;
public override int OldStrengthReq => 45;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 13;
public override int OldSpeed => 38;
[Constructible]
public MagicalShortbow() : base( 0x2D2B )
{
Weight = 6.0;
}
public override int DefMaxRange => 10;
public MagicalShortbow( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 41;
public override int InitMaxHits => 90;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D28, 0x2D34 )]
public class OrnateAxe : BaseAxe
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
[Flippable(0x2D28, 0x2D34)]
public class OrnateAxe : BaseAxe
{
[Constructible]
public OrnateAxe() : base(0x2D28)
{
Weight = 12.0;
Layer = Layer.TwoHanded;
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 18;
public override int AosMaxDamage => 20;
public override int AosSpeed => 26;
public override float MlSpeed => 3.50f;
public OrnateAxe(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 45;
public override int OldMinDamage => 18;
public override int OldMaxDamage => 20;
public override int OldSpeed => 26;
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 18;
public override int AosMaxDamage => 20;
public override int AosSpeed => 26;
public override float MlSpeed => 3.50f;
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override int OldStrengthReq => 45;
public override int OldMinDamage => 18;
public override int OldMaxDamage => 20;
public override int OldSpeed => 26;
[Constructible]
public OrnateAxe() : base( 0x2D28 )
{
Weight = 12.0;
Layer = Layer.TwoHanded;
}
public override int DefMissSound => 0x239;
public OrnateAxe( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D33, 0x2D27 )]
public class RadiantScimitar : BaseSword
{
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
[Flippable(0x2D33, 0x2D27)]
public class RadiantScimitar : BaseSword
{
[Constructible]
public RadiantScimitar() : base(0x2D33)
{
Weight = 9.0;
}
public override int AosStrengthReq => 20;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 43;
public override float MlSpeed => 2.50f;
public RadiantScimitar(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 14;
public override int OldSpeed => 43;
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 20;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 43;
public override float MlSpeed => 2.50f;
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override int OldStrengthReq => 20;
public override int OldMinDamage => 12;
public override int OldMaxDamage => 14;
public override int OldSpeed => 43;
[Constructible]
public RadiantScimitar() : base( 0x2D33 )
{
Weight = 9.0;
}
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public RadiantScimitar( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,51 +1,51 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D32, 0x2D26 )]
public class RuneBlade : BaseSword
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
[Flippable(0x2D32, 0x2D26)]
public class RuneBlade : BaseSword
{
[Constructible]
public RuneBlade() : base(0x2D32)
{
Weight = 7.0;
Layer = Layer.TwoHanded;
}
public override int AosStrengthReq => 30;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 35;
public override float MlSpeed => 3.00f;
public RuneBlade(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 30;
public override int OldMinDamage => 15;
public override int OldMaxDamage => 17;
public override int OldSpeed => 35;
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 30;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 35;
public override float MlSpeed => 3.00f;
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override int OldStrengthReq => 30;
public override int OldMinDamage => 15;
public override int OldMaxDamage => 17;
public override int OldSpeed => 35;
[Constructible]
public RuneBlade() : base( 0x2D32 )
{
Weight = 7.0;
Layer = Layer.TwoHanded;
}
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public RuneBlade( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,54 +1,54 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D2F, 0x2D23 )]
public class WarCleaver : BaseKnife
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
[Flippable(0x2D2F, 0x2D23)]
public class WarCleaver : BaseKnife
{
[Constructible]
public WarCleaver() : base(0x2D2F)
{
Weight = 10.0;
}
public override int AosStrengthReq => 15;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 48;
public override float MlSpeed => 2.25f;
public WarCleaver(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 11;
public override int OldSpeed => 48;
public override WeaponAbility PrimaryAbility => WeaponAbility.Disarm;
public override WeaponAbility SecondaryAbility => WeaponAbility.Bladeweave;
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
public override int AosStrengthReq => 15;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 48;
public override float MlSpeed => 2.25f;
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public override int OldStrengthReq => 15;
public override int OldMinDamage => 9;
public override int OldMaxDamage => 11;
public override int OldSpeed => 48;
public override SkillName DefSkill => SkillName.Fencing;
public override WeaponType DefType => WeaponType.Piercing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Pierce1H;
public override int DefHitSound => 0x23B;
public override int DefMissSound => 0x239;
[Constructible]
public WarCleaver() : base( 0x2D2F )
{
Weight = 10.0;
}
public override int InitMinHits => 30; // TODO
public override int InitMaxHits => 60; // TODO
public WarCleaver( Serial serial ) : base( serial )
{
}
public override SkillName DefSkill => SkillName.Fencing;
public override WeaponType DefType => WeaponType.Piercing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Pierce1H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x2D25, 0x2D31 )]
public class WildStaff : BaseStaff
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Block;
public override WeaponAbility SecondaryAbility => WeaponAbility.ForceOfNature;
[Flippable(0x2D25, 0x2D31)]
public class WildStaff : BaseStaff
{
[Constructible]
public WildStaff() : base(0x2D25)
{
Weight = 8.0;
}
public override int AosStrengthReq => 15;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 12;
public override int AosSpeed => 48;
public override float MlSpeed => 2.25f;
public WildStaff(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 12;
public override int OldSpeed => 48;
public override WeaponAbility PrimaryAbility => WeaponAbility.Block;
public override WeaponAbility SecondaryAbility => WeaponAbility.ForceOfNature;
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override int AosStrengthReq => 15;
public override int AosMinDamage => 10;
public override int AosMaxDamage => 12;
public override int AosSpeed => 48;
public override float MlSpeed => 2.25f;
[Constructible]
public WildStaff() : base( 0x2D25 )
{
Weight = 8.0;
}
public override int OldStrengthReq => 15;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 12;
public override int OldSpeed => 48;
public WildStaff( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 30;
public override int InitMaxHits => 60;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,56 +1,61 @@
using Server.Engines.ConPVP;
namespace Server.Items
{
public abstract class BaseBashing : BaseMeleeWeapon
{
public override int DefHitSound => 0x233;
public override int DefMissSound => 0x239;
public abstract class BaseBashing : BaseMeleeWeapon
{
public BaseBashing(int itemID) : base(itemID)
{
}
public override SkillName DefSkill => SkillName.Macing;
public override WeaponType DefType => WeaponType.Bashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash1H;
public BaseBashing(Serial serial) : base(serial)
{
}
public BaseBashing( int itemID ) : base( itemID )
{
}
public override int DefHitSound => 0x233;
public override int DefMissSound => 0x239;
public BaseBashing( Serial serial ) : base( serial )
{
}
public override SkillName DefSkill => SkillName.Macing;
public override WeaponType DefType => WeaponType.Bashing;
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash1H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
int version = reader.ReadInt();
}
public override void OnHit( Mobile attacker, Mobile defender, double damageBonus = 1 )
{
base.OnHit( attacker, defender, damageBonus );
public override void OnHit(Mobile attacker, Mobile defender, double damageBonus = 1)
{
base.OnHit(attacker, defender, damageBonus);
defender.Stam -= Utility.Random( 3, 3 ); // 3-5 points of stamina loss
}
defender.Stam -= Utility.Random(3, 3); // 3-5 points of stamina loss
}
public override double GetBaseDamage( Mobile attacker )
{
double damage = base.GetBaseDamage( attacker );
public override double GetBaseDamage(Mobile attacker)
{
double damage = base.GetBaseDamage(attacker);
if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && attacker.Skills[SkillName.Anatomy].Value >= 80 && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility(attacker, "Crushing Blow", false))
{
damage *= 1.5;
if (!Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded &&
attacker.Skills[SkillName.Anatomy].Value >= 80 &&
attacker.Skills[SkillName.Anatomy].Value / 400.0 >= Utility.RandomDouble() &&
DuelContext.AllowSpecialAbility(attacker, "Crushing Blow", false))
{
damage *= 1.5;
attacker.SendMessage( "You deliver a crushing blow!" ); // Is this not localized?
attacker.PlaySound( 0x11C );
}
attacker.SendMessage("You deliver a crushing blow!"); // Is this not localized?
attacker.PlaySound(0x11C);
}
return damage;
}
}
}
return damage;
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x13b4, 0x13b3 )]
public class Club : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ShadowStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Dismount;
[Flippable(0x13b4, 0x13b3)]
public class Club : BaseBashing
{
[Constructible]
public Club() : base(0x13B4)
{
Weight = 9.0;
}
public override int AosStrengthReq => 40;
public override int AosMinDamage => 11;
public override int AosMaxDamage => 13;
public override int AosSpeed => 44;
public override float MlSpeed => 2.50f;
public Club(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 10;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 24;
public override int OldSpeed => 40;
public override WeaponAbility PrimaryAbility => WeaponAbility.ShadowStrike;
public override WeaponAbility SecondaryAbility => WeaponAbility.Dismount;
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override int AosStrengthReq => 40;
public override int AosMinDamage => 11;
public override int AosMaxDamage => 13;
public override int AosSpeed => 44;
public override float MlSpeed => 2.50f;
[Constructible]
public Club() : base( 0x13B4 )
{
Weight = 9.0;
}
public override int OldStrengthReq => 10;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 24;
public override int OldSpeed => 40;
public Club( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 40;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class EmeraldMace : DiamondMace
{
public override int LabelNumber => 1073530; // emerald mace
public class EmeraldMace : DiamondMace
{
[Constructible]
public EmeraldMace()
{
WeaponAttributes.ResistPoisonBonus = 5;
}
[Constructible]
public EmeraldMace()
{
WeaponAttributes.ResistPoisonBonus = 5;
}
public EmeraldMace(Serial serial) : base(serial)
{
}
public EmeraldMace( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073530; // emerald mace
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -2,135 +2,141 @@ using System;
namespace Server.Items
{
public class FireworksWand : MagicWand
{
public override int LabelNumber => 1041424; // a fireworks wand
public class FireworksWand : MagicWand
{
private int m_Charges;
private int m_Charges;
[Constructible]
public FireworksWand() : this(100)
{
}
[CommandProperty( AccessLevel.GameMaster )]
public int Charges
{
get => m_Charges;
set{ m_Charges = value; InvalidateProperties(); }
}
[Constructible]
public FireworksWand(int charges)
{
m_Charges = charges;
LootType = LootType.Blessed;
}
[Constructible]
public FireworksWand() : this( 100 )
{
}
public FireworksWand(Serial serial) : base(serial)
{
}
[Constructible]
public FireworksWand( int charges )
{
m_Charges = charges;
LootType = LootType.Blessed;
}
public override int LabelNumber => 1041424; // a fireworks wand
public FireworksWand( Serial serial ) : base( serial )
{
}
[CommandProperty(AccessLevel.GameMaster)]
public int Charges
{
get => m_Charges;
set
{
m_Charges = value;
InvalidateProperties();
}
}
public override void AddNameProperties( ObjectPropertyList list )
{
base.AddNameProperties( list );
public override void AddNameProperties(ObjectPropertyList list)
{
base.AddNameProperties(list);
list.Add( 1060741, m_Charges.ToString() ); // charges: ~1_val~
}
list.Add(1060741, m_Charges.ToString()); // charges: ~1_val~
}
public override void OnDoubleClick( Mobile from )
{
BeginLaunch( from, true );
}
public override void OnDoubleClick(Mobile from)
{
BeginLaunch(from, true);
}
public void BeginLaunch( Mobile from, bool useCharges )
{
Map map = from.Map;
public void BeginLaunch(Mobile from, bool useCharges)
{
Map map = from.Map;
if ( map == null || map == Map.Internal )
return;
if (map == null || map == Map.Internal)
return;
if ( useCharges )
{
if ( Charges > 0 )
{
--Charges;
}
else
{
from.SendLocalizedMessage( 502412 ); // There are no charges left on that item.
return;
}
}
if (useCharges)
{
if (Charges > 0)
{
--Charges;
}
else
{
from.SendLocalizedMessage(502412); // There are no charges left on that item.
return;
}
}
from.SendLocalizedMessage( 502615 ); // You launch a firework!
from.SendLocalizedMessage(502615); // You launch a firework!
Point3D ourLoc = GetWorldLocation();
Point3D ourLoc = GetWorldLocation();
Point3D startLoc = new Point3D( ourLoc.X, ourLoc.Y, ourLoc.Z + 10 );
Point3D endLoc = new Point3D( startLoc.X + Utility.RandomMinMax( -2, 2 ), startLoc.Y + Utility.RandomMinMax( -2, 2 ), startLoc.Z + 32 );
Point3D startLoc = new Point3D(ourLoc.X, ourLoc.Y, ourLoc.Z + 10);
Point3D endLoc = new Point3D(startLoc.X + Utility.RandomMinMax(-2, 2), startLoc.Y + Utility.RandomMinMax(-2, 2),
startLoc.Z + 32);
Effects.SendMovingEffect( new Entity( Serial.Zero, startLoc, map ), new Entity( Serial.Zero, endLoc, map ),
0x36E4, 5, 0, false, false );
Effects.SendMovingEffect(new Entity(Serial.Zero, startLoc, map), new Entity(Serial.Zero, endLoc, map),
0x36E4, 5, 0, false, false);
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( FinishLaunch ), new object[]{ from, endLoc, map } );
}
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(FinishLaunch),
new object[] { from, endLoc, map });
}
private void FinishLaunch( object state )
{
object[] states = (object[])state;
private void FinishLaunch(object state)
{
object[] states = (object[])state;
Mobile from = (Mobile)states[0];
Point3D endLoc = (Point3D)states[1];
Map map = (Map)states[2];
Mobile from = (Mobile)states[0];
Point3D endLoc = (Point3D)states[1];
Map map = (Map)states[2];
int hue = Utility.Random( 40 );
int hue = Utility.Random(40);
if ( hue < 8 )
hue = 0x66D;
else if ( hue < 10 )
hue = 0x482;
else if ( hue < 12 )
hue = 0x47E;
else if ( hue < 16 )
hue = 0x480;
else if ( hue < 20 )
hue = 0x47F;
else
hue = 0;
if (hue < 8)
hue = 0x66D;
else if (hue < 10)
hue = 0x482;
else if (hue < 12)
hue = 0x47E;
else if (hue < 16)
hue = 0x480;
else if (hue < 20)
hue = 0x47F;
else
hue = 0;
if ( Utility.RandomBool() )
hue = Utility.RandomList( 0x47E, 0x47F, 0x480, 0x482, 0x66D );
if (Utility.RandomBool())
hue = Utility.RandomList(0x47E, 0x47F, 0x480, 0x482, 0x66D);
int renderMode = Utility.RandomList( 0, 2, 3, 4, 5, 7 );
int renderMode = Utility.RandomList(0, 2, 3, 4, 5, 7);
Effects.PlaySound( endLoc, map, Utility.Random( 0x11B, 4 ) );
Effects.SendLocationEffect( endLoc, map, 0x373A + (0x10 * Utility.Random( 4 )), 16, 10, hue, renderMode );
}
Effects.PlaySound(endLoc, map, Utility.Random(0x11B, 4));
Effects.SendLocationEffect(endLoc, map, 0x373A + 0x10 * Utility.Random(4), 16, 10, hue, renderMode);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
writer.Write(0); // version
writer.Write( (int) m_Charges );
}
writer.Write(m_Charges);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Charges = reader.ReadInt();
break;
}
}
}
}
}
switch (version)
{
case 0:
{
m_Charges = reader.ReadInt();
break;
}
}
}
}
}

View file

@ -1,48 +1,48 @@
namespace Server.Items
{
[FlippableAttribute( 0x143D, 0x143C )]
public class HammerPick : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
[Flippable(0x143D, 0x143C)]
public class HammerPick : BaseBashing
{
[Constructible]
public HammerPick() : base(0x143D)
{
Weight = 9.0;
Layer = Layer.OneHanded;
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 28;
public override float MlSpeed => 3.75f;
public HammerPick(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.ArmorIgnore;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 15;
public override int AosMaxDamage => 17;
public override int AosSpeed => 28;
public override float MlSpeed => 3.75f;
[Constructible]
public HammerPick() : base( 0x143D )
{
Weight = 9.0;
Layer = Layer.OneHanded;
}
public override int OldStrengthReq => 35;
public override int OldMinDamage => 6;
public override int OldMaxDamage => 33;
public override int OldSpeed => 30;
public HammerPick( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0xF5C, 0xF5D )]
public class Mace : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
[Flippable(0xF5C, 0xF5D)]
public class Mace : BaseBashing
{
[Constructible]
public Mace() : base(0xF5C)
{
Weight = 14.0;
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 40;
public override float MlSpeed => 2.75f;
public Mace(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 32;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.ConcussionBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 12;
public override int AosMaxDamage => 14;
public override int AosSpeed => 40;
public override float MlSpeed => 2.75f;
[Constructible]
public Mace() : base( 0xF5C )
{
Weight = 14.0;
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 32;
public override int OldSpeed => 30;
public Mace( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,46 +1,46 @@
namespace Server.Items
{
public class MagicWand : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.Dismount;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public class MagicWand : BaseBashing
{
[Constructible]
public MagicWand() : base(0xDF2)
{
Weight = 1.0;
}
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 40;
public override float MlSpeed => 2.75f;
public MagicWand(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 0;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 6;
public override int OldSpeed => 35;
public override WeaponAbility PrimaryAbility => WeaponAbility.Dismount;
public override WeaponAbility SecondaryAbility => WeaponAbility.Disarm;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 5;
public override int AosMinDamage => 9;
public override int AosMaxDamage => 11;
public override int AosSpeed => 40;
public override float MlSpeed => 2.75f;
[Constructible]
public MagicWand() : base( 0xDF2 )
{
Weight = 1.0;
}
public override int OldStrengthReq => 0;
public override int OldMinDamage => 2;
public override int OldMaxDamage => 6;
public override int OldSpeed => 35;
public MagicWand( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x143B, 0x143A )]
public class Maul : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.ConcussionBlow;
[Flippable(0x143B, 0x143A)]
public class Maul : BaseBashing
{
[Constructible]
public Maul() : base(0x143B)
{
Weight = 10.0;
}
public override int AosStrengthReq => 45;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 16;
public override int AosSpeed => 32;
public override float MlSpeed => 3.50f;
public Maul(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 30;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.ConcussionBlow;
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override int AosStrengthReq => 45;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 16;
public override int AosSpeed => 32;
public override float MlSpeed => 3.50f;
[Constructible]
public Maul() : base( 0x143B )
{
Weight = 10.0;
}
public override int OldStrengthReq => 20;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 30;
public override int OldSpeed => 30;
public Maul( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 70;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int version = reader.ReadInt();
if ( Weight == 14.0 )
Weight = 10.0;
}
}
}
if (Weight == 14.0)
Weight = 10.0;
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class RubyMace : DiamondMace
{
public override int LabelNumber => 1073529; // ruby mace
public class RubyMace : DiamondMace
{
[Constructible]
public RubyMace()
{
Attributes.WeaponDamage = 5;
}
[Constructible]
public RubyMace()
{
Attributes.WeaponDamage = 5;
}
public RubyMace(Serial serial) : base(serial)
{
}
public RubyMace( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073529; // ruby mace
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class SapphireMace : DiamondMace
{
public override int LabelNumber => 1073531; // sapphire mace
public class SapphireMace : DiamondMace
{
[Constructible]
public SapphireMace()
{
WeaponAttributes.ResistEnergyBonus = 5;
}
[Constructible]
public SapphireMace()
{
WeaponAttributes.ResistEnergyBonus = 5;
}
public SapphireMace(Serial serial) : base(serial)
{
}
public SapphireMace( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073531; // sapphire mace
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x26BC, 0x26C6 )]
public class Scepter : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
[Flippable(0x26BC, 0x26C6)]
public class Scepter : BaseBashing
{
[Constructible]
public Scepter() : base(0x26BC)
{
Weight = 8.0;
}
public override int AosStrengthReq => 40;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 17;
public override int AosSpeed => 30;
public override float MlSpeed => 3.50f;
public Scepter(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 14;
public override int OldMaxDamage => 17;
public override int OldSpeed => 30;
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 40;
public override int AosMinDamage => 14;
public override int AosMaxDamage => 17;
public override int AosSpeed => 30;
public override float MlSpeed => 3.50f;
[Constructible]
public Scepter() : base( 0x26BC )
{
Weight = 8.0;
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 14;
public override int OldMaxDamage => 17;
public override int OldSpeed => 30;
public Scepter( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,31 +1,31 @@
namespace Server.Items
{
public class SilverEtchedMace : DiamondMace
{
public override int LabelNumber => 1073532; // silver-etched mace
public class SilverEtchedMace : DiamondMace
{
[Constructible]
public SilverEtchedMace()
{
Slayer = SlayerName.Exorcism;
}
[Constructible]
public SilverEtchedMace()
{
Slayer = SlayerName.Exorcism;
}
public SilverEtchedMace(Serial serial) : base(serial)
{
}
public SilverEtchedMace( Serial serial ) : base( serial )
{
}
public override int LabelNumber => 1073532; // silver-etched mace
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt( 0 ); // version
}
writer.WriteEncodedInt(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -1,50 +1,50 @@
namespace Server.Items
{
[FlippableAttribute( 0x1439, 0x1438 )]
public class WarHammer : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
[Flippable(0x1439, 0x1438)]
public class WarHammer : BaseBashing
{
[Constructible]
public WarHammer() : base(0x1439)
{
Weight = 10.0;
Layer = Layer.TwoHanded;
}
public override int AosStrengthReq => 95;
public override int AosMinDamage => 17;
public override int AosMaxDamage => 18;
public override int AosSpeed => 28;
public override float MlSpeed => 3.75f;
public WarHammer(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 40;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 36;
public override int OldSpeed => 31;
public override WeaponAbility PrimaryAbility => WeaponAbility.WhirlwindAttack;
public override WeaponAbility SecondaryAbility => WeaponAbility.CrushingBlow;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 95;
public override int AosMinDamage => 17;
public override int AosMaxDamage => 18;
public override int AosSpeed => 28;
public override float MlSpeed => 3.75f;
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash2H;
public override int OldStrengthReq => 40;
public override int OldMinDamage => 8;
public override int OldMaxDamage => 36;
public override int OldSpeed => 31;
[Constructible]
public WarHammer() : base( 0x1439 )
{
Weight = 10.0;
Layer = Layer.TwoHanded;
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public WarHammer( Serial serial ) : base( serial )
{
}
public override WeaponAnimation DefAnimation => WeaponAnimation.Bash2H;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -1,47 +1,47 @@
namespace Server.Items
{
[FlippableAttribute( 0x1407, 0x1406 )]
public class WarMace : BaseBashing
{
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
[Flippable(0x1407, 0x1406)]
public class WarMace : BaseBashing
{
[Constructible]
public WarMace() : base(0x1407)
{
Weight = 17.0;
}
public override int AosStrengthReq => 80;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 26;
public override float MlSpeed => 4.00f;
public WarMace(Serial serial) : base(serial)
{
}
public override int OldStrengthReq => 30;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 30;
public override int OldSpeed => 32;
public override WeaponAbility PrimaryAbility => WeaponAbility.CrushingBlow;
public override WeaponAbility SecondaryAbility => WeaponAbility.MortalStrike;
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override int AosStrengthReq => 80;
public override int AosMinDamage => 16;
public override int AosMaxDamage => 17;
public override int AosSpeed => 26;
public override float MlSpeed => 4.00f;
[Constructible]
public WarMace() : base( 0x1407 )
{
Weight = 17.0;
}
public override int OldStrengthReq => 30;
public override int OldMinDamage => 10;
public override int OldMaxDamage => 30;
public override int OldSpeed => 32;
public WarMace( Serial serial ) : base( serial )
{
}
public override int InitMinHits => 31;
public override int InitMaxHits => 110;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

Some files were not shown because too many files have changed in this diff Show more