This commit is contained in:
parent
b2349aed25
commit
d03acbffaf
15 changed files with 81 additions and 30 deletions
|
|
@ -653,10 +653,10 @@ namespace Server.Spells
|
|||
// Faster casting cap of 0 (if using the protection spell)
|
||||
// Paladin spells are subject to a faster casting cap of 4
|
||||
// Paladins with magery of 70.0 or above are subject to a faster casting cap of 2
|
||||
int fcMax = 2;
|
||||
int fcMax = 4;
|
||||
|
||||
if ( CastSkill == SkillName.Chivalry && m_Caster.Skills[SkillName.Magery].Value < 70.0 )
|
||||
fcMax = 4;
|
||||
if ( CastSkill == SkillName.Magery || CastSkill == SkillName.Necromancy || ( CastSkill == SkillName.Chivalry && m_Caster.Skills[SkillName.Magery].Value >= 70.0 ) )
|
||||
fcMax = 2;
|
||||
|
||||
int fc = AosAttributes.GetValue( m_Caster, AosAttribute.CastSpeed );
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Collections;
|
|||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Bushido
|
||||
|
|
@ -30,20 +31,15 @@ namespace Server.Spells.Bushido
|
|||
|
||||
public static bool VerifyCast( Mobile Caster, bool messages )
|
||||
{
|
||||
if( Caster == null ) //sanity
|
||||
if( Caster == null ) // Sanity
|
||||
return false;
|
||||
|
||||
if( Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
|
||||
return true;
|
||||
|
||||
//Intentional having a Shield check override all.
|
||||
|
||||
BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
|
||||
|
||||
if( weap == null )
|
||||
weap = Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
|
||||
|
||||
if( weap != null )
|
||||
if( weap != null || Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
|
||||
{
|
||||
if( Core.ML && Caster.Skills[weap.Skill].Base < 50 )
|
||||
{
|
||||
|
|
@ -71,9 +67,18 @@ namespace Server.Spells.Bushido
|
|||
|
||||
public static bool CheckSpellEvasion( Mobile defender )
|
||||
{
|
||||
if( IsEvading( defender ) && VerifyCast( defender, false ) && BaseWeapon.CheckParry( defender ) ) //As per OSI, uses the exact same parry code
|
||||
BaseWeapon weap = defender.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
|
||||
|
||||
if ( weap == null )
|
||||
weap = defender.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
|
||||
|
||||
if ( Core.ML && defender.Spell != null && defender.Spell.IsCasting )
|
||||
{
|
||||
defender.Emote( "*evades*" ); //Yes. Eew. Blame OSI.
|
||||
return false;
|
||||
}
|
||||
else if ( IsEvading( defender ) && BaseWeapon.CheckParry( defender ) && ( !Core.ML || defender.Skills[weap.Skill].Base > 50 ) && ( weap != null || defender.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null ) )
|
||||
{
|
||||
defender.Emote( "*evades*" ); // Yes. Eew. Blame OSI.
|
||||
defender.FixedEffect( 0x37B9, 10, 16 );
|
||||
return true;
|
||||
}
|
||||
|
|
@ -158,15 +163,15 @@ namespace Server.Spells.Bushido
|
|||
if( !Core.ML )
|
||||
return 1.5;
|
||||
|
||||
double bonus = 80;
|
||||
double bonus = 0;
|
||||
|
||||
if( m.Skills.Bushido.Value > 60 )
|
||||
bonus += m.Skills.Bushido.Value;
|
||||
if( m.Skills.Bushido.Value >= 60 )
|
||||
bonus += ( ( m.Skills.Bushido.Value - 60 * .004 ) + 0.16 );
|
||||
|
||||
if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended
|
||||
bonus += 50;
|
||||
if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended
|
||||
bonus += 0.10;
|
||||
|
||||
return 1.0 + bonus/500;
|
||||
return 1.0 + bonus;
|
||||
}
|
||||
|
||||
public static void BeginEvasion( Mobile m )
|
||||
|
|
|
|||
|
|
@ -62,6 +62,15 @@ namespace Server.Spells.Necromancy
|
|||
damage *= (300 + (m.Karma / 100) + (GetDamageSkill( Caster ) * 10));
|
||||
damage /= 1000;
|
||||
|
||||
int sdiBonus = AosAttributes.GetValue( Caster, AosAttribute.SpellDamage );
|
||||
|
||||
// PvP spell damage increase cap of 15% from an item’s magic property in Publish 33(SE)
|
||||
if ( Core.SE && m.Player && Caster.Player && sdiBonus > 15 )
|
||||
sdiBonus = 15;
|
||||
|
||||
damage *= ( 100 + sdiBonus );
|
||||
damage /= 100;
|
||||
|
||||
// TODO: cap?
|
||||
//if ( damage > 40 )
|
||||
// damage = 40;
|
||||
|
|
|
|||
|
|
@ -62,6 +62,24 @@ namespace Server.Spells.Seventh
|
|||
return SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom );
|
||||
}
|
||||
|
||||
private bool GateExistsAt(Map map, Point3D loc )
|
||||
{
|
||||
bool _gateFound = false;
|
||||
|
||||
IPooledEnumerable eable = map.GetItemsInRange( loc, 0 );
|
||||
foreach ( Item item in eable )
|
||||
{
|
||||
if ( item is Moongate || item is PublicMoongate )
|
||||
{
|
||||
_gateFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
return _gateFound;
|
||||
}
|
||||
|
||||
public void Effect( Point3D loc, Map map, bool checkMulti )
|
||||
{
|
||||
if ( Factions.Sigil.ExistsOn( Caster ) )
|
||||
|
|
@ -102,6 +120,10 @@ namespace Server.Spells.Seventh
|
|||
{
|
||||
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
|
||||
}
|
||||
else if ( Core.SE && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ namespace Server.Spells.Spellweaving
|
|||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( (int)(skill / 24) + FocusLevel );
|
||||
|
||||
int fcMalus = 2 * (FocusLevel + 1);
|
||||
int ssiMalus = FocusLevel + 1;
|
||||
int fcMalus = FocusLevel + 1;
|
||||
int ssiMalus = 2 * (FocusLevel + 1);
|
||||
|
||||
List<Mobile> targets = new List<Mobile>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue