This commit is contained in:
mark 2012-11-03 21:37:59 +00:00
parent c0218110c3
commit 754877f880
12 changed files with 70 additions and 56 deletions

View file

@ -386,7 +386,7 @@ namespace Server.Engines.CannedEvil
case 4: Type = ChampionSpawnType.Arachnid; break;
}
}
m_HasBeenAdvanced = false;
Start();

View file

@ -2113,7 +2113,22 @@ namespace Server.Items
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 )
@ -2269,72 +2284,48 @@ namespace Server.Items
* : 50.0 = unchanged
* : 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
* : 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
* : 1% bonus for every 5 points of anatomy
* : +10% bonus at Grandmaster or higher
*/
double anatomyValue = attacker.Skills[SkillName.Anatomy].Value;
double anatomyBonus = (anatomyValue / 5.0) / 100.0;
modifiers += ( ( anatomyValue / 5.0 ) / 100.0 );
if ( anatomyValue >= 100.0 )
anatomyBonus += 0.1;
modifiers += 0.1;
/* Compute lumberjacking bonus
* : 1% bonus for every 5 points of lumberjacking
* : +10% bonus at Grandmaster or higher
*/
double lumberBonus;
if ( Type == WeaponType.Axe )
{
double lumberValue = attacker.Skills[SkillName.Lumberjacking].Value;
lumberBonus = (lumberValue / 5.0) / 100.0;
modifiers += ( ( lumberValue / 5.0 ) / 100.0 );
if ( lumberValue >= 100.0 )
lumberBonus += 0.1;
}
else
{
lumberBonus = 0.0;
modifiers += 0.1;
}
// 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
damage += (damage * tacticsBonus) + (damage * strBonus) + (damage * anatomyBonus) + (damage * lumberBonus) + (damage * qualityBonus) + ((damage * VirtualDamageBonus) / 100);
// 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;
damage += ( damage * modifiers );
return ScaleDamageByDurability( (int)damage );
}

View file

@ -1,9 +1,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
namespace Server
{

View file

@ -128,7 +128,7 @@ namespace Server.Mobiles
from.SayTo( from, 1010095 ); // This must be on your person to use.
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
return false;
@ -173,6 +173,16 @@ namespace Server.Mobiles
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 )
{
base.Serialize( writer );

View file

@ -1,8 +1,8 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using System.Collections.Generic;
namespace Server.Mobiles
{

View file

@ -1,9 +1,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
using System.Collections.Generic;
namespace Server.Mobiles
{

View file

@ -1,9 +1,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Engines.CannedEvil;
using System.Collections.Generic;
namespace Server.Mobiles
{

View file

@ -208,7 +208,7 @@ namespace Server.Mobiles
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to drop or throw an unholy bone
AddUnholyBone( defender, 0.25 );
CheckSpeedBoost();
}

View file

@ -412,7 +412,7 @@ namespace Server.Spells
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;
m_State = SpellState.None;
@ -433,7 +433,7 @@ namespace Server.Spells
}
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;
m_State = SpellState.None;
@ -558,10 +558,16 @@ namespace Server.Spells
WeaponAbility.ClearCurrentAbility( m_Caster );
m_CastTimer = new CastTimer( this, castDelay );
m_CastTimer.Start();
//m_CastTimer.Start();
OnBeginCast();
if ( castDelay > TimeSpan.Zero ) {
m_CastTimer.Start();
} else {
m_CastTimer.Tick();
}
return true;
}
else
@ -659,8 +665,6 @@ namespace Server.Spells
return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
}
public abstract TimeSpan CastDelayBase { get; }
public virtual double CastDelayFastScalar { get { return 1; } }
@ -898,12 +902,17 @@ namespace Server.Spells
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_CastTimer = null;
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;
Target originalTarget = m_Spell.m_Caster.Target;
@ -916,6 +925,10 @@ namespace Server.Spells
m_Spell.m_CastTimer = null;
}
}
public void Tick() {
OnTick();
}
}
}
}

View file

@ -104,7 +104,7 @@ namespace Server.Spells
return true;
}
}
return false;
}
@ -176,7 +176,7 @@ namespace Server.Spells
return false;
}
public static bool CanRevealCaster( Mobile m )
{
if ( m is BaseCreature )

View file

@ -65,7 +65,7 @@ namespace Server.Spells.Fifth
SpellHelper.CheckReflect( (int)this.Circle, ref from, ref target );
int damage = (int)((Caster.Skills[SkillName.Magery].Value + Caster.Int) / 5);
if ( damage > 60 )
damage = 60;