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

@ -59,6 +59,8 @@ namespace Server.Items
public class BarrelHoops : Item
{
public override int LabelNumber { get { return 1011228; } } // Barrel hoops
[Constructable]
public BarrelHoops() : base(0x1DB7)
{

View file

@ -194,7 +194,7 @@ namespace Server.Items
get {
if ( Core.ML ) {
Mobile m = ParentEntity as Mobile;
if ( m != null && m.Backpack == this ) {
if ( m != null && m.Player && m.Backpack == this ) {
return 550;
} else {
return base.DefaultMaxWeight;

View file

@ -106,7 +106,9 @@ namespace Server.Items
public void EndPlace( Mobile from, HolidayTreeType type, Point3D loc )
{
this.Delete();
new HolidayTree( from, type, loc );
HolidayTree tree = new HolidayTree( from, type, loc );
BaseHouse house = BaseHouse.FindHouseAt( tree );
house.Addons.Add( tree );
}
public override void OnDoubleClick( Mobile from )

View file

@ -157,7 +157,7 @@ namespace Server.Items
[Constructable]
public SushiPlatter() : base( 0x2840 )
{
Stackable = false;
Stackable = Core.ML;
Weight = 3.0;
FillFactor = 2;
}

View file

@ -26,6 +26,7 @@ namespace Server.Items
[Constructable]
public Dough() : base( 0x103d )
{
Stackable = Core.ML;
Weight = 1.0;
}
@ -124,6 +125,7 @@ namespace Server.Items
[Constructable]
public SweetDough() : base( 0x103d )
{
Stackable = Core.ML;
Weight = 1.0;
Hue = 150;
}

View file

@ -688,7 +688,7 @@ namespace Server.Items
[Constructable]
public Cookies() : base( 0x160b )
{
Stackable = false;
Stackable = Core.ML;
this.Weight = 1.0;
this.FillFactor = 4;
}
@ -997,7 +997,7 @@ namespace Server.Items
[Constructable]
public Quiche() : base( 0x1041 )
{
Stackable = false;
Stackable = Core.ML;
this.Weight = 1.0;
this.FillFactor = 5;
}

View file

@ -16,6 +16,7 @@ namespace Server.Items
[Constructable]
public ArcaneGem() : base( 0x1EA7 )
{
Stackable = Core.ML;
Weight = 1.0;
}

View file

@ -929,6 +929,16 @@ namespace Server.Items
public void Carve( Mobile from, Item item )
{
if ( IsCriminalAction( from ) && this.Map != null && (this.Map.Rules & MapRules.HarmfulRestrictions) != 0 )
{
if ( m_Owner == null || !m_Owner.Player )
from.SendLocalizedMessage( 1005035 ); // You did not earn the right to loot this creature!
else
from.SendLocalizedMessage( 1010049 ); // You may not loot this corpse.
return;
}
Mobile dead = m_Owner;
if ( m_Carved || dead == null )

View file

@ -14,6 +14,7 @@ namespace Server.Items
{
Hue = 2101;
Weight = 2.0;
Stackable = Core.ML;
}
public TribalPaint( Serial serial ) : base( serial )

View file

@ -26,7 +26,7 @@ namespace Server.Items
public BigFish() : base( 0x09CC )
{
Weight = Utility.RandomMinMax( 3, 200 ); //TODO: Find correct formula. max on OSI currently 200, OSI dev says it's not 200 as max, and ~ 1/1,000,000 chance to get highest
Hue = 0x847;
Hue = Utility.RandomBool() ? 0x847 : 0x58C;
}
public override void GetProperties( ObjectPropertyList list )

View file

@ -71,6 +71,7 @@ namespace Server.Items
else
list.Add( CraftResources.GetName( m_Resource ) );
}
Stackable = Core.ML;
}
}

View file

@ -146,6 +146,8 @@ namespace Server.Items
public class TrophyAddon : Item, IAddon
{
public override bool ForceShowProperties { get { return ObjectPropertyList.Enabled; } }
private int m_WestID;
private int m_NorthID;
private int m_DeedNumber;

View file

@ -134,12 +134,20 @@ namespace Server.Items
m.Animate( 34, 5, 1, true, false, 0 );
}
public static int EnhancePotions( Mobile m )
{
int EP = AosAttributes.GetValue( m, AosAttribute.EnhancePotions );
if ( Core.ML && EP > 50 )
EP = 50;
return EP;
}
public static TimeSpan Scale( Mobile m, TimeSpan v )
{
if ( !Core.AOS )
return v;
double scalar = 1.0 + (0.01 * AosAttributes.GetValue( m, AosAttribute.EnhancePotions ));
double scalar = 1.0 + ( 0.01 * EnhancePotions( m ) );
return TimeSpan.FromSeconds( v.TotalSeconds * scalar );
}
@ -149,7 +157,7 @@ namespace Server.Items
if ( !Core.AOS )
return v;
double scalar = 1.0 + (0.01 * AosAttributes.GetValue( m, AosAttribute.EnhancePotions ));
double scalar = 1.0 + ( 0.01 * EnhancePotions( m ) );
return v * scalar;
}
@ -159,7 +167,7 @@ namespace Server.Items
if ( !Core.AOS )
return v;
return AOS.Scale( v, 100 + AosAttributes.GetValue( m, AosAttribute.EnhancePotions ) );
return AOS.Scale( v, 100 + EnhancePotions( m ) );
}
public override bool StackWith( Mobile from, Item dropped, bool playSound )

View file

@ -276,7 +276,7 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( GetWorldLocation(), 1 ) )
if ( from.InRange( GetWorldLocation(), (Core.ML ? 3 : 1) ) )
{
if ( DateTime.Now < NextUse )
{
@ -294,22 +294,22 @@ namespace Server.Items
NextUse = DateTime.Now + UseDelay;
}
public override void OnAfterDuped( Item newItem )
{
Runebook book = newItem as Runebook;
public override void OnAfterDuped( Item newItem )
{
Runebook book = newItem as Runebook;
if ( book == null )
return;
if ( book == null )
return;
book.m_Entries = new List<RunebookEntry>();
for ( int i = 0; i < m_Entries.Count; i++ )
{
RunebookEntry entry = m_Entries[i];
for ( int i = 0; i < m_Entries.Count; i++ )
{
RunebookEntry entry = m_Entries[i];
book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
}
}
book.m_Entries.Add( new RunebookEntry( entry.Location, entry.Map, entry.Description, entry.House ) );
}
}
public bool CheckAccess( Mobile m )
{

View file

@ -16,6 +16,7 @@ namespace Server.Items
public ArcaneCircleScroll( int amount )
: base( 600, 0x2D51, amount )
{
Hue = 0x8FD;
}
public ArcaneCircleScroll( Serial serial )
@ -50,6 +51,7 @@ namespace Server.Items
public GiftOfRenewalScroll( int amount )
: base( 601, 0x2D52, amount )
{
Hue = 0x8FD;
}
public GiftOfRenewalScroll( Serial serial )
@ -84,6 +86,7 @@ namespace Server.Items
public ImmolatingWeaponScroll( int amount )
: base( 602, 0x2D53, amount )
{
Hue = 0x8FD;
}
public ImmolatingWeaponScroll( Serial serial )
@ -118,6 +121,7 @@ namespace Server.Items
public AttuneWeaponScroll( int amount )
: base( 603, 0x2D54, amount )
{
Hue = 0x8FD;
}
public AttuneWeaponScroll( Serial serial )
@ -152,6 +156,7 @@ namespace Server.Items
public ThunderstormScroll( int amount )
: base( 604, 0x2D55, amount )
{
Hue = 0x8FD;
}
public ThunderstormScroll( Serial serial )
@ -186,6 +191,7 @@ namespace Server.Items
public NatureFuryScroll( int amount )
: base( 605, 0x2D56, amount )
{
Hue = 0x8FD;
}
public NatureFuryScroll( Serial serial )
@ -220,6 +226,7 @@ namespace Server.Items
public SummonFeyScroll( int amount )
: base( 606, 0x2D57, amount )
{
Hue = 0x8FD;
}
public SummonFeyScroll( Serial serial )
@ -254,6 +261,7 @@ namespace Server.Items
public SummonFiendScroll( int amount )
: base( 607, 0x2D58, amount )
{
Hue = 0x8FD;
}
public SummonFiendScroll( Serial serial )
@ -288,6 +296,7 @@ namespace Server.Items
public ReaperFormScroll( int amount )
: base( 608, 0x2D59, amount )
{
Hue = 0x8FD;
}
public ReaperFormScroll( Serial serial )
@ -322,6 +331,7 @@ namespace Server.Items
public WildfireScroll( int amount )
: base( 609, 0x2D5A, amount )
{
Hue = 0x8FD;
}
public WildfireScroll( Serial serial )
@ -356,6 +366,7 @@ namespace Server.Items
public EssenceOfWindScroll( int amount )
: base( 610, 0x2D5B, amount )
{
Hue = 0x8FD;
}
public EssenceOfWindScroll( Serial serial )
@ -390,6 +401,7 @@ namespace Server.Items
public DryadAllureScroll( int amount )
: base( 611, 0x2D5C, amount )
{
Hue = 0x8FD;
}
public DryadAllureScroll( Serial serial )
@ -424,6 +436,7 @@ namespace Server.Items
public EtherealVoyageScroll( int amount )
: base( 612, 0x2D5D, amount )
{
Hue = 0x8FD;
}
public EtherealVoyageScroll( Serial serial )
@ -458,6 +471,7 @@ namespace Server.Items
public WordOfDeathScroll( int amount )
: base( 613, 0x2D5E, amount )
{
Hue = 0x8FD;
}
public WordOfDeathScroll( Serial serial )
@ -492,6 +506,7 @@ namespace Server.Items
public GiftOfLifeScroll( int amount )
: base( 614, 0x2D5F, amount )
{
Hue = 0x8FD;
}
public GiftOfLifeScroll( Serial serial )
@ -526,6 +541,7 @@ namespace Server.Items
public ArcaneEmpowermentScroll( int amount )
: base( 615, 0x2D60, amount )
{
Hue = 0x8FD;
}
public ArcaneEmpowermentScroll( Serial serial )

View file

@ -8,6 +8,7 @@ namespace Server.Items
[Constructable]
public EggBomb() : base( 0x2809 )
{
Stackable = Core.ML;
Weight = 1.0;
}

View file

@ -8,6 +8,7 @@ namespace Server.Items
[Constructable]
public SmokeBomb() : base( 0x2808 )
{
Stackable = Core.ML;
Weight = 1.0;
}

View file

@ -26,7 +26,7 @@ namespace Server.Items
[Constructable]
public Sand( int amount ) : base( 0x11EA )
{
Stackable = false;
Stackable = Core.ML;
Weight = 1.0;
}

View file

@ -492,7 +492,13 @@ namespace Server.Items
/* Begin Sheilds */
case 0: ApplyAttribute( primary, min, max, AosAttribute.SpellChanneling, 1, 1 ); break;
case 1: ApplyAttribute( primary, min, max, AosAttribute.DefendChance, 1, 15 ); break;
case 2: ApplyAttribute( primary, min, max, AosAttribute.AttackChance, 1, 15 ); break;
case 2:
if (Core.ML) {
ApplyAttribute( primary, min, max, AosAttribute.ReflectPhysical, 1, 15 );
} else {
ApplyAttribute( primary, min, max, AosAttribute.AttackChance, 1, 15 );
}
break;
case 3: ApplyAttribute( primary, min, max, AosAttribute.CastSpeed, 1, 1 ); break;
/* Begin Armor */
case 4: ApplyAttribute( secondary, min, max, AosArmorAttribute.LowerStatReq, 10, 100, 10 ); break;

View file

@ -2,6 +2,7 @@ using System;
using System.Collections;
using Server.Network;
using Server.Items;
using Server.Multis;
namespace Server.Items
{
@ -11,7 +12,7 @@ namespace Server.Items
Modern
}
public class HolidayTree : Item
public class HolidayTree : Item, IAddon
{
private ArrayList m_Components;
private Mobile m_Placer;
@ -208,6 +209,16 @@ namespace Server.Items
{
}
public bool CouldFit( IPoint3D p, Map map )
{
return map.CanFit( (Point3D)p, 20 );
}
Item IAddon.Deed
{
get{ return new HolidayTreeDeed(); }
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
@ -253,8 +264,22 @@ namespace Server.Items
break;
}
}
ValidatePlacement();
}
public void ValidatePlacement()
{
BaseHouse house = BaseHouse.FindHouseAt( this );
if ( house == null )
{
HolidayTreeDeed deed = new HolidayTreeDeed();
deed.MoveToWorld( Location, Map );
Delete();
}
}
public override void OnDoubleClick( Mobile from )
{
if ( from.InRange( this.GetWorldLocation(), 1 ) )
@ -265,6 +290,13 @@ namespace Server.Items
this.Delete();
BaseHouse house = BaseHouse.FindHouseAt( this );
if ( house != null && house.Addons.Contains( this ) )
{
house.Addons.Remove( this );
}
from.SendLocalizedMessage( 503393 ); // A deed for the tree has been placed in your backpack.
}
else

View file

@ -7,6 +7,8 @@ using Server.Targeting;
using Server.ContextMenus;
using Server.Network;
using Server.Regions;
using Server.Spells;
using Server.Spells.Ninjitsu;
namespace Server.Items
{
@ -144,20 +146,27 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( this.RootParent == from ) // TODO: Previous implementation allowed use on ground, without house protection checks. What is the correct behavior?
if ( this.RootParent != from ) // TODO: Previous implementation allowed use on ground, without house protection checks. What is the correct behavior?
{
if ( Pet == null )
{
LinkPet( from );
}
else
{
SummonPet( from );
}
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042001 ); // That must be in your pack for you to use it.
return;
}
AnimalFormContext animalContext = AnimalForm.GetContext( from );
if( Core.ML && animalContext != null )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1080073 ); // You cannot use a Crystal Ball of Pet Summoning while in animal form.
return;
}
if ( Pet == null )
{
LinkPet( from );
}
else
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042001 ); // That must be in your pack for you to use it.
CastSummonPet( from );
}
}
@ -220,7 +229,7 @@ namespace Server.Items
}
}
public void SummonPet( Mobile from )
public void CastSummonPet( Mobile from )
{
BaseCreature pet = this.Pet;
@ -251,27 +260,48 @@ namespace Server.Items
{
from.Send( new AsciiMessage( this.Serial, this.ItemID, MessageType.Regular, 0x22, 3, "", "You cannot summon your pet to this location." ) );
}
else if ( Core.ML && from is PlayerMobile && DateTime.Now < ((PlayerMobile)from).LastPetBallTime.AddSeconds( 15.0 ) )
{
MessageHelper.SendLocalizedMessageTo( this, from, 1080072, 0x22 ); // You must wait a few seconds before you can summon your pet.
}
else
{
Charges--;
if( Core.ML )
new PetSummoningSpell( this, from ).Cast();
else
SummonPet( from );
}
if ( pet.IsStabled )
{
pet.SetControlMaster( from );
}
if ( pet.Summoned )
pet.SummonMaster = from;
public void SummonPet( Mobile from )
{
BaseCreature pet = this.Pet;
pet.ControlTarget = from;
pet.ControlOrder = OrderType.Follow;
Charges--;
pet.IsStabled = false;
from.Stabled.Remove( pet );
}
if ( pet.IsStabled )
{
pet.SetControlMaster( from );
pet.MoveToWorld( from.Location, from.Map );
if ( pet.Summoned )
pet.SummonMaster = from;
MessageHelper.SendLocalizedMessageTo( this, from, 1054128, 0x43 ); // The Crystal Ball fills with a green mist. Your pet has been summoned.
pet.ControlTarget = from;
pet.ControlOrder = OrderType.Follow;
pet.IsStabled = false;
from.Stabled.Remove( pet );
}
pet.MoveToWorld( from.Location, from.Map );
MessageHelper.SendLocalizedMessageTo( this, from, 1054128, 0x43 ); // The Crystal Ball fills with a green mist. Your pet has been summoned.
if ( from is PlayerMobile )
{
((PlayerMobile)from).LastPetBallTime = DateTime.Now;
}
}
@ -341,5 +371,94 @@ namespace Server.Items
}
}
}
private class PetSummoningSpell : Spell
{
private static SpellInfo m_Info = new SpellInfo( "Ball Of Summoning", "", 230 );
private BallOfSummoning m_Ball;
private Mobile m_Caster;
public PetSummoningSpell( BallOfSummoning ball, Mobile caster )
: base( caster, null, m_Info )
{
m_Caster = caster;
m_Ball = ball;
}
public override bool ClearHandsOnCast { get { return false; } }
public override bool RevealOnCast { get { return true; } }
public override TimeSpan GetCastRecovery()
{
return TimeSpan.Zero;
}
public override double CastDelayFastScalar { get { return 0; } }
public override TimeSpan CastDelayBase
{
get
{
return TimeSpan.FromSeconds( 2.0 );
}
}
public override int GetMana()
{
return 0;
}
public override bool ConsumeReagents()
{
return true;
}
public override bool CheckFizzle()
{
return true;
}
private bool m_Stop;
public void Stop()
{
m_Stop = true;
Disturb( DisturbType.Hurt, false, false );
}
public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
{
if( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
return false;
return true;
}
public override void DoHurtFizzle()
{
if( !m_Stop )
base.DoHurtFizzle();
}
public override void DoFizzle()
{
if( !m_Stop )
base.DoFizzle();
}
public override void OnDisturb( DisturbType type, bool message )
{
if( message && !m_Stop )
Caster.SendLocalizedMessage( 1080074 ); // You have been disrupted while attempting to summon your pet!
}
public override void OnCast()
{
m_Ball.SummonPet( m_Caster );
FinishSequence();
}
}
}
}

View file

@ -24,6 +24,22 @@ namespace Server.Items
public abstract class BaseWand : 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; } }
public override int AosSpeed { get { return 40; } }
public override int OldStrengthReq { get { return 0; } }
public override int OldMinDamage { get { return 2; } }
public override int OldMaxDamage { get { return 6; } }
public override int OldSpeed { get { return 35; } }
public override int InitMinHits { get { return 31; } }
public override int InitMaxHits { get { return 110; } }
private WandEffect m_WandEffect;
private int m_Charges;

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; } }