- Added support for ML mods, as well as quivers. More ML artifacts are added

(http://www.uodemise.com/discussion/showthread.php?t=116685)

- Dog Form HPR rate is tweaked as per OSI
(http://www.uodemise.com/discussion/showthread.php?t=124422)

- Hairstylist gump now works for elves
(http://www.uodemise.com/discussion/showthread.php?t=120199)

- Bless buff icon now will report correct values
(http://www.uodemise.com/discussion/showthread.php?t=123760)

- When stealthing, the step just before a stealth check won't let you lose the stealth status (you can use shadowjump)
(http://www.uodemise.com/discussion/showthread.php?t=121250)

- You can open the blacksmith gump even if far from anvil and forge, but you still need to be near them to craft
(http://www.uodemise.com/discussion/showthread.php?t=122750)
This commit is contained in:
daedalus 2009-11-23 11:20:29 +00:00
parent aff5e22940
commit 30c7232a69
54 changed files with 1363 additions and 149 deletions

View file

@ -355,7 +355,8 @@ namespace Server.Engines.Craft
typeof( BaseTool ),
typeof( BaseHarvestTool ),
typeof( FukiyaDarts ), typeof( Shuriken ),
typeof( Spellbook ), typeof( Runebook )
typeof( Spellbook ), typeof( Runebook ),
typeof( BaseQuiver )
};
#endregion

View file

@ -7,6 +7,7 @@ namespace Server.Engines.Craft
{
public enum EnhanceResult
{
None,
NotInBackpack,
BadItem,
BadResource,
@ -33,6 +34,14 @@ namespace Server.Engines.Craft
if ( CraftResources.IsStandard( resource ) )
return EnhanceResult.BadResource;
int num = craftSystem.CanCraft( from, tool, item.GetType() );
if ( num > 0 )
{
resMessage = num;
return EnhanceResult.None;
}
CraftItem craftItem = craftSystem.CraftItems.SearchFor( item.GetType() );

View file

@ -150,8 +150,12 @@ namespace Server.Engines.Craft
bool toDelete = false;
//TODO: Make a IRepairable
if ( m_CraftSystem is DefTinkering && targeted is Golem )
if ( m_CraftSystem.CanCraft( from, m_Tool, targeted.GetType() ) == 1044267 )
{
number = 1044282; // You must be near a forge and and anvil to repair items. * Yes, there are two and's *
}
else if ( m_CraftSystem is DefTinkering && targeted is Golem )
{
Golem g = (Golem)targeted;
int damage = g.HitsMax - g.Hits;

View file

@ -22,7 +22,7 @@ namespace Server.Engines.Craft
{
int num = craftSystem.CanCraft( from, tool, null );
if ( num > 0 )
if ( num > 0 && num != 1044267 )
{
from.SendGump( new CraftGump( from, craftSystem, tool, num ) );
}
@ -111,6 +111,18 @@ namespace Server.Engines.Craft
if ( num > 0 )
{
if ( num == 1044267 )
{
bool anvil, forge;
DefBlacksmithy.CheckAnvilAndForge( from, 2, out anvil, out forge );
if ( !anvil )
num = 1044266; // You must be near an anvil
else if ( !forge )
num = 1044265; // You must be near a forge.
}
from.SendGump( new CraftGump( from, m_CraftSystem, m_Tool, num ) );
}
else

View file

@ -200,6 +200,33 @@ namespace Server.Engines.Craft
SetNeededExpansion( index, Expansion.SE );
}
if( Core.ML )
{
index = AddCraft( typeof( ElvenQuiver ), 1015283, 1032657, 65.0, 115.0, typeof( Leather ), 1044462, 28, 1044463 );
AddRecipe( index, 501 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( QuiverOfFire ), 1015283, 1073109, 65.0, 115.0, typeof( Leather ), 1044462, 28, 1044463 );
AddRes( index, typeof( FireRuby ), 1032695, 15, 1042081 );
AddRecipe( index, 502 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( QuiverOfIce ), 1015283, 1073110, 65.0, 115.0, typeof( Leather ), 1044462, 28, 1044463 );
AddRes( index, typeof( WhitePearl ), 1032694, 15, 1042081 );
AddRecipe( index, 503 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( QuiverOfBlight ), 1015283, 1073111, 65.0, 115.0, typeof( Leather ), 1044462, 28, 1044463 );
AddRes( index, typeof( Blight ), 1032675, 10, 1042081 );
AddRecipe( index, 504 );
SetNeededExpansion( index, Expansion.ML );
index = AddCraft( typeof( QuiverOfLightning ), 1015283, 1073112, 65.0, 115.0, typeof( Leather ), 1044462, 28, 1044463 );
AddRes( index, typeof( Corruption ), 1032676, 10, 1042081 );
AddRecipe( index, 505 );
SetNeededExpansion( index, Expansion.ML );
}
AddCraft( typeof( OilCloth ), 1015283, 1041498, 74.6, 99.6, typeof( Cloth ), 1044286, 1, 1044287 );
if( Core.SE )

View file

@ -20,9 +20,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = 0;
phys = fire = pois = chaos = direct = 0;
cold = nrgy = 50;
}
@ -190,9 +190,9 @@ namespace Server.Items
Attributes.WeaponDamage = 60;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = nrgy = 0;
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}
@ -232,9 +232,9 @@ namespace Server.Items
Attributes.Luck = 200;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = cold = pois = nrgy = 0;
phys = cold = pois = nrgy = chaos = direct = 0;
fire = 100;
}
@ -345,9 +345,9 @@ namespace Server.Items
Attributes.DefendChance = 10;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}
@ -549,7 +549,7 @@ namespace Server.Items
|| IsInTypeList( t, TreasuresOfTokuno.GreaterArtifacts )
|| IsInTypeList( t, DemonKnight.ArtifactRarity10 )
|| IsInTypeList( t, DemonKnight.ArtifactRarity11 )
|| IsInTypeList( t, DemonKnight.ArtifactRarity10 )
|| IsInTypeList( t, BaseCreature.MinorArtifactsMl )
|| IsInTypeList( t, StealableArtifactsSpawner.TypesOfEntires )
|| IsInTypeList( t, Paragon.Artifacts )
|| IsInTypeList( t, Leviathan.Artifacts )

View file

@ -297,9 +297,9 @@ namespace Server.Items
Attributes.WeaponSpeed = 20;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}

View file

@ -23,9 +23,9 @@ namespace Server.Items
WeaponAttributes.HitLeechHits = 22;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = 0;
phys = chaos = direct = 0;
fire = 40;
cold = 30;
pois = 10;

View file

@ -38,16 +38,14 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if ( from.Race == Race.Elf )
{
from.SendMessage( "This isn't implemented for elves yet. Sorry!" );
return;
}
if ( !IsChildOf( from.Backpack ) )
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
{
from.SendLocalizedMessage( 1042001 ); // That must be in your pack...
}
else
{
from.SendGump( new InternalGump( from, this ) );
}
}
private class InternalGump : Gump
@ -69,79 +67,91 @@ namespace Server.Items
AddHtmlLocalized( 210, 342, 90, 35, 1011012, false, false );// <CENTER>HAIRSTYLE SELECTION MENU</center>
AddBackground( 220, 60, 50, 50, 0xA3C );
AddBackground( 220, 115, 50, 50, 0xA3C );
AddBackground( 220, 170, 50, 50, 0xA3C );
AddBackground( 220, 225, 50, 50, 0xA3C );
AddBackground( 425, 60, 50, 50, 0xA3C );
AddBackground( 425, 115, 50, 50, 0xA3C );
AddBackground( 425, 170, 50, 50, 0xA3C );
AddBackground( 425, 225, 50, 50, 0xA3C );
AddBackground( 425, 280, 50, 50, 0xA3C );
int[][] RacialData = (from.Race == Race.Human) ? HumanArray : ElvenArray;
AddHtmlLocalized( 150, 75, 80, 35, 1011052, false, false ); // Short
AddHtmlLocalized( 150, 130, 80, 35, 1011053, false, false ); // Long
AddHtmlLocalized( 150, 185, 80, 35, 1011054, false, false ); // Ponytail
AddHtmlLocalized( 150, 240, 80, 35, 1011055, false, false ); // Mohawk
AddHtmlLocalized( 355, 75, 80, 35, 1011047, false, false ); // Pageboy
AddHtmlLocalized( 355, 130, 80, 35, 1011048, false, false ); // Receding
AddHtmlLocalized( 355, 185, 80, 35, 1011049, false, false ); // 2-tails
AddHtmlLocalized( 355, 240, 80, 35, 1011050, false, false ); // Topknot
AddHtmlLocalized( 355, 295, 80, 35, 1011064, false, false ); // Bald
AddImage( 153, 20, 0xC60C );
AddImage( 153, 65, 0xED24 );
AddImage( 153, 120, 0xED1E );
AddImage( 153, 185, 0xC60F );
AddImage( 358, 18, 0xED26 );
AddImage( 358, 75, 0xEDE5 );
AddImage( 358, 120, 0xED23 );
AddImage( 362, 190, 0xED29 );
AddButton( 118, 73, 0xFA5, 0xFA7, 2, GumpButtonType.Reply, 0 );
AddButton( 118, 128, 0xFA5, 0xFA7, 3, GumpButtonType.Reply, 0 );
AddButton( 118, 183, 0xFA5, 0xFA7, 4, GumpButtonType.Reply, 0 );
AddButton( 118, 238, 0xFA5, 0xFA7, 5, GumpButtonType.Reply, 0 );
AddButton( 323, 73, 0xFA5, 0xFA7, 6, GumpButtonType.Reply, 0 );
AddButton( 323, 128, 0xFA5, 0xFA7, 7, GumpButtonType.Reply, 0 );
AddButton( 323, 183, 0xFA5, 0xFA7, 8, GumpButtonType.Reply, 0 );
AddButton( 323, 238, 0xFA5, 0xFA7, 9, GumpButtonType.Reply, 0 );
AddButton( 323, 292, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
for(int i=1; i<RacialData.Length; i++)
{
AddHtmlLocalized( LayoutArray[i][2], LayoutArray[i][3], (i==1) ? 125 : 80, (i==1) ? 70 : 35, (m_From.Female) ? RacialData[i][0] : RacialData[i][1], false, false );
if ( LayoutArray[i][4] != 0 )
{
AddBackground( LayoutArray[i][0], LayoutArray[i][1], 50, 50, 0xA3C );
AddImage( LayoutArray[i][4], LayoutArray[i][5], (m_From.Female) ? RacialData[i][4] : RacialData[i][5] );
}
AddButton( LayoutArray[i][6], LayoutArray[i][7], 0xFA5, 0xFA7, i, GumpButtonType.Reply, 0 );
}
}
public override void OnResponse( NetState sender, RelayInfo info )
{
if( m_From == null || !m_From.Alive )
return;
if ( m_Deed.Deleted )
return;
if ( info.ButtonID > 0 )
{
int itemID = 0;
if ( info.ButtonID < 1 || info.ButtonID > 10 )
return;
switch ( info.ButtonID )
{
case 2: itemID = 0x203B; break;
case 3: itemID = 0x203C; break;
case 4: itemID = 0x203D; break;
case 5: itemID = 0x2044; break;
case 6: itemID = 0x2045; break;
case 7: itemID = m_From.Female ? 0x2046 : 0x2048; break;
case 8: itemID = 0x2049; break;
case 9: itemID = 0x204A; break;
}
int[][] RacialData = (m_From.Race == Race.Human) ? HumanArray : ElvenArray;
if ( m_From is PlayerMobile )
{
PlayerMobile pm = (PlayerMobile)m_From;
pm.SetHairMods( -1, -1 ); // clear any hairmods (disguise kit, incognito)
}
m_From.HairItemID = itemID;
m_From.HairItemID = (m_From.Female) ? RacialData[info.ButtonID][2] : RacialData[info.ButtonID][3];
m_Deed.Delete();
}
}
/*
gump data: bgX, bgY, htmlX, htmlY, imgX, imgY, butX, butY
*/
int[][] LayoutArray =
{
new int[] { 0 }, /* padding: its more efficient than code to ++ the index/buttonid */
new int[] { 425, 280, 342, 295, 000, 000, 310, 292 },
new int[] { 235, 060, 150, 075, 168, 020, 118, 073 },
new int[] { 235, 115, 150, 130, 168, 070, 118, 128 },
new int[] { 235, 170, 150, 185, 168, 130, 118, 183 },
new int[] { 235, 225, 150, 240, 168, 185, 118, 238 },
new int[] { 425, 060, 342, 075, 358, 018, 310, 073 },
new int[] { 425, 115, 342, 130, 358, 075, 310, 128 },
new int[] { 425, 170, 342, 185, 358, 125, 310, 183 },
new int[] { 425, 225, 342, 240, 358, 185, 310, 238 },
new int[] { 235, 280, 150, 295, 168, 245, 118, 292 } // slot 10, Curly - N/A for elfs.
};
/*
racial arrays are: cliloc_F, cliloc_M, ItemID_F, ItemID_M, gump_img_F, gump_img_M
*/
int[][] HumanArray = /* why on earth cant these utilies be consistent with hex/dec */
{
new int[] { 0 },
new int[] { 1011064, 1011064, 0, 0, 0, 0 }, // bald
new int[] { 1011052, 1011052, 0x203B, 0x203B, 0xed1c, 0xC60C }, // Short
new int[] { 1011053, 1011053, 0x203C, 0x203C, 0xed1d, 0xc60d }, // Long
new int[] { 1011054, 1011054, 0x203D, 0x203D, 0xed1e, 0xc60e }, // Ponytail
new int[] { 1011055, 1011055, 0x2044, 0x2044, 0xed27, 0xC60F }, // Mohawk
new int[] { 1011047, 1011047, 0x2045, 0x2045, 0xED26, 0xED26 }, // Pageboy
new int[] { 1074393, 1011048, 0x2046, 0x2048, 0xed28, 0xEDE5 }, // Buns, Receding
new int[] { 1011049, 1011049, 0x2049, 0x2049, 0xede6, 0xede6 }, // 2-tails
new int[] { 1011050, 1011050, 0x204A, 0x204A, 0xED29, 0xED29 }, // Topknot
new int[] { 1011396, 1011396, 0x2047, 0x2047, 0xed25, 0xc618 } // Curly
};
int[][] ElvenArray =
{
new int[] { 0 },
new int[] { 1011064, 1011064, 0, 0, 0, 0, }, // bald
new int[] { 1074386, 1074386, 0x2fc0, 0x2fc0, 0xedf5, 0xc6e5 }, // long feather
new int[] { 1074387, 1074387, 0x2fc1, 0x2fc1, 0xedf6, 0xc6e6 }, // short
new int[] { 1074388, 1074388, 0x2fc2, 0x2fc2, 0xedf7, 0xc6e7 }, // mullet
new int[] { 1074391, 1074391, 0x2fce, 0x2fce, 0xeddc, 0xc6cc }, // knob
new int[] { 1074392, 1074392, 0x2fcf, 0x2fcf, 0xeddd, 0xc6cd }, // braided
new int[] { 1074394, 1074394, 0x2fd1, 0x2fd1, 0xeddf, 0xc6cf }, // spiked
new int[] { 1074389, 1074385, 0x2fcc, 0x2fbf, 0xedda, 0xc6e4 }, // flower, mid-long
new int[] { 1074393, 1074390, 0x2fd0, 0x2fcd, 0xedde, 0xc6cb } // buns, long
};
}
}
}

View file

@ -21,12 +21,12 @@ namespace Server.Items
WeaponAttributes.ResistColdBonus = 10;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
cold = 50;
phys = 50;
pois = fire = nrgy = 0;
pois = fire = nrgy = chaos = direct = 0;
}
public ArcticDeathDealer( Serial serial ) : base( serial )

View file

@ -22,12 +22,12 @@ namespace Server.Items
WeaponAttributes.LowerStatReq = 100;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
fire = 50;
phys = 50;
cold = pois = nrgy = 0;
cold = pois = nrgy = chaos = direct = 0;
}
public BlazeOfDeath( Serial serial ) : base( serial )

View file

@ -22,11 +22,11 @@ namespace Server.Items
Attributes.BonusMana = 6;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
cold = 100;
fire = phys = pois = nrgy = 0;
fire = phys = pois = nrgy = chaos = direct = 0;
}
public ColdBlood( Serial serial ) : base( serial )

View file

@ -0,0 +1,49 @@
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class Boomstick : WildStaff
{
public override int LabelNumber{ get{ return 1075032; } } // Boomstick
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public Boomstick() : base()
{
Hue = 0x25;
Attributes.SpellChanneling = 1;
Attributes.RegenMana = 3;
Attributes.CastSpeed = 1;
Attributes.LowerRegCost = 20;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = nrgy = direct = 0;
chaos = 100;
}
public Boomstick( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,48 @@
using System;
using Server;
namespace Server.Items
{
public class HelmOfSwiftness : WingedHelm
{
public override int LabelNumber{ get{ return 1075037; } } // Helm of Swiftness
public override int BasePhysicalResistance{ get{ return 6; } }
public override int BaseFireResistance{ get{ return 5; } }
public override int BaseColdResistance{ get{ return 6; } }
public override int BasePoisonResistance{ get{ return 6; } }
public override int BaseEnergyResistance{ get{ return 8; } }
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public HelmOfSwiftness() : base()
{
Hue = 0x592;
Attributes.BonusInt = 5;
Attributes.CastSpeed = 1;
Attributes.CastRecovery = 2;
ArmorAttributes.MageArmor = 1;
}
public HelmOfSwiftness( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,43 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfElements : BaseQuiver
{
public override int LabelNumber{ get{ return 1075040; } } // Quiver of the Elements
[Constructable]
public QuiverOfElements() : base()
{
Hue = 0xEB;
DamageIncrease = 10;
WeightReduction = 50;
}
public QuiverOfElements( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
phys = fire = cold = pois = nrgy = direct = 0;
chaos = 100;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,43 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfRage : BaseQuiver
{
public override int LabelNumber{ get{ return 1075038; } } // Quiver of Rage
[Constructable]
public QuiverOfRage() : base()
{
Hue = 0x24C;
WeightReduction = 25;
DamageIncrease = 10;
}
public QuiverOfRage( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
chaos = direct = 0;
phys = fire = cold = pois = nrgy = 20;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -23,11 +23,11 @@ namespace Server.Items
Slayer = SlayerName.Repond;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
cold = 100;
pois = fire = phys = nrgy = 0;
pois = fire = phys = nrgy = chaos = direct = 0;
}
public SoulSeeker( Serial serial ) : base( serial )

View file

@ -0,0 +1,48 @@
using System;
using Server;
namespace Server.Items
{
public class WildfireBow : ElvenCompositeLongbow
{
public override int LabelNumber{ get{ return 1075044; } } // Wildfire Bow
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public WildfireBow() : base()
{
Hue = 0x489;
SkillBonuses.SetValues( 0, SkillName.Archery, 10 );
WeaponAttributes.ResistFireBonus = 25;
Velocity = 15;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = cold = pois = nrgy = chaos = direct = 0;
fire = 100;
}
public WildfireBow( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,42 @@
using System;
using Server;
namespace Server.Items
{
public class Windsong : MagicalShortbow
{
public override int LabelNumber{ get{ return 1075031; } } // Windsong
public override int InitMinHits{ get{ return 255; } }
public override int InitMaxHits{ get{ return 255; } }
[Constructable]
public Windsong() : base()
{
Hue = 0xAC;
Attributes.WeaponDamage = 35;
WeaponAttributes.SelfRepair = 3;
Velocity = 25;
}
public Windsong( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -21,12 +21,12 @@ namespace Server.Items
WeaponAttributes.ResistPoisonBonus = 10;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
pois = 50;
phys = 50;
fire = cold = nrgy = 0;
fire = cold = nrgy = chaos = direct = 0;
}
public NoxRangersHeavyCrossbow( Serial serial ) : base( serial )

View file

@ -24,11 +24,11 @@ namespace Server.Items
Slayer = SlayerName.Fey;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
fire = 100;
cold = pois = phys = nrgy = 0;
cold = pois = phys = nrgy = chaos = direct = 0;
}
public PixieSwatter( Serial serial ) : base( serial )

View file

@ -20,11 +20,11 @@ namespace Server.Items
Attributes.WeaponDamage = 40;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
pois = 100;
cold = fire = phys = nrgy = 0;
cold = fire = phys = nrgy = chaos = direct = 0;
}
public WrathOfTheDryad( Serial serial ) : base( serial )

View file

@ -0,0 +1,468 @@
using System;
using Server.Network;
using Server.Engines.Craft;
namespace Server.Items
{
public class BaseQuiver : Container, ICraftable
{
public override int DefaultGumpID{ get{ return 0x108; } }
public override int DefaultMaxItems{ get{ return 1; } }
public override int DefaultMaxWeight{ get{ return 50; } }
public override double DefaultWeight{ get{ return 2.0; } }
private AosAttributes m_Attributes;
private int m_Capacity;
private int m_LowerAmmoCost;
private int m_WeightReduction;
private int m_DamageIncrease;
[CommandProperty( AccessLevel.GameMaster)]
public AosAttributes Attributes
{
get{ return m_Attributes; }
set{}
}
[CommandProperty( AccessLevel.GameMaster)]
public int Capacity
{
get{ return m_Capacity; }
set{ m_Capacity = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster)]
public int LowerAmmoCost
{
get{ return m_LowerAmmoCost; }
set{ m_LowerAmmoCost = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster)]
public int WeightReduction
{
get{ return m_WeightReduction; }
set{ m_WeightReduction = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster)]
public int DamageIncrease
{
get{ return m_DamageIncrease; }
set{ m_DamageIncrease = value; InvalidateProperties(); }
}
private Mobile m_Crafter;
private ClothingQuality m_Quality;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Crafter
{
get{ return m_Crafter; }
set{ m_Crafter = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public ClothingQuality Quality
{
get{ return m_Quality; }
set{ m_Quality = value; InvalidateProperties(); }
}
public Item Ammo
{
get{ return Items.Count > 0 ? Items[ 0 ] : null; }
}
public BaseQuiver() : this( 0x2FB7 )
{
}
public BaseQuiver( int itemID ) : base( itemID )
{
Weight = 2.0;
Capacity = 500;
Layer = Layer.Cloak;
m_Attributes = new AosAttributes( this );
}
public BaseQuiver( Serial serial ) : base( serial )
{
}
public override void OnAfterDuped( Item newItem )
{
BaseQuiver quiver = newItem as BaseQuiver;
if ( quiver == null )
return;
quiver.m_Attributes = new AosAttributes( newItem, m_Attributes );
}
public override void UpdateTotal( Item sender, TotalType type, int delta )
{
InvalidateProperties();
base.UpdateTotal(sender, type, delta);
}
public override int GetTotal( TotalType type )
{
int total = base.GetTotal( type );
if ( type == TotalType.Weight )
total -= total * m_WeightReduction / 100;
return total;
}
private static Type[] m_Ammo = new Type[]
{
typeof( Arrow ), typeof( Bolt )
};
public bool CheckType( Item item )
{
Type type = item.GetType();
Item ammo = Ammo;
if ( ammo != null )
{
if ( ammo.GetType() == type )
return true;
}
else
{
for ( int i = 0; i < m_Ammo.Length; i++ )
{
if ( type == m_Ammo[ i ] )
return true;
}
}
return false;
}
public override bool CheckHold( Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight )
{
if ( !CheckType( item ) )
{
if ( message )
m.SendLocalizedMessage( 1074836 ); // The container can not hold that type of object.
return false;
}
if ( Items.Count < DefaultMaxItems )
{
if ( item.Amount <= m_Capacity )
return base.CheckHold( m, item, message, checkItems, plusItems, plusWeight );
return false;
}
else if ( checkItems )
return false;
Item ammo = Ammo;
if ( ammo == null || ammo.Deleted )
return false;
if ( ammo.Amount + item.Amount <= m_Capacity )
return true;
return false;
}
public override void AddItem( Item dropped )
{
base.AddItem( dropped );
InvalidateWeight();
}
public override void RemoveItem( Item dropped )
{
base.RemoveItem( dropped );
InvalidateWeight();
}
public override void OnAdded( object parent )
{
if ( parent is Mobile )
{
Mobile mob = (Mobile) parent;
m_Attributes.AddStatBonuses( mob );
}
}
public override void OnRemoved( object parent )
{
if ( parent is Mobile )
{
Mobile mob = (Mobile) parent;
m_Attributes.RemoveStatBonuses( mob );
}
}
public override void GetProperties( ObjectPropertyList list )
{
base.GetProperties( list );
if ( m_Crafter != null )
list.Add( 1050043, m_Crafter.Name ); // crafted by ~1_NAME~
if ( m_Quality == ClothingQuality.Exceptional )
list.Add( 1063341 ); // exceptional
Item ammo = Ammo;
if ( ammo != null )
{
if ( ammo is Arrow )
list.Add( 1075265, "{0}\t{1}", ammo.Amount, Capacity ); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
else if ( ammo is Bolt )
list.Add( 1075266, "{0}\t{1}", ammo.Amount, Capacity ); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ bolts
}
else
list.Add( 1075265, "{0}\t{1}", 0, Capacity ); // Ammo: ~1_QUANTITY~/~2_CAPACITY~ arrows
int prop;
if ( (prop = m_DamageIncrease) != 0 )
list.Add( 1074762, prop.ToString() ); // Damage modifier: ~1_PERCENT~%
int phys, fire, cold, pois, nrgy, chaos, direct;
phys = fire = cold = pois = nrgy = chaos = direct = 0;
AlterBowDamage( ref phys, ref fire, ref cold, ref pois, ref nrgy, ref chaos, ref direct );
if ( phys != 0 )
list.Add( 1060403, phys.ToString() ); // physical damage ~1_val~%
if ( fire != 0 )
list.Add( 1060405, fire.ToString() ); // fire damage ~1_val~%
if ( cold != 0 )
list.Add( 1060404, cold.ToString() ); // cold damage ~1_val~%
if ( pois != 0 )
list.Add( 1060406, pois.ToString() ); // poison damage ~1_val~%
if ( nrgy != 0 )
list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val
if ( chaos != 0 )
list.Add( 1072846, chaos.ToString() ); // chaos damage ~1_val~%
if ( direct != 0 )
list.Add( 1079978, direct.ToString() ); // Direct Damage: ~1_PERCENT~%
list.Add( 1075085 ); // Requirement: Mondain's Legacy
if ( (prop = m_Attributes.DefendChance) != 0 )
list.Add( 1060408, prop.ToString() ); // defense chance increase ~1_val~%
if ( (prop = m_Attributes.BonusDex) != 0 )
list.Add( 1060409, prop.ToString() ); // dexterity bonus ~1_val~
if ( (prop = m_Attributes.EnhancePotions) != 0 )
list.Add( 1060411, prop.ToString() ); // enhance potions ~1_val~%
if ( (prop = m_Attributes.CastRecovery) != 0 )
list.Add( 1060412, prop.ToString() ); // faster cast recovery ~1_val~
if ( (prop = m_Attributes.CastSpeed) != 0 )
list.Add( 1060413, prop.ToString() ); // faster casting ~1_val~
if ( (prop = m_Attributes.AttackChance) != 0 )
list.Add( 1060415, prop.ToString() ); // hit chance increase ~1_val~%
if ( (prop = m_Attributes.BonusHits) != 0 )
list.Add( 1060431, prop.ToString() ); // hit point increase ~1_val~
if ( (prop = m_Attributes.BonusInt) != 0 )
list.Add( 1060432, prop.ToString() ); // intelligence bonus ~1_val~
if ( (prop = m_Attributes.LowerManaCost) != 0 )
list.Add( 1060433, prop.ToString() ); // lower mana cost ~1_val~%
if ( (prop = m_Attributes.LowerRegCost) != 0 )
list.Add( 1060434, prop.ToString() ); // lower reagent cost ~1_val~%
if ( (prop = m_Attributes.Luck) != 0 )
list.Add( 1060436, prop.ToString() ); // luck ~1_val~
if ( (prop = m_Attributes.BonusMana) != 0 )
list.Add( 1060439, prop.ToString() ); // mana increase ~1_val~
if ( (prop = m_Attributes.RegenMana) != 0 )
list.Add( 1060440, prop.ToString() ); // mana regeneration ~1_val~
if ( (prop = m_Attributes.NightSight) != 0 )
list.Add( 1060441 ); // night sight
if ( (prop = m_Attributes.ReflectPhysical) != 0 )
list.Add( 1060442, prop.ToString() ); // reflect physical damage ~1_val~%
if ( (prop = m_Attributes.RegenStam) != 0 )
list.Add( 1060443, prop.ToString() ); // stamina regeneration ~1_val~
if ( (prop = m_Attributes.RegenHits) != 0 )
list.Add( 1060444, prop.ToString() ); // hit point regeneration ~1_val~
if ( (prop = m_Attributes.SpellDamage) != 0 )
list.Add( 1060483, prop.ToString() ); // spell damage increase ~1_val~%
if ( (prop = m_Attributes.BonusStam) != 0 )
list.Add( 1060484, prop.ToString() ); // stamina increase ~1_val~
if ( (prop = m_Attributes.BonusStr) != 0 )
list.Add( 1060485, prop.ToString() ); // strength bonus ~1_val~
if ( (prop = m_Attributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
if ( (prop = m_LowerAmmoCost) > 0 )
list.Add( 1075208, prop.ToString() ); // Lower Ammo Cost ~1_Percentage~%
double weight = 0;
if ( ammo != null )
weight = ammo.Weight * ammo.Amount;
list.Add( 1072241, "{0}\t{1}\t{2}\t{3}", Items.Count, DefaultMaxItems, (int) weight, DefaultMaxWeight ); // Contents: ~1_COUNT~/~2_MAXCOUNT items, ~3_WEIGHT~/~4_MAXWEIGHT~ stones
if ( (prop = m_WeightReduction) != 0 )
list.Add( 1072210, prop.ToString() ); // Weight reduction: ~1_PERCENTAGE~%
}
private static void SetSaveFlag( ref SaveFlag flags, SaveFlag toSet, bool setIf )
{
if ( setIf )
flags |= toSet;
}
private static bool GetSaveFlag( SaveFlag flags, SaveFlag toGet )
{
return ( (flags & toGet) != 0 );
}
[Flags]
private enum SaveFlag
{
None = 0x00000000,
Attributes = 0x00000001,
DamageModifier = 0x00000002,
LowerAmmoCost = 0x00000004,
WeightReduction = 0x00000008,
Crafter = 0x00000010,
Quality = 0x00000020,
Capacity = 0x00000040,
DamageIncrease = 0x00000080
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( 0 ); // version
SaveFlag flags = SaveFlag.None;
SetSaveFlag( ref flags, SaveFlag.Attributes, !m_Attributes.IsEmpty );
SetSaveFlag( ref flags, SaveFlag.LowerAmmoCost, m_LowerAmmoCost != 0 );
SetSaveFlag( ref flags, SaveFlag.WeightReduction, m_WeightReduction != 0 );
SetSaveFlag( ref flags, SaveFlag.DamageIncrease, m_DamageIncrease != 0 );
SetSaveFlag( ref flags, SaveFlag.Crafter, m_Crafter != null );
SetSaveFlag( ref flags, SaveFlag.Quality, true );
SetSaveFlag( ref flags, SaveFlag.Capacity, m_Capacity > 0 );
writer.WriteEncodedInt( (int) flags );
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
m_Attributes.Serialize( writer );
if ( GetSaveFlag( flags, SaveFlag.LowerAmmoCost ) )
writer.Write( (int) m_LowerAmmoCost );
if ( GetSaveFlag( flags, SaveFlag.WeightReduction ) )
writer.Write( (int) m_WeightReduction );
if ( GetSaveFlag( flags, SaveFlag.DamageIncrease ) )
writer.Write( (int) m_DamageIncrease );
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
writer.Write( (Mobile) m_Crafter );
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
writer.Write( (int) m_Quality );
if ( GetSaveFlag( flags, SaveFlag.Capacity ) )
writer.Write( (int) m_Capacity );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
SaveFlag flags = (SaveFlag) reader.ReadEncodedInt();
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
m_Attributes = new AosAttributes( this, reader );
else
m_Attributes = new AosAttributes( this );
if ( GetSaveFlag( flags, SaveFlag.LowerAmmoCost ) )
m_LowerAmmoCost = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.WeightReduction ) )
m_WeightReduction = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.DamageIncrease ) )
m_DamageIncrease = reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
m_Crafter = reader.ReadMobile();
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
m_Quality = (ClothingQuality) reader.ReadInt();
if ( GetSaveFlag( flags, SaveFlag.Capacity ) )
m_Capacity = reader.ReadInt();
}
public virtual void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
}
public void InvalidateWeight()
{
if ( RootParent is Mobile )
{
Mobile m = (Mobile) RootParent;
m.UpdateTotals();
}
}
#region ICraftable
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
{
Quality = (ClothingQuality) quality;
if ( makersMark )
Crafter = from;
return quality;
}
#endregion
}
}

View file

@ -0,0 +1,36 @@
using System;
using Server;
namespace Server.Items
{
[FlipableAttribute( 0x2FB7, 0x3171 )]
public class ElvenQuiver : BaseQuiver
{
public override int LabelNumber{ get{ return 1032657; } } // elven quiver
[Constructable]
public ElvenQuiver() : base()
{
DamageIncrease = 10;
WeightReduction = 30;
}
public ElvenQuiver( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfBlight : ElvenQuiver
{
public override int LabelNumber{ get{ return 1073111; } } // Quiver of Blight
[Constructable]
public QuiverOfBlight() : base()
{
Hue = 0x4F3;
}
public QuiverOfBlight( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
phys = fire = nrgy = chaos = direct = 0;
cold = pois = 50;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfFire : ElvenQuiver
{
public override int LabelNumber{ get{ return 1073109; } } // quiver of fire
[Constructable]
public QuiverOfFire() : base()
{
Hue = 0x4E7;
}
public QuiverOfFire( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
cold = pois = nrgy = chaos = direct = 0;
phys = fire = 50;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfIce : ElvenQuiver
{
public override int LabelNumber{ get{ return 1073110; } } // quiver of ice
[Constructable]
public QuiverOfIce() : base()
{
Hue = 0x4ED;
}
public QuiverOfIce( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
fire = pois = nrgy = chaos = direct = 0;
phys = cold = 50;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -0,0 +1,40 @@
using System;
using Server;
namespace Server.Items
{
public class QuiverOfLightning : ElvenQuiver
{
public override int LabelNumber{ get{ return 1073112; } } // Quiver of Lightning
[Constructable]
public QuiverOfLightning() : base()
{
Hue = 0x4F9;
}
public QuiverOfLightning( Serial serial ) : base( serial )
{
}
public override void AlterBowDamage( ref int phys, ref int fire, ref int cold, ref int pois, ref int nrgy, ref int chaos, ref int direct )
{
fire = cold = pois = chaos = direct = 0;
phys = nrgy = 50;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
}
}
}

View file

@ -69,6 +69,14 @@ namespace Server.Items
if ( handTwo is BaseWeapon )
handOne = handTwo;
if ( handOne is BaseRanged )
{
BaseRanged ranged = (BaseRanged) handOne;
if ( ranged.Balanced )
return true;
}
return ( handOne == null || handTwo == null );
}

View file

@ -349,9 +349,9 @@ namespace Server.Items
public static void GetElementalDamages( BaseWeapon weapon, bool randomizeOrder )
{
int fire, phys, cold, nrgy, pois;
int fire, phys, cold, nrgy, pois, chaos, direct;
weapon.GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );
weapon.GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
int totalDamage = phys;

View file

@ -130,7 +130,7 @@ namespace Server.Items
int num = system.CanCraft( from, this, null );
if ( num > 0 )
if ( num > 0 && ( num != 1044267 || !Core.SE ) ) // Blacksmithing shows the gump regardless of proximity of an anvil and forge after SE
{
from.SendLocalizedMessage( num );
}

View file

@ -20,9 +20,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = nrgy = 0;
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}

View file

@ -22,9 +22,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
fire = cold = nrgy = 0;
fire = cold = nrgy = chaos = direct = 0;
phys = 25;
pois = 75;
}

View file

@ -21,9 +21,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}

View file

@ -22,9 +22,9 @@ namespace Server.Items
WeaponAttributes.UseBestSkill = 1;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}

View file

@ -21,9 +21,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = nrgy = 0;
phys = fire = cold = nrgy = chaos = direct = 0;
pois = 100;
}

View file

@ -21,8 +21,9 @@ namespace Server.Items
Attributes.WeaponDamage = 50;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
chaos = direct = 0;
phys = fire = cold = pois = nrgy = 20;
}

View file

@ -1517,9 +1517,17 @@ namespace Server.Items
AddBlood( attacker, defender, damage );
int phys, fire, cold, pois, nrgy;
int phys, fire, cold, pois, nrgy, chaos, direct;
GetDamageTypes( attacker, out phys, out fire, out cold, out pois, out nrgy );
GetDamageTypes( attacker, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
if ( Core.ML && this is BaseRanged )
{
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
if ( quiver != null )
quiver.AlterBowDamage( ref phys, ref fire, ref cold, ref pois, ref nrgy, ref chaos, ref direct );
}
if ( m_Consecrated )
{
@ -1536,7 +1544,7 @@ namespace Server.Items
if ( pois < low ){ low = pois; type = 3; }
if ( nrgy < low ){ low = nrgy; type = 4; }
phys = fire = cold = pois = nrgy = 0;
phys = fire = cold = pois = nrgy = chaos = direct = 0;
if ( type == 0 ) phys = 100;
else if ( type == 1 ) fire = 100;
@ -1561,7 +1569,7 @@ namespace Server.Items
bool ignoreArmor = ( a is ArmorIgnore || (move != null && move.IgnoreArmor( attacker )) );
damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy );
damageGiven = AOS.Damage( defender, attacker, damage, ignoreArmor, phys, fire, cold, pois, nrgy, chaos, direct, false, this is BaseRanged );
double propertyBonus = ( move == null ) ? 1.0 : move.GetPropertyBonus( attacker );
@ -1966,7 +1974,7 @@ namespace Server.Items
}
}
public virtual void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public virtual void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
if( wielder is BaseCreature )
{
@ -1977,6 +1985,8 @@ namespace Server.Items
cold = bc.ColdDamage;
pois = bc.PoisonDamage;
nrgy = bc.EnergyDamage;
chaos = bc.ChaosDamage;
direct = bc.DirectDamage;
}
else
{
@ -1984,8 +1994,10 @@ namespace Server.Items
cold = m_AosElementDamages.Cold;
pois = m_AosElementDamages.Poison;
nrgy = m_AosElementDamages.Energy;
chaos = m_AosElementDamages.Chaos;
direct = m_AosElementDamages.Direct;
phys = 100 - fire - cold - pois - nrgy;
phys = 100 - fire - cold - pois - nrgy - chaos - direct;
CraftResourceInfo resInfo = CraftResources.GetInfo( m_Resource );
@ -2001,6 +2013,8 @@ namespace Server.Items
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponEnergyDamage, ref nrgy, left );
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponFireDamage, ref fire, left );
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponPoisonDamage, ref pois, left );
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponChaosDamage, ref chaos, left );
left = ApplyCraftAttributeElementDamage( attrInfo.WeaponDirectDamage, ref direct, left );
phys = left;
}
@ -2975,8 +2989,8 @@ namespace Server.Items
public int GetElementalDamageHue()
{
int phys, fire, cold, pois, nrgy;
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );
int phys, fire, cold, pois, nrgy, chaos, direct;
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
//Order is Cold, Energy, Fire, Poison, Physical left
int currentMax = 50;
@ -3123,6 +3137,9 @@ namespace Server.Items
int prop;
if ( Core.ML && this is BaseRanged && ( (BaseRanged) this ).Balanced )
list.Add( 1072792 ); // Balanced
if ( (prop = m_AosWeaponAttributes.UseBestSkill) != 0 )
list.Add( 1060400 ); // use best weapon skill
@ -3189,6 +3206,9 @@ namespace Server.Items
if ( (prop = m_AosWeaponAttributes.HitLeechStam) != 0 )
list.Add( 1060430, prop.ToString() ); // hit stamina leech ~1_val~%
if ( Core.ML && this is BaseRanged && ( prop = ( (BaseRanged) this ).Velocity ) != 0 )
list.Add( 1072793, prop.ToString() ); // Velocity ~1_val~%
if ( (prop = m_AosAttributes.BonusDex) != 0 )
list.Add( 1060409, prop.ToString() ); // dexterity bonus ~1_val~
@ -3249,9 +3269,9 @@ namespace Server.Items
if ( (prop = m_AosAttributes.WeaponSpeed) != 0 )
list.Add( 1060486, prop.ToString() ); // swing speed increase ~1_val~%
int phys, fire, cold, pois, nrgy;
int phys, fire, cold, pois, nrgy, chaos, direct;
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy );
GetDamageTypes( null, out phys, out fire, out cold, out pois, out nrgy, out chaos, out direct );
if ( phys != 0 )
list.Add( 1060403, phys.ToString() ); // physical damage ~1_val~%
@ -3266,7 +3286,13 @@ namespace Server.Items
list.Add( 1060406, pois.ToString() ); // poison damage ~1_val~%
if ( nrgy != 0 )
list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val~%
list.Add( 1060407, nrgy.ToString() ); // energy damage ~1_val
if ( Core.ML && chaos != 0 )
list.Add( 1072846, chaos.ToString() ); // chaos damage ~1_val~%
if ( Core.ML && direct != 0 )
list.Add( 1079978, direct.ToString() ); // Direct Damage: ~1_PERCENT~%
list.Add( 1061168, "{0}\t{1}", MinDamage.ToString(), MaxDamage.ToString() ); // weapon damage ~1_val~ - ~2_val~

View file

@ -20,9 +20,9 @@ namespace Server.Items
Hue = this.GetElementalDamageHue();
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = pois = nrgy = 0;
phys = fire = pois = nrgy = chaos = direct = 0;
cold = 100;
}

View file

@ -20,9 +20,9 @@ namespace Server.Items
Hue = this.GetElementalDamageHue();
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}

View file

@ -22,9 +22,9 @@ namespace Server.Items
Hue = this.GetElementalDamageHue();
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = cold = pois = nrgy = 0;
phys = cold = pois = nrgy = chaos = direct = 0;
fire = 100;
}

View file

@ -18,9 +18,9 @@ namespace Server.Items
Attributes.WeaponDamage = 60;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = nrgy = 0;
phys = fire = nrgy = chaos = direct = 0;
cold = pois = 50;
}

View file

@ -19,9 +19,9 @@ namespace Server.Items
Attributes.WeaponDamage = 35;
}
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy )
public override void GetDamageTypes( Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct )
{
phys = fire = cold = pois = 0;
phys = fire = cold = pois = chaos = direct = 0;
nrgy = 100;
}

View file

@ -21,6 +21,23 @@ namespace Server.Items
public override SkillName AccuracySkill{ get{ return SkillName.Archery; } }
private bool m_Balanced;
private int m_Velocity;
[CommandProperty( AccessLevel.GameMaster )]
public bool Balanced
{
get{ return m_Balanced; }
set{ m_Balanced = value; InvalidateProperties(); }
}
[CommandProperty( AccessLevel.GameMaster )]
public int Velocity
{
get{ return m_Velocity; }
set{ m_Velocity = value; InvalidateProperties(); }
}
public BaseRanged( int itemID ) : base( itemID )
{
}
@ -81,6 +98,22 @@ namespace Server.Items
if ( attacker.Player && !defender.Player && (defender.Body.IsAnimal || defender.Body.IsMonster) && 0.4 >= Utility.RandomDouble() )
defender.AddToBackpack( Ammo );
if ( Core.ML && m_Velocity > 0 )
{
int bonus = (int) attacker.GetDistanceToSqrt( defender );
if ( bonus > 0 && m_Velocity > Utility.Random( 100 ) )
{
AOS.Damage( defender, attacker, bonus * 3, 100, 0, 0, 0, 0 );
if ( attacker.Player )
attacker.SendLocalizedMessage( 1072794 ); // Your arrow hits its mark with velocity!
if ( defender.Player )
defender.SendLocalizedMessage( 1072795 ); // You have been hit by an arrow with velocity!
}
}
base.OnHit( attacker, defender, damageBonus );
}
@ -94,10 +127,19 @@ namespace Server.Items
public virtual bool OnFired( Mobile attacker, Mobile defender )
{
BaseQuiver quiver = attacker.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
Container pack = attacker.Backpack;
if ( attacker.Player && (pack == null || !pack.ConsumeTotal( AmmoType, 1 )) )
return false;
if ( attacker.Player )
{
if ( quiver == null || quiver.LowerAmmoCost == 0 || quiver.LowerAmmoCost > Utility.Random( 100 ) )
{
if ( quiver != null && quiver.ConsumeTotal( AmmoType, 1 ) )
quiver.InvalidateWeight();
else if ( pack == null || !pack.ConsumeTotal( AmmoType, 1 ) )
return false;
}
}
attacker.MovingEffect( defender, EffectID, 18, 1, false, false );
@ -108,7 +150,10 @@ namespace Server.Items
{
base.Serialize( writer );
writer.Write( (int) 2 ); // version
writer.Write( (int) 3 ); // version
writer.Write( (bool) m_Balanced );
writer.Write( (int) m_Velocity );
}
public override void Deserialize( GenericReader reader )
@ -119,6 +164,13 @@ namespace Server.Items
switch ( version )
{
case 3:
{
m_Balanced = reader.ReadBool();
m_Velocity = reader.ReadInt();
goto case 2;
}
case 2:
case 1:
{

View file

@ -40,20 +40,20 @@ namespace Server
public static int Damage( Mobile m, Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy )
{
return Damage( m, from, damage, false, phys, fire, cold, pois, nrgy, false );
return Damage( m, from, damage, false, phys, fire, cold, pois, nrgy, 0, 0, false, false );
}
public static int Damage( Mobile m, Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy )
{
return Damage( m, from, damage, ignoreArmor, phys, fire, cold, pois, nrgy, false );
return Damage( m, from, damage, ignoreArmor, phys, fire, cold, pois, nrgy, 0, 0, false, false );
}
public static int Damage( Mobile m, Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy, bool keepAlive )
{
return Damage( m, from, damage, false, phys, fire, cold, pois, nrgy, keepAlive );
return Damage( m, from, damage, false, phys, fire, cold, pois, nrgy, 0, 0, keepAlive, false );
}
public static int Damage( Mobile m, Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy, bool keepAlive )
public static int Damage( Mobile m, Mobile from, int damage, bool ignoreArmor, int phys, int fire, int cold, int pois, int nrgy, int chaos, int direct, bool keepAlive, bool archer )
{
if( m == null || m.Deleted || !m.Alive || damage <= 0 )
return 0;
@ -72,6 +72,25 @@ namespace Server
Fix( ref cold );
Fix( ref pois );
Fix( ref nrgy );
Fix( ref chaos );
Fix( ref direct );
if ( Core.ML && chaos > 0 )
{
switch ( Utility.Random( 5 ) )
{
case 0: phys += chaos; break;
case 1: fire += chaos; break;
case 2: cold += chaos; break;
case 3: pois += chaos; break;
case 4: nrgy += chaos; break;
}
}
BaseQuiver quiver = null;
if ( archer && from != null )
quiver = from.FindItemOnLayer( Layer.Cloak ) as BaseQuiver;
int totalDamage;
@ -92,16 +111,30 @@ namespace Server
totalDamage /= 10000;
if ( Core.ML )
{
totalDamage += damage * direct / 100;
if ( quiver != null )
totalDamage += totalDamage * quiver.DamageIncrease / 100;
}
if( totalDamage < 1 )
totalDamage = 1;
}
else if( Core.ML && m is PlayerMobile && from is PlayerMobile )
{
if ( quiver != null )
damage += damage * quiver.DamageIncrease / 100;
totalDamage = Math.Min( damage, 35 ); //Direct Damage cap of 35
}
else
{
totalDamage = damage;
if ( Core.ML && quiver != null )
totalDamage += totalDamage * quiver.DamageIncrease / 100;
}
#region Dragon Barding
@ -264,6 +297,13 @@ namespace Server
if( attrs != null )
value += attrs[attribute];
}
else if( obj is BaseQuiver )
{
AosAttributes attrs = ((BaseQuiver)obj).Attributes;
if( attrs != null )
value += attrs[attribute];
}
}
return value;
@ -280,6 +320,40 @@ namespace Server
return "...";
}
public void AddStatBonuses( Mobile to )
{
int strBonus = BonusStr;
int dexBonus = BonusDex;
int intBonus = BonusInt;
if ( strBonus != 0 || dexBonus != 0 || intBonus != 0 )
{
string modName = Owner.Serial.ToString();
if ( strBonus != 0 )
to.AddStatMod( new StatMod( StatType.Str, modName + "Str", strBonus, TimeSpan.Zero ) );
if ( dexBonus != 0 )
to.AddStatMod( new StatMod( StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero ) );
if ( intBonus != 0 )
to.AddStatMod( new StatMod( StatType.Int, modName + "Int", intBonus, TimeSpan.Zero ) );
}
to.CheckStatTimers();
}
public void RemoveStatBonuses( Mobile from )
{
string modName = Owner.Serial.ToString();
from.RemoveStatMod( modName + "Str" );
from.RemoveStatMod( modName + "Dex" );
from.RemoveStatMod( modName + "Int" );
from.CheckStatTimers();
}
[CommandProperty( AccessLevel.GameMaster )]
public int RegenHits { get { return this[AosAttribute.RegenHits]; } set { this[AosAttribute.RegenHits] = value; } }
@ -823,7 +897,9 @@ namespace Server
Fire=0x00000002,
Cold=0x00000004,
Poison=0x00000008,
Energy=0x00000010
Energy=0x00000010,
Chaos=0x00000020,
Direct=0x00000040
}
public sealed class AosElementAttributes : BaseAttributes
@ -868,6 +944,12 @@ namespace Server
[CommandProperty( AccessLevel.GameMaster )]
public int Energy { get { return this[AosElementAttribute.Energy]; } set { this[AosElementAttribute.Energy] = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int Chaos { get { return this[AosElementAttribute.Chaos]; } set { this[AosElementAttribute.Chaos] = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int Direct { get { return this[AosElementAttribute.Direct]; } set { this[AosElementAttribute.Direct] = value; } }
}
[PropertyObject]

View file

@ -60,13 +60,6 @@ namespace Server.Misc
if ( (from is BaseCreature && ((BaseCreature)from).IsParagon) || from is Leviathan )
points += 40;
if ( CheckTransform( from, typeof( HorrificBeastSpell ) ) )
points += 20;
if ( CheckAnimal( from, typeof( Dog ) ) || CheckAnimal( from, typeof( Cat ) ) )
points += from.Skills[SkillName.Ninjitsu].Fixed / 300;
//TODO: What's the new increased rate?
if( Core.ML && from.Race == Race.Human ) //Is this affected by the cap?
points += 2;
@ -74,7 +67,13 @@ namespace Server.Misc
points = 0;
if( Core.ML && from is PlayerMobile ) //does racial bonus go before/after?
points = Math.Min ( points, 18 );
points = Math.Min( points, 18 );
if ( CheckTransform( from, typeof( HorrificBeastSpell ) ) )
points += 20;
if ( CheckAnimal( from, typeof( Dog ) ) || CheckAnimal( from, typeof( Cat ) ) )
points += from.Skills[SkillName.Ninjitsu].Fixed / 30;
return TimeSpan.FromSeconds( 1.0 / (0.1 * (1 + points)) );
}

View file

@ -52,6 +52,8 @@ namespace Server.Items
private int m_WeaponColdDamage;
private int m_WeaponPoisonDamage;
private int m_WeaponEnergyDamage;
private int m_WeaponChaosDamage;
private int m_WeaponDirectDamage;
private int m_WeaponDurability;
private int m_WeaponLuck;
private int m_WeaponGoldIncrease;
@ -76,6 +78,8 @@ namespace Server.Items
public int WeaponColdDamage{ get{ return m_WeaponColdDamage; } set{ m_WeaponColdDamage = value; } }
public int WeaponPoisonDamage{ get{ return m_WeaponPoisonDamage; } set{ m_WeaponPoisonDamage = value; } }
public int WeaponEnergyDamage{ get{ return m_WeaponEnergyDamage; } set{ m_WeaponEnergyDamage = value; } }
public int WeaponChaosDamage{ get{ return m_WeaponChaosDamage; } set{ m_WeaponChaosDamage = value; } }
public int WeaponDirectDamage{ get{ return m_WeaponDirectDamage; } set{ m_WeaponDirectDamage = value; } }
public int WeaponDurability{ get{ return m_WeaponDurability; } set{ m_WeaponDurability = value; } }
public int WeaponLuck{ get{ return m_WeaponLuck; } set{ m_WeaponLuck = value; } }
public int WeaponGoldIncrease{ get{ return m_WeaponGoldIncrease; } set{ m_WeaponGoldIncrease = value; } }

View file

@ -231,6 +231,8 @@ namespace Server.Mobiles
private int m_ColdResistance, m_ColdDamage;
private int m_PoisonResistance, m_PoisonDamage;
private int m_EnergyResistance, m_EnergyDamage;
private int m_ChaosDamage;
private int m_DirectDamage;
private List<Mobile> m_Owners;
private List<Mobile> m_Friends;
@ -373,6 +375,12 @@ namespace Server.Mobiles
[CommandProperty( AccessLevel.GameMaster )]
public int EnergyDamage{ get{ return m_EnergyDamage; } set{ m_EnergyDamage = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int ChaosDamage{ get{ return m_ChaosDamage; } set{ m_ChaosDamage = value; } }
[CommandProperty( AccessLevel.GameMaster )]
public int DirectDamage{ get{ return m_DirectDamage; } set{ m_DirectDamage = value; } }
#endregion
[CommandProperty( AccessLevel.GameMaster )]
@ -4540,6 +4548,22 @@ namespace Server.Mobiles
return true;
}
private static Type[] m_MinorArtifactsMl = new Type[]
{
typeof( AegisOfGrace ), typeof( BladeDance ), typeof( Bonesmasher ),
typeof( Boomstick ), typeof( FeyLeggings ), typeof( FleshRipper ),
typeof( HelmOfSwiftness ), typeof( PadsOfTheCuSidhe ), typeof( QuiverOfRage ),
typeof( QuiverOfElements ), typeof( RaedsGlory ), typeof( RighteousAnger ),
typeof( RobeOfTheEclipse ), typeof( RobeOfTheEquinox ), typeof( SoulSeeker ),
typeof( TalonBite ), typeof( WildfireBow ), typeof( Windsong ),
// TODO: Brightsight lenses, Bloodwood spirit, Totem of the void
};
public static Type[] MinorArtifactsMl
{
get { return m_MinorArtifactsMl; }
}
private static bool EnableRummaging = true;
private const double ChanceToRummage = 0.5; // 50%

View file

@ -100,6 +100,7 @@ namespace Server.Mobiles
private PlayerFlag m_Flags;
private int m_StepsTaken;
private int m_Profession;
private bool m_IsStealthing; // IsStealthing should be moved to Server.Mobiles
private DateTime m_LastOnline;
private Server.Guilds.RankDefinition m_GuildRank;
@ -161,6 +162,13 @@ namespace Server.Mobiles
set{ m_StepsTaken = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public bool IsStealthing // IsStealthing should be moved to Server.Mobiles
{
get { return m_IsStealthing; }
set { m_IsStealthing = value; }
}
[CommandProperty( AccessLevel.GameMaster )]
public NpcGuild NpcGuild
{
@ -883,6 +891,8 @@ namespace Server.Mobiles
Spells.Sixth.InvisibilitySpell.RemoveTimer( this );
base.RevealingAction();
m_IsStealthing = false; // IsStealthing should be moved to Server.Mobiles
}
[CommandProperty( AccessLevel.GameMaster )]

View file

@ -1,5 +1,6 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.SkillHandlers
{
@ -87,6 +88,8 @@ namespace Server.SkillHandlers
steps = 1;
m.AllowedStealthSteps = steps;
PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
pm.IsStealthing = true;
m.SendLocalizedMessage( 502730 ); // You begin to move quietly.

View file

@ -33,6 +33,7 @@ namespace Server.Spells.Necromancy
m.FixedParticles( 0x3728, 1, 13, 9918, 92, 3, EffectLayer.Head );
m.Delta( MobileDelta.WeaponDamage );
m.CheckStatTimers();
}
public override void RemoveEffect( Mobile m )

View file

@ -207,6 +207,7 @@ namespace Server.Spells.Ninjitsu
timer.Start();
AddContext( m, new AnimalFormContext( timer, mod, entry.SpeedBoost, entry.Type ) );
m.CheckStatTimers();
return MorphResult.Success;
}

View file

@ -28,7 +28,8 @@ namespace Server.Spells.Ninjitsu
public override bool CheckCast()
{
if ( !Caster.Hidden || Caster.AllowedStealthSteps <= 0 )
PlayerMobile pm = Caster as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
if ( !pm.IsStealthing )
{
Caster.SendLocalizedMessage( 1063087 ); // You must be in stealth mode to use this ability.
return false;
@ -54,8 +55,10 @@ namespace Server.Spells.Ninjitsu
Map map = Caster.Map;
SpellHelper.GetSurfaceTop( ref p );
PlayerMobile pm = Caster as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
if ( !Caster.Hidden || Caster.AllowedStealthSteps <= 0 )
if ( !pm.IsStealthing )
{
Caster.SendLocalizedMessage( 1063087 ); // You must be in stealth mode to use this ability.
}
@ -94,6 +97,8 @@ namespace Server.Spells.Ninjitsu
Effects.SendLocationParticles( EffectItem.Create( from, m.Map, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
m.PlaySound( 0x512 );
Server.SkillHandlers.Stealth.OnUse( m ); // stealth check after the a jump
}
FinishSequence();
@ -119,8 +124,6 @@ namespace Server.Spells.Ninjitsu
protected override void OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
Server.SkillHandlers.Stealth.OnUse( from );
}
}
}

View file

@ -42,7 +42,7 @@ namespace Server.Spells.Third
m.FixedParticles( 0x373A, 10, 15, 5018, EffectLayer.Waist );
m.PlaySound( 0x1EA );
int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, true) * 100);
int percentage = (int)(SpellHelper.GetOffsetScalar(Caster, m, false) * 100);
TimeSpan length = SpellHelper.GetDuration(Caster, m);
string args = String.Format("{0}\t{1}\t{2}", percentage, percentage, percentage);