This commit is contained in:
mark 2009-08-09 07:18:50 +00:00
parent 57b345a480
commit 68d742d262
28 changed files with 432 additions and 193 deletions

View file

@ -4,7 +4,7 @@ using Server.Engines.Harvest;
namespace Server.Items
{
public class GargoylesPickaxe : BaseAxe
public class GargoylesPickaxe : BaseAxe, IUsesRemaining
{
public override int LabelNumber{ get{ return 1041281; } } // a gargoyle's pickaxe
public override HarvestSystem HarvestSystem{ get{ return Mining.System; } }

View file

@ -4,7 +4,7 @@ using Server.Engines.Harvest;
namespace Server.Items
{
public class SturdyPickaxe : BaseAxe
public class SturdyPickaxe : BaseAxe, IUsesRemaining
{
public override int LabelNumber{ get{ return 1045126; } } // sturdy pickaxe
public override HarvestSystem HarvestSystem{ get{ return Mining.System; } }

View file

@ -4,7 +4,7 @@ using Server.Items;
namespace Server.Items
{
[FlipableAttribute( 0x1bdd, 0x1be0 )]
public class Log : Item, ICommodity
public class Log : Item, ICommodity, IAxe
{
private CraftResource m_Resource;
@ -31,7 +31,7 @@ namespace Server.Items
}
[Constructable]
public Log( int amount ) : this( CraftResource.RegularWood )
public Log( int amount ) : this( CraftResource.RegularWood, amount )
{
}
@ -40,7 +40,6 @@ namespace Server.Items
: this( resource, 1 )
{
}
[Constructable]
public Log( CraftResource resource, int amount )
: base( 0x1BDD )
@ -67,7 +66,6 @@ namespace Server.Items
list.Add( CraftResources.GetName( m_Resource ) );
}
}
public Log( Serial serial ) : base( serial )
{
}
@ -99,38 +97,63 @@ namespace Server.Items
if ( version == 0 )
m_Resource = CraftResource.RegularWood;
}
}
public virtual bool TryCreateBoards( Mobile from, double skill, Item item )
{
if ( Deleted || !from.CanSee( this ) )
return false;
else if ( from.Skills.Carpentry.Value < skill &&
from.Skills.Lumberjacking.Value < skill )
{
from.SendLocalizedMessage( 1072652 ); // You cannot work this strange and unusual wood.
return false;
}
base.ScissorHelper( from, item, 1, false );
return true;
}
public virtual bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 0, new Board() ) )
return false;
return true;
}
}
public class HeartwoodLog : Log
{
[Constructable]
public HeartwoodLog() : this( 1 )
{
}
[Constructable]
public HeartwoodLog( int amount )
: base( CraftResource.Heartwood, amount )
{
}
public HeartwoodLog( 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 override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new HeartwoodBoard() ) )
return false;
return true;
}
}
public class BloodwoodLog : Log
@ -140,31 +163,35 @@ namespace Server.Items
: this( 1 )
{
}
[Constructable]
public BloodwoodLog( int amount )
: base( CraftResource.Bloodwood, amount )
{
}
public BloodwoodLog( 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 override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new BloodwoodBoard() ) )
return false;
return true;
}
}
public class FrostwoodLog : Log
@ -199,6 +226,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 100, new FrostwoodBoard() ) )
return false;
return true;
}
}
public class OakLog : Log
@ -233,6 +268,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 65, new OakBoard() ) )
return false;
return true;
}
}
public class AshLog : Log
@ -267,6 +310,14 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 80, new AshBoard() ) )
return false;
return true;
}
}
public class YewLog : Log
@ -301,5 +352,13 @@ namespace Server.Items
int version = reader.ReadInt();
}
public override bool Axe( Mobile from, BaseAxe axe )
{
if ( !TryCreateBoards( from , 95, new YewBoard() ) )
return false;
return true;
}
}
}

View file

@ -257,7 +257,7 @@ namespace Server.Items
- Summoning Undead
*/
double val = (targ.Hits * 1.6) + targ.Stam + targ.Mana;
double val = (targ.HitsMax * 1.6) + targ.StamMax + targ.ManaMax;
val += targ.SkillsTotal / 10;