This commit is contained in:
parent
c0218110c3
commit
754877f880
12 changed files with 70 additions and 56 deletions
|
|
@ -2113,7 +2113,22 @@ namespace Server.Items
|
||||||
|
|
||||||
GetBaseDamageRange( attacker, out min, out max );
|
GetBaseDamageRange( attacker, out min, out max );
|
||||||
|
|
||||||
return Utility.RandomMinMax( min, max );
|
int damage = Utility.RandomMinMax( min, max );
|
||||||
|
|
||||||
|
if ( Core.AOS ) return damage;
|
||||||
|
|
||||||
|
/* Apply damage level offset
|
||||||
|
* : Regular : 0
|
||||||
|
* : Ruin : 1
|
||||||
|
* : Might : 3
|
||||||
|
* : Force : 5
|
||||||
|
* : Power : 7
|
||||||
|
* : Vanq : 9
|
||||||
|
*/
|
||||||
|
if ( m_DamageLevel != WeaponDamageLevel.Regular )
|
||||||
|
damage += (2 * (int)m_DamageLevel) - 1;
|
||||||
|
|
||||||
|
return damage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual double GetBonus( double value, double scalar, double threshold, double offset )
|
public virtual double GetBonus( double value, double scalar, double threshold, double offset )
|
||||||
|
|
@ -2269,72 +2284,48 @@ namespace Server.Items
|
||||||
* : 50.0 = unchanged
|
* : 50.0 = unchanged
|
||||||
* : 100.0 = 50% bonus
|
* : 100.0 = 50% bonus
|
||||||
*/
|
*/
|
||||||
double tacticsBonus = (attacker.Skills[SkillName.Tactics].Value - 50.0) / 100.0;
|
damage += ( damage * ( ( attacker.Skills[SkillName.Tactics].Value - 50.0 ) / 100.0 ) );
|
||||||
|
|
||||||
|
|
||||||
/* Compute strength modifier
|
/* Compute strength modifier
|
||||||
* : 1% bonus for every 5 strength
|
* : 1% bonus for every 5 strength
|
||||||
*/
|
*/
|
||||||
double strBonus = (attacker.Str / 5.0) / 100.0;
|
double modifiers = ( attacker.Str / 5.0 ) / 100.0;
|
||||||
|
|
||||||
/* Compute anatomy modifier
|
/* Compute anatomy modifier
|
||||||
* : 1% bonus for every 5 points of anatomy
|
* : 1% bonus for every 5 points of anatomy
|
||||||
* : +10% bonus at Grandmaster or higher
|
* : +10% bonus at Grandmaster or higher
|
||||||
*/
|
*/
|
||||||
double anatomyValue = attacker.Skills[SkillName.Anatomy].Value;
|
double anatomyValue = attacker.Skills[SkillName.Anatomy].Value;
|
||||||
double anatomyBonus = (anatomyValue / 5.0) / 100.0;
|
modifiers += ( ( anatomyValue / 5.0 ) / 100.0 );
|
||||||
|
|
||||||
if ( anatomyValue >= 100.0 )
|
if ( anatomyValue >= 100.0 )
|
||||||
anatomyBonus += 0.1;
|
modifiers += 0.1;
|
||||||
|
|
||||||
/* Compute lumberjacking bonus
|
/* Compute lumberjacking bonus
|
||||||
* : 1% bonus for every 5 points of lumberjacking
|
* : 1% bonus for every 5 points of lumberjacking
|
||||||
* : +10% bonus at Grandmaster or higher
|
* : +10% bonus at Grandmaster or higher
|
||||||
*/
|
*/
|
||||||
double lumberBonus;
|
|
||||||
|
|
||||||
if ( Type == WeaponType.Axe )
|
if ( Type == WeaponType.Axe )
|
||||||
{
|
{
|
||||||
double lumberValue = attacker.Skills[SkillName.Lumberjacking].Value;
|
double lumberValue = attacker.Skills[SkillName.Lumberjacking].Value;
|
||||||
|
|
||||||
lumberBonus = (lumberValue / 5.0) / 100.0;
|
modifiers += ( ( lumberValue / 5.0 ) / 100.0 );
|
||||||
|
|
||||||
if ( lumberValue >= 100.0 )
|
if ( lumberValue >= 100.0 )
|
||||||
lumberBonus += 0.1;
|
modifiers += 0.1;
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
lumberBonus = 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// New quality bonus:
|
// New quality bonus:
|
||||||
double qualityBonus = ((int)m_Quality - 1) * 0.2;
|
if ( m_Quality != WeaponQuality.Regular )
|
||||||
|
modifiers += ( ( (int)m_Quality - 1 ) * 0.2 );
|
||||||
|
|
||||||
|
// Virtual damage bonus:
|
||||||
|
if ( VirtualDamageBonus != 0 )
|
||||||
|
modifiers += ( VirtualDamageBonus / 100.0 );
|
||||||
|
|
||||||
// Apply bonuses
|
// Apply bonuses
|
||||||
damage += (damage * tacticsBonus) + (damage * strBonus) + (damage * anatomyBonus) + (damage * lumberBonus) + (damage * qualityBonus) + ((damage * VirtualDamageBonus) / 100);
|
damage += ( damage * modifiers );
|
||||||
|
|
||||||
// Old quality bonus:
|
|
||||||
#if false
|
|
||||||
/* Apply quality offset
|
|
||||||
* : Low : -4
|
|
||||||
* : Regular : 0
|
|
||||||
* : Exceptional : +4
|
|
||||||
*/
|
|
||||||
damage += ((int)m_Quality - 1) * 4.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Apply damage level offset
|
|
||||||
* : Regular : 0
|
|
||||||
* : Ruin : 1
|
|
||||||
* : Might : 3
|
|
||||||
* : Force : 5
|
|
||||||
* : Power : 7
|
|
||||||
* : Vanq : 9
|
|
||||||
*/
|
|
||||||
if ( m_DamageLevel != WeaponDamageLevel.Regular )
|
|
||||||
damage += (2.0 * (int)m_DamageLevel) - 1.0;
|
|
||||||
|
|
||||||
// Halve the computed damage and return
|
|
||||||
damage /= 2.0;
|
|
||||||
|
|
||||||
return ScaleDamageByDurability( (int)damage );
|
return ScaleDamageByDurability( (int)damage );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Server;
|
using Server;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Mobiles;
|
using Server.Mobiles;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Server
|
namespace Server
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ namespace Server.Mobiles
|
||||||
from.SayTo( from, 1010095 ); // This must be on your person to use.
|
from.SayTo( from, 1010095 ); // This must be on your person to use.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if( m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( from, this, null ) )
|
else if( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||||
{
|
{
|
||||||
// CheckIsUsableBy sends the message
|
// CheckIsUsableBy sends the message
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -173,6 +173,16 @@ namespace Server.Mobiles
|
||||||
new EtherealSpell( this, from ).Cast();
|
new EtherealSpell( this, from ).Cast();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void OnSingleClick( Mobile from )
|
||||||
|
{
|
||||||
|
base.OnSingleClick( from );
|
||||||
|
|
||||||
|
if ( m_IsDonationItem )
|
||||||
|
LabelTo( from, "Donation Ethereal" );
|
||||||
|
else
|
||||||
|
LabelTo( from, "Veteran Reward" );
|
||||||
|
}
|
||||||
|
|
||||||
public override void Serialize( GenericWriter writer )
|
public override void Serialize( GenericWriter writer )
|
||||||
{
|
{
|
||||||
base.Serialize( writer );
|
base.Serialize( writer );
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Server;
|
using Server;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Server;
|
using Server;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Engines.CannedEvil;
|
using Server.Engines.CannedEvil;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
using Server;
|
using Server;
|
||||||
using Server.Items;
|
using Server.Items;
|
||||||
using Server.Engines.CannedEvil;
|
using Server.Engines.CannedEvil;
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Server.Mobiles
|
namespace Server.Mobiles
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -412,7 +412,7 @@ namespace Server.Spells
|
||||||
|
|
||||||
if ( m_State == SpellState.Casting )
|
if ( m_State == SpellState.Casting )
|
||||||
{
|
{
|
||||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_State = SpellState.None;
|
m_State = SpellState.None;
|
||||||
|
|
@ -433,7 +433,7 @@ namespace Server.Spells
|
||||||
}
|
}
|
||||||
else if ( m_State == SpellState.Sequencing )
|
else if ( m_State == SpellState.Sequencing )
|
||||||
{
|
{
|
||||||
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_State = SpellState.None;
|
m_State = SpellState.None;
|
||||||
|
|
@ -558,10 +558,16 @@ namespace Server.Spells
|
||||||
WeaponAbility.ClearCurrentAbility( m_Caster );
|
WeaponAbility.ClearCurrentAbility( m_Caster );
|
||||||
|
|
||||||
m_CastTimer = new CastTimer( this, castDelay );
|
m_CastTimer = new CastTimer( this, castDelay );
|
||||||
m_CastTimer.Start();
|
//m_CastTimer.Start();
|
||||||
|
|
||||||
OnBeginCast();
|
OnBeginCast();
|
||||||
|
|
||||||
|
if ( castDelay > TimeSpan.Zero ) {
|
||||||
|
m_CastTimer.Start();
|
||||||
|
} else {
|
||||||
|
m_CastTimer.Tick();
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -659,8 +665,6 @@ namespace Server.Spells
|
||||||
return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
|
return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public abstract TimeSpan CastDelayBase { get; }
|
public abstract TimeSpan CastDelayBase { get; }
|
||||||
|
|
||||||
public virtual double CastDelayFastScalar { get { return 1; } }
|
public virtual double CastDelayFastScalar { get { return 1; } }
|
||||||
|
|
@ -898,12 +902,17 @@ namespace Server.Spells
|
||||||
|
|
||||||
protected override void OnTick()
|
protected override void OnTick()
|
||||||
{
|
{
|
||||||
if ( m_Spell.m_State == SpellState.Casting && m_Spell.m_Caster.Spell == m_Spell )
|
if ( m_Spell == null || m_Spell.m_Caster == null )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if ( m_Spell.m_State == SpellState.Casting && m_Spell.m_Caster.Spell == m_Spell )
|
||||||
{
|
{
|
||||||
m_Spell.m_State = SpellState.Sequencing;
|
m_Spell.m_State = SpellState.Sequencing;
|
||||||
m_Spell.m_CastTimer = null;
|
m_Spell.m_CastTimer = null;
|
||||||
m_Spell.m_Caster.OnSpellCast( m_Spell );
|
m_Spell.m_Caster.OnSpellCast( m_Spell );
|
||||||
m_Spell.m_Caster.Region.OnSpellCast( m_Spell.m_Caster, m_Spell );
|
if ( m_Spell.m_Caster.Region != null )
|
||||||
|
m_Spell.m_Caster.Region.OnSpellCast( m_Spell.m_Caster, m_Spell );
|
||||||
m_Spell.m_Caster.NextSpellTime = DateTime.Now + m_Spell.GetCastRecovery();// Spell.NextSpellDelay;
|
m_Spell.m_Caster.NextSpellTime = DateTime.Now + m_Spell.GetCastRecovery();// Spell.NextSpellDelay;
|
||||||
|
|
||||||
Target originalTarget = m_Spell.m_Caster.Target;
|
Target originalTarget = m_Spell.m_Caster.Target;
|
||||||
|
|
@ -916,6 +925,10 @@ namespace Server.Spells
|
||||||
m_Spell.m_CastTimer = null;
|
m_Spell.m_CastTimer = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Tick() {
|
||||||
|
OnTick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue