- Added support for ML mods, as well as quivers. More ML artifacts are added
(http://www.uodemise.com/discussion/showthread.php?t=116685) - Dog Form HPR rate is tweaked as per OSI (http://www.uodemise.com/discussion/showthread.php?t=124422) - Hairstylist gump now works for elves (http://www.uodemise.com/discussion/showthread.php?t=120199) - Bless buff icon now will report correct values (http://www.uodemise.com/discussion/showthread.php?t=123760) - When stealthing, the step just before a stealth check won't let you lose the stealth status (you can use shadowjump) (http://www.uodemise.com/discussion/showthread.php?t=121250) - You can open the blacksmith gump even if far from anvil and forge, but you still need to be near them to craft (http://www.uodemise.com/discussion/showthread.php?t=122750)
This commit is contained in:
parent
aff5e22940
commit
30c7232a69
54 changed files with 1363 additions and 149 deletions
|
|
@ -20,9 +20,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = pois = nrgy = chaos = direct = 0;
|
||||
cold = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
fire = cold = nrgy = chaos = direct = 0;
|
||||
phys = 25;
|
||||
pois = 75;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace Server.Items
|
|||
WeaponAttributes.UseBestSkill = 1;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = cold = nrgy = chaos = direct = 0;
|
||||
pois = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 50;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1517,9 +1517,17 @@ namespace Server.Items
|
|||
|
||||
AddBlood( attacker, defender, damage );
|
||||
|
||||
int phys, fire, cold, pois, nrgy;
|
||||
int phys, fire, cold, pois, nrgy, chaos, direct;
|
||||
|
||||
GetDamageTypes( attacker, out phys, out fire, out cold, out pois, out nrgy );
|
||||
GetDamageTypes( attacker, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
|
||||
|
||||
if ( Core.ML && this is BaseRanged )
|
||||
{
|
||||
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
|
||||
|
||||
if ( quiver != null )
|
||||
quiver.AlterBowDamage( ref phys, ref fire, ref cold, ref pois, ref nrgy, ref chaos, ref direct );
|
||||
}
|
||||
|
||||
if ( m_Consecrated )
|
||||
{
|
||||
|
|
@ -1536,7 +1544,7 @@ namespace Server.Items
|
|||
if ( pois < low ){ low = pois; type = 3; }
|
||||
if ( nrgy < low ){ low = nrgy; type = 4; }
|
||||
|
||||
phys = fire = cold = pois = nrgy = 0;
|
||||
phys = fire = cold = pois = nrgy = chaos = direct = 0;
|
||||
|
||||
if ( type == 0 ) phys = 100;
|
||||
else if ( type == 1 ) fire = 100;
|
||||
|
|
@ -1561,7 +1569,7 @@ namespace Server.Items
|
|||
|
||||
bool ignoreArmor = ( a is ArmorIgnore || (move != null && move.IgnoreArmor( attacker )) );
|
||||
|
||||
damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy );
|
||||
damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy, chaos, direct, false, this is BaseRanged );
|
||||
|
||||
double propertyBonus = ( move == null ) ? 1.0 : move.GetPropertyBonus( attacker );
|
||||
|
||||
|
|
@ -1966,7 +1974,7 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
|
||||
public virtual void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
public virtual 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 )
|
||||
{
|
||||
if( wielder is BaseCreature )
|
||||
{
|
||||
|
|
@ -1977,6 +1985,8 @@ namespace Server.Items
|
|||
cold = bc.ColdDamage;
|
||||
pois = bc.PoisonDamage;
|
||||
nrgy = bc.EnergyDamage;
|
||||
chaos = bc.ChaosDamage;
|
||||
direct = bc.DirectDamage;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1984,8 +1994,10 @@ namespace Server.Items
|
|||
cold = m_AosElementDamages.Cold;
|
||||
pois = m_AosElementDamages.Poison;
|
||||
nrgy = m_AosElementDamages.Energy;
|
||||
chaos = m_AosElementDamages.Chaos;
|
||||
direct = m_AosElementDamages.Direct;
|
||||
|
||||
phys = 100 - fire - cold - pois - nrgy;
|
||||
phys = 100 - fire - cold - pois - nrgy - chaos - direct;
|
||||
|
||||
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
|
||||
|
||||
|
|
@ -2001,6 +2013,8 @@ namespace Server.Items
|
|||
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponEnergyDamage, ref nrgy, left );
|
||||
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponFireDamage, ref fire, left );
|
||||
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponPoisonDamage, ref pois, left );
|
||||
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponChaosDamage, ref chaos, left );
|
||||
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponDirectDamage, ref direct, left );
|
||||
|
||||
phys = left;
|
||||
}
|
||||
|
|
@ -2975,8 +2989,8 @@ namespace Server.Items
|
|||
|
||||
public int GetElementalDamageHue()
|
||||
{
|
||||
int phys, fire, cold, pois, nrgy;
|
||||
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );
|
||||
int phys, fire, cold, pois, nrgy, chaos, direct;
|
||||
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
|
||||
//Order is Cold, Energy, Fire, Poison, Physical left
|
||||
|
||||
int currentMax = 50;
|
||||
|
|
@ -3123,6 +3137,9 @@ namespace Server.Items
|
|||
|
||||
int prop;
|
||||
|
||||
if ( Core.ML && this is BaseRanged && ( (BaseRanged) this ).Balanced )
|
||||
list.Add( 1072792 ); // Balanced
|
||||
|
||||
if ( (prop = m_AosWeaponAttributes.UseBestSkill) != 0 )
|
||||
list.Add( 1060400 ); // use best weapon skill
|
||||
|
||||
|
|
@ -3189,6 +3206,9 @@ namespace Server.Items
|
|||
if ( (prop = m_AosWeaponAttributes.HitLeechStam) != 0 )
|
||||
list.Add( 1060430, prop.ToString() ); // hit stamina leech ~1_val~%
|
||||
|
||||
if ( Core.ML && this is BaseRanged && ( prop = ( (BaseRanged) this ).Velocity ) != 0 )
|
||||
list.Add( 1072793, prop.ToString() ); // Velocity ~1_val~%
|
||||
|
||||
if ( (prop = m_AosAttributes.BonusDex) != 0 )
|
||||
list.Add( 1060409, prop.ToString() ); // dexterity bonus ~1_val~
|
||||
|
||||
|
|
@ -3249,9 +3269,9 @@ namespace Server.Items
|
|||
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
|
||||
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
|
||||
|
||||
int phys, fire, cold, pois, nrgy;
|
||||
int phys, fire, cold, pois, nrgy, chaos, direct;
|
||||
|
||||
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );
|
||||
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
|
||||
|
||||
if ( phys != 0 )
|
||||
list.Add( 1060403, phys.ToString() ); // physical damage ~1_val~%
|
||||
|
|
@ -3266,7 +3286,13 @@ namespace Server.Items
|
|||
list.Add( 1060406, pois.ToString() ); // poison damage ~1_val~%
|
||||
|
||||
if ( nrgy != 0 )
|
||||
list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val~%
|
||||
list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val
|
||||
|
||||
if ( Core.ML && chaos != 0 )
|
||||
list.Add( 1072846, chaos.ToString() ); // chaos damage ~1_val~%
|
||||
|
||||
if ( Core.ML && direct != 0 )
|
||||
list.Add( 1079978, direct.ToString() ); // Direct Damage: ~1_PERCENT~%
|
||||
|
||||
list.Add( 1061168, "{0}\t{1}", MinDamage.ToString(), MaxDamage.ToString() ); // weapon damage ~1_val~ - ~2_val~
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ namespace Server.Items
|
|||
Hue = this.GetElementalDamageHue();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = pois = nrgy = chaos = direct = 0;
|
||||
cold = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ namespace Server.Items
|
|||
Hue = this.GetElementalDamageHue();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ namespace Server.Items
|
|||
Hue = this.GetElementalDamageHue();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = cold = pois = nrgy = chaos = direct = 0;
|
||||
fire = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 60;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = nrgy = chaos = direct = 0;
|
||||
cold = pois = 50;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ namespace Server.Items
|
|||
Attributes.WeaponDamage = 35;
|
||||
}
|
||||
|
||||
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
|
||||
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 = 0;
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,23 @@ namespace Server.Items
|
|||
|
||||
public override SkillName AccuracySkill{ get{ return SkillName.Archery; } }
|
||||
|
||||
private bool m_Balanced;
|
||||
private int m_Velocity;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Balanced
|
||||
{
|
||||
get{ return m_Balanced; }
|
||||
set{ m_Balanced = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Velocity
|
||||
{
|
||||
get{ return m_Velocity; }
|
||||
set{ m_Velocity = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public BaseRanged( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
|
|
@ -81,6 +98,22 @@ namespace Server.Items
|
|||
if ( attacker.Player && !defender.Player && (defender.Body.IsAnimal || defender.Body.IsMonster) && 0.4 >= Utility.RandomDouble() )
|
||||
defender.AddToBackpack( Ammo );
|
||||
|
||||
if ( Core.ML && m_Velocity > 0 )
|
||||
{
|
||||
int bonus = (int) attacker.GetDistanceToSqrt( defender );
|
||||
|
||||
if ( bonus > 0 && m_Velocity > Utility.Random( 100 ) )
|
||||
{
|
||||
AOS.Damage( defender, attacker, bonus * 3, 100, 0, 0, 0, 0 );
|
||||
|
||||
if ( attacker.Player )
|
||||
attacker.SendLocalizedMessage( 1072794 ); // Your arrow hits its mark with velocity!
|
||||
|
||||
if ( defender.Player )
|
||||
defender.SendLocalizedMessage( 1072795 ); // You have been hit by an arrow with velocity!
|
||||
}
|
||||
}
|
||||
|
||||
base.OnHit( attacker, defender, damageBonus );
|
||||
}
|
||||
|
||||
|
|
@ -94,10 +127,19 @@ namespace Server.Items
|
|||
|
||||
public virtual bool OnFired( Mobile attacker, Mobile defender )
|
||||
{
|
||||
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
|
||||
Container pack = attacker.Backpack;
|
||||
|
||||
if ( attacker.Player && (pack == null || !pack.ConsumeTotal( AmmoType, 1 )) )
|
||||
return false;
|
||||
if ( attacker.Player )
|
||||
{
|
||||
if ( quiver == null || quiver.LowerAmmoCost == 0 || quiver.LowerAmmoCost > Utility.Random( 100 ) )
|
||||
{
|
||||
if ( quiver != null && quiver.ConsumeTotal( AmmoType, 1 ) )
|
||||
quiver.InvalidateWeight();
|
||||
else if ( pack == null || !pack.ConsumeTotal( AmmoType, 1 ) )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
|
||||
|
||||
|
|
@ -108,7 +150,10 @@ namespace Server.Items
|
|||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 2 ); // version
|
||||
writer.Write( (int) 3 ); // version
|
||||
|
||||
writer.Write( (bool) m_Balanced );
|
||||
writer.Write( (int) m_Velocity );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
|
|
@ -119,6 +164,13 @@ namespace Server.Items
|
|||
|
||||
switch ( version )
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_Balanced = reader.ReadBool();
|
||||
m_Velocity = reader.ReadInt();
|
||||
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
case 1:
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue