Lots of fixes, changes, rewrites of various things, including but not limited to:

Logging of staff crafting items,
Fixes for the OSI client changes
The potion stacking stuff
BaseWeapon fix, so that damage increase things don't multiply themselves.
admin gump fixes for Firewall
Various display tweaks for weight
SoS no longer spawn in Tokuno
Hiryu hues happified to OSI standards
staff now see alliance chat correctly
Play barkeeper text increased per OSI
Various other OSI skill requirement changes
Various unimplemented features of the SE moves
EventSink for when the client version is received from client.
Client validation moved out of the core.
Client version validation now has options to ignore/kick/warn/annoy.  Automagically tries to detect current client.
Reverted the delayeddamagecontext back to OSI standards.
Can no longer use bags of sending in jail.

MagerySpell implemented. Now only Magery spells have a circle, and various other properties of 'em.
TransformationSpellHelper now implemented.  Things moved around for this.
Spells now need a Timespan for the cast delay, instead of arbitrarily based on Circle.  Circle doesn't make sense for non-Magery spells!
Alot of the spellweaving spells added to OSI standards.
This commit is contained in:
asayre 2007-05-26 03:12:41 +00:00
parent f12e9745c6
commit 2ad37d54aa
214 changed files with 4881 additions and 1243 deletions

View file

@ -61,7 +61,8 @@ namespace Server.Misc
if ( Core.AOS )
{
CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3618, 2591, 0 );
//CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3618, 2591, 0 );
CityInfo haven = new CityInfo( "Haven", "Uzeraan's Mansion", 3503, 2574, 14 );
StartingCities[StartingCities.Length - 1] = haven;
}
}

View file

@ -225,8 +225,6 @@ namespace Server
if( IPAddress.TryParse( entry, out addr ) )
return new IPFirewallEntry( addr );
//Try CIDR parse
string[] str = entry.Split( '/' );
@ -269,6 +267,16 @@ namespace Server
Add( (IPAddress)obj );
else if( obj is string )
Add( (string)obj );
else if( obj is IFirewallEntry )
Add( (IFirewallEntry)obj );
}
public static void Add( IFirewallEntry entry )
{
if( !m_Blocked.Contains( entry ) )
m_Blocked.Add( entry );
Save();
}
public static void Add( string pattern )

View file

@ -48,7 +48,7 @@ namespace Server.Misc
{
++count;
if ( count > MaxAddresses )
if ( count >= MaxAddresses )
return false;
}
}

View file

@ -102,12 +102,12 @@ namespace Server.Commands
{
if ( e.Length == 1 && !e.GetBoolean( 0 ) )
{
from.Send( SpeedBoost.Disabled );
from.Send( SpeedControl.Disable );
from.SendMessage( "Speed boost has been disabled." );
}
else
{
from.Send( SpeedBoost.Enabled );
from.Send( SpeedControl.MountSpeed );
from.SendMessage( "Speed boost has been enabled." );
}
}

View file

@ -11,6 +11,8 @@ using Server.ContextMenus;
using Server.Engines.Quests;
using Server.Engines.Quests.Necro;
using MoveImpl=Server.Movement.MovementImpl;
using Server.Spells;
using Server.Spells.Spellweaving;
namespace Server.Mobiles
{
@ -1486,7 +1488,7 @@ namespace Server.Mobiles
if( aggr.IsDeadBondedPet || !aggr.Alive )
continue;
double aggrScore = m_Mobile.GetValueFrom( aggr, FightMode.Closest, false );
double aggrScore = m_Mobile.GetFightModeRanking( aggr, FightMode.Closest, false );
if( (newCombatant == null || aggrScore > newScore) && m_Mobile.InLOS( aggr ) )
{
@ -2484,6 +2486,10 @@ namespace Server.Mobiles
if ( bFacFoe && !m_Mobile.IsEnemy( m ) )
continue;
//Ignore anyone under EtherealVoyage
if( TransformationSpellHelper.UnderTransformation( m, typeof( EtherealVoyageSpell ) ) )
continue;
if( acqType == FightMode.Aggressor || acqType == FightMode.Evil )
{
// Only acquire this mobile if it attacked us, or if it's evil.
@ -2516,7 +2522,7 @@ namespace Server.Mobiles
if ( bFacFoe && !bFacFriend && !m_Mobile.CanBeHarmful( m, false ) )
continue;
theirVal = m_Mobile.GetValueFrom( m, acqType, bPlayerOnly );
theirVal = m_Mobile.GetFightModeRanking( m, acqType, bPlayerOnly );
if( theirVal > val && m_Mobile.InLOS( m ) )
{

View file

@ -13,6 +13,7 @@ using Server.ContextMenus;
using Server.Engines.Quests;
using Server.Factions;
using Server.Spells.Bushido;
using Server.Spells.Spellweaving;
namespace Server.Mobiles
{
@ -758,6 +759,9 @@ namespace Server.Mobiles
if ( !(m is BaseCreature) || m is Server.Engines.Quests.Haven.MilitiaFighter )
return true;
if( TransformationSpellHelper.UnderTransformation( m, typeof( EtherealVoyageSpell ) ) )
return false;
BaseCreature c = (BaseCreature)m;
return ( m_iTeam != c.m_iTeam || ( (m_bSummoned || m_bControlled) != (c.m_bSummoned || c.m_bControlled) )/* || c.Combatant == this*/ );
@ -2519,15 +2523,13 @@ namespace Server.Mobiles
this.PublicOverheadMessage( MessageType.Regular, 41, false, String.Format( format, args ) );
}
/*
* Will need to be givent a better name
*
/*
* This function can be overriden.. so a "Strongest" mobile, can have a different definition depending
* on who check for value
* -Could add a FightMode.Prefered
*
*/
public virtual double GetValueFrom( Mobile m, FightMode acqType, bool bPlayerOnly )
public virtual double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
if ( ( bPlayerOnly && m.Player ) || !bPlayerOnly )
{
@ -2549,7 +2551,7 @@ namespace Server.Mobiles
}
}
// Turn, - for let, + for right
// Turn, - for left, + for right
// Basic for now, needs work
public virtual void Turn(int iTurnSteps)
{
@ -4159,6 +4161,8 @@ namespace Server.Mobiles
this.OwnerAbandonTime = DateTime.MinValue;
}
GiftOfLifeSpell.HandleDeath( this );
CheckStatTimers();
}
else

View file

@ -1011,7 +1011,7 @@ namespace Server.Engines.CannedEvil
public override void AlterLightLevel( Mobile m, ref int global, ref int personal )
{
base.AlterLightLevel( m, ref global, ref personal );
global = Math.Max( global, 1 + m_Spawn.Level ); //This is a gusstimate. TODO: Verify & get exact values // OSI testing: at 2 red skulls, light = 0x3 ; 1 red = 0x3.; 3 = 8; 9 = 0xD 8 = 0xD 12 = 0x12 10 = 0xD
global = Math.Max( global, 1 + m_Spawn.Level ); //This is a guesstimate. TODO: Verify & get exact values // OSI testing: at 2 red skulls, light = 0x3 ; 1 red = 0x3.; 3 = 8; 9 = 0xD 8 = 0xD 12 = 0x12 10 = 0xD
}
}

View file

@ -5,6 +5,7 @@ using Server;
using Server.Items;
using Server.Factions;
using Server.Mobiles;
using Server.Commands;
namespace Server.Engines.Craft
{
@ -679,11 +680,11 @@ namespace Server.Engines.Craft
{
// Runebooks are a special case, they need a blank recall rune
Item[] runes = ourPack.FindItemsByType( typeof( RecallRune ) );
List<RecallRune> runes = ourPack.FindItemsByType<RecallRune>();
for ( int i = 0; i < runes.Length; ++i )
for ( int i = 0; i < runes.Count; ++i )
{
RecallRune rune = runes[i] as RecallRune;
RecallRune rune = runes[i];
if ( rune != null && !rune.Marked )
{
@ -1115,6 +1116,9 @@ namespace Server.Engines.Craft
from.AddToBackpack( item );
if( from.AccessLevel > AccessLevel.Player )
CommandLogging.WriteLine( from, "Crafting {0} with craft system {1}", CommandLogging.Format( item ), craftSystem.GetType().Name );
//from.PlaySound( 0x57 );
}

View file

@ -282,7 +282,7 @@ namespace Server.Engines.Craft
index = AddCraft( typeof( StandardPlateKabuto ), 1011079, 1030196, 90.0, 140.0, typeof( IronIngot ), 1044036, 25, 1044037 );
SetNeededExpansion( index, Expansion.SE );
/*
if( Core.ML )
{
index = AddCraft( typeof( Circlet ), 1011079, 1032645, 62.1, 112.1, typeof( IronIngot ), 1044036, 6, 1044037 );
@ -296,8 +296,8 @@ namespace Server.Engines.Craft
AddRes( index, typeof( Amethyst ), 1044236, 1, 1044240 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
SetNeededExpansion( index, Expansion.ML );
}
* */
}
#endregion
@ -336,7 +336,6 @@ namespace Server.Engines.Craft
if( Core.SE )
{
index = AddCraft( typeof( NoDachi ), 1011081, 1030221, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
SetNeededExpansion( index, Expansion.SE );
index = AddCraft( typeof( Wakizashi ), 1011081, 1030223, 50.0, 100.0, typeof( IronIngot ), 1044036, 8, 1044037 );
@ -353,7 +352,7 @@ namespace Server.Engines.Craft
SetNeededExpansion( index, Expansion.SE );
index = AddCraft( typeof( Sai ), 1011081, 1030234, 50.0, 100.0, typeof( IronIngot ), 1044036, 12, 1044037 );
SetNeededExpansion( index, Expansion.SE );
/*
if( Core.ML )
{
index = AddCraft( typeof( RadiantScimitar ), 1011081, 1031571, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
@ -409,17 +408,152 @@ namespace Server.Engines.Craft
ForceNonExceptional( index );
SetNeededExpansion( index, Expansion.ML );
/* //TODO: true spellblade;
index = AddCraft( typeof( ), 1011081, 1072920, 70.0, 120.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( GrizzledBones ), 1032684, 1, 1053098 );
AddRes( index, typeof( Blight ), 1032675, 10, 1053098 );
AddRes( index, typeof( Scourge ), 1032677, 10, 1053098 );
index = AddCraft( typeof( TrueSpellblade ), 1011081, 1073513, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
AddRecipe( index, 4 );
ForceNonExceptional( index );
SetNeededExpansion( index, Expansion.ML );
* */
index = AddCraft( typeof( IcySpellblade ), 1011081, 1073514, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( Turquoise ), 1032691, 1, 1044240 );
AddRecipe( index, 5 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( FierySpellblade ), 1011081, 1073515, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( FireRuby ), 1032695, 1, 1044240 );
AddRecipe( index, 6 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( SpellbladeOfDefense ), 1011081, 1073516, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
AddRes( index, typeof( WhitePearl ), 1032694, 1, 1044240 );
AddRecipe( index, 7 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( TrueAssassinSpike ), 1011081, 1073517, 75.0, 125.0, typeof( IronIngot ), 1044036, 9, 1044037 );
AddRes( index, typeof( DarkSapphire ), 1032690, 1, 1044240 );
AddRecipe( index, 8 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( ChargedAssassinSpike ), 1011081, 1073518, 75.0, 125.0, typeof( IronIngot ), 1044036, 9, 1044037 );
AddRes( index, typeof( EcruCitrine ), 1032693, 1, 1044240 );
AddRecipe( index, 9 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( MagekillerAssassinSpike ), 1011081, 1073519, 75.0, 125.0, typeof( IronIngot ), 1044036, 9, 1044037 );
AddRes( index, typeof( BrilliantAmber ), 1032697, 1, 1044240 );
AddRecipe( index, 10 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( WoundingAssassinSpike ), 1011081, 1073520, 75.0, 125.0, typeof( IronIngot ), 1044036, 9, 1044037 );
AddRes( index, typeof( PerfectEmerald ), 1032692, 1, 1044240 );
AddRecipe( index, 11 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( TrueLeafblade ), 1011081, 1073521, 75.0, 125.0, typeof( IronIngot ), 1044036, 12, 1044037 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
AddRecipe( index, 12 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( Luckblade ), 1011081, 1073522, 75.0, 125.0, typeof( IronIngot ), 1044036, 12, 1044037 );
AddRes( index, typeof( WhitePearl ), 1032694, 1, 1044240 );
AddRecipe( index, 13 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( MagekillerLeafblade ), 1011081, 1073523, 75.0, 125.0, typeof( IronIngot ), 1044036, 12, 1044037 );
AddRes( index, typeof( FireRuby ), 1032695, 1, 1044240 );
AddRecipe( index, 14 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( LeafbladeOfEase ), 1011081, 1073524, 75.0, 125.0, typeof( IronIngot ), 1044036, 12, 1044037 );
AddRes( index, typeof( PerfectEmerald ), 1032692, 1, 1044240 );
AddRecipe( index, 15 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( KnightsWarCleaver ), 1011081, 1073525, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
AddRes( index, typeof( PerfectEmerald ), 1032692, 1, 1044240 );
AddRecipe( index, 16 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( ButchersWarCleaver ), 1011081, 1073526, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
AddRes( index, typeof( Turquoise ), 1032691, 1, 1044240 );
AddRecipe( index, 17 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( SerratedWarCleaver ), 1011081, 1073527, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
AddRes( index, typeof( EcruCitrine ), 1032693, 1, 1044240 );
AddRecipe( index, 18 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( TrueWarCleaver ), 1011081, 1073528, 75.0, 125.0, typeof( IronIngot ), 1044036, 18, 1044037 );
AddRes( index, typeof( BrilliantAmber ), 1032697, 1, 1044240 );
AddRecipe( index, 19 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( AdventurersMachete ), 1011081, 1073533, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( WhitePearl ), 1032694, 1, 1044240 );
AddRecipe( index, 20 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( OrcishMachete ), 1011081, 1073534, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( Scourge ), 1072136, 1, 1042081 );
AddRecipe( index, 21 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( MacheteOfDefense ), 1011081, 1073535, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( BrilliantAmber ), 1032697, 1, 1044240 );
AddRecipe( index, 22 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( DiseasedMachete ), 1011081, 1073536, 75.0, 125.0, typeof( IronIngot ), 1044036, 14, 1044037 );
AddRes( index, typeof( Blight ), 1072134, 1, 1042081 );
AddRecipe( index, 23 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( RuneSabre ), 1011081, 1073537, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( Turquoise ), 1032691, 1, 1044240 );
AddRecipe( index, 24 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( MagesRuneBlade ), 1011081, 1073538, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
AddRecipe( index, 25 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( RuneBladeOfKnowledge ), 1011081, 1073539, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( EcruCitrine ), 1032693, 1, 1044240 );
AddRecipe( index, 26 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( CorruptedRuneBlade ), 1011081, 1073540, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( Corruption ), 1072135, 1, 1042081 );
AddRecipe( index, 27 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( TrueRadiantScimitar ), 1011081, 1073541, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( BrilliantAmber ), 1032697, 1, 1044240 );
AddRecipe( index, 28 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( DarkglowScimitar ), 1011081, 1073542, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( DarkSapphire ), 1032690, 1, 1044240 );
AddRecipe( index, 29 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( IcyScimitar ), 1011081, 1073543, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( DarkSapphire ), 1032690, 1, 1044240 );
AddRecipe( index, 30 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( TwinklingScimitar ), 1011081, 1073544, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( DarkSapphire ), 1032690, 1, 1044240 );
AddRecipe( index, 31 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( BoneMachete ), 1011081, 1020526, 75.0, 125.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( Bone ), 1049064, 6, 1049063 );
AddRecipe( index, 32 );
SetNeededExpansion( index, Expansion.ML );
}
*/
}
#endregion
@ -431,6 +565,33 @@ namespace Server.Engines.Craft
AddCraft( typeof( LargeBattleAxe ), 1011082, 1025115, 28.0, 78.0, typeof( IronIngot ), 1044036, 12, 1044037 );
AddCraft( typeof( TwoHandedAxe ), 1011082, 1025187, 33.0, 83.0, typeof( IronIngot ), 1044036, 16, 1044037 );
AddCraft( typeof( WarAxe ), 1011082, 1025040, 39.1, 89.1, typeof( IronIngot ), 1044036, 16, 1044037 );
/*
if( Core.ML )
{
index = AddCraft( typeof( OrnateAxe ), 1011082, 1031572, 70.0, 120.0, typeof( IronIngot ), 1044036, 18, 1044037 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( GuardianAxe ), 1011082, 1073545, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
AddRecipe( index, 33 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( SingingAxe ), 1011082, 1073546, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( BrilliantAmber ), 1032697, 1, 1044240 );
AddRecipe( index, 34 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( ThunderingAxe ), 1011082, 1073547, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( EcruCitrine ), 1032693, 1, 1044240 );
AddRecipe( index, 35 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( HeavyOrnateAxe ), 1011082, 1073548, 75.0, 125.0, typeof( IronIngot ), 1044036, 15, 1044037 );
AddRes( index, typeof( Turquoise ), 1032691, 1, 1044240 );
AddRecipe( index, 36 );
SetNeededExpansion( index, Expansion.ML );
}*/
#endregion
#region Pole Arms
@ -481,6 +642,40 @@ namespace Server.Engines.Craft
AddRes( index, typeof( Cloth ), 1044286, 10, 1044287 );
SetNeededExpansion( index, Expansion.SE );
}
/*
if( Core.ML )
{
index = AddCraft( typeof( DiamondMace ), 1011084, 1073568, 70.0, 120.0, typeof( IronIngot ), 1044036, 20, 1044037 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( ShardThrasher ), 1011084, 1072918, 70.0, 120.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( EyeOfTheTravesty ), 1073126, 1, 1042081 );
AddRes( index, typeof( Muculent ), 1072139, 10, 1042081 );
AddRes( index, typeof( Corruption ), 1072135, 10, 1042081 );
AddRecipe( index, 37 );
ForceNonExceptional( index );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( RubyMace ), 1011084, 1073529, 75.0, 125.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( FireRuby ), 1032695, 1, 1044240 );
AddRecipe( index, 38 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( EmeraldMace ), 1011084, 1073530, 75.0, 125.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( PerfectEmerald ), 1032692, 1, 1044240 );
AddRecipe( index, 39 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( SapphireMace ), 1011084, 1073531, 75.0, 125.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( DarkSapphire ), 1032690, 1, 1044240 );
AddRecipe( index, 40 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( SilverEtchedMace ), 1011084, 1073532, 75.0, 125.0, typeof( IronIngot ), 1044036, 20, 1044037 );
AddRes( index, typeof( BlueDiamond ), 1032696, 1, 1044240 );
AddRecipe( index, 41 );
SetNeededExpansion( index, Expansion.ML );
}*/
#endregion
#region Dragon Scale Armor

View file

@ -115,6 +115,15 @@ namespace Server.Engines.Craft
SetNeededExpansion( index, Expansion.SE );
}
if( Core.AOS ) //Duplicate Entries to preserve ordering depending on era
{
index = AddCraft( typeof( FishingPole ), 1044294, 1023519, 68.4, 93.4, typeof( Log ), 1044041, 5, 1044351 ); //This is in the categor of Other during AoS
AddSkill( index, SkillName.Tailoring, 40.0, 45.0 );
AddRes( index, typeof( Cloth ), 1044286, 5, 1044287 );
}
// Furniture
AddCraft( typeof( FootStool ), 1044291, 1022910, 11.0, 36.0, typeof( Log ), 1044041, 9, 1044351 );
AddCraft( typeof( Stool ), 1044291, 1022602, 11.0, 36.0, typeof( Log ), 1044041, 9, 1044351 );
@ -194,10 +203,13 @@ namespace Server.Engines.Craft
AddCraft( typeof( QuarterStaff ), 1044295, 1023721, 73.6, 98.6, typeof( Log ), 1044041, 6, 1044351 );
AddCraft( typeof( GnarledStaff ), 1044295, 1025112, 78.9, 103.9, typeof( Log ), 1044041, 7, 1044351 );
AddCraft( typeof( WoodenShield ), 1044295, 1027034, 52.6, 77.6, typeof( Log ), 1044041, 9, 1044351 );
index = AddCraft( typeof( FishingPole ), Core.AOS ? 1044294 : 1044295, 1023519, 68.4, 93.4, typeof( Log ), 1044041, 5, 1044351 ); //This is in the categor of Other during AoS
AddSkill( index, SkillName.Tailoring, 40.0, 45.0 );
AddRes( index, typeof( Cloth ), 1044286, 5, 1044287 );
if( !Core.AOS ) //Duplicate Entries to preserve ordering depending on era
{
index = AddCraft( typeof( FishingPole ), 1044295, 1023519, 68.4, 93.4, typeof( Log ), 1044041, 5, 1044351 ); //This is in the categor of Other during AoS
AddSkill( index, SkillName.Tailoring, 40.0, 45.0 );
AddRes( index, typeof( Cloth ), 1044286, 5, 1044287 );
}
if( Core.SE )
{

View file

@ -4,6 +4,7 @@ using Server.Items;
using Server.Mobiles;
using Server.Engines.Quests;
using Server.Engines.Quests.Collector;
using System.Collections.Generic;
namespace Server.Engines.Harvest
{
@ -200,11 +201,11 @@ namespace Server.Engines.Harvest
if ( pack != null )
{
Item[] messages = pack.FindItemsByType( typeof( SOS ) );
List<SOS> messages = pack.FindItemsByType<SOS>();
for ( int i = 0; i < messages.Length; ++i )
for ( int i = 0; i < messages.Count; ++i )
{
SOS sos = (SOS)messages[i];
SOS sos = messages[i];
if ( from.Map == sos.TargetMap && from.InRange( sos.TargetLocation, 60 ) )
return true;
@ -228,18 +229,18 @@ namespace Server.Engines.Harvest
}
else if ( type == typeof( MessageInABottle ) )
{
return new MessageInABottle( SafeMap( from.Map ) );
return new MessageInABottle( from.Map == Map.Felucca ? Map.Felucca : Map.Trammel );
}
Container pack = from.Backpack;
if ( pack != null )
{
Item[] messages = pack.FindItemsByType( typeof( SOS ) );
List<SOS> messages = pack.FindItemsByType<SOS>();
for ( int i = 0; i < messages.Length; ++i )
for ( int i = 0; i < messages.Count; ++i )
{
SOS sos = (SOS)messages[i];
SOS sos = messages[i];
if ( from.Map == sos.TargetMap && from.InRange( sos.TargetLocation, 60 ) )
{

View file

@ -298,7 +298,7 @@ namespace Server.Engines.Help
}
else
{
from.MoveToWorld( new Point3D( 3618, 2587, 0 ), Map.Trammel );
from.MoveToWorld( new Point3D( 3503, 2574, 14 ), Map.Trammel );
}
}

View file

@ -15,7 +15,7 @@ namespace Server.Engines.Help
public static readonly bool Enabled = true;
// How long should we maintain each speech entry?
public static readonly TimeSpan EntryDuration = TimeSpan.FromMinutes( 10.0 );
public static readonly TimeSpan EntryDuration = TimeSpan.FromMinutes( 20.0 );
// What is the maximum number of entries a log can contain? (0 -> no limit)
public static readonly int MaxLength = 0;
@ -49,7 +49,7 @@ namespace Server.Engines.Help
{
from.SendMessage( "Speech logs aren't supported on that target." );
}
else if ( from != targeted && from.AccessLevel <= pm.AccessLevel )
else if ( from != targeted && from.AccessLevel <= pm.AccessLevel && from.AccessLevel != AccessLevel.Owner )
{
from.SendMessage( "You don't have the required access level to view {0} speech log.", pm.Female ? "her" : "his" );
}

View file

@ -431,7 +431,7 @@ namespace Server.Engines.Plants
int message;
if ( ApplyPotion( potion.PotionEffect, false, out message ) )
{
potion.Delete();
potion.Consume();
from.PlaySound( 0x240 );
from.AddToBackpack( new Bottle() );
}

View file

@ -2,6 +2,7 @@ using System;
using System.Collections;
using Server;
using Server.Items;
using System.Collections.Generic;
namespace Server.Engines.Plants
{
@ -391,7 +392,7 @@ namespace Server.Engines.Plants
if ( from.Backpack != null )
{
Item[] plants = from.Backpack.FindItemsByType( typeof( PlantItem ) );
List<PlantItem> plants = from.Backpack.FindItemsByType<PlantItem>();
foreach ( PlantItem plant in plants )
{
@ -404,7 +405,7 @@ namespace Server.Engines.Plants
if ( bank != null )
{
Item[] plants = bank.FindItemsByType( typeof( PlantItem ) );
List<PlantItem> plants = bank.FindItemsByType<PlantItem>();
foreach ( PlantItem plant in plants )
{

View file

@ -6,6 +6,7 @@ namespace Server.Items
{
public class EnchantedSextant : Item
{
//TODO: Trammel/Haven
private static readonly Point2D[] m_TrammelBanks = new Point2D[]
{
new Point2D( 652, 820 ),

View file

@ -160,7 +160,7 @@ namespace Server.Engines.Reports
public static SkillDistribution[] GetSkillDistribution()
{
int skip = ( Core.ML ? 0 : Core.SE ? 1 : Core.AOS ? 3 : 6 ); //TODO: Change for ML
int skip = ( Core.ML ? 0 : Core.SE ? 1 : Core.AOS ? 3 : 6 );
SkillDistribution[] distribs = new SkillDistribution[SkillInfo.Table.Length - skip];

View file

@ -369,16 +369,14 @@ namespace Server
}
}
public void ApplyPerfectionDamageBonus( ref double factor )
public int PerfectionDamageBonus
{
if ( m_Perfection > 0 )
factor *= 1.0 + (m_Perfection / 100.0);
get { return m_Perfection; }
}
public void ApplyPerfectionLuckBonus( ref int luck )
public int PerfectionLuckBonus
{
if ( m_Perfection > 0 )
luck += (m_Perfection * m_Perfection) / 10;
get{ return (m_Perfection * m_Perfection) / 10; }
}
public bool CheckDistance()

View file

@ -1182,7 +1182,7 @@ namespace Server.Gumps
{
object obj = m_List[index];
if ( !(obj is IPAddress) && !(obj is String) )
if ( !(obj is Firewall.IFirewallEntry ) )
break;
int offset = 140 + (i * 20);
@ -1197,7 +1197,7 @@ namespace Server.Gumps
{
AddFirewallHeader();
if ( !(state is IPAddress) && !(state is String) )
if ( !(state is Firewall.IFirewallEntry) )
break;
AddHtml( 10, 125, 400, 20, Color( Center( state.ToString() ), LabelColor32 ), false, false );
@ -1210,9 +1210,6 @@ namespace Server.Gumps
{
m_List = new ArrayList();
string pattern = state as String;
IPAddress addr = ( state is IPAddress ? (IPAddress)state : IPAddress.Any );
foreach ( Account acct in Accounts.GetAccounts() )
{
IPAddress[] loginList = acct.LoginIPs;
@ -1221,22 +1218,12 @@ namespace Server.Gumps
for( int i = 0; !contains && i < loginList.Length; ++i )
{
if( pattern == null ) //if is IP Address
if( ((Firewall.IFirewallEntry)state).IsBlocked( loginList[i] ) )
{
contains = loginList[i].Equals( addr );
continue;
m_List.Add( acct );
break;
}
contains = Utility.IPMatchCIDR( pattern, loginList[i] );
if( !contains )
contains = Utility.IPMatch( pattern, loginList[i] );
}
if ( contains )
m_List.Add( acct );
}
m_List.Sort( AccountComparer.Instance );
@ -2481,10 +2468,7 @@ namespace Server.Gumps
}
else
{
object toAdd;
try{ toAdd = IPAddress.Parse( text ); }
catch{ toAdd = text; }
object toAdd = Firewall.ToFirewallEntry( text );
CommandLogging.WriteLine( from, "{0} {1} firewalling {2}", from.AccessLevel, CommandLogging.Format( from ), toAdd );
@ -2502,7 +2486,7 @@ namespace Server.Gumps
}
case 3:
{
if ( m_State is IPAddress || m_State is String )
if ( m_State is Firewall.IFirewallEntry )
{
CommandLogging.WriteLine( from, "{0} {1} removing {2} from firewall list", from.AccessLevel, CommandLogging.Format( from ), m_State );

View file

@ -10,7 +10,7 @@ using System.Collections.Generic;
namespace Server.Guilds
{
public class GuildRosterGump : BaseGuildListGump<PlayerMobile> //TODO: Convert to <PlayerMobile>
public class GuildRosterGump : BaseGuildListGump<PlayerMobile>
{
#region Comparers
private class NameComparer : IComparer<PlayerMobile>

View file

@ -9,12 +9,19 @@ namespace Server.Gumps
public class PetResurrectGump : Gump
{
private BaseCreature m_Pet;
private double m_HitsScalar;
public PetResurrectGump( Mobile from, BaseCreature pet ) : base( 50, 50 )
public PetResurrectGump( Mobile from, BaseCreature pet )
: this( from, pet, 0.0 )
{
}
public PetResurrectGump( Mobile from, BaseCreature pet, double hitsScalar ) : base( 50, 50 )
{
from.CloseGump( typeof( PetResurrectGump ) );
m_Pet = pet;
m_HitsScalar = hitsScalar;
AddPage( 0 );
@ -48,6 +55,11 @@ namespace Server.Gumps
from.SendLocalizedMessage( 503256 ); // You fail to resurrect the creature.
return;
}
else if( m_Pet.Region != null && m_Pet.Region.IsPartOf( "Khaldun" ) ) //TODO: Confirm for pets, as per Bandage's script.
{
from.SendLocalizedMessage( 1010395 ); // The veil of death in this area is too strong and resists thy efforts to restore life.
return;
}
m_Pet.PlaySound( 0x214 );
m_Pet.FixedEffect( 0x376A, 10, 16 );
@ -62,6 +74,9 @@ namespace Server.Gumps
for ( int i = 0; i < m_Pet.Skills.Length; ++i ) //Decrease all skills on pet.
m_Pet.Skills[i].Base -= decreaseAmount;
if( !m_Pet.IsDeadPet && m_HitsScalar > 0 )
m_Pet.Hits = (int)(m_Pet.HitsMax * m_HitsScalar);
}
}

View file

@ -25,7 +25,8 @@ namespace Server.Gumps
private const int SelectedColor32 = 0x8080FF;
private const int TextColor32 = 0xFFFFFF;
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list ) : this( prop, mobile, o, stack, page, list, 0, null, ModelBodyType.Invalid )
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list )
: this( prop, mobile, o, stack, page, list, 0, null, ModelBodyType.Invalid )
{
}
@ -47,7 +48,8 @@ namespace Server.Gumps
AddHtml( x + 35, y, 200, 20, Color( text, isSelection ? SelectedColor32 : LabelColor32 ), false, false );
}
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list, int ourPage, ArrayList ourList, ModelBodyType ourType ) : base( 20, 30 )
public SetBodyGump( PropertyInfo prop, Mobile mobile, object o, Stack stack, int page, ArrayList list, int ourPage, ArrayList ourList, ModelBodyType ourType )
: base( 20, 30 )
{
m_Property = prop;
m_Mobile = mobile;

View file

@ -11,10 +11,10 @@ namespace Server.Gumps
{
public enum ResurrectMessage
{
ChaosShrine = 0,
VirtueShrine = 1,
Healer = 2,
Generic = 3,
ChaosShrine=0,
VirtueShrine=1,
Healer=2,
Generic=3,
}
public class ResurrectGump : Gump
@ -22,28 +22,44 @@ namespace Server.Gumps
private Mobile m_Healer;
private int m_Price;
private bool m_FromSacrifice;
private double m_HitsScalar;
public ResurrectGump( Mobile owner ) : this( owner, owner, ResurrectMessage.Generic, false )
public ResurrectGump( Mobile owner )
: this( owner, owner, ResurrectMessage.Generic, false )
{
}
public ResurrectGump( Mobile owner, bool fromSacrifice ) : this( owner, owner, ResurrectMessage.Generic, fromSacrifice )
public ResurrectGump( Mobile owner, double hitsScalar )
: this( owner, owner, ResurrectMessage.Generic, false, hitsScalar )
{
}
public ResurrectGump( Mobile owner, Mobile healer ) : this( owner, healer, ResurrectMessage.Generic, false )
public ResurrectGump( Mobile owner, bool fromSacrifice )
: this( owner, owner, ResurrectMessage.Generic, fromSacrifice )
{
}
public ResurrectGump( Mobile owner, ResurrectMessage msg ) : this( owner, owner, msg, false )
public ResurrectGump( Mobile owner, Mobile healer )
: this( owner, healer, ResurrectMessage.Generic, false )
{
}
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice ) : base( 100, 0 )
public ResurrectGump( Mobile owner, ResurrectMessage msg )
: this( owner, owner, msg, false )
{
}
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice )
: this( owner, healer, msg, fromSacrifice, 0.0 )
{
}
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice, double hitsScalar )
: base( 100, 0 )
{
m_Healer = healer;
m_FromSacrifice = fromSacrifice;
m_HitsScalar = hitsScalar;
AddPage( 0 );
@ -63,7 +79,8 @@ namespace Server.Gumps
AddHtmlLocalized( 100, 230, 110, 35, 1011011, false, false ); // CONTINUE
}
public ResurrectGump( Mobile owner, Mobile healer, int price ) : base( 150, 50 )
public ResurrectGump( Mobile owner, Mobile healer, int price )
: base( 150, 50 )
{
m_Healer = healer;
m_Price = price;
@ -122,19 +139,19 @@ namespace Server.Gumps
{
Mobile from = state.Mobile;
if ( info.ButtonID == 1 || info.ButtonID == 2 )
if( info.ButtonID == 1 || info.ButtonID == 2 )
{
if ( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
if( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
{
from.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
return;
}
if ( m_Price > 0 )
if( m_Price > 0 )
{
if ( info.IsSwitched( 1 ) )
if( info.IsSwitched( 1 ) )
{
if ( Banker.Withdraw( from, m_Price ) )
if( Banker.Withdraw( from, m_Price ) )
{
from.SendLocalizedMessage( 1060398, m_Price.ToString() ); // ~1_AMOUNT~ gold has been withdrawn from your bank box.
from.SendLocalizedMessage( 1060022, Banker.GetBalance( from ).ToString() ); // You have ~1_AMOUNT~ gold in cash remaining in your bank box.
@ -157,11 +174,11 @@ namespace Server.Gumps
from.Resurrect();
if ( m_Healer != null && from != m_Healer )
if( m_Healer != null && from != m_Healer )
{
VirtueLevel level = VirtueHelper.GetLevel( m_Healer, VirtueName.Compassion );
switch ( level )
switch( level )
{
case VirtueLevel.Seeker: from.Hits = AOS.Scale( from.HitsMax, 20 ); break;
case VirtueLevel.Follower: from.Hits = AOS.Scale( from.HitsMax, 40 ); break;
@ -169,56 +186,60 @@ namespace Server.Gumps
}
}
if ( m_FromSacrifice && !from.Criminal && from is PlayerMobile )
if( m_FromSacrifice && !from.Criminal && from is PlayerMobile )
{
((PlayerMobile)from).AvailableResurrects -= 1;
Container pack = from.Backpack;
Container corpse = from.Corpse;
if ( pack != null && corpse != null )
if( pack != null && corpse != null )
{
List<Item> items = new List<Item>( corpse.Items );
for ( int i = 0; i < items.Count; ++i )
for( int i = 0; i < items.Count; ++i )
{
Item item = items[i];
if ( item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable )
if( item.Layer != Layer.Hair && item.Layer != Layer.FacialHair && item.Movable )
pack.DropItem( item );
}
}
}
if ( from.Fame > 0 )
if( from.Fame > 0 )
{
int amount = from.Fame / 10;
Misc.Titles.AwardFame( from, -amount, true );
}
if ( !Core.AOS && from.ShortTermMurders >= 5 )
if( !Core.AOS && from.ShortTermMurders >= 5 )
{
double loss = (100.0 - ( 4.0 + (from.ShortTermMurders / 5.0))) / 100.0; // 5 to 15% loss
double loss = (100.0 - (4.0 + (from.ShortTermMurders / 5.0))) / 100.0; // 5 to 15% loss
if ( loss < 0.85 )
if( loss < 0.85 )
loss = 0.85;
else if ( loss > 0.95 )
else if( loss > 0.95 )
loss = 0.95;
if ( from.RawStr * loss > 10 )
if( from.RawStr * loss > 10 )
from.RawStr = (int)(from.RawStr * loss);
if ( from.RawInt * loss > 10 )
if( from.RawInt * loss > 10 )
from.RawInt = (int)(from.RawInt * loss);
if ( from.RawDex * loss > 10 )
if( from.RawDex * loss > 10 )
from.RawDex = (int)(from.RawDex * loss);
for ( int s = 0; s < from.Skills.Length; s++ )
for( int s = 0; s < from.Skills.Length; s++ )
{
if ( from.Skills[s].Base * loss > 35 )
if( from.Skills[s].Base * loss > 35 )
from.Skills[s].Base *= loss;
}
}
if( from.Alive && m_HitsScalar > 0 )
from.Hits = (int)(from.HitsMax * m_HitsScalar);
}
}
}

View file

@ -9,6 +9,13 @@ namespace Server.Gumps
{
private WarningGumpCallback m_Callback;
private object m_State;
private bool m_CancelButton;
public WarningGump( int header, int headerColor, object content, int contentColor, int width, int height, WarningGumpCallback callback, object state, bool cancelButton )
: this( header, headerColor, content, contentColor, width, height, callback, state )
{
m_CancelButton = cancelButton;
}
public WarningGump( int header, int headerColor, object content, int contentColor, int width, int height, WarningGumpCallback callback, object state ) : base( (640 - width) / 2, (480 - height) / 2 )
{
@ -39,8 +46,11 @@ namespace Server.Gumps
AddButton( 10, height - 30, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 40, height - 30, 170, 20, 1011036, 32767, false, false ); // OKAY
AddButton( 10 + ((width - 20) / 2), height - 30, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 40 + ((width - 20) / 2), height - 30, 170, 20, 1011012, 32767, false, false ); // CANCEL
if( m_CancelButton )
{
AddButton( 10 + ((width - 20) / 2), height - 30, 4005, 4007, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 40 + ((width - 20) / 2), height - 30, 170, 20, 1011012, 32767, false, false ); // CANCEL
}
}
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )

View file

@ -1569,6 +1569,7 @@ namespace Server.Items
from.Send( new DisplayEquipmentInfo( this, eqInfo ) );
}
#region ICraftable Members
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
@ -1591,9 +1592,30 @@ namespace Server.Items
if ( context != null && context.DoNotColor )
Hue = 0;
if ( quality == 2 )
if( Quality == ArmorQuality.Exceptional )
{
DistributeBonuses( (tool is BaseRunicTool ? 6 : Core.SE ? 15 : 14) ); // Not sure since when, but right now 15 points are added, not 14.
if( Core.ML && !(this is BaseShield) )
{
int bonus = (int)(from.Skills.ArmsLore.Value / 20);
for( int i = 0; i < bonus; i++ )
{
switch( Utility.Random( 5 ) )
{
case 0: m_PhysicalBonus++; break;
case 1: m_FireBonus++; break;
case 2: m_ColdBonus++; break;
case 3: m_EnergyBonus++; break;
case 4: m_PoisonBonus++; break;
}
}
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
}
}
if ( Core.AOS && tool is BaseRunicTool )
((BaseRunicTool)tool).ApplyAttributesTo( this );

View file

@ -249,7 +249,7 @@ namespace Server.Items
if ( m.Backpack == null )
return false;
Item[] items = m.Backpack.FindItemsByType( typeof( BaseHarvestTool ) );
List<BaseHarvestTool> items = m.Backpack.FindItemsByType<BaseHarvestTool>();
foreach ( BaseHarvestTool tool in items )
{

View file

@ -55,6 +55,8 @@ namespace Server.Items
set{ m_TimeOfDeath = value; }
}
public override bool DisplayWeight { get { return false; } }
public HairInfo Hair { get { return m_Hair; } }
public FacialHairInfo FacialHair { get { return m_FacialHair; } }

View file

@ -237,7 +237,7 @@ namespace Server.Items
new PMEntry( new Point3D( 1828, 2948,-20), 1012008 ), // Trinsic
new PMEntry( new Point3D( 643, 2067, 5 ), 1012009 ), // Skara Brae
new PMEntry( new Point3D( 3563, 2139, 34), 1012010 ), // Magincia
new PMEntry( new Point3D( 3763, 2771, 50), 1046259 ) // Haven
new PMEntry( new Point3D( 3763, 2771, 50), 1078098 ) // New Haven
} );
public static readonly PMList Felucca =

View file

@ -1,6 +1,7 @@
using System;
using Server;
using Server.Mobiles;
using Server.Spells;
namespace Server.Items
{
@ -35,7 +36,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 501699 ); // You cannot disguise yourself while polymorphed.
}
else if ( Spells.Necromancy.TransformationSpell.UnderTransformation( from ) )
else if( TransformationSpellHelper.UnderTransformation( from ) )
{
from.SendLocalizedMessage( 501699 ); // You cannot disguise yourself while polymorphed.
}

View file

@ -58,7 +58,7 @@ namespace Server.Items
{
base.Serialize( writer );
writer.Write( (int) 2 ); // version
writer.Write( (int) 3 ); // version
writer.Write( (int) m_Level );
@ -73,6 +73,7 @@ namespace Server.Items
switch ( version )
{
case 3:
case 2:
{
m_Level = reader.ReadInt();
@ -92,6 +93,9 @@ namespace Server.Items
if ( version < 2 )
m_Level = GetRandomLevel();
if( version < 3 && m_TargetMap == Map.Tokuno )
m_TargetMap = Map.Trammel;
}
public override void OnDoubleClick( Mobile from )

View file

@ -100,7 +100,7 @@ namespace Server.Items
{
base.Serialize( writer );
writer.Write( (int) 3 ); // version
writer.Write( (int) 4 ); // version
writer.Write( m_Level );
@ -117,6 +117,7 @@ namespace Server.Items
switch ( version )
{
case 4:
case 3:
case 2:
{
@ -150,6 +151,9 @@ namespace Server.Items
if ( version < 3 )
UpdateHue();
if( version < 4 && m_TargetMap == Map.Tokuno )
m_TargetMap = Map.Trammel;
}
public override void OnDoubleClick( Mobile from )

View file

@ -209,19 +209,30 @@ namespace Server.Items
if ( item is BasePotion )
{
BasePotion pot = (BasePotion)item;
int toHold = Math.Min( 100 - m_Held, pot.Amount );
if ( m_Held == 0 )
if ( toHold <= 0 )
{
if ( GiveBottle( from ) )
from.SendLocalizedMessage( 502233 ); // The keg will not hold any more!
return false;
}
else if ( m_Held == 0 )
{
if ( GiveBottle( from, toHold ) )
{
m_Type = pot.PotionEffect;
Held = 1;
Held = toHold;
from.PlaySound( 0x240 );
from.SendLocalizedMessage( 502237 ); // You place the empty bottle in your backpack.
item.Delete();
item.Consume( toHold );
if( !item.Deleted )
item.Bounce( from );
return true;
}
else
@ -235,23 +246,21 @@ namespace Server.Items
from.SendLocalizedMessage( 502236 ); // You decide that it would be a bad idea to mix different types of potions.
return false;
}
else if ( m_Held >= 100 )
{
from.SendLocalizedMessage( 502233 ); // The keg will not hold any more!
return false;
}
else
{
if ( GiveBottle( from ) )
if ( GiveBottle( from, toHold ) )
{
++Held;
item.Delete();
Held += toHold;
from.PlaySound( 0x240 );
from.SendLocalizedMessage( 502237 ); // You place the empty bottle in your backpack.
item.Delete();
item.Consume( toHold );
if( !item.Deleted )
item.Bounce( from );
return true;
}
else
@ -268,11 +277,11 @@ namespace Server.Items
}
}
public bool GiveBottle( Mobile m )
public bool GiveBottle( Mobile m, int amount )
{
Container pack = m.Backpack;
Bottle bottle = new Bottle();
Bottle bottle = new Bottle( amount );
if ( pack == null || !pack.TryDropItem( m, bottle, false ) )
{

View file

@ -1,6 +1,7 @@
using System;
using Server;
using Server.Engines.Craft;
using System.Collections.Generic;
namespace Server.Items
{
@ -51,7 +52,7 @@ namespace Server.Items
{
m_PotionEffect = effect;
Stackable = false;
Stackable = Core.ML;
Weight = 1.0;
}
@ -94,7 +95,7 @@ namespace Server.Items
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int) 1 ); // version
writer.Write( (int) m_PotionEffect );
}
@ -107,12 +108,16 @@ namespace Server.Items
switch ( version )
{
case 1:
case 0:
{
m_PotionEffect = (PotionEffect)reader.ReadInt();
break;
}
}
if( version == 0 )
Stackable = Core.ML;
}
public abstract void Drink( Mobile from );
@ -156,6 +161,15 @@ namespace Server.Items
return AOS.Scale( v, 100 + AosAttributes.GetValue( m, AosAttribute.EnhancePotions ) );
}
public override bool StackWith( Mobile from, Item dropped, bool playSound )
{
if( dropped is BasePotion && ((BasePotion)dropped).m_PotionEffect == m_PotionEffect )
return base.StackWith( from, dropped, playSound );
return false;
}
#region ICraftable Members
public int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
@ -166,11 +180,11 @@ namespace Server.Items
if ( pack != null )
{
Item[] kegs = pack.FindItemsByType( typeof( PotionKeg ), true );
List<PotionKeg> kegs = pack.FindItemsByType<PotionKeg>();
for ( int i = 0; i < kegs.Length; ++i )
for ( int i = 0; i < kegs.Count; ++i )
{
PotionKeg keg = kegs[i] as PotionKeg;
PotionKeg keg = kegs[i];
if ( keg == null )
continue;
@ -183,7 +197,7 @@ namespace Server.Items
++keg.Held;
Delete();
Consume();
from.AddToBackpack( new Bottle() );
return -1; // signal placed in keg

View file

@ -1,5 +1,6 @@
using System;
using Server;
using Server.Spells;
namespace Server.Items
{
@ -83,7 +84,7 @@ namespace Server.Items
public override void Drink( Mobile from )
{
if ( Spells.Necromancy.TransformationSpell.UnderTransformation( from, typeof( Spells.Necromancy.VampiricEmbraceSpell ) ) )
if ( TransformationSpellHelper.UnderTransformation( from, typeof( Spells.Necromancy.VampiricEmbraceSpell ) ) )
{
from.SendLocalizedMessage( 1061652 ); // The garlic in the potion would surely kill you.
}

View file

@ -200,6 +200,11 @@ namespace Server.Items
Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
if( m_Potion.Amount > 1 )
{
Mobile.LiftItemDupe( m_Potion, 1 );
}
m_Potion.Internalize();
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( m_Potion.Reposition_OnTick ), new object[]{ from, p, map } );
}
@ -210,7 +215,7 @@ namespace Server.Items
if ( Deleted )
return;
Delete();
Consume();
for ( int i = 0; m_Users != null && i < m_Users.Count; ++i )
{

View file

@ -0,0 +1,550 @@
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class ArcaneCircleScroll : SpellScroll
{
[Constructable]
public ArcaneCircleScroll()
: this( 1 )
{
}
[Constructable]
public ArcaneCircleScroll( int amount )
: base( 600, 0x2D51, amount )
{
}
public ArcaneCircleScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class GiftOfRenewalScroll : SpellScroll
{
[Constructable]
public GiftOfRenewalScroll()
: this( 1 )
{
}
[Constructable]
public GiftOfRenewalScroll( int amount )
: base( 601, 0x2D52, amount )
{
}
public GiftOfRenewalScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class ImmolatingWeaponScroll : SpellScroll
{
[Constructable]
public ImmolatingWeaponScroll()
: this( 1 )
{
}
[Constructable]
public ImmolatingWeaponScroll( int amount )
: base( 602, 0x2D53, amount )
{
}
public ImmolatingWeaponScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class AttuneWeaponScroll : SpellScroll
{
[Constructable]
public AttuneWeaponScroll()
: this( 1 )
{
}
[Constructable]
public AttuneWeaponScroll( int amount )
: base( 603, 0x2D54, amount )
{
}
public AttuneWeaponScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class ThunderstormScroll : SpellScroll
{
[Constructable]
public ThunderstormScroll()
: this( 1 )
{
}
[Constructable]
public ThunderstormScroll( int amount )
: base( 604, 0x2D55, amount )
{
}
public ThunderstormScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class NatureFuryScroll : SpellScroll
{
[Constructable]
public NatureFuryScroll()
: this( 1 )
{
}
[Constructable]
public NatureFuryScroll( int amount )
: base( 605, 0x2D56, amount )
{
}
public NatureFuryScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class SummonFeyScroll : SpellScroll
{
[Constructable]
public SummonFeyScroll()
: this( 1 )
{
}
[Constructable]
public SummonFeyScroll( int amount )
: base( 606, 0x2D57, amount )
{
}
public SummonFeyScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class SummonFiendScroll : SpellScroll
{
[Constructable]
public SummonFiendScroll()
: this( 1 )
{
}
[Constructable]
public SummonFiendScroll( int amount )
: base( 606, 0x2D57, amount )
{
}
public SummonFiendScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class ReaperFormScroll : SpellScroll
{
[Constructable]
public ReaperFormScroll()
: this( 1 )
{
}
[Constructable]
public ReaperFormScroll( int amount )
: base( 608, 0x2D59, amount )
{
}
public ReaperFormScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class WildfireScroll : SpellScroll
{
[Constructable]
public WildfireScroll()
: this( 1 )
{
}
[Constructable]
public WildfireScroll( int amount )
: base( 609, 0x2D5A, amount )
{
}
public WildfireScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class EssenceOfWindScroll : SpellScroll
{
[Constructable]
public EssenceOfWindScroll()
: this( 1 )
{
}
[Constructable]
public EssenceOfWindScroll( int amount )
: base( 610, 0x2D5B, amount )
{
}
public EssenceOfWindScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class DryadAllureScroll : SpellScroll
{
[Constructable]
public DryadAllureScroll()
: this( 1 )
{
}
[Constructable]
public DryadAllureScroll( int amount )
: base( 611, 0x2D5C, amount )
{
}
public DryadAllureScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class EtherealVoyageScroll : SpellScroll
{
[Constructable]
public EtherealVoyageScroll()
: this( 1 )
{
}
[Constructable]
public EtherealVoyageScroll( int amount )
: base( 612, 0x2D5D, amount )
{
}
public EtherealVoyageScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class WordOfDeathScroll : SpellScroll
{
[Constructable]
public WordOfDeathScroll()
: this( 1 )
{
}
[Constructable]
public WordOfDeathScroll( int amount )
: base( 613, 0x2D5E, amount )
{
}
public WordOfDeathScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class GiftOfLifeScroll : SpellScroll
{
[Constructable]
public GiftOfLifeScroll()
: this( 1 )
{
}
[Constructable]
public GiftOfLifeScroll( int amount )
: base( 614, 0x2D5F, amount )
{
}
public GiftOfLifeScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class ArcaneEmpowermentScroll : SpellScroll
{
[Constructable]
public ArcaneEmpowermentScroll()
: this( 1 )
{
}
[Constructable]
public ArcaneEmpowermentScroll( int amount )
: base( 615, 0x2D60, amount )
{
}
public ArcaneEmpowermentScroll( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}

View file

@ -265,6 +265,8 @@ namespace Server.Items
return ( book.SpellbookType == type && ( spellID == -1 || book.HasSpell( spellID ) ) );
}
public override bool DisplayWeight { get { return false; } }
private AosAttributes m_AosAttributes;
private AosSkillBonuses m_AosSkillBonuses;

View file

@ -310,7 +310,7 @@ namespace Server.Items
healerNumber = 1060088; // You bind the wound and stop the bleeding
patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding!
BleedAttack.EndBleed( m_Patient, true );
BleedAttack.EndBleed( m_Patient, false );
}
else if ( MortalStrike.IsWounded( m_Patient ) )
{
@ -365,7 +365,7 @@ namespace Server.Items
healerNumber = 500968; // You apply the bandages, but they barely help.
}
m_Patient.Heal( (int) toHeal, false );
m_Patient.Heal( (int) toHeal, m_Healer, false );
}
else
{

View file

@ -68,7 +68,7 @@ namespace Server.Items
{
from.SendLocalizedMessage( 1010465 ); // You cannot disguise yourself while holding a sigil
}
else if ( TransformationSpell.UnderTransformation( from ) )
else if ( TransformationSpellHelper.UnderTransformation( from ) )
{
// You cannot disguise yourself while in that form.
from.SendLocalizedMessage( 1061634 );

View file

@ -155,11 +155,15 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( !this.IsChildOf( from.Backpack ) )
if( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
from.SendMessage( "You may not do that in jail." );
}
else if( !this.IsChildOf( from.Backpack ) )
{
MessageHelper.SendLocalizedMessageTo( this, from, 1054107, 0x59 ); // The bag of sending must be in your backpack.
}
else if ( this.Charges == 0 )
else if( this.Charges == 0 )
{
MessageHelper.SendLocalizedMessageTo( this, from, 1042544, 0x59 ); // This item is out of charges.
}
@ -183,7 +187,11 @@ namespace Server.Items
if ( m_Bag.Deleted )
return;
if ( !m_Bag.IsChildOf( from.Backpack ) )
if( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
from.SendMessage( "You may not do that in jail." );
}
else if( !m_Bag.IsChildOf( from.Backpack ) )
{
MessageHelper.SendLocalizedMessageTo( m_Bag, from, 1054107, 0x59 ); // The bag of sending must be in your backpack.
}

View file

@ -102,7 +102,42 @@ namespace Server.Items
SkillName.Bushido
};
public static SkillName[] Skills{ get{ return ( Core.SE ? m_SESkills : Core.AOS ? m_AOSSkills : m_Skills ); } }
private static SkillName[] m_MLSkills = new SkillName[]
{
SkillName.Blacksmith,
SkillName.Tailoring,
SkillName.Swords,
SkillName.Fencing,
SkillName.Macing,
SkillName.Archery,
SkillName.Wrestling,
SkillName.Parry,
SkillName.Tactics,
SkillName.Anatomy,
SkillName.Healing,
SkillName.Magery,
SkillName.Meditation,
SkillName.EvalInt,
SkillName.MagicResist,
SkillName.AnimalTaming,
SkillName.AnimalLore,
SkillName.Veterinary,
SkillName.Musicianship,
SkillName.Provocation,
SkillName.Discordance,
SkillName.Peacemaking,
SkillName.Chivalry,
SkillName.Focus,
SkillName.Necromancy,
SkillName.Stealing,
SkillName.Stealth,
SkillName.SpiritSpeak,
SkillName.Ninjitsu,
SkillName.Bushido,
SkillName.Spellweaving
};
public static SkillName[] Skills{ get{ return ( Core.ML ? m_MLSkills : Core.SE ? m_SESkills : Core.AOS ? m_AOSSkills : m_Skills ); } }
public static PowerScroll CreateRandom( int min, int max )
{

View file

@ -3,6 +3,7 @@ using System.Collections;
using Server.Mobiles;
using Server.Spells.Necromancy;
using Server.Network;
using Server.Spells;
namespace Server.Items
{
@ -27,7 +28,7 @@ namespace Server.Items
ClearCurrentAbility( attacker );
// Necromancers under Lich or Wraith Form are immune to Bleed Attacks.
TransformContext context = TransformationSpell.GetContext( defender );
TransformContext context = TransformationSpellHelper.GetContext( defender );
if ( (context != null && ( context.Type == typeof( LichFormSpell ) || context.Type == typeof( WraithFormSpell ))) ||
(defender is BaseCreature && ((BaseCreature)defender).BleedImmune) )

View file

@ -1,5 +1,6 @@
using System;
using Server;
using Server.Spells.Spellweaving;
namespace Server.Items
{
@ -17,9 +18,11 @@ namespace Server.Items
{
damage = base.AbsorbDamage( attacker, defender, damage );
AttuneWeaponSpell.TryAbsorb( defender, ref damage );
if ( Core.AOS )
return damage;
int absorb = defender.MeleeDamageAbsorb;
if ( absorb > 0 )

View file

@ -11,6 +11,7 @@ using Server.Spells.Ninjitsu;
using Server.Factions;
using Server.Engines.Craft;
using System.Collections.Generic;
using Server.Spells.Spellweaving;
namespace Server.Items
{
@ -865,12 +866,20 @@ namespace Server.Items
if( Feint.Registry.Contains( m ) )
bonus -= ((Feint.FeintTimer)Feint.Registry[m]).SwingSpeedReduction;
TransformContext context = TransformationSpellHelper.GetContext( m );
if( context != null && context.Spell is ReaperFormSpell )
bonus += ((ReaperFormSpell)context.Spell).SwingSpeedBonus;
int discordanceEffect = 0;
// Discordance gives a malus of -0/-28% to swing speed.
if ( SkillHandlers.Discordance.GetEffect( m, ref discordanceEffect ) )
bonus -= discordanceEffect;
if( EssenceOfWindSpell.IsDebuffed( m ) )
bonus -= EssenceOfWindSpell.GetSSIMalus( m );
if ( bonus > 60 )
bonus = 60;
@ -1323,18 +1332,26 @@ namespace Server.Items
* The following damage bonuses multiply damage by a factor.
* Capped at x3 (300%).
*/
double factor = 1.0;
//double factor = 1.0;
int percentageBonus = 0;
WeaponAbility a = WeaponAbility.GetCurrentAbility( attacker );
SpecialMove move = SpecialMove.GetCurrentMove( attacker );
if ( a != null )
factor *= a.DamageScalar;
if( a != null )
{
//factor *= a.DamageScalar;
percentageBonus += (int)(a.DamageScalar * 100) - 100;
}
if ( move != null )
factor *= move.GetDamageScalar( attacker, defender );
if( move != null )
{
//factor *= move.GetDamageScalar( attacker, defender );
percentageBonus += (int)(move.GetDamageScalar( attacker, defender ) * 100) - 100;
}
factor *= damageBonus;
//factor *= damageBonus;
percentageBonus += (int)(damageBonus * 100) - 100;
CheckSlayerResult cs = CheckSlayers( attacker, defender );
@ -1343,7 +1360,8 @@ namespace Server.Items
if ( cs == CheckSlayerResult.Slayer )
defender.FixedEffect( 0x37B9, 10, 5 );
factor *= 2.0;
//factor *= 2.0;
percentageBonus += 100;
}
if ( !attacker.Player )
@ -1352,8 +1370,11 @@ namespace Server.Items
{
PlayerMobile pm = (PlayerMobile)defender;
if ( pm.EnemyOfOneType != null && pm.EnemyOfOneType != attacker.GetType() )
factor *= 2.0;
if( pm.EnemyOfOneType != null && pm.EnemyOfOneType != attacker.GetType() )
{
//factor *= 2.0;
percentageBonus += 100;
}
}
}
else if ( !defender.Player )
@ -1371,39 +1392,58 @@ namespace Server.Items
if ( pm.EnemyOfOneType == defender.GetType() )
{
defender.FixedEffect( 0x37B9, 10, 5, 1160, 0 );
factor *= 1.5;
//factor *= 1.5;
percentageBonus += 50;
}
}
}
int packInstinctBonus = GetPackInstinctBonus( attacker, defender );
if ( packInstinctBonus != 0 )
factor *= 1.0 + (double)packInstinctBonus / 100.0;
if( packInstinctBonus != 0 )
{
//factor *= 1.0 + (double)packInstinctBonus / 100.0;
percentageBonus += packInstinctBonus;
}
if ( m_InDoubleStrike )
factor *= 0.9; // 10% loss when attacking with double-strike
if( m_InDoubleStrike )
{
//factor *= 0.9; // 10% loss when attacking with double-strike
percentageBonus -= 10;
}
TransformContext context = TransformationSpell.GetContext( defender );
TransformContext context = TransformationSpellHelper.GetContext( defender );
if ( (m_Slayer == SlayerName.Silver || m_Slayer2 == SlayerName.Silver) && context != null && context.Type != typeof( HorrificBeastSpell ) )
factor *= 1.25; // Every necromancer transformation other than horrific beast takes an additional 25% damage
if( (m_Slayer == SlayerName.Silver || m_Slayer2 == SlayerName.Silver) && context != null && context.Spell is NecromancerSpell && context.Type != typeof( HorrificBeastSpell ) )
{
//factor *= 1.25; // Every necromancer transformation other than horrific beast takes an additional 25% damage
percentageBonus += 25;
}
if ( attacker is PlayerMobile && !(Core.ML && defender is PlayerMobile ))
{
PlayerMobile pmAttacker = (PlayerMobile) attacker;
PlayerMobile pmAttacker = (PlayerMobile) attacker;
if ( pmAttacker.HonorActive && pmAttacker.InRange( defender, 1 ) )
factor *= 1.25;
if( pmAttacker.HonorActive && pmAttacker.InRange( defender, 1 ) )
{
//factor *= 1.25;
percentageBonus += 25;
}
if ( pmAttacker.SentHonorContext != null && pmAttacker.SentHonorContext.Target == defender )
pmAttacker.SentHonorContext.ApplyPerfectionDamageBonus( ref factor );
if( pmAttacker.SentHonorContext != null && pmAttacker.SentHonorContext.Target == defender )
{
//pmAttacker.SentHonorContext.ApplyPerfectionDamageBonus( ref factor );
percentageBonus += pmAttacker.SentHonorContext.PerfectionDamageBonus;
}
}
if ( factor > 3.0 )
factor = 3.0;
//if ( factor > 3.0 )
// factor = 3.0;
damage = (int)(damage * factor);
percentageBonus = Math.Min( percentageBonus, 300 );
//damage = (int)(damage * factor);
damage = AOS.Scale( damage, 100 + percentageBonus );
#endregion
if ( attacker is BaseCreature )
@ -1496,7 +1536,7 @@ namespace Server.Items
if ( m_Cursed )
lifeLeech += 50; // Additional 50% life leech for cursed weapons (necro spell)
context = TransformationSpell.GetContext( attacker );
context = TransformationSpellHelper.GetContext( attacker );
if ( context != null && context.Type == typeof( VampiricEmbraceSpell ) )
lifeLeech += 20; // Vampiric embrace gives an additional 20% life leech
@ -1666,6 +1706,11 @@ namespace Server.Items
// SDI bonus
damageBonus += AosAttributes.GetValue( attacker, AosAttribute.SpellDamage );
TransformContext context = TransformationSpellHelper.GetContext( attacker );
if( context != null && context.Spell is ReaperFormSpell )
damageBonus += ((ReaperFormSpell)context.Spell).SpellDamageBonus;
}
damage = AOS.Scale( damage, 100 + damageBonus );
@ -1753,7 +1798,7 @@ namespace Server.Items
attacker.DoHarmful( defender );
Spells.Spell sp = new Spells.Sixth.DispelSpell( attacker, null );
Spells.MagerySpell sp = new Spells.Sixth.DispelSpell( attacker, null );
if ( sp.CheckResisted( defender ) )
{
@ -2092,7 +2137,7 @@ namespace Server.Items
int damageBonus = AosAttributes.GetValue( attacker, AosAttribute.WeaponDamage );
// Horrific Beast transformation gives a +25% bonus to damage.
if ( TransformationSpell.UnderTransformation( attacker, typeof( HorrificBeastSpell ) ) )
if( TransformationSpellHelper.UnderTransformation( attacker, typeof( HorrificBeastSpell ) ) )
damageBonus += 25;
// Divine Fury gives a +10% bonus to damage.
@ -3296,12 +3341,18 @@ namespace Server.Items
if ( tool is BaseRunicTool )
((BaseRunicTool)tool).ApplyAttributesTo( this );
if ( quality == 2 )
if ( Quality == WeaponQuality.Exceptional )
{
if ( Attributes.WeaponDamage > 35 )
Attributes.WeaponDamage -= 20;
else
Attributes.WeaponDamage = 15;
if( Core.ML )
{
Attributes.WeaponDamage += (int)(from.Skills.ArmsLore.Value / 20);
from.CheckSkill( SkillName.ArmsLore, 0, 100 );
}
}
}
else if ( tool is BaseRunicTool )

View file

@ -21,6 +21,7 @@ namespace Server.Items
public override int OldSpeed{ get{ return 50; } }
public override int DefMissSound{ get{ return 0x239; } }
public override SkillName DefSkill { get { return SkillName.Fencing; } }
public override int InitMinHits{ get{ return 30; } } // TODO
public override int InitMaxHits{ get{ return 60; } } // TODO

View file

@ -12,23 +12,15 @@ namespace Server
public static void Initialize()
{
//To Ensure that it's sent only AFTER we get the client's version, and right after.
if( Enabled )
{
PacketHandlers.Register( 0xBD, 0, true, new OnPacketReceive
(
delegate( NetState state, PacketReader pvSrc )
{
PacketHandlers.ClientVersion( state, pvSrc );
PlayerMobile pm = state.Mobile as PlayerMobile;
if( pm != null )
{
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( pm.ResendBuffs ) );
}
}
) );
EventSink.ClientVersionRecieved += new ClientVersionRecievedHandler( delegate( ClientVersionRecievedArgs args )
{
PlayerMobile pm = args.State.Mobile as PlayerMobile;
if( pm != null )
Timer.DelayCall( TimeSpan.Zero, pm.ResendBuffs );
} );
}
}
@ -143,6 +135,19 @@ namespace Server
{
m_Args = args;
}
public BuffInfo( BuffIcon iconID, int titleCliloc, TimeSpan length, Mobile m, TextDefinition args, bool retainThroughDeath )
: this( iconID, titleCliloc, titleCliloc + 1, length, m, args, retainThroughDeath )
{
}
public BuffInfo( BuffIcon iconID, int titleCliloc, int secondaryCliloc, TimeSpan length, Mobile m, TextDefinition args, bool retainThroughDeath )
: this( iconID, titleCliloc, secondaryCliloc, length, m )
{
m_Args = args;
m_RetainThroughDeath = retainThroughDeath;
}
#endregion
#region Convience Methods
@ -192,7 +197,7 @@ namespace Server
Mindrot, //*
PainSpike, //*
Strangle,
GiftOfRenewal,
GiftOfRenewal, //*
AttuneWeapon,
Thunderstorm,
EssenceOfWind,

View file

@ -733,8 +733,20 @@ namespace Server.Misc
m_Mobile.SendLocalizedMessage( m_Message );
}
}
private static readonly ClientVersion m_NewHavenClient = new ClientVersion( "6.0.0.0" );
private static readonly CityInfo m_NewHavenInfo = new CityInfo( "New Haven", "The Bountiful Harvest Inn", 3503, 2574, 14, Map.Trammel );
private static CityInfo GetStartLocation( CharacterCreatedEventArgs args, bool isYoung )
{
if( Core.ML )
{
//if( args.State != null && args.State.Version >= m_NewHavenClient )
return m_NewHavenInfo; //We don't get the client Version until AFTER Character creation
//return args.City; TODO: Uncomment when the old quest system is actually phased out
}
bool useHaven = isYoung;
int flags = args.State == null ? 0 : args.State.Flags;
@ -766,7 +778,7 @@ namespace Server.Misc
}
case 5: //Paladin
{
return new CityInfo( "Haven", "Uzeraan's Mansion", 3578, 2589, 0, Map.Trammel );
return m_NewHavenInfo;
}
case 6: //Samurai
{
@ -815,7 +827,7 @@ namespace Server.Misc
}
if( useHaven )
return new CityInfo( "Haven", "Uzeraan's Mansion", 3582, 2587, 0, Map.Trammel );
return m_NewHavenInfo;
else
return args.City;
}
@ -1102,6 +1114,8 @@ namespace Server.Misc
book.LootType = LootType.Blessed;
addSkillItems = false;
break;
}

View file

@ -141,7 +141,8 @@ namespace Server.Misc
|| item is TreasureMap || item is MessageInABottle
|| item is BaseArmor || item is BaseWeapon
|| item is BaseClothing
|| (item is BaseJewel && Core.AOS) )
|| (item is BaseJewel && Core.AOS)
|| (item is BasePotion && Core.ML))
return true;
return false;

View file

@ -2,16 +2,95 @@ using System;
using Server;
using System.Diagnostics;
using System.IO;
using Server.Network;
using Server.Gumps;
namespace Server.Misc
{
public class ClientVerification
{
private static bool m_DetectClientRequirement = false;
private enum OldClientResponse
{
Ignore,
Warn,
Annoy,
Kick
}
private static bool m_DetectClientRequirement = true;
private static OldClientResponse m_OldClientResponse = OldClientResponse.Annoy;
private static ClientVersion m_Required;
private static bool m_AllowRegular = true, m_AllowUOTD = true, m_AllowGod = true;
private static TimeSpan m_KickDelay = TimeSpan.FromSeconds( 10.0 );
public static ClientVersion Required
{
get
{
return m_Required;
}
set
{
m_Required = value;
}
}
public static bool AllowRegular
{
get
{
return m_AllowRegular;
}
set
{
m_AllowRegular = value;
}
}
public static bool AllowUOTD
{
get
{
return m_AllowUOTD;
}
set
{
m_AllowUOTD = value;
}
}
public static bool AllowGod
{
get
{
return m_AllowGod;
}
set
{
m_AllowGod = value;
}
}
public static TimeSpan KickDelay
{
get
{
return m_KickDelay;
}
set
{
m_KickDelay = value;
}
}
public static void Initialize()
{
EventSink.ClientVersionRecieved += new ClientVersionRecievedHandler( EventSink_ClientVersionRecieved );
//ClientVersion.Required = null;
//ClientVersion.Required = new ClientVersion( "3.0.8q" );
//Required = new ClientVersion( "6.0.0.0" );
if( m_DetectClientRequirement )
{
@ -23,17 +102,105 @@ namespace Server.Misc
if ( info.FileMajorPart != 0 || info.FileMinorPart != 0 || info.FileBuildPart != 0 || info.FilePrivatePart != 0 )
{
ClientVersion.Required = new ClientVersion( info.FileMajorPart, info.FileMinorPart, info.FileBuildPart, info.FilePrivatePart );
Console.WriteLine( "Restricting client version to {0}", ClientVersion.Required );
Required = new ClientVersion( info.FileMajorPart, info.FileMinorPart, info.FileBuildPart, info.FilePrivatePart );
}
}
}
ClientVersion.AllowGod = true;
ClientVersion.AllowUOTD = true;
ClientVersion.AllowRegular = true;
if( Required != null )
{
Utility.PushColor( ConsoleColor.White );
Console.WriteLine( "Restricting client version to {0}. Action to be taken: {1}", Required, m_OldClientResponse );
Utility.PopColor();
}
}
ClientVersion.KickDelay = TimeSpan.FromSeconds( 10.0 );
private static void EventSink_ClientVersionRecieved( ClientVersionRecievedArgs e )
{
string kickMessage = null;
NetState state = e.State;
ClientVersion version = e.Version;
if( Required != null && m_OldClientResponse == OldClientResponse.Kick && version < Required )
{
kickMessage = String.Format( "This server requires your client version be at least {0}.", Required );
}
else if( !AllowGod || !AllowRegular || !AllowUOTD )
{
if( !AllowGod && version.Type == ClientType.God )
kickMessage = "This server does not allow god clients to connect.";
else if( !AllowRegular && version.Type == ClientType.Regular )
kickMessage = "This server does not allow regular clients to connect.";
else if( !AllowUOTD && state.IsUOTDClient )
kickMessage = "This server does not allow UO:TD clients to connect.";
if( !AllowGod && !AllowRegular && !AllowUOTD )
{
kickMessage = "This server does not allow any clients to connect.";
}
else if( AllowGod && !AllowRegular && !AllowUOTD && version.Type != ClientType.God )
{
kickMessage = "This server requires you to use the god client.";
}
else if( kickMessage != null )
{
if( AllowRegular && AllowUOTD )
kickMessage += " You can use regular or UO:TD clients.";
else if( AllowRegular )
kickMessage += " You can use regular clients.";
else if( AllowUOTD )
kickMessage += " You can use UO:TD clients.";
}
}
if( kickMessage != null )
{
state.Mobile.SendMessage( 0x22, kickMessage );
state.Mobile.SendMessage( 0x22, "You will be disconnected in {0} seconds.", KickDelay.TotalSeconds );
Timer.DelayCall( KickDelay, delegate
{
if( state.Socket != null )
{
Console.WriteLine( "Client: {0}: Disconnecting, bad version", state );
state.Dispose();
}
} );
}
else if( Required != null && version < Required )
{
switch( m_OldClientResponse )
{
case OldClientResponse.Warn:
{
state.Mobile.SendMessage( 0x22, "Your client is out of date. Please update your client.", Required );
state.Mobile.SendMessage( 0x22, "This server reccomends that your client version be at least {0}.", Required );
break;
}
case OldClientResponse.Annoy:
{
SendAnnoyGump( state.Mobile );
break;
}
}
}
}
private static void SendAnnoyGump( Mobile m )
{
if( m.NetState != null && m.NetState.Version < Required )
{
Gump g = new WarningGump( 1060637, 30720, String.Format( "Your client is out of date. Please update your client.<br>This server reccomends that your client version be at least {0}.<br> <br>You are currently using version {1}.<br> <br>To patch, run UOPatch.exe inside your Ultima Online folder.", Required, m.NetState.Version ), 0xFFC000, 480, 360,
delegate( Mobile mob, bool selection, object o )
{
m.SendMessage( "You will be reminded of this again." );
Timer.DelayCall( TimeSpan.FromMinutes( 20 ), delegate { SendAnnoyGump( m ); } );
}, null, false );
g.Dragable = false;
m.SendGump( g );
}
}
}
}

View file

@ -21,7 +21,7 @@ namespace Server.Misc
m_Givers.Add( giver );
}
public static void Configure()
public static void Initialize()
{
EventSink.Login += new LoginEventHandler( EventSink_Login );
}

View file

@ -17,8 +17,8 @@ namespace Server
int luck = killer.Luck;
PlayerMobile pmKiller = killer as PlayerMobile;
if ( pmKiller != null && pmKiller.SentHonorContext != null && pmKiller.SentHonorContext.Target == victim )
pmKiller.SentHonorContext.ApplyPerfectionLuckBonus( ref luck );
if( pmKiller != null && pmKiller.SentHonorContext != null && pmKiller.SentHonorContext.Target == victim )
luck += pmKiller.SentHonorContext.PerfectionLuckBonus;
if ( luck < 0 )
return 0;

View file

@ -16,7 +16,7 @@ namespace Server.Misc
*/
RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules );
RegisterMap( 1, 1, 0, 7168, 4096, 0, "Trammel", MapRules.TrammelRules );
RegisterMap( 1, 1, 1, 7168, 4096, 0, "Trammel", MapRules.TrammelRules );
RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules );
RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules );
RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules );
@ -35,6 +35,8 @@ namespace Server.Misc
* - <name> : Reference name for the map, used in props gump, get/set commands, region loading, etc
* - <rules> : Rules and restrictions associated with the map. See documentation for details
*/
TileMatrixPatch.Enabled = false; //OSI client patch 6.0.0.0
}
public static void RegisterMap( int mapIndex, int mapID, int fileIndex, int width, int height, int season, string name, MapRules rules )

View file

@ -10,6 +10,7 @@ using Server.Engines.PartySystem;
using Server.Factions;
using Server.Spells.Necromancy;
using Server.Spells.Ninjitsu;
using Server.Spells;
namespace Server.Misc
{
@ -310,7 +311,7 @@ namespace Server.Misc
if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) )
{
if( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) && !TransformationSpell.UnderTransformation( target ) && !AnimalForm.UnderTransformation( target ) )
if( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) && !TransformationSpellHelper.UnderTransformation( target ) && !AnimalForm.UnderTransformation( target ) )
return Notoriety.CanBeAttacked;
}

View file

@ -87,7 +87,7 @@ namespace Server
protected override void OnTick()
{
if ( (Core.AOS && m_Poison.Level < 4 && TransformationSpell.UnderTransformation( m_Mobile, typeof( VampiricEmbraceSpell ) )) ||
if ( (Core.AOS && m_Poison.Level < 4 && TransformationSpellHelper.UnderTransformation( m_Mobile, typeof( VampiricEmbraceSpell ) )) ||
(m_Poison.Level < 3 && OrangePetals.UnderEffect( m_Mobile )) ||
AnimalForm.UnderTransformation( m_Mobile, typeof( Unicorn ) ) )
{

View file

@ -42,7 +42,7 @@ namespace Server.Misc
private static bool CheckTransform( Mobile m, Type type )
{
return TransformationSpell.UnderTransformation( m, type );
return TransformationSpellHelper.UnderTransformation( m, type );
}
private static bool CheckAnimal( Mobile m, Type type )

View file

@ -6,7 +6,7 @@ namespace Server.Misc
{
public class SkillCheck
{
private static readonly bool AntiMacroCode = true; //Change this to false to disable anti-macro code
private static readonly bool AntiMacroCode = !Core.ML; //Change this to false to disable anti-macro code
public static TimeSpan AntiMacroExpire = TimeSpan.FromMinutes( 5.0 ); //How long do we remember targets/locations?
public const int Allowance = 3; //How many times may we use the same location/target for gain

View file

@ -19,6 +19,8 @@ namespace Server.Mobiles
set { m_NextMountAbility = value; }
}
protected Item InternalItem { get { return m_InternalItem; } }
public virtual bool AllowMaleRider{ get{ return true; } }
public virtual bool AllowFemaleRider{ get{ return true; } }

View file

@ -17,8 +17,8 @@ namespace Server.Mobiles
[CommandProperty( AccessLevel.GameMaster )]
public bool IsRewardItem
{
get{ return m_IsRewardItem; }
set{ m_IsRewardItem = value; }
get { return m_IsRewardItem; }
set { m_IsRewardItem = value; }
}
public override double DefaultWeight
@ -34,7 +34,8 @@ namespace Server.Mobiles
}
[Constructable]
public EtherealMount( int itemID, int mountID ) : base( itemID )
public EtherealMount( int itemID, int mountID )
: base( itemID )
{
m_MountedID = mountID;
m_RegularID = itemID;
@ -65,11 +66,11 @@ namespace Server.Mobiles
}
set
{
if ( m_MountedID != value )
if( m_MountedID != value )
{
m_MountedID = value;
if ( m_Rider != null )
if( m_Rider != null )
ItemID = value;
}
}
@ -84,77 +85,78 @@ namespace Server.Mobiles
}
set
{
if ( m_RegularID != value )
if( m_RegularID != value )
{
m_RegularID = value;
if ( m_Rider == null )
if( m_Rider == null )
ItemID = value;
}
}
}
public EtherealMount( Serial serial ) : base( serial )
public EtherealMount( Serial serial )
: base( serial )
{
}
public override bool DisplayLootType{ get{ return false; } }
public override bool DisplayLootType { get { return false; } }
public virtual int FollowerSlots{ get{ return 1; } }
public virtual int FollowerSlots { get { return 1; } }
public void RemoveFollowers()
{
if ( m_Rider != null )
if( m_Rider != null )
m_Rider.Followers -= FollowerSlots;
if ( m_Rider != null && m_Rider.Followers < 0 )
if( m_Rider != null && m_Rider.Followers < 0 )
m_Rider.Followers = 0;
}
public void AddFollowers()
{
if ( m_Rider != null )
if( m_Rider != null )
m_Rider.Followers += FollowerSlots;
}
public virtual bool Validate( Mobile from )
{
if ( !IsChildOf( from.Backpack ) )
if( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
return false;
}
else if ( m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( from, this, null ) )
else if( m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( from, this, null ) )
{
// CheckIsUsableBy sends the message
return false;
}
else if ( !BaseMount.CheckMountAllowed( from, true ) )
else if( !BaseMount.CheckMountAllowed( from, true ) )
{
// CheckMountAllowed sends the message
return false;
}
else if ( from.Mounted )
else if( from.Mounted )
{
from.SendLocalizedMessage( 1005583 ); // Please dismount first.
return false;
}
else if ( from.IsBodyMod && !from.Body.IsHuman )
else if( from.IsBodyMod && !from.Body.IsHuman )
{
from.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
return false;
}
else if ( from.HasTrade )
else if( from.HasTrade )
{
from.SendLocalizedMessage( 1042317, "", 0x41 ); // You may not ride at this time
return false;
}
else if ( (from.Followers + FollowerSlots) > from.FollowersMax )
else if( (from.Followers + FollowerSlots) > from.FollowersMax )
{
from.SendLocalizedMessage( 1049679 ); // You have too many followers to summon your mount.
return false;
}
else if ( !Multis.DesignContext.Check( from ) )
else if( !Multis.DesignContext.Check( from ) )
{
// Check sends the message
return false;
@ -165,7 +167,7 @@ namespace Server.Mobiles
public override void OnDoubleClick( Mobile from )
{
if ( Validate( from ) )
if( Validate( from ) )
new EtherealSpell( this, from ).Cast();
}
@ -173,10 +175,10 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 3 ); // version
writer.Write( (int)3 ); // version
writer.Write( m_IsDonationItem );
writer.Write( (bool) m_IsRewardItem );
writer.Write( (bool)m_IsRewardItem );
writer.Write( (int)m_MountedID );
writer.Write( (int)m_RegularID );
@ -190,35 +192,35 @@ namespace Server.Mobiles
int version = reader.ReadInt();
switch ( version )
switch( version )
{
case 3:
{
m_IsDonationItem = reader.ReadBool();
goto case 2;
}
{
m_IsDonationItem = reader.ReadBool();
goto case 2;
}
case 2:
{
m_IsRewardItem = reader.ReadBool();
goto case 0;
}
{
m_IsRewardItem = reader.ReadBool();
goto case 0;
}
case 1: reader.ReadInt(); goto case 0;
case 0:
{
m_MountedID = reader.ReadInt();
m_RegularID = reader.ReadInt();
m_Rider = reader.ReadMobile();
{
m_MountedID = reader.ReadInt();
m_RegularID = reader.ReadInt();
m_Rider = reader.ReadMobile();
if ( m_MountedID == 0x3EA2 )
m_MountedID = 0x3EAA;
if( m_MountedID == 0x3EA2 )
m_MountedID = 0x3EAA;
break;
}
break;
}
}
AddFollowers();
if ( version < 3 && Weight == 0 )
if( version < 3 && Weight == 0 )
Weight = -1;
}
@ -233,7 +235,7 @@ namespace Server.Mobiles
{
IMount mount = m.Mount;
if ( mount != null )
if( mount != null )
mount.Rider = null;
}
@ -246,9 +248,9 @@ namespace Server.Mobiles
}
set
{
if ( value != m_Rider )
if( value != m_Rider )
{
if ( value == null )
if( value == null )
{
Internalize();
UnmountMe();
@ -258,7 +260,7 @@ namespace Server.Mobiles
}
else
{
if ( m_Rider != null )
if( m_Rider != null )
Dismount( m_Rider );
Dismount( value );
@ -286,7 +288,7 @@ namespace Server.Mobiles
if( Hue == EtherealHue )
Hue = 0;
if ( bp != null )
if( bp != null )
{
bp.DropItem( this );
}
@ -295,7 +297,7 @@ namespace Server.Mobiles
Point3D loc = m_Rider.Location;
Map map = m_Rider.Map;
if ( map == null || map == Map.Internal )
if( map == null || map == Map.Internal )
{
loc = m_Rider.LogoutLocation;
map = m_Rider.LogoutMap;
@ -311,7 +313,7 @@ namespace Server.Mobiles
Layer = Layer.Mount;
Movable = false;
if ( Hue == 0 )
if( Hue == 0 )
Hue = EtherealHue;
ProcessDelta();
@ -331,7 +333,7 @@ namespace Server.Mobiles
public static void StopMounting( Mobile mob )
{
if ( mob.Spell is EtherealSpell )
if( mob.Spell is EtherealSpell )
((EtherealSpell)mob.Spell).Stop();
}
@ -341,28 +343,34 @@ namespace Server.Mobiles
private class EtherealSpell : Spell
{
private static SpellInfo m_Info = new SpellInfo( "Ethereal Mount", "", SpellCircle.Second, 230 );
private static SpellInfo m_Info = new SpellInfo( "Ethereal Mount", "", 230 );
private EtherealMount m_Mount;
private Mobile m_Rider;
public EtherealSpell( EtherealMount mount, Mobile rider ) : base( rider, null, m_Info )
public EtherealSpell( EtherealMount mount, Mobile rider )
: base( rider, null, m_Info )
{
m_Rider = rider;
m_Mount = mount;
}
public override bool ClearHandsOnCast{ get{ return false; } }
public override bool RevealOnCast{ get{ return false; } }
public override bool ClearHandsOnCast { get { return false; } }
public override bool RevealOnCast { get { return false; } }
public override TimeSpan GetCastRecovery()
{
return TimeSpan.Zero;
}
public override TimeSpan GetCastDelay()
public override double CastDelayFastScalar { get { return 0; } }
public override TimeSpan CastDelayBase
{
return TimeSpan.FromSeconds( ( (m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3 )? 12.5 : 5.0 ) );
get
{
return TimeSpan.FromSeconds( ((m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3)? 12.5 : 5.0) );
}
}
public override int GetMana()
@ -390,7 +398,7 @@ namespace Server.Mobiles
public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
{
if ( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
if( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
return false;
return true;
@ -398,19 +406,19 @@ namespace Server.Mobiles
public override void DoHurtFizzle()
{
if ( !m_Stop )
if( !m_Stop )
base.DoHurtFizzle();
}
public override void DoFizzle()
{
if ( !m_Stop )
if( !m_Stop )
base.DoFizzle();
}
public override void OnDisturb( DisturbType type, bool message )
{
if ( message && !m_Stop )
if( message && !m_Stop )
Caster.SendLocalizedMessage( 1049455 ); // You have been disrupted while attempting to summon your ethereal mount!
//m_Mount.UnmountMe();
@ -418,7 +426,7 @@ namespace Server.Mobiles
public override void OnCast()
{
if ( !m_Mount.Deleted && m_Mount.Rider == null && m_Mount.Validate( m_Rider ) )
if( !m_Mount.Deleted && m_Mount.Rider == null && m_Mount.Validate( m_Rider ) )
m_Mount.Rider = m_Rider;
FinishSequence();
@ -428,14 +436,16 @@ namespace Server.Mobiles
public class EtherealHorse : EtherealMount
{
public override int LabelNumber{ get{ return 1041298; } } // Ethereal Horse Statuette
public override int LabelNumber { get { return 1041298; } } // Ethereal Horse Statuette
[Constructable]
public EtherealHorse() : base( 0x20DD, 0x3EAA )
public EtherealHorse()
: base( 0x20DD, 0x3EAA )
{
}
public EtherealHorse( Serial serial ) : base( serial )
public EtherealHorse( Serial serial )
: base( serial )
{
}
@ -443,7 +453,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -452,24 +462,26 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal horse" )
if( Name == "an ethereal horse" )
Name = null;
if ( ItemID == 0x2124 )
if( ItemID == 0x2124 )
ItemID = 0x20DD;
}
}
public class EtherealLlama : EtherealMount
{
public override int LabelNumber{ get{ return 1041300; } } // Ethereal Llama Statuette
public override int LabelNumber { get { return 1041300; } } // Ethereal Llama Statuette
[Constructable]
public EtherealLlama() : base( 0x20F6, 0x3EAB )
public EtherealLlama()
: base( 0x20F6, 0x3EAB )
{
}
public EtherealLlama( Serial serial ) : base( serial )
public EtherealLlama( Serial serial )
: base( serial )
{
}
@ -477,7 +489,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -486,21 +498,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal llama" )
if( Name == "an ethereal llama" )
Name = null;
}
}
public class EtherealOstard : EtherealMount
{
public override int LabelNumber{ get{ return 1041299; } } // Ethereal Ostard Statuette
public override int LabelNumber { get { return 1041299; } } // Ethereal Ostard Statuette
[Constructable]
public EtherealOstard() : base( 0x2135, 0x3EAC )
public EtherealOstard()
: base( 0x2135, 0x3EAC )
{
}
public EtherealOstard( Serial serial ) : base( serial )
public EtherealOstard( Serial serial )
: base( serial )
{
}
@ -508,7 +522,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -517,21 +531,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal ostard" )
if( Name == "an ethereal ostard" )
Name = null;
}
}
public class EtherealRidgeback : EtherealMount
{
public override int LabelNumber{ get{ return 1049747; } } // Ethereal Ridgeback Statuette
public override int LabelNumber { get { return 1049747; } } // Ethereal Ridgeback Statuette
[Constructable]
public EtherealRidgeback() : base( 0x2615, 0x3E9A )
public EtherealRidgeback()
: base( 0x2615, 0x3E9A )
{
}
public EtherealRidgeback( Serial serial ) : base( serial )
public EtherealRidgeback( Serial serial )
: base( serial )
{
}
@ -539,7 +555,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -548,21 +564,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal ridgeback" )
if( Name == "an ethereal ridgeback" )
Name = null;
}
}
public class EtherealUnicorn : EtherealMount
{
public override int LabelNumber{ get{ return 1049745; } } // Ethereal Unicorn Statuette
public override int LabelNumber { get { return 1049745; } } // Ethereal Unicorn Statuette
[Constructable]
public EtherealUnicorn() : base( 0x25CE, 0x3E9B )
public EtherealUnicorn()
: base( 0x25CE, 0x3E9B )
{
}
public EtherealUnicorn( Serial serial ) : base( serial )
public EtherealUnicorn( Serial serial )
: base( serial )
{
}
@ -570,7 +588,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -579,21 +597,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal unicorn" )
if( Name == "an ethereal unicorn" )
Name = null;
}
}
public class EtherealBeetle : EtherealMount
{
public override int LabelNumber{ get{ return 1049748; } } // Ethereal Beetle Statuette
public override int LabelNumber { get { return 1049748; } } // Ethereal Beetle Statuette
[Constructable]
public EtherealBeetle() : base( 0x260F, 0x3E97 )
public EtherealBeetle()
: base( 0x260F, 0x3E97 )
{
}
public EtherealBeetle( Serial serial ) : base( serial )
public EtherealBeetle( Serial serial )
: base( serial )
{
}
@ -601,7 +621,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -610,21 +630,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal beetle" )
if( Name == "an ethereal beetle" )
Name = null;
}
}
public class EtherealKirin : EtherealMount
{
public override int LabelNumber{ get{ return 1049746; } } // Ethereal Ki-Rin Statuette
public override int LabelNumber { get { return 1049746; } } // Ethereal Ki-Rin Statuette
[Constructable]
public EtherealKirin() : base( 0x25A0, 0x3E9C )
public EtherealKirin()
: base( 0x25A0, 0x3E9C )
{
}
public EtherealKirin( Serial serial ) : base( serial )
public EtherealKirin( Serial serial )
: base( serial )
{
}
@ -632,7 +654,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -641,21 +663,23 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal kirin" )
if( Name == "an ethereal kirin" )
Name = null;
}
}
public class EtherealSwampDragon : EtherealMount
{
public override int LabelNumber{ get{ return 1049749; } } // Ethereal Swamp Dragon Statuette
public override int LabelNumber { get { return 1049749; } } // Ethereal Swamp Dragon Statuette
[Constructable]
public EtherealSwampDragon() : base( 0x2619, 0x3E98 )
public EtherealSwampDragon()
: base( 0x2619, 0x3E98 )
{
}
public EtherealSwampDragon( Serial serial ) : base( serial )
public EtherealSwampDragon( Serial serial )
: base( serial )
{
}
@ -663,7 +687,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
writer.Write( (int)0 ); // version
}
public override void Deserialize( GenericReader reader )
@ -672,7 +696,7 @@ namespace Server.Mobiles
int version = reader.ReadInt();
if ( Name == "an ethereal swamp dragon" )
if( Name == "an ethereal swamp dragon" )
Name = null;
}
}

View file

@ -13,13 +13,71 @@ namespace Server.Mobiles
return WeaponAbility.Dismount;
}
public override bool StatLossAfterTame{ get{ return true; } }
public override bool StatLossAfterTame { get { return true; } }
private static int GetHue()
{
int rand = Utility.Random( 1075 );
/*
1000 1075 No Hue Color 93.02% 0x0
*
10 1075 Ice Green 0.93% 0x847F
10 1075 Light Blue 0.93% 0x848D
10 1075 Strong Cyan 0.93% 0x8495
10 1075 Agapite 0.93% 0x8899
10 1075 Gold 0.93% 0x8032
*
8 1075 Blue and Yellow 0.74% 0x8487
*
5 1075 Ice Blue 0.47% 0x8482
*
3 1075 Cyan 0.28% 0x8123
3 1075 Light Green 0.28% 0x8295
*
2 1075 Strong Yellow 0.19% 0x8037
2 1075 Green 0.19% 0x8030 //this one is an approximation
*
1 1075 Strong Purple 0.09% 0x8490
1 1075 Strong Green 0.09% 0x855C
* */
if( rand <= 0 )
return 0x855C;
else if( rand <= 1 )
return 0x8490;
else if( rand <= 3 )
return 0x8030;
else if( rand <= 5 )
return 0x8037;
else if( rand <= 8 )
return 0x8295;
else if( rand <= 11 )
return 0x8123;
else if( rand <= 16 )
return 0x8482;
else if( rand <= 24 )
return 0x8487;
else if( rand <= 34 )
return 0x8032;
else if( rand <= 44 )
return 0x8899;
else if( rand <= 54 )
return 0x8495;
else if( rand <= 64 )
return 0x848D;
else if( rand <= 74 )
return 0x847F;
return 0;
}
[Constructable]
public Hiryu() : base( "a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
public Hiryu()
: base( "a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
if ( 0.05 > Utility.RandomDouble() )
Hue = Utility.RandomList( 0x32, 0x37, 0x3C, 0x3D, 0x123, 0x294, 0x295, 0x47F, 0x482, 0x487, 0x48D, 0x490, 0x495, 0x55C, 0x8A0, 0x899, 0x89F ) | 0x8000;
Hue = GetHue();
SetStr( 1201, 1410 );
SetDex( 171, 270 );
@ -50,7 +108,7 @@ namespace Server.Mobiles
ControlSlots = 4;
MinTameSkill = 98.7;
if ( Utility.RandomDouble() < .33 )
if( Utility.RandomDouble() < .33 )
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
}
@ -85,18 +143,18 @@ namespace Server.Mobiles
AddLoot( LootPack.FilthyRich, 3 );
AddLoot( LootPack.Gems, 4 );
}
public override int TreasureMapLevel{ get{ return 5; } }
public override int Meat{ get{ return 16; } }
public override int Hides{ get{ return 60; } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override int TreasureMapLevel { get { return 5; } }
public override int Meat { get { return 16; } }
public override int Hides { get { return 60; } }
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
public override bool CanAngerOnTame { get { return true; } }
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
if ( 0.1 > Utility.RandomDouble() )
if( 0.1 > Utility.RandomDouble() )
{
/* Grasping Claw
* Start cliloc: 1070836
@ -107,7 +165,7 @@ namespace Server.Mobiles
ExpireTimer timer = (ExpireTimer)m_Table[defender];
if ( timer != null )
if( timer != null )
{
timer.DoExpire();
defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
@ -135,7 +193,8 @@ namespace Server.Mobiles
private Mobile m_Mobile;
private ResistanceMod m_Mod;
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay ) : base( delay )
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay )
: base( delay )
{
m_Mobile = m;
m_Mod = mod;
@ -156,20 +215,27 @@ namespace Server.Mobiles
}
}
public Hiryu( Serial serial ) : base( serial )
public Hiryu( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
writer.Write( (int)1 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if( version == 0 )
Timer.DelayCall( TimeSpan.Zero, delegate { Hue = GetHue(); } );
if( version <= 1 )
Timer.DelayCall( TimeSpan.Zero, delegate { InternalItem.Hue = this.Hue; } );
}
}
}

View file

@ -13,13 +13,43 @@ namespace Server.Mobiles
return WeaponAbility.Dismount;
}
public override bool StatLossAfterTame{ get{ return true; } }
public override bool StatLossAfterTame { get { return true; } }
private static int GetHue()
{
int rand = Utility.Random( 527 );
/*
500 527 No Hue Color 94.88% 0
10 527 Green 1.90% 0x8295
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
5 527 Dark Green 0.95% 0x87D4
1 527 Valorite 0.19% 0x88AB
1 527 Midnight Blue 0.19% 0x8258
* */
if( rand <= 0 )
return 0x8258;
else if( rand <= 1 )
return 0x88AB;
else if( rand <= 6 )
return 0x87D4;
else if( rand <= 16 )
return 0x8163;
else if( rand <= 26 )
return 0x8295;
return 0;
}
[Constructable]
public LesserHiryu() : base( "a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
if ( 0.05 > Utility.RandomDouble() )
Hue = Utility.RandomList( 0x32, 0x37, 0x3C, 0x3D, 0x123, 0x294, 0x295, 0x47F, 0x482, 0x487, 0x48D, 0x490, 0x495, 0x55C, 0x8A0, 0x899, 0x89F ) | 0x8000;
public LesserHiryu()
: base( "a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Hue = GetHue();
SetStr( 301, 410 );
SetDex( 171, 270 );
@ -50,7 +80,7 @@ namespace Server.Mobiles
ControlSlots = 3;
MinTameSkill = 98.7;
if ( Utility.RandomDouble() < .33 )
if( Utility.RandomDouble() < .33 )
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
}
@ -89,24 +119,24 @@ namespace Server.Mobiles
public override double GetControlChance( Mobile m, bool useBaseSkill )
{
double skill = (useBaseSkill? m.Skills.Bushido.Base : m.Skills.Bushido.Value);
if ( skill >= 90.0 )
if( skill >= 90.0 )
return 1.0;
return base.GetControlChance( m, useBaseSkill );
}
public override int TreasureMapLevel{ get{ return 3; } }
public override int Meat{ get{ return 16; } }
public override int Hides{ get{ return 60; } }
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override int TreasureMapLevel { get { return 3; } }
public override int Meat { get { return 16; } }
public override int Hides { get { return 60; } }
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
public override bool CanAngerOnTame { get { return true; } }
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
if ( 0.1 > Utility.RandomDouble() )
if( 0.1 > Utility.RandomDouble() )
{
/* Grasping Claw
* Start cliloc: 1070836
@ -117,7 +147,7 @@ namespace Server.Mobiles
ExpireTimer timer = (ExpireTimer)m_Table[defender];
if ( timer != null )
if( timer != null )
{
timer.DoExpire();
defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
@ -145,7 +175,8 @@ namespace Server.Mobiles
private Mobile m_Mobile;
private ResistanceMod m_Mod;
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay ) : base( delay )
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay )
: base( delay )
{
m_Mobile = m;
m_Mod = mod;
@ -166,20 +197,27 @@ namespace Server.Mobiles
}
}
public LesserHiryu( Serial serial ) : base( serial )
public LesserHiryu( Serial serial )
: base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
writer.Write( (int)1 );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
if( version == 0 )
Timer.DelayCall( TimeSpan.Zero, delegate { Hue = GetHue(); } );
if( version <= 1 )
Timer.DelayCall( TimeSpan.Zero, delegate { InternalItem.Hue = this.Hue; } );
}
}
}

View file

@ -180,7 +180,7 @@ namespace Server.Mobiles
int toHeal = (int)(Skills[SkillName.Magery].Value * 0.4);
toHeal += Utility.Random( 1, 10 );
m.Heal( toHeal );
m.Heal( toHeal, this );
m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
m.PlaySound( 0x202 );

View file

@ -139,7 +139,7 @@ namespace Server.Mobiles
SpellHelper.Turn( this, m );
m.Heal( toHeal );
m.Heal( toHeal, this );
m.FixedParticles( 0x376A, 9, 32, 5030, EffectLayer.Waist );
m.PlaySound( 0x202 );

View file

@ -14,7 +14,7 @@ namespace Server.Mobiles
public override double DispelDifficulty { get { return 0.0; } }
public override double DispelFocus { get { return 20.0; } }
public override double GetValueFrom( Mobile m, FightMode acqType, bool bPlayerOnly )
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return ( m.Str + m.Skills[SkillName.Tactics].Value ) / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}

View file

@ -14,7 +14,7 @@ namespace Server.Mobiles
public override double DispelDifficulty { get { return 80.0; } }
public override double DispelFocus { get { return 20.0; } }
public override double GetValueFrom( Mobile m, FightMode acqType, bool bPlayerOnly )
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return ( m.Int + m.Skills[SkillName.Magery].Value ) / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}
@ -25,14 +25,16 @@ namespace Server.Mobiles
{
Name = "an energy vortex";
if ( Core.SE && 0.02 > Utility.RandomDouble() ) // Tested on OSI, but is this right? Who knows.
if( Core.SE && 0.02 > Utility.RandomDouble() ) // Tested on OSI, but is this right? Who knows.
{
// Llama vortex!
Body = 0xDC;
Hue = 0x76;
}
else
Body = 164;
{
Body = 164;
}
SetStr( 200 );
SetDex( 200 );

View file

@ -23,6 +23,7 @@ using Server.Regions;
using Server.Accounting;
using Server.Engines.CannedEvil;
using Server.Engines.Craft;
using Server.Spells.Spellweaving;
namespace Server.Mobiles
{
@ -1691,7 +1692,7 @@ namespace Server.Mobiles
public override bool CheckShove( Mobile shoved )
{
if( TransformationSpell.UnderTransformation( this, typeof( WraithFormSpell ) ) )
if( TransformationSpellHelper.UnderTransformation( this, typeof( WraithFormSpell ) ) )
return true;
else
return base.CheckShove( shoved );
@ -2133,7 +2134,7 @@ namespace Server.Mobiles
{
//g.Alliance.AllianceTextMessage( hue, "[Alliance][{0}]: {1}", this.Name, text );
g.Alliance.AllianceChat( this, text );
SendToStaffMessage( this, "[Alliance]: {0}", this.Name, text );
SendToStaffMessage( this, "[Alliance]: {0}", text );
m_AllianceMessageHue = hue;
}
@ -3043,13 +3044,18 @@ namespace Server.Mobiles
if ( checkTurning && (dir & Direction.Mask) != (this.Direction & Direction.Mask) )
return TimeSpan.FromSeconds( 0.1 ); // We are NOT actually moving (just a direction change)
TransformContext context = TransformationSpellHelper.GetContext( this );
if( context != null && context.Type == typeof( ReaperFormSpell ) )
return Mobile.WalkFoot;
bool running = ( (dir & Direction.Running) != 0 );
bool onHorse = ( this.Mount != null );
AnimalFormContext context = AnimalForm.GetContext( this );
AnimalFormContext animalContext = AnimalForm.GetContext( this );
if ( onHorse || (context != null && context.SpeedBoost) )
if( onHorse || (animalContext != null && animalContext.SpeedBoost) )
return ( running ? Mobile.RunMount : Mobile.WalkMount );
return ( running ? Mobile.RunFoot : Mobile.WalkFoot );
@ -3188,6 +3194,8 @@ namespace Server.Mobiles
public DateTime LastSacrificeGain{ get{ return m_LastSacrificeGain; } set{ m_LastSacrificeGain = value; } }
public DateTime LastSacrificeLoss{ get{ return m_LastSacrificeLoss; } set{ m_LastSacrificeLoss = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int AvailableResurrects{ get{ return m_AvailableResurrects; } set{ m_AvailableResurrects = value; } }
private DateTime m_NextJustAward;

View file

@ -57,7 +57,7 @@ namespace Server.Mobiles
if ( Map != Map.Felucca )
return;
ArrayList toGive = new ArrayList();
List<Mobile> toGive = new List<Mobile>();
List<DamageStore> rights = BaseCreature.GetLootingRights( this.DamageEntries, this.HitsMax );
for ( int i = rights.Count - 1; i >= 0; --i )
@ -73,7 +73,7 @@ namespace Server.Mobiles
for( int i = 0; i < toGive.Count; i++ )
{
Mobile m = (Mobile)toGive[i];
Mobile m = toGive[i];
if( !(m is PlayerMobile) )
continue;
@ -97,64 +97,72 @@ namespace Server.Mobiles
for ( int i = 0; i < toGive.Count; ++i )
{
int rand = Utility.Random( toGive.Count );
object hold = toGive[i];
Mobile hold = toGive[i];
toGive[i] = toGive[rand];
toGive[rand] = hold;
}
for ( int i = 0; i < 6; ++i )
{
Mobile m = (Mobile)toGive[i % toGive.Count];
Mobile m = toGive[i % toGive.Count];
PowerScroll ps = CreateRandomPowerScroll();
m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
GivePowerScrollTo( m, ps );
}
}
if ( !Core.SE || m.Alive )
m.AddToBackpack( ps );
public static void GivePowerScrollTo( Mobile m, PowerScroll ps )
{
if( ps == null || m == null ) //sanity
return;
m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
if( !Core.SE || m.Alive )
m.AddToBackpack( ps );
else
{
if( m.Corpse != null && !m.Corpse.Deleted )
m.Corpse.DropItem( ps );
else
{
if ( m.Corpse != null && !m.Corpse.Deleted )
((Container)m.Corpse).DropItem( ps );
else
m.AddToBackpack( ps );
}
m.AddToBackpack( ps );
}
if ( m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
if( m is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m;
for ( int j = 0; j < pm.JusticeProtectors.Count; ++j )
for( int j = 0; j < pm.JusticeProtectors.Count; ++j )
{
Mobile prot = pm.JusticeProtectors[j];
if( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( m, prot ) )
continue;
int chance = 0;
switch( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
{
Mobile prot = (Mobile)pm.JusticeProtectors[j];
case VirtueLevel.Seeker: chance = 60; break;
case VirtueLevel.Follower: chance = 80; break;
case VirtueLevel.Knight: chance = 100; break;
}
if ( prot.Map != m.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( m, prot ) )
continue;
if( chance > Utility.Random( 100 ) )
{
PowerScroll powerScroll = new PowerScroll( ps.Skill, ps.Value );
int chance = 0;
prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
switch ( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
if( !Core.SE || prot.Alive )
prot.AddToBackpack( powerScroll );
else
{
case VirtueLevel.Seeker: chance = 60; break;
case VirtueLevel.Follower: chance = 80; break;
case VirtueLevel.Knight: chance = 100; break;
}
if ( chance > Utility.Random( 100 ) )
{
ps = CreateRandomPowerScroll();
prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
if ( !Core.SE || prot.Alive )
prot.AddToBackpack( ps );
if( prot.Corpse != null && !prot.Corpse.Deleted )
prot.Corpse.DropItem( powerScroll );
else
{
if ( prot.Corpse != null && !prot.Corpse.Deleted )
((Container)prot.Corpse).DropItem( ps );
else
prot.AddToBackpack( ps );
}
prot.AddToBackpack( powerScroll );
}
}
}

View file

@ -29,8 +29,8 @@ namespace Server.Mobiles
public override void OnResponse( Mobile from, string text )
{
if ( text.Length > 50 )
text = text.Substring( 0, 50 );
if( text.Length > 130 )
text = text.Substring( 0, 130 );
m_Barkeeper.EndChangeRumor( from, m_RumorIndex, text );
}
@ -54,8 +54,8 @@ namespace Server.Mobiles
public override void OnResponse( Mobile from, string text )
{
if ( text.Length > 50 )
text = text.Substring( 0, 50 );
if( text.Length > 130 )
text = text.Substring( 0, 130 );
m_Barkeeper.EndChangeKeyword( from, m_RumorIndex, text );
}
@ -77,8 +77,8 @@ namespace Server.Mobiles
public override void OnResponse( Mobile from, string text )
{
if ( text.Length > 50 )
text = text.Substring( 0, 50 );
if ( text.Length > 130 )
text = text.Substring( 0, 130 );
m_Barkeeper.EndChangeTip( from, text );
}

View file

@ -128,6 +128,11 @@ namespace Server.Regions
m_GuardType = DefaultGuardType;
}
public GuardedRegion( string name, Map map, int priority, params Rectangle2D[] area )
: base( name, map, priority, area )
{
m_GuardType = DefaultGuardType;
}
public GuardedRegion( XmlElement xml, Map map, Region parent ) : base( xml, map, parent )
{
XmlElement el = xml["guards"];

View file

@ -74,7 +74,7 @@ namespace Server.SkillHandlers
private class SpiritSpeakSpell : Spell
{
private static SpellInfo m_Info = new SpellInfo( "Spirit Speak", "", SpellCircle.Second, 269 );
private static SpellInfo m_Info = new SpellInfo( "Spirit Speak", "", 269 );
public override bool BlockedByHorrificBeast{ get{ return false; } }
@ -84,10 +84,8 @@ namespace Server.SkillHandlers
public override bool ClearHandsOnCast{ get{ return false; } }
public override TimeSpan GetCastDelay()
{
return TimeSpan.FromSeconds( 1.0 );
}
public override double CastDelayFastScalar { get { return 0; } }
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.0 ); } }
public override int GetMana()
{

View file

@ -9,6 +9,8 @@ using Server.Factions;
using Server.Spells.Seventh;
using Server.Spells.Fifth;
using Server.Spells.Necromancy;
using Server.Spells;
using Server.Spells.Ninjitsu;
namespace Server.SkillHandlers
{
@ -111,11 +113,11 @@ namespace Server.SkillHandlers
{
m_Thief.SendLocalizedMessage( 1010582 ); // You cannot steal the sigil while polymorphed
}
else if ( TransformationSpell.UnderTransformation( m_Thief ) )
else if( TransformationSpellHelper.UnderTransformation( m_Thief ) )
{
m_Thief.SendLocalizedMessage( 1061622 ); // You cannot steal the sigil while in that form.
}
else if ( Spells.Ninjitsu.AnimalForm.UnderTransformation( m_Thief ) )
else if ( AnimalForm.UnderTransformation( m_Thief ) )
{
m_Thief.SendLocalizedMessage( 1063222 ); // You cannot steal the sigil while mimicking an animal.
}

View file

@ -65,20 +65,25 @@ namespace Server.SkillHandlers
m.SendLocalizedMessage( 502726 ); // You are not hidden well enough. Become better at hiding.
m.RevealingAction();
}
else if( !m.CanBeginAction( typeof( Stealth ) ) )
{
m.SendLocalizedMessage( 1063086 ); // You cannot use this skill right now.
m.RevealingAction();
}
else
{
int armorRating = GetArmorRating( m );
if ( armorRating >= (Core.AOS ? 42 : 26) ) //I have a hunch '42' was chosen cause someone's a fan of DNA
if( armorRating >= (Core.AOS ? 42 : 26) ) //I have a hunch '42' was chosen cause someone's a fan of DNA
{
m.SendLocalizedMessage( 502727 ); // You could not hope to move quietly wearing this much armor.
m.RevealingAction();
}
else if ( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2) ) )
else if( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2) ) )
{
int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.AOS ? 5.0 : 10.0));
if ( steps < 1 )
if( steps < 1 )
steps = 1;
m.AllowedStealthSteps = steps;

View file

@ -221,11 +221,11 @@ namespace Server.SkillHandlers
int divisor = hiding + stealth;
// Necromancy forms affect tracking difficulty
if ( TransformationSpell.UnderTransformation( m, typeof( HorrificBeastSpell ) ) )
if ( TransformationSpellHelper.UnderTransformation( m, typeof( HorrificBeastSpell ) ) )
divisor -= 200;
else if ( TransformationSpell.UnderTransformation( m, typeof( VampiricEmbraceSpell ) ) && divisor < 500 )
else if ( TransformationSpellHelper.UnderTransformation( m, typeof( VampiricEmbraceSpell ) ) && divisor < 500 )
divisor = 500;
else if ( TransformationSpell.UnderTransformation( m, typeof( WraithFormSpell ) ) && divisor <= 2000 )
else if ( TransformationSpellHelper.UnderTransformation( m, typeof( WraithFormSpell ) ) && divisor <= 2000 )
divisor += 200;
int chance;

View file

@ -0,0 +1,116 @@
using System;
using Server;
using Server.Items;
namespace Server.Spells
{
public abstract class MagerySpell : Spell
{
public MagerySpell( Mobile caster, Item scroll, SpellInfo info )
: base( caster, scroll, info )
{
}
public abstract SpellCircle Circle { get; }
public override bool ConsumeReagents()
{
if( base.ConsumeReagents() )
return true;
if( ArcaneGem.ConsumeCharges( Caster, (Core.SE ? 1 : 1 + (int)Circle) ) )
return true;
return false;
}
private const double ChanceOffset = 20.0, ChanceLength = 100.0 / 7.0;
public override void GetCastSkills( out double min, out double max )
{
int circle = (int)Circle;
if( Scroll != null )
circle -= 2;
double avg = ChanceLength * circle;
min = avg - ChanceOffset;
max = avg + ChanceOffset;
}
private static int[] m_ManaTable = new int[] { 4, 6, 9, 11, 14, 20, 40, 50 };
public override int GetMana()
{
if( Scroll is BaseWand )
return 0;
return m_ManaTable[(int)Circle];
}
public override double GetResistSkill( Mobile m )
{
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if( m.Skills[SkillName.MagicResist].Value < maxSkill )
m.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );
return m.Skills[SkillName.MagicResist].Value;
}
public virtual bool CheckResisted( Mobile target )
{
double n = GetResistPercent( target );
n /= 100.0;
if( n <= 0.0 )
return false;
if( n >= 1.0 )
return true;
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if( target.Skills[SkillName.MagicResist].Value < maxSkill )
target.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );
return (n >= Utility.RandomDouble());
}
public virtual double GetResistPercentForCircle( Mobile target, SpellCircle circle )
{
double firstPercent = target.Skills[SkillName.MagicResist].Value / 5.0;
double secondPercent = target.Skills[SkillName.MagicResist].Value - (((Caster.Skills[CastSkill].Value - 20.0) / 5.0) + (1 + (int)circle) * 5.0);
return (firstPercent > secondPercent ? firstPercent : secondPercent) / 2.0; // Seems should be about half of what stratics says.
}
public virtual double GetResistPercent( Mobile target )
{
return GetResistPercentForCircle( target, Circle );
}
public override TimeSpan GetCastDelay()
{
if( Scroll is BaseWand )
return TimeSpan.Zero;
if( !Core.AOS )
return TimeSpan.FromSeconds( 0.5 + (0.25 * (int)Circle) );
return base.GetCastDelay();
}
public override TimeSpan CastDelayBase
{
get
{
return TimeSpan.FromSeconds( (3 + (int)Circle) * CastDelaySecondsPerTick );
}
}
}
}

View file

@ -7,6 +7,8 @@ using Server.Spells.Second;
using Server.Spells.Necromancy;
using Server.Spells.Ninjitsu;
using System.Collections.Generic;
using Server.Spells.Spellweaving;
using Server.Spells.Bushido;
namespace Server.Spells
{
@ -23,7 +25,6 @@ namespace Server.Spells
public SpellInfo Info{ get{ return m_Info; } }
public string Name{ get{ return m_Info.Name; } }
public string Mantra{ get{ return m_Info.Mantra; } }
public SpellCircle Circle{ get{ return m_Info.Circle; } }
public Type[] Reagents{ get{ return m_Info.Reagents; } }
public Item Scroll{ get{ return m_Scroll; } }
public DateTime StartCastTime { get { return m_StartCastTime; } }
@ -46,65 +47,55 @@ namespace Server.Spells
//the possibility of stacking 'em. Note that a MA & an Explosion will stack, but
//of course, two MA's won't.
private static Dictionary<Mobile, List<DelayedDamageContext>> m_ContextTable = new Dictionary<Mobile, List<DelayedDamageContext>>();
private static Dictionary<Type, DelayedDamageContextWrapper> m_ContextTable = new Dictionary<Type, DelayedDamageContextWrapper>();
private class DelayedDamageContext {
public Mobile Target;
public Type Type;
public Timer Timer;
private class DelayedDamageContextWrapper
{
private Dictionary<Mobile, Timer> m_Contexts = new Dictionary<Mobile, Timer>();
public DelayedDamageContext( Mobile target, Type type, Timer timer ) {
Target = target;
Type = type;
Timer = timer;
}
}
public void StartDelayedDamageContext( Mobile target, Timer timer )
{
if( DelayedDamageStacking )
return; //Sanity
List<DelayedDamageContext> contexts;
Type type = this.GetType();
if( !m_ContextTable.TryGetValue( m_Caster, out contexts ) )
contexts = new List<DelayedDamageContext>();
else {
for ( int i = 0; i < contexts.Count; i++ ) {
DelayedDamageContext ddc = contexts[i];
if ( ddc.Target == target && ddc.Type == type ) {
ddc.Timer.Stop();
contexts.RemoveAt( i );
break;
}
public void Add( Mobile m, Timer t )
{
Timer oldTimer;
if( m_Contexts.TryGetValue( m, out oldTimer ) )
{
oldTimer.Stop();
m_Contexts.Remove( m );
}
m_Contexts.Add( m, t );
}
contexts.Add( new DelayedDamageContext( target, type, timer ) );
public void Remove( Mobile m )
{
m_Contexts.Remove( m );
}
}
public void RemoveDelayedDamageContext( Mobile target )
{
List<DelayedDamageContext> contexts;
Type type = this.GetType();
public void StartDelayedDamageContext( Mobile m, Timer t )
{
if( DelayedDamageStacking )
return; //Sanity
if( !m_ContextTable.TryGetValue( m_Caster, out contexts ) )
DelayedDamageContextWrapper contexts;
if( !m_ContextTable.TryGetValue( GetType(), out contexts ) )
{
contexts = new DelayedDamageContextWrapper();
m_ContextTable.Add( GetType(), contexts );
}
contexts.Add( m, t );
}
public void RemoveDelayedDamageContext( Mobile m )
{
DelayedDamageContextWrapper contexts;
if( !m_ContextTable.TryGetValue( GetType(), out contexts ) )
return;
for ( int i = 0; i < contexts.Count; i++ ) {
DelayedDamageContext ddc = contexts[i];
if ( ddc.Target == target && ddc.Type == type ) {
contexts.RemoveAt( i );
break;
}
}
if ( contexts.Count == 0 )
m_ContextTable.Remove( m_Caster );
}
contexts.Remove( m );
}
public Spell( Mobile caster, Item scroll, SpellInfo info )
{
@ -146,8 +137,14 @@ namespace Server.Spells
// PvP spell damage increase cap of 15% from an items magic property
if ( playerVsPlayer && sdiBonus > 15 )
sdiBonus = 15;
damageBonus += sdiBonus;
TransformContext context = TransformationSpellHelper.GetContext( Caster );
if( context != null && context.Spell is ReaperFormSpell )
damageBonus += ((ReaperFormSpell)context.Spell).SpellDamageBonus;
damage = AOS.Scale( damage, 100 + damageBonus );
int evalSkill = GetDamageFixed( m_Caster );
@ -160,27 +157,6 @@ namespace Server.Spells
return damage / 100;
}
/*
public virtual double GetAosDamage( int min, int random, double div )
{
double scale = 1.0;
scale += GetInscribeSkill( m_Caster ) * 0.001;
if ( Caster.Player )
{
scale += Caster.Int * 0.001;
scale += AosAttributes.GetValue( m_Caster, AosAttribute.SpellDamage ) * 0.01;
}
int baseDamage = min + (int)(GetDamageSkill( m_Caster ) / div);
double damage = Utility.RandomMinMax( baseDamage, baseDamage + random );
return damage * scale;
}
*/
public virtual bool IsCasting{ get{ return m_State == SpellState.Casting; } }
public virtual void OnCasterHurt()
@ -263,36 +239,9 @@ namespace Server.Spells
if ( pack.ConsumeTotal( m_Info.Reagents, m_Info.Amounts ) == -1 )
return true;
if ( GetType().BaseType == typeof( Spell ) )
{
if ( ArcaneGem.ConsumeCharges( m_Caster, ( Core.SE ? 1 : 1 + (int)Circle ) ) )
return true;
}
return false;
}
public virtual bool CheckResisted( Mobile target )
{
double n = GetResistPercent( target );
n /= 100.0;
if ( n <= 0.0 )
return false;
if ( n >= 1.0 )
return true;
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if ( target.Skills[SkillName.MagicResist].Value < maxSkill )
target.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );
return ( n >= Utility.RandomDouble() );
}
public virtual double GetInscribeSkill( Mobile m )
{
// There is no chance to gain
@ -323,41 +272,11 @@ namespace Server.Spells
return m.Skills[DamageSkill].Value;
}
public virtual int GetResistFixed( Mobile m )
{
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if ( m.Skills[SkillName.MagicResist].Value < maxSkill )
m.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );
return m.Skills[SkillName.MagicResist].Fixed;
}
public virtual double GetResistSkill( Mobile m )
{
int maxSkill = (1 + (int)Circle) * 10;
maxSkill += (1 + ((int)Circle / 6)) * 25;
if ( m.Skills[SkillName.MagicResist].Value < maxSkill )
m.CheckSkill( SkillName.MagicResist, 0.0, 120.0 );
return m.Skills[SkillName.MagicResist].Value;
}
public virtual double GetResistPercentForCircle( Mobile target, SpellCircle circle )
{
double firstPercent = target.Skills[SkillName.MagicResist].Value / 5.0;
double secondPercent = target.Skills[SkillName.MagicResist].Value - (((m_Caster.Skills[CastSkill].Value - 20.0) / 5.0) + (1 + (int)circle) * 5.0);
return ( firstPercent > secondPercent ? firstPercent : secondPercent ) / 2.0; // Seems should be about half of what stratics says.
}
public virtual double GetResistPercent( Mobile target )
{
return GetResistPercentForCircle( target, m_Info.Circle );
}
public virtual double GetDamageScalar( Mobile target )
{
double scalar = 1.0;
@ -397,6 +316,9 @@ namespace Server.Spells
target.Region.SpellDamageScalar( m_Caster, target, ref scalar );
if( Evasion.CheckSpellEvasion( target ) ) //Only single target spells an be evaded
scalar = 0;
return scalar;
}
@ -417,7 +339,7 @@ namespace Server.Spells
}
TransformContext context = TransformationSpell.GetContext( defender );
TransformContext context = TransformationSpellHelper.GetContext( defender );
if( (atkBook.Slayer == SlayerName.Silver || atkBook.Slayer2 == SlayerName.Silver) && context != null && context.Type != typeof( HorrificBeastSpell ) )
scalar +=.25; // Every necromancer transformation other than horrific beast take an additional 25% damage
@ -481,7 +403,7 @@ namespace Server.Spells
if ( m_State == SpellState.Casting )
{
if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
return;
m_State = SpellState.None;
@ -502,7 +424,7 @@ namespace Server.Spells
}
else if ( m_State == SpellState.Sequencing )
{
if ( !firstCircle && Circle == SpellCircle.First && !Core.AOS )
if( !firstCircle && !Core.AOS && this is MagerySpell && ((MagerySpell)this).Circle == SpellCircle.First )
return;
m_State = SpellState.None;
@ -564,7 +486,7 @@ namespace Server.Spells
{
m_Caster.SendLocalizedMessage( 502642 ); // You are already casting a spell.
}
else if ( BlockedByHorrificBeast && TransformationSpell.UnderTransformation( m_Caster, typeof( HorrificBeastSpell ) ) || ( BlockedByAnimalForm && AnimalForm.UnderTransformation( m_Caster ) ))
else if ( BlockedByHorrificBeast && TransformationSpellHelper.UnderTransformation( m_Caster, typeof( HorrificBeastSpell ) ) || ( BlockedByAnimalForm && AnimalForm.UnderTransformation( m_Caster ) ))
{
m_Caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
}
@ -636,19 +558,9 @@ namespace Server.Spells
{
}
private const double ChanceOffset = 20.0, ChanceLength = 100.0 / 7.0;
public virtual void GetCastSkills( out double min, out double max )
{
int circle = (int)m_Info.Circle;
if ( m_Scroll != null )
circle -= 2;
double avg = ChanceLength * circle;
min = avg - ChanceOffset;
max = avg + ChanceOffset;
min = max = 0; //Intended but not required for overriding.
}
public virtual bool CheckFizzle()
@ -663,15 +575,7 @@ namespace Server.Spells
return Caster.CheckSkill( CastSkill, minSkill, maxSkill );
}
private static int[] m_ManaTable = new int[]{ 4, 6, 9, 11, 14, 20, 40, 50 };
public virtual int GetMana()
{
if ( m_Scroll is BaseWand )
return 0;
return m_ManaTable[(int)Circle];
}
public abstract int GetMana();
public virtual int ScaleMana( int mana )
{
@ -704,7 +608,6 @@ namespace Server.Spells
}
public virtual int CastRecoveryBase{ get{ return 6; } }
public virtual int CastRecoveryCircleScalar{ get{ return 0; } }
public virtual int CastRecoveryFastScalar{ get{ return 1; } }
public virtual int CastRecoveryPerSecond{ get{ return 4; } }
public virtual int CastRecoveryMinimum{ get{ return 0; } }
@ -716,10 +619,11 @@ namespace Server.Spells
int fcr = AosAttributes.GetValue( m_Caster, AosAttribute.CastRecovery );
int circleDelay = CastRecoveryCircleScalar * (1 + (int)Circle); // Note: Circle is 0-based so we must offset
fcr -= ThunderstormSpell.GetCastRecoveryMalus( m_Caster );
int fcrDelay = -(CastRecoveryFastScalar * fcr);
int delay = CastRecoveryBase + circleDelay + fcrDelay;
int delay = CastRecoveryBase + fcrDelay;
if ( delay < CastRecoveryMinimum )
delay = CastRecoveryMinimum;
@ -727,20 +631,24 @@ namespace Server.Spells
return TimeSpan.FromSeconds( (double)delay / CastRecoveryPerSecond );
}
public virtual int CastDelayBase{ get{ return 3; } }
public virtual int CastDelayCircleScalar{ get{ return 1; } }
public virtual int CastDelayFastScalar{ get{ return 1; } }
public virtual int CastDelayPerSecond{ get{ return 4; } }
public virtual int CastDelayMinimum{ get{ return 1; } }
public abstract TimeSpan CastDelayBase { get; }
public virtual double CastDelayFastScalar { get { return 1; } }
public virtual double CastDelaySecondsPerTick { get { return 0.25; } }
public virtual TimeSpan CastDelayMinimum { get { return TimeSpan.FromSeconds( 0.25 ); } }
//public virtual int CastDelayBase{ get{ return 3; } }
//public virtual int CastDelayFastScalar{ get{ return 1; } }
//public virtual int CastDelayPerSecond{ get{ return 4; } }
//public virtual int CastDelayMinimum{ get{ return 1; } }
public virtual TimeSpan GetCastDelay()
{
if ( m_Scroll is BaseWand )
return TimeSpan.Zero;
if ( !Core.AOS )
return TimeSpan.FromSeconds( 0.5 + (0.25 * (int)Circle) );
// Faster casting cap of 2 (if not using the protection spell)
// Faster casting cap of 0 (if using the protection spell)
// Paladin spells are subject to a faster casting cap of 4
@ -758,17 +666,21 @@ namespace Server.Spells
if ( ProtectionSpell.Registry.Contains( m_Caster ) )
fc -= 2;
// Circle is 0-based but we must not offset, first circle spells are cast at base delay.
int circleDelay = CastDelayCircleScalar * (int)Circle;
if( EssenceOfWindSpell.IsDebuffed( m_Caster ) )
fc -= EssenceOfWindSpell.GetFCMalus( m_Caster );
int fcDelay = -(CastDelayFastScalar * fc);
TimeSpan baseDelay = CastDelayBase;
int delay = CastDelayBase + circleDelay + fcDelay;
TimeSpan fcDelay = TimeSpan.FromSeconds( -(CastDelayFastScalar * fc * CastDelaySecondsPerTick) );
//int delay = CastDelayBase + circleDelay + fcDelay;
TimeSpan delay = baseDelay + fcDelay;
if ( delay < CastDelayMinimum )
delay = CastDelayMinimum;
return TimeSpan.FromSeconds( (double)delay / CastDelayPerSecond );
//return TimeSpan.FromSeconds( (double)delay / CastDelayPerSecond );
return delay;
}
public virtual void FinishSequence()
@ -840,7 +752,7 @@ namespace Server.Spells
if ( karma != 0 )
Misc.Titles.AwardKarma( Caster, karma, true );
if ( TransformationSpell.UnderTransformation( m_Caster, typeof( VampiricEmbraceSpell ) ) )
if( TransformationSpellHelper.UnderTransformation( m_Caster, typeof( VampiricEmbraceSpell ) ) )
{
bool garlic = false;

View file

@ -9,6 +9,10 @@ using Server.Targeting;
using Server.Engines.PartySystem;
using Server.Misc;
using Server.Spells.Bushido;
using Server.Spells.Ninjitsu;
using System.Collections.Generic;
using Server.Spells.Seventh;
using Server.Spells.Fifth;
namespace Server
{
@ -423,6 +427,16 @@ namespace Server.Spells
creature.Mana = creature.ManaMax;
}
Point3D p = new Point3D( caster );
if( SpellHelper.FindValidSpawnLocation( map, ref p, true ) )
{
BaseCreature.Summon( creature, caster, p, sound, duration );
return;
}
/*
int offset = Utility.Random( 8 ) * 2;
for( int i = 0; i < m_Offsets.Length; i += 2 )
@ -446,11 +460,61 @@ namespace Server.Spells
}
}
}
* */
creature.Delete();
caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
public static bool FindValidSpawnLocation( Map map, ref Point3D p, bool surroundingsOnly )
{
if( map == null ) //sanity
return false;
if( !surroundingsOnly )
{
if( map.CanSpawnMobile( p ) ) //p's fine.
{
p = new Point3D( p );
return true;
}
int z = map.GetAverageZ( p.X, p.Y );
if( map.CanSpawnMobile( p.X, p.Y, z ) )
{
p = new Point3D( p.X, p.Y, z );
return true;
}
}
int offset = Utility.Random( 8 ) * 2;
for( int i = 0; i < m_Offsets.Length; i += 2 )
{
int x = p.X + m_Offsets[(offset + i) % m_Offsets.Length];
int y = p.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
if( map.CanSpawnMobile( x, y, p.Z ) )
{
p = new Point3D( x, y, p.Z );
return true;
}
else
{
int z = map.GetAverageZ( x, y );
if( map.CanSpawnMobile( x, y, z ) )
{
p = new Point3D( x, y, z );
return true;
}
}
}
return false;
}
private delegate bool TravelValidator( Map map, Point3D loc );
private static TravelValidator[] m_Validators = new TravelValidator[]
@ -789,9 +853,6 @@ namespace Server.Spells
{
int iDamage = (int)damage;
if( Evasion.CheckSpellEvasion( target ) )
iDamage = 0;
if( delay == TimeSpan.Zero )
{
if( from is BaseCreature )
@ -844,9 +905,6 @@ namespace Server.Spells
{
int iDamage = (int)damage;
if( Evasion.CheckSpellEvasion( target ) )
iDamage = 0;
if( delay == TimeSpan.Zero )
{
if( from is BaseCreature )
@ -868,6 +926,16 @@ namespace Server.Spells
((BaseCreature)target).OnDamagedBySpell( from );
}
public static void Heal( int amount, Mobile target, Mobile from )
{
Heal( amount, target, from, true );
}
public static void Heal( int amount, Mobile target, Mobile from, bool message )
{
//TODO: All Healing *spells* go through ArcaneEmpowerment
target.Heal( amount, from, message );
}
private class SpellDamageTimer : Timer
{
private Mobile m_Target, m_From;
@ -950,4 +1018,244 @@ namespace Server.Spells
}
}
}
public class TransformationSpellHelper
{
#region Context Stuff
private static Dictionary<Mobile, TransformContext> m_Table = new Dictionary<Mobile, TransformContext>();
public static void AddContext( Mobile m, TransformContext context )
{
m_Table[m] = context;
}
public static void RemoveContext( Mobile m, bool resetGraphics )
{
TransformContext context = GetContext( m );
if( context != null )
RemoveContext( m, context, resetGraphics );
}
public static void RemoveContext( Mobile m, TransformContext context, bool resetGraphics )
{
if( m_Table.ContainsKey( m ) )
{
m_Table.Remove( m );
List<ResistanceMod> mods = context.Mods;
for( int i = 0; i < mods.Count; ++i )
m.RemoveResistanceMod( mods[i] );
if( resetGraphics )
{
m.HueMod = -1;
m.BodyMod = 0;
}
context.Timer.Stop();
context.Spell.RemoveEffect( m );
}
}
public static TransformContext GetContext( Mobile m )
{
TransformContext context = null;
m_Table.TryGetValue( m, out context );
return context;
}
public static bool UnderTransformation( Mobile m )
{
return (GetContext( m ) != null);
}
public static bool UnderTransformation( Mobile m, Type type )
{
TransformContext context = GetContext( m );
return (context != null && context.Type == type);
}
#endregion
public static bool CheckCast( Mobile caster, Spell spell )
{
if( Factions.Sigil.ExistsOn( caster ) )
{
caster.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
return false;
}
else if( !caster.CanBeginAction( typeof( PolymorphSpell ) ) )
{
caster.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
return false;
}
else if( AnimalForm.UnderTransformation( caster ) )
{
caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
return false;
}
return true;
}
public static bool OnCast( Mobile caster, Spell spell )
{
ITransformationSpell transformSpell = spell as ITransformationSpell;
if( transformSpell == null )
return false;
if( Factions.Sigil.ExistsOn( caster ) )
{
caster.SendLocalizedMessage( 1061632 ); // You can't do that while carrying the sigil.
}
else if( !caster.CanBeginAction( typeof( PolymorphSpell ) ) )
{
caster.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
}
else if( AnimalForm.UnderTransformation( caster ) )
{
caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
}
else if( !caster.CanBeginAction( typeof( IncognitoSpell ) ) || (caster.IsBodyMod && GetContext( caster ) == null) )
{
spell.DoFizzle();
}
else if( spell.CheckSequence() )
{
TransformContext context = GetContext( caster );
Type ourType = spell.GetType();
bool wasTransformed = (context != null);
bool ourTransform = (wasTransformed && context.Type == ourType);
if( wasTransformed )
{
RemoveContext( caster, context, ourTransform );
if( ourTransform )
{
caster.PlaySound( 0xFA );
caster.FixedParticles( 0x3728, 1, 13, 5042, EffectLayer.Waist );
}
}
if( !ourTransform )
{
List<ResistanceMod> mods = new List<ResistanceMod>();
if( transformSpell.PhysResistOffset != 0 )
mods.Add( new ResistanceMod( ResistanceType.Physical, transformSpell.PhysResistOffset ) );
if( transformSpell.FireResistOffset != 0 )
mods.Add( new ResistanceMod( ResistanceType.Fire, transformSpell.FireResistOffset ) );
if( transformSpell.ColdResistOffset != 0 )
mods.Add( new ResistanceMod( ResistanceType.Cold, transformSpell.ColdResistOffset ) );
if( transformSpell.PoisResistOffset != 0 )
mods.Add( new ResistanceMod( ResistanceType.Poison, transformSpell.PoisResistOffset ) );
if( transformSpell.NrgyResistOffset != 0 )
mods.Add( new ResistanceMod( ResistanceType.Energy, transformSpell.NrgyResistOffset ) );
if( !((Body)transformSpell.Body).IsHuman )
{
Mobiles.IMount mt = caster.Mount;
if( mt != null )
mt.Rider = null;
}
caster.BodyMod = transformSpell.Body;
caster.HueMod = transformSpell.Hue;
for( int i = 0; i < mods.Count; ++i )
caster.AddResistanceMod( mods[i] );
transformSpell.DoEffect( caster );
Timer timer = new TransformTimer( caster, transformSpell );
timer.Start();
AddContext( caster, new TransformContext( timer, mods, ourType, transformSpell ) );
return true;
}
}
return false;
}
}
public interface ITransformationSpell
{
int Body { get; }
int Hue { get; }
int PhysResistOffset { get; }
int FireResistOffset { get; }
int ColdResistOffset { get; }
int PoisResistOffset { get; }
int NrgyResistOffset { get; }
double TickRate { get; }
void OnTick( Mobile m );
void DoEffect( Mobile m );
void RemoveEffect( Mobile m );
}
public class TransformContext
{
private Timer m_Timer;
private List<ResistanceMod> m_Mods;
private Type m_Type;
private ITransformationSpell m_Spell;
public Timer Timer { get { return m_Timer; } }
public List<ResistanceMod> Mods { get { return m_Mods; } }
public Type Type { get { return m_Type; } }
public ITransformationSpell Spell { get { return m_Spell; } }
public TransformContext( Timer timer, List<ResistanceMod> mods, Type type, ITransformationSpell spell )
{
m_Timer = timer;
m_Mods = mods;
m_Type = type;
m_Spell = spell;
}
}
public class TransformTimer : Timer
{
private Mobile m_Mobile;
private ITransformationSpell m_Spell;
public TransformTimer( Mobile from, ITransformationSpell spell )
: base( TimeSpan.FromSeconds( spell.TickRate ), TimeSpan.FromSeconds( spell.TickRate ) )
{
m_Mobile = from;
m_Spell = spell;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
{
if( m_Mobile.Deleted || !m_Mobile.Alive || m_Mobile.Body != m_Spell.Body || m_Mobile.Hue != m_Spell.Hue )
{
TransformationSpellHelper.RemoveContext( m_Mobile, true );
Stop();
}
else
{
m_Spell.OnTick( m_Mobile );
}
}
}
}

View file

@ -7,42 +7,40 @@ namespace Server.Spells
{
private string m_Name;
private string m_Mantra;
private SpellCircle m_Circle;
private Type[] m_Reagents;
private int[] m_Amounts;
private int m_Action;
private bool m_AllowTown;
private int m_LeftHandEffect, m_RightHandEffect;
public SpellInfo( string name, string mantra, SpellCircle circle, params Type[] regs ) : this( name, mantra, circle, 16, 0, 0, true, regs )
public SpellInfo( string name, string mantra, params Type[] regs ) : this( name, mantra, 16, 0, 0, true, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, bool allowTown, params Type[] regs ) : this( name, mantra, circle, 16, 0, 0, allowTown, regs )
public SpellInfo( string name, string mantra, bool allowTown, params Type[] regs ) : this( name, mantra, 16, 0, 0, allowTown, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, int action, params Type[] regs ) : this( name, mantra, circle, action, 0, 0, true, regs )
public SpellInfo( string name, string mantra, int action, params Type[] regs ) : this( name, mantra, action, 0, 0, true, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, int action, bool allowTown, params Type[] regs ) : this( name, mantra, circle, action, 0, 0, allowTown, regs )
public SpellInfo( string name, string mantra, int action, bool allowTown, params Type[] regs ) : this( name, mantra, action, 0, 0, allowTown, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, int action, int handEffect, params Type[] regs ) : this( name, mantra, circle, action, handEffect, handEffect, true, regs )
public SpellInfo( string name, string mantra, int action, int handEffect, params Type[] regs ) : this( name, mantra, action, handEffect, handEffect, true, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, int action, int handEffect, bool allowTown, params Type[] regs ) : this( name, mantra, circle, action, handEffect, handEffect, allowTown, regs )
public SpellInfo( string name, string mantra, int action, int handEffect, bool allowTown, params Type[] regs ) : this( name, mantra, action, handEffect, handEffect, allowTown, regs )
{
}
public SpellInfo( string name, string mantra, SpellCircle circle, int action, int leftHandEffect, int rightHandEffect, bool allowTown, params Type[] regs )
public SpellInfo( string name, string mantra, int action, int leftHandEffect, int rightHandEffect, bool allowTown, params Type[] regs )
{
m_Name = name;
m_Mantra = mantra;
m_Circle = circle;
m_Action = action;
m_Reagents = regs;
m_AllowTown = allowTown;
@ -59,7 +57,6 @@ namespace Server.Spells
public int Action{ get{ return m_Action; } set{ m_Action = value; } }
public bool AllowTown{ get{ return m_AllowTown; } set{ m_AllowTown = value; } }
public int[] Amounts{ get{ return m_Amounts; } set{ m_Amounts = value; } }
public SpellCircle Circle{ get{ return m_Circle; } set{ m_Circle = value; } }
public string Mantra{ get{ return m_Mantra; } set{ m_Mantra = value; } }
public string Name{ get{ return m_Name; } set{ m_Name = value; } }
public Type[] Reagents{ get{ return m_Reagents; } set{ m_Reagents = value; } }

View file

@ -11,7 +11,7 @@ namespace Server.Spells
{
public class SpellRegistry
{
private static Type[] m_Types = new Type[600];
private static Type[] m_Types = new Type[700];
private static int m_Count;
public static Type[] Types
@ -146,7 +146,8 @@ namespace Server.Spells
"Necromancy",
"Chivalry",
"Bushido",
"Ninjitsu"
"Ninjitsu",
"SpellWeaving"
};
public static Spell NewSpell( string name, Mobile caster, Item scroll )

View file

@ -10,11 +10,12 @@ namespace Server.Spells.Bushido
{
private static SpellInfo m_Info = new SpellInfo(
"Confidence", null,
SpellCircle.First, // 0 + 0.25 = 0.25s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.25 ); } }
public override double RequiredSkill{ get{ return 25.0; } }
public override int RequiredMana{ get{ return 10; } }

View file

@ -11,11 +11,12 @@ namespace Server.Spells.Bushido
{
private static SpellInfo m_Info = new SpellInfo(
"CounterAttack", null,
SpellCircle.First, // 0 + 0.25 = 0.25s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.25 ); } }
public override double RequiredSkill{ get{ return 40.0; } }
public override int RequiredMana{ get{ return 5; } }

View file

@ -11,11 +11,12 @@ namespace Server.Spells.Bushido
{
private static SpellInfo m_Info = new SpellInfo(
"Evasion", null,
SpellCircle.First, // 0 + 0.25 = 0.25s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.25 ); } }
public override double RequiredSkill { get { return 60.0; } }
public override int RequiredMana { get { return 10; } }

View file

@ -6,5 +6,10 @@ namespace Server.Spells
public class SamuraiMove : SpecialMove
{
public override SkillName MoveSkill{ get{ return SkillName.Bushido; } }
public override void CheckGain( Mobile m )
{
m.CheckSkill( MoveSkill, RequiredSkill - 12.5, RequiredSkill + 37.5 ); //Per five on friday 02/16/07
}
}
}

View file

@ -18,8 +18,8 @@ namespace Server.Spells.Bushido
public override bool BlocksMovement{ get{ return false; } }
public override bool ShowHandMovement{ get{ return false; } }
public override int CastDelayBase{ get{ return 1; } }
public override int CastDelayFastScalar{ get{ return 0; } }
//public override int CastDelayBase{ get{ return 1; } }
public override double CastDelayFastScalar{ get{ return 0; } }
public override int CastRecoveryBase{ get{ return 7; } }
@ -35,7 +35,8 @@ namespace Server.Spells.Bushido
if ( from.NetState == null )
return false;
return ( (from.NetState.Flags & 0x10) != 0 );
//return ( (from.NetState.Flags & 0x10) != 0 );
return from.NetState.SupportsExpansion( Expansion.SE );
}
public override bool CheckCast()
@ -89,7 +90,7 @@ namespace Server.Spells.Bushido
public override void GetCastSkills( out double min, out double max )
{
min = RequiredSkill;
min = RequiredSkill - 12.5; //per 5 on friday, 2/16/07
max = RequiredSkill + 37.5;
}

View file

@ -10,11 +10,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Cleanse By Fire", "Expor Flamus",
SpellCircle.Fourth, // 0 + 1.0 = 1s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.0 ); } }
public override double RequiredSkill{ get{ return 5.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -11,11 +11,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Close Wounds", "Obsu Vulni",
SpellCircle.Sixth, // 0 + 1.5 = 1.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.5 ); } }
public override double RequiredSkill{ get{ return 0.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 10; } }
@ -71,7 +72,9 @@ namespace Server.Spells.Chivalry
if ( (m.Hits + toHeal) > m.HitsMax )
toHeal = m.HitsMax - m.Hits;
m.Hits += toHeal;
//m.Hits += toHeal; //Was previosuly due to the message
//m.Heal( toHeal, Caster, false );
SpellHelper.Heal( toHeal, m, Caster, false );
m.SendLocalizedMessage( 1060203, toHeal.ToString() ); // You have had ~1_HEALED_AMOUNT~ hit points of damage healed.

View file

@ -10,11 +10,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Consecrate Weapon", "Consecrus Arma",
SpellCircle.Second, // 0 + 0.5 = 0.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.5 ); } }
public override double RequiredSkill{ get{ return 15.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -12,11 +12,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Dispel Evil", "Dispiro Malas",
SpellCircle.First, // 0 + 0.25 = 0.25s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.25 ); } }
public override double RequiredSkill{ get{ return 35.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 10; } }
@ -93,7 +94,8 @@ namespace Server.Spells.Chivalry
}
}
if ( TransformationSpell.GetContext( m ) != null )
TransformContext context = TransformationSpellHelper.GetContext( m );
if( context != null && context.Spell is NecromancerSpell ) //Trees are not evil! TODO: OSI confirm?
{
// transformed ..

View file

@ -10,11 +10,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Divine Fury", "Divinum Furis",
SpellCircle.Fourth, // 0 + 1.0 = 1s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.0 ); } }
public override double RequiredSkill{ get{ return 25.0; } }
public override int RequiredMana{ get{ return 15; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -12,11 +12,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Enemy of One", "Forul Solum",
SpellCircle.Second, // 0 + 0.5 = 0.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 0.5 ); } }
public override double RequiredSkill{ get{ return 45.0; } }
public override int RequiredMana{ get{ return 20; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -10,11 +10,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Holy Light", "Augus Luminos",
SpellCircle.Seventh, // 0 + 1.75 = 1.75s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.75 ); } }
public override double RequiredSkill{ get{ return 55.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -16,11 +16,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Noble Sacrifice", "Dium Prostra",
SpellCircle.Sixth, // 0 + 1.5 = 1.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.5 ); } }
public override double RequiredSkill{ get{ return 65.0; } }
public override int RequiredMana{ get{ return 20; } }
public override int RequiredTithing{ get{ return 30; } }
@ -109,7 +110,7 @@ namespace Server.Spells.Chivalry
toHeal = 24;
Caster.DoBeneficial( m );
m.Heal( toHeal );
m.Heal( toHeal, Caster );
sendEffect = true;
}

View file

@ -16,7 +16,7 @@ namespace Server.Spells.Chivalry
public override bool ClearHandsOnCast{ get{ return false; } }
public override int CastDelayBase{ get{ return 1; } }
//public override int CastDelayBase{ get{ return 1; } }
public override int CastRecoveryBase{ get{ return 7; } }

View file

@ -12,11 +12,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Remove Curse", "Extermo Vomica",
SpellCircle.Sixth, // 0 + 1.5 = 1.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.5 ); } }
public override double RequiredSkill{ get{ return 5.0; } }
public override int RequiredMana{ get{ return 20; } }
public override int RequiredTithing{ get{ return 10; } }

View file

@ -12,11 +12,12 @@ namespace Server.Spells.Chivalry
{
private static SpellInfo m_Info = new SpellInfo(
"Sacred Journey", "Sanctum Viatas",
SpellCircle.Sixth, // 0 + 1.5 = 1.5s base cast delay
-1,
9002
);
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds( 1.5 ); } }
public override double RequiredSkill{ get{ return 15.0; } }
public override int RequiredMana{ get{ return 10; } }
public override int RequiredTithing{ get{ return 15; } }

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class AirElementalSpell : Spell
public class AirElementalSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Air Elemental", "Kal Vas Xen Hur",
SpellCircle.Eighth,
269,
9010,
false,
@ -18,6 +17,8 @@ namespace Server.Spells.Eighth
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public AirElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class EarthElementalSpell : Spell
public class EarthElementalSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Earth Elemental", "Kal Vas Xen Ylem",
SpellCircle.Eighth,
269,
9020,
false,
@ -18,6 +17,8 @@ namespace Server.Spells.Eighth
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public EarthElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -6,11 +6,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class EarthquakeSpell : Spell
public class EarthquakeSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Earthquake", "In Vas Por",
SpellCircle.Eighth,
233,
9012,
false,
@ -20,6 +19,8 @@ namespace Server.Spells.Eighth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public EarthquakeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class EnergyVortexSpell : Spell
public class EnergyVortexSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Energy Vortex", "Vas Corp Por",
SpellCircle.Eighth,
260,
9032,
false,
@ -19,6 +18,8 @@ namespace Server.Spells.Eighth
Reagent.Nightshade
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public EnergyVortexSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class FireElementalSpell : Spell
public class FireElementalSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Fire Elemental", "Kal Vas Xen Flam",
SpellCircle.Eighth,
269,
9050,
false,
@ -19,6 +18,8 @@ namespace Server.Spells.Eighth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public FireElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Gumps;
namespace Server.Spells.Eighth
{
public class ResurrectionSpell : Spell
public class ResurrectionSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Resurrection", "An Corp",
SpellCircle.Eighth,
245,
9062,
Reagent.Bloodmoss,
@ -17,6 +16,8 @@ namespace Server.Spells.Eighth
Reagent.Ginseng
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public ResurrectionSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

View file

@ -5,11 +5,10 @@ using Server.Targeting;
namespace Server.Spells.Eighth
{
public class SummonDaemonSpell : Spell
public class SummonDaemonSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Summon Daemon", "Kal Vas Xen Corp",
SpellCircle.Eighth,
269,
9050,
false,
@ -19,6 +18,8 @@ namespace Server.Spells.Eighth
Reagent.SulfurousAsh
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public SummonDaemonSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

Some files were not shown because too many files have changed in this diff Show more