This commit is contained in:
parent
4ee6ca5951
commit
06e5c8b732
70 changed files with 2798 additions and 286 deletions
|
|
@ -6,6 +6,24 @@ namespace Server.Mobiles
|
|||
[CorpseName( "a cow corpse" )]
|
||||
public class Cow : BaseCreature
|
||||
{
|
||||
private DateTime m_MilkedOn;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime MilkedOn
|
||||
{
|
||||
get { return m_MilkedOn; }
|
||||
set { m_MilkedOn = value; }
|
||||
}
|
||||
|
||||
private int m_Milk;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Milk
|
||||
{
|
||||
get { return m_Milk; }
|
||||
set { m_Milk = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cow() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
|
|
@ -69,22 +87,53 @@ namespace Server.Mobiles
|
|||
Animate( 8, 0, 3, true, false, 0 );
|
||||
}
|
||||
|
||||
public Cow(Serial serial) : base(serial)
|
||||
public bool TryMilk( Mobile from )
|
||||
{
|
||||
if ( !from.InLOS( this ) || !from.InRange( Location, 2 ) )
|
||||
from.SendLocalizedMessage( 1080400 ); // You can not milk the cow from this location.
|
||||
if ( Controlled && ControlMaster != from )
|
||||
from.SendLocalizedMessage( 1071182 ); // The cow nimbly escapes your attempts to milk it.
|
||||
if ( m_Milk == 0 && m_MilkedOn + TimeSpan.FromDays( 1 ) > DateTime.Now )
|
||||
from.SendLocalizedMessage( 1080198 ); // This cow can not be milked now. Please wait for some time.
|
||||
else
|
||||
{
|
||||
if ( m_Milk == 0 )
|
||||
m_Milk = 4;
|
||||
|
||||
m_MilkedOn = DateTime.Now;
|
||||
m_Milk--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Cow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize(writer);
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write((int) 0);
|
||||
writer.Write( (int) 1 );
|
||||
|
||||
writer.Write( (DateTime) m_MilkedOn );
|
||||
writer.Write( (int) m_Milk );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version > 0 )
|
||||
{
|
||||
m_MilkedOn = reader.ReadDateTime();
|
||||
m_Milk = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -123,9 +123,9 @@ namespace Server.Mobiles
|
|||
|
||||
public virtual bool Validate( Mobile from )
|
||||
{
|
||||
if( !IsChildOf( from.Backpack ) )
|
||||
if( Parent == null )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
from.SayTo( from,1010095 ); // This must be on your person to use.
|
||||
return false;
|
||||
}
|
||||
else if( m_IsRewardItem && !Engines.VeteranRewards.RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
|
|
|
|||
|
|
@ -110,6 +110,9 @@ namespace Server.Mobiles
|
|||
|
||||
if( Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ namespace Server.Mobiles
|
|||
[CorpseName( "a horde minion corpse" )]
|
||||
public class HordeMinionFamiliar : BaseFamiliar
|
||||
{
|
||||
public override bool DisplayWeight{ get { return true; } }
|
||||
|
||||
public HordeMinionFamiliar()
|
||||
{
|
||||
Name = "a horde minion";
|
||||
|
|
@ -47,6 +49,7 @@ namespace Server.Mobiles
|
|||
|
||||
pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
pack.Weight = 13.0;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ namespace Server.Mobiles
|
|||
public virtual void OfferResurrection( Mobile m )
|
||||
{
|
||||
Direction = GetDirectionTo( m );
|
||||
Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
|
||||
m.PlaySound( 0x214 );
|
||||
m.FixedEffect( 0x376A, 10, 16 );
|
||||
|
|
|
|||
|
|
@ -40,6 +40,12 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( Core.AOS && m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,12 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool CheckResurrect( Mobile m )
|
||||
{
|
||||
if ( Core.AOS && m.Criminal )
|
||||
{
|
||||
Say( 501222 ); // Thou art a criminal. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ namespace Server.Mobiles
|
|||
Say( 501223 ); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
else if ( m.Karma < 0 )
|
||||
{
|
||||
Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,10 @@ namespace Server.Mobiles
|
|||
Say( 501223 ); // Thou'rt not a decent and good person. I shall not resurrect thee.
|
||||
return false;
|
||||
}
|
||||
else if ( m.Karma < 0 )
|
||||
{
|
||||
Say( 501224 ); // Thou hast strayed from the path of virtue, but thou still deservest a second chance.
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ namespace Server.Mobiles
|
|||
PackItem( new Bone( 3 ) );
|
||||
PackItem( new FertileDirt( Utility.RandomMinMax( 1, 5 ) ) );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(2) );
|
||||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: PackItem( new DullCopperOre( Utility.RandomMinMax( 1, 10 ) ) ); break;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ namespace Server.Mobiles
|
|||
Karma = -4000;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ namespace Server.Mobiles
|
|||
Karma = -11500;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(1) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a cyclops corpse" )]
|
||||
[CorpseName( "a cyclopean corpse" )]
|
||||
public class Cyclops : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Cyclops() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a cyclops";
|
||||
Name = "a cyclopean warrior";
|
||||
Body = 75;
|
||||
BaseSoundID = 604;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ namespace Server.Mobiles
|
|||
|
||||
VirtualArmor = 50;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(2) );
|
||||
|
||||
PackItem( new Garlic( 5 ) );
|
||||
PackItem( new Bandage( 10 ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Server.Mobiles
|
|||
[Constructable]
|
||||
public RestlessSoul() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8 )
|
||||
{
|
||||
Name = "a restless soul";
|
||||
Name = "restless soul";
|
||||
Body = 0x3CA;
|
||||
Hue = 0x453;
|
||||
|
||||
|
|
@ -71,12 +71,12 @@ namespace Server.Mobiles
|
|||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1BF;
|
||||
return 0x107;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x107;
|
||||
return 0x1BF;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
|
|
|
|||
|
|
@ -64,6 +64,9 @@ namespace Server.Mobiles
|
|||
|
||||
PackItem( new ArcaneGem() );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
|
||||
|
||||
m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds( Utility.RandomMinMax( 2, 5 ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,6 +56,9 @@ namespace Server.Mobiles
|
|||
Karma = 5000;
|
||||
|
||||
VirtualArmor = 28; // Don't know what it should be
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(1) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ namespace Server.Mobiles
|
|||
public override bool AutoDispel{ get{ return !Controlled; } }
|
||||
public override int TreasureMapLevel{ get{ return 5; } }
|
||||
public override int Meat{ get{ return 19; } }
|
||||
public override int Hides{ get{ return 20; } }
|
||||
public override int Hides{ get{ return 30; } }
|
||||
public override HideType HideType{ get{ return HideType.Barbed; } }
|
||||
public override int Scales{ get{ return 7; } }
|
||||
public override ScaleType ScaleType{ get{ return ( Body == 12 ? ScaleType.Yellow : ScaleType.Red ); } }
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ namespace Server.Mobiles
|
|||
|
||||
VirtualArmor = 40;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
|
||||
|
||||
AddItem( new LightSource() );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ namespace Server.Mobiles
|
|||
|
||||
VirtualArmor = 30;
|
||||
PackArmor( 1, 5 );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
|
|||
|
|
@ -42,6 +42,9 @@ namespace Server.Mobiles
|
|||
Karma = 15000;
|
||||
|
||||
VirtualArmor = 36;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(2) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
|
|
|
|||
|
|
@ -60,6 +60,96 @@ namespace Server.Mobiles
|
|||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Barbed; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish; } }
|
||||
public override bool ShowFameTitle{ get{ return false; } }
|
||||
public override bool ClickTitle{ get{ return false; } }
|
||||
public override bool PropertyTitle{ get{ return false; } }
|
||||
|
||||
public override void OnCombatantChange()
|
||||
{
|
||||
if ( Combatant == null && !IsBodyMod && !Controlled && m_DisguiseTimer == null && Utility.RandomBool() )
|
||||
m_DisguiseTimer = Timer.DelayCall( TimeSpan.FromSeconds( Utility.RandomMinMax( 15, 30 ) ), new TimerCallback( Disguise ) );
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
RemoveDisguise();
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
#region Disguise
|
||||
private Timer m_DisguiseTimer;
|
||||
|
||||
public void Disguise()
|
||||
{
|
||||
if ( Combatant != null || IsBodyMod || Controlled )
|
||||
return;
|
||||
|
||||
FixedEffect( 0x376A, 8, 32 );
|
||||
PlaySound( 0x1FE );
|
||||
|
||||
Female = Utility.RandomBool();
|
||||
|
||||
if ( Female )
|
||||
{
|
||||
BodyMod = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
}
|
||||
else
|
||||
{
|
||||
BodyMod = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
}
|
||||
|
||||
Title = "the mystic llama herder";
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
HairItemID = Race.Human.RandomHair( this );
|
||||
HairHue = Race.Human.RandomHairHue();
|
||||
FacialHairItemID = Race.Human.RandomFacialHair( this );
|
||||
FacialHairHue = HairHue;
|
||||
|
||||
switch ( Utility.Random( 4 ) )
|
||||
{
|
||||
case 0: AddItem( new Shoes( Utility.RandomNeutralHue() ) ); break;
|
||||
case 1: AddItem( new Boots( Utility.RandomNeutralHue() ) ); break;
|
||||
case 2: AddItem( new Sandals( Utility.RandomNeutralHue() ) ); break;
|
||||
case 3: AddItem( new ThighBoots( Utility.RandomNeutralHue() ) ); break;
|
||||
}
|
||||
|
||||
AddItem( new Robe( Utility.RandomNondyedHue() ) );
|
||||
|
||||
m_DisguiseTimer = null;
|
||||
m_DisguiseTimer = Timer.DelayCall( TimeSpan.FromSeconds( 75 ), new TimerCallback( RemoveDisguise ) );
|
||||
}
|
||||
|
||||
public void RemoveDisguise()
|
||||
{
|
||||
if ( !IsBodyMod )
|
||||
return;
|
||||
|
||||
Name = "a bake kitsune";
|
||||
Title = null;
|
||||
BodyMod = 0;
|
||||
Hue = 0;
|
||||
HairItemID = 0;
|
||||
HairHue = 0;
|
||||
FacialHairItemID = 0;
|
||||
FacialHairHue = 0;
|
||||
|
||||
DeleteItemOnLayer( Layer.OuterTorso );
|
||||
DeleteItemOnLayer( Layer.Shoes );
|
||||
|
||||
m_DisguiseTimer = null;
|
||||
}
|
||||
|
||||
public void DeleteItemOnLayer( Layer layer )
|
||||
{
|
||||
Item item = FindItemOnLayer( layer );
|
||||
|
||||
if ( item != null )
|
||||
item.Delete();
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
|
|
@ -180,6 +270,8 @@ namespace Server.Mobiles
|
|||
SetResistance( ResistanceType.Poison, 40, 60 );
|
||||
SetResistance( ResistanceType.Energy, 40, 60 );
|
||||
}
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( RemoveDisguise ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,10 +51,10 @@ namespace Server.Mobiles
|
|||
case 2: PackItem( new Axle() ); break;
|
||||
}
|
||||
}
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
|
|
@ -126,11 +126,10 @@ namespace Server.Mobiles
|
|||
if ( m.Alive )
|
||||
{
|
||||
int damageGiven = AOS.Damage( m, from, 5, 0, 0, 0, 0, 100 );
|
||||
|
||||
from.Hits += damageGiven;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
EndLifeDrain( m );
|
||||
}
|
||||
}
|
||||
|
|
@ -165,7 +164,7 @@ namespace Server.Mobiles
|
|||
}
|
||||
if ( amt > 0 )
|
||||
{
|
||||
SpillAcid( target, amt, "slime" );
|
||||
SpillAcid( target, amt );
|
||||
from.SendLocalizedMessage( 1070820 );
|
||||
if ( Mana > 14)
|
||||
Mana -= 15;
|
||||
|
|
@ -175,6 +174,11 @@ namespace Server.Mobiles
|
|||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
public override Item NewHarmfulItem()
|
||||
{
|
||||
return new AcidSlime( TimeSpan.FromSeconds(10), 5, 10 );
|
||||
}
|
||||
|
||||
public Kappa( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ namespace Server.Mobiles
|
|||
Fame = 8500;
|
||||
Karma = -8500;
|
||||
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(1) );
|
||||
|
||||
switch( Utility.Random( 10 ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -297,7 +297,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
Container bank = from.FindBankNoCreate();
|
||||
|
||||
if ( bank != null && bank.ConsumeTotal( typeof( Gold ), 30 ) )
|
||||
if ( ( from.Backpack != null && from.Backpack.ConsumeTotal( typeof( Gold ), 30 ) ) || ( bank != null && bank.ConsumeTotal( typeof( Gold ), 30 ) ) )
|
||||
{
|
||||
pet.ControlTarget = null;
|
||||
pet.ControlOrder = OrderType.Stay;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue