This commit is contained in:
mark 2009-06-28 03:36:42 +00:00
parent c63a5f13fa
commit 2204d5fb86
86 changed files with 1077 additions and 257 deletions

View file

@ -33,6 +33,16 @@ namespace Server.Items
return false;
}*/
public override bool RequiresTactics( Mobile from )
{
BaseWeapon weapon = from.Weapon as BaseWeapon;
if ( weapon == null )
return false;
return weapon.Skill != SkillName.Wrestling;
}
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds( 5.0 );
public override void OnHit( Mobile attacker, Mobile defender, int damage )
@ -53,7 +63,7 @@ namespace Server.Items
{
attacker.SendLocalizedMessage( 1004001 ); // You cannot disarm your opponent.
}
else if ( toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook )
else if (toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook && !Core.ML )
{
attacker.SendLocalizedMessage( 1060849 ); // Your target is already unarmed!
}

View file

@ -58,6 +58,11 @@ namespace Server.Items
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
}
attacker.SendLocalizedMessage( 1060082 ); // The force of your attack has dislodged them from their mount!
if ( attacker.Mounted )
@ -71,8 +76,15 @@ namespace Server.Items
mount.Rider = null;
BaseMount.SetMountPrevention( defender, BlockMountType.Dazed, DefenderRemountDelay );
BaseMount.SetMountPrevention( attacker, BlockMountType.DismountRecovery, AttackerRemountDelay );
if( Core.ML && attacker is BaseCreature && ((BaseCreature)attacker).ControlMaster != null )
{
BaseMount.SetMountPrevention( ((BaseCreature)attacker).ControlMaster, BlockMountType.DismountRecovery, AttackerRemountDelay );
}
else
{
BaseMount.SetMountPrevention( attacker, BlockMountType.DismountRecovery, AttackerRemountDelay );
}
if ( !attacker.Mounted )
AOS.Damage( defender, attacker, Utility.RandomMinMax( 15, 25 ), 100, 0, 0, 0, 0 );
}

View file

@ -20,6 +20,11 @@ namespace Server.Items
public override int BaseMana{ get{ return 15; } }
public override bool RequiresTactics( Mobile from )
{
return false;
}
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )

View file

@ -13,7 +13,7 @@ namespace Server.Items
}
public override int BaseMana{ get{ return 15; } }
public override double AccuracyScalar{ get{ return 0.75; } }
public override int AccuracyBonus{ get{ return -25; } }
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{

View file

@ -38,6 +38,16 @@ namespace Server.Items
return false;
}*/
public override bool RequiresTactics( Mobile from )
{
BaseWeapon weapon = from.Weapon as BaseWeapon;
if ( weapon == null )
return true;
return weapon.Skill != SkillName.Wrestling;
}
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
if( defender.Paralyzed )

View file

@ -16,6 +16,11 @@ namespace Server.Items
public override int BaseMana{ get{ return 20; } }
public override double DamageScalar{ get{ return 1.25; } }
public override bool RequiresTactics( Mobile from )
{
return false;
}
public override bool CheckSkills( Mobile from )
{
if ( !base.CheckSkills( from ) )

View file

@ -11,7 +11,7 @@ namespace Server.Items
{
public virtual int BaseMana{ get{ return 0; } }
public virtual double AccuracyScalar{ get{ return 1.0; } }
public virtual int AccuracyBonus{ get{ return 0; } }
public virtual double DamageScalar{ get{ return 1.0; } }
public virtual bool RequiresSE { get { return false; } }
@ -35,6 +35,11 @@ namespace Server.Items
return true;
}
public virtual bool RequiresTactics( Mobile from )
{
return true;
}
public virtual double GetRequiredSkill( Mobile from )
{
BaseWeapon weapon = from.Weapon as BaseWeapon;
@ -87,6 +92,13 @@ namespace Server.Items
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;
@ -96,7 +108,14 @@ namespace Server.Items
return true;
/* </UBWS> */
from.SendLocalizedMessage( 1060182, reqSkill.ToString() ); // You need ~1_SKILL_REQUIREMENT~ weapon skill to perform that attack
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;
}
@ -160,6 +179,11 @@ namespace Server.Items
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;
}
return CheckSkills( from ) && CheckMana( from, false );
}

View file

@ -750,9 +750,6 @@ namespace Server.Items
double atkValue = atkWeapon.GetAttackSkillValue( attacker, defender );
double defValue = defWeapon.GetDefendSkillValue( attacker, defender );
//attacker.CheckSkill( atkSkill.SkillName, defValue - 20.0, 120.0 );
//defender.CheckSkill( defSkill.SkillName, atkValue - 20.0, 120.0 );
double ourValue, theirValue;
int bonus = GetHitChanceBonus();
@ -765,12 +762,7 @@ namespace Server.Items
if ( defValue <= -20.0 )
defValue = -19.9;
// Hit Chance Increase = 45%
int atkChance = AosAttributes.GetValue( attacker, AosAttribute.AttackChance );
if ( atkChance > 45 )
atkChance = 45;
bonus += atkChance;
bonus += AosAttributes.GetValue( attacker, AosAttribute.AttackChance );
if ( Spells.Chivalry.DivineFurySpell.UnderEffect( attacker ) )
bonus += 10; // attacker gets 10% bonus when they're under divine fury
@ -781,13 +773,24 @@ namespace Server.Items
if ( HitLower.IsUnderAttackEffect( attacker ) )
bonus -= 25; // Under Hit Lower Attack effect -> 25% malus
ourValue = (atkValue + 20.0) * (100 + bonus);
WeaponAbility ability = WeaponAbility.GetCurrentAbility( attacker );
// Defense Chance Increase = 45%
bonus = AosAttributes.GetValue( defender, AosAttribute.DefendChance );
if ( ability != null )
bonus += ability.AccuracyBonus;
SpecialMove move = SpecialMove.GetCurrentMove( attacker );
if ( move != null )
bonus += move.GetAccuracyBonus( attacker );
// Max Hit Chance Increase = 45%
if ( bonus > 45 )
bonus = 45;
ourValue = (atkValue + 20.0) * (100 + bonus);
bonus = AosAttributes.GetValue( defender, AosAttribute.DefendChance );
if ( Spells.Chivalry.DivineFurySpell.UnderEffect( defender ) )
bonus -= 20; // defender loses 20% bonus when they're under divine fury
@ -810,6 +813,10 @@ namespace Server.Items
if ( SkillHandlers.Discordance.GetEffect( attacker, ref discordanceEffect ) )
bonus -= discordanceEffect;
// Defense Chance Increase = 45%
if ( bonus > 45 )
bonus = 45;
theirValue = (defValue + 20.0) * (100 + bonus);
bonus = 0;
@ -833,19 +840,7 @@ namespace Server.Items
if ( Core.AOS && chance < 0.02 )
chance = 0.02;
WeaponAbility ability = WeaponAbility.GetCurrentAbility( attacker );
if ( ability != null )
chance *= ability.AccuracyScalar;
SpecialMove move = SpecialMove.GetCurrentMove( attacker );
if ( move != null )
chance *= move.GetAccuracyScalar( attacker );
return attacker.CheckSkill( atkSkill.SkillName, chance );
//return ( chance >= Utility.RandomDouble() );
}
public virtual TimeSpan GetDelay( Mobile m )

View file

@ -6,6 +6,9 @@ namespace Server.Items
{
public class MagicWand : BaseBashing
{
public override WeaponAbility PrimaryAbility { get { return WeaponAbility.Dismount; } }
public override WeaponAbility SecondaryAbility { get { return WeaponAbility.Disarm; } }
public override int AosStrengthReq{ get{ return 5; } }
public override int AosMinDamage{ get{ return 9; } }
public override int AosMaxDamage{ get{ return 11; } }