- extensive framework for dueling, tournaments, and events

- IP address command implementor
- miscellaneous minor fixes
This commit is contained in:
mark 2012-04-22 05:37:16 +00:00
parent c52504151b
commit 599b2af6d5
82 changed files with 11920 additions and 63 deletions

View file

@ -189,6 +189,61 @@ namespace Server.Items
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 );
}

View file

@ -153,7 +153,7 @@ namespace Server.Items
{
base.OnHit( attacker, defender, damageBonus );
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() )
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Concussion Blow", false ) )
{
StatMod mod = defender.GetStatMod( "Concussion" );

View file

@ -1019,8 +1019,18 @@ namespace Server.Items
PlayerMobile p = attacker as PlayerMobile;
canSwing = ( p == null || p.PeacedUntil <= DateTime.Now );
}
}
#region Dueling
if ( attacker is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)attacker;
if ( pm.DuelContext != null && !pm.DuelContext.CheckItemEquip( attacker, this ) )
canSwing = false;
}
#endregion
if ( canSwing && attacker.HarmfulCheck( defender ) )
{

View file

@ -217,6 +217,11 @@ namespace Server.Items
{
Mobile m = e.Mobile;
#region Dueling
if ( !Engines.ConPVP.DuelContext.AllowSpecialAbility( m, "Disarm", true ) )
return;
#endregion
double armsValue = m.Skills[SkillName.ArmsLore].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;
@ -242,6 +247,11 @@ namespace Server.Items
{
Mobile m = e.Mobile;
#region Dueling
if ( !Engines.ConPVP.DuelContext.AllowSpecialAbility( m, "Stun", true ) )
return;
#endregion
double anatValue = m.Skills[SkillName.Anatomy].Value;
double wresValue = m.Skills[SkillName.Wrestling].Value;

View file

@ -46,7 +46,7 @@ namespace Server.Items
{
double damage = base.GetBaseDamage( attacker );
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() )
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Crushing Blow", false ) )
{
damage *= 1.5;

View file

@ -107,7 +107,7 @@ namespace Server.Items
{
base.OnHit( attacker, defender, damageBonus );
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() )
if ( !Core.AOS && (attacker.Player || attacker.Body.IsHuman) && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Concussion Blow", false ) )
{
StatMod mod = defender.GetStatMod( "Concussion" );

View file

@ -68,6 +68,16 @@ namespace Server.Items
}
}
#region Dueling
if ( attacker is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)attacker;
if ( pm.DuelContext != null && !pm.DuelContext.CheckItemEquip( attacker, this ) )
canSwing = false;
}
#endregion
if ( canSwing && attacker.HarmfulCheck( defender ) )
{
attacker.DisruptiveAction();

View file

@ -39,7 +39,7 @@ namespace Server.Items
{
base.OnHit( attacker, defender, damageBonus );
if ( !Core.AOS && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() )
if ( !Core.AOS && Layer == Layer.TwoHanded && (attacker.Skills[SkillName.Anatomy].Value / 400.0) >= Utility.RandomDouble() && Engines.ConPVP.DuelContext.AllowSpecialAbility( attacker, "Paralyzing Blow", false ) )
{
defender.SendMessage( "You receive a paralyzing blow!" ); // Is this not localized?
defender.Freeze( TimeSpan.FromSeconds( 2.0 ) );