Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -1,80 +1,81 @@
using System;
using Server.Misc;
using Server.Ethics;
using Server.Items;
using Server.Misc;
namespace Server.Mobiles
{
public class DarkWisp : BaseCreature
{
public override string CorpseName => "a wisp corpse";
public override InhumanSpeech SpeechType => InhumanSpeech.Wisp;
public class DarkWisp : BaseCreature
{
[Constructible]
public DarkWisp() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Body = 165;
BaseSoundID = 466;
public override Ethics.Ethic EthicAllegiance => Ethics.Ethic.Evil;
SetStr(196, 225);
SetDex(196, 225);
SetInt(196, 225);
public override TimeSpan ReacquireDelay => TimeSpan.FromSeconds( 1.0 );
SetHits(118, 135);
public override string DefaultName => "a wisp";
SetDamage(17, 18);
[Constructible]
public DarkWisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Body = 165;
BaseSoundID = 466;
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Energy, 50);
SetStr( 196, 225 );
SetDex( 196, 225 );
SetInt( 196, 225 );
SetResistance(ResistanceType.Physical, 35, 45);
SetResistance(ResistanceType.Fire, 20, 40);
SetResistance(ResistanceType.Cold, 10, 30);
SetResistance(ResistanceType.Poison, 5, 10);
SetResistance(ResistanceType.Energy, 50, 70);
SetHits( 118, 135 );
SetSkill(SkillName.EvalInt, 80.0);
SetSkill(SkillName.Magery, 80.0);
SetSkill(SkillName.MagicResist, 80.0);
SetSkill(SkillName.Tactics, 80.0);
SetSkill(SkillName.Wrestling, 80.0);
SetDamage( 17, 18 );
Fame = 4000;
Karma = -4000;
SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Energy, 50 );
VirtualArmor = 40;
SetResistance( ResistanceType.Physical, 35, 45 );
SetResistance( ResistanceType.Fire, 20, 40 );
SetResistance( ResistanceType.Cold, 10, 30 );
SetResistance( ResistanceType.Poison, 5, 10 );
SetResistance( ResistanceType.Energy, 50, 70 );
AddItem(new LightSource());
}
SetSkill( SkillName.EvalInt, 80.0 );
SetSkill( SkillName.Magery, 80.0 );
SetSkill( SkillName.MagicResist, 80.0 );
SetSkill( SkillName.Tactics, 80.0 );
SetSkill( SkillName.Wrestling, 80.0 );
public DarkWisp(Serial serial)
: base(serial)
{
}
Fame = 4000;
Karma = -4000;
public override string CorpseName => "a wisp corpse";
public override InhumanSpeech SpeechType => InhumanSpeech.Wisp;
VirtualArmor = 40;
public override Ethic EthicAllegiance => Ethic.Evil;
AddItem( new LightSource() );
}
public override TimeSpan ReacquireDelay => TimeSpan.FromSeconds(1.0);
public override void GenerateLoot()
{
AddLoot( LootPack.Rich );
AddLoot( LootPack.Average );
}
public override string DefaultName => "a wisp";
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public DarkWisp( Serial serial )
: base( serial )
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -3,141 +3,139 @@ using Server.Gumps;
namespace Server.Mobiles
{
public class EtherealWarrior : BaseCreature
{
public override string CorpseName => "an ethereal warrior corpse";
public override bool InitialInnocent => true;
public class EtherealWarrior : BaseCreature
{
private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds(2.0);
[Constructible]
public EtherealWarrior() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName( "ethereal warrior" );
Body = 123;
private DateTime m_NextResurrect;
SetStr( 586, 785 );
SetDex( 177, 255 );
SetInt( 351, 450 );
[Constructible]
public EtherealWarrior() : base(AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("ethereal warrior");
Body = 123;
SetHits( 352, 471 );
SetStr(586, 785);
SetDex(177, 255);
SetInt(351, 450);
SetDamage( 13, 19 );
SetHits(352, 471);
SetDamageType( ResistanceType.Physical, 100 );
SetDamage(13, 19);
SetResistance( ResistanceType.Physical, 80, 90 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 40, 50 );
SetResistance( ResistanceType.Poison, 40, 50 );
SetResistance( ResistanceType.Energy, 40, 50 );
SetDamageType(ResistanceType.Physical, 100);
SetSkill( SkillName.Anatomy, 50.1, 75.0 );
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Magery, 99.1, 100.0 );
SetSkill( SkillName.Meditation, 90.1, 100.0 );
SetSkill( SkillName.MagicResist, 90.1, 100.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 40, 50);
Fame = 7000;
Karma = 7000;
SetSkill(SkillName.Anatomy, 50.1, 75.0);
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Magery, 99.1, 100.0);
SetSkill(SkillName.Meditation, 90.1, 100.0);
SetSkill(SkillName.MagicResist, 90.1, 100.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 97.6, 100.0);
VirtualArmor = 120;
}
Fame = 7000;
Karma = 7000;
public override int TreasureMapLevel => Core.AOS ? 5 : 0;
VirtualArmor = 120;
}
public override void GenerateLoot()
{
AddLoot( LootPack.Rich, 3 );
AddLoot( LootPack.Gems );
}
public EtherealWarrior(Serial serial) : base(serial)
{
}
private DateTime m_NextResurrect;
private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds(2.0);
public override string CorpseName => "an ethereal warrior corpse";
public override bool InitialInnocent => true;
public override void OnMovement(Mobile from, Point3D oldLocation)
{
if (!from.Alive && (from is PlayerMobile))
{
if (!from.Frozen && (DateTime.UtcNow >= m_NextResurrect) && InRange(from, 4) && !InRange(oldLocation, 4) && InLOS(from))
{
m_NextResurrect = DateTime.UtcNow + ResurrectDelay;
if (!from.Criminal && (from.Kills < 5) && (from.Karma > 0))
{
if (from.Map != null && from.Map.CanFit(from.Location, 16, false, false))
{
Direction = GetDirectionTo(from);
from.PlaySound(0x1F2);
from.FixedEffect(0x376A, 10, 16);
from.CloseGump(typeof(ResurrectGump));
from.SendGump(new ResurrectGump(from, ResurrectMessage.Healer));
}
}
}
}
}
public override int TreasureMapLevel => Core.AOS ? 5 : 0;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override int Feathers => 100;
public override int Feathers => 100;
public override int GetAngerSound()
{
return 0x2F8;
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich, 3);
AddLoot(LootPack.Gems);
}
public override int GetIdleSound()
{
return 0x2F8;
}
public override void OnMovement(Mobile from, Point3D oldLocation)
{
if (!from.Alive && from is PlayerMobile)
if (!from.Frozen && DateTime.UtcNow >= m_NextResurrect && InRange(from, 4) && !InRange(oldLocation, 4) &&
InLOS(from))
{
m_NextResurrect = DateTime.UtcNow + ResurrectDelay;
if (!from.Criminal && from.Kills < 5 && from.Karma > 0)
if (from.Map != null && from.Map.CanFit(from.Location, 16, false, false))
{
Direction = GetDirectionTo(from);
from.PlaySound(0x1F2);
from.FixedEffect(0x376A, 10, 16);
from.CloseGump(typeof(ResurrectGump));
from.SendGump(new ResurrectGump(from, ResurrectMessage.Healer));
}
}
}
public override int GetAttackSound()
{
return Utility.Random( 0x2F5, 2 );
}
public override int GetAngerSound()
{
return 0x2F8;
}
public override int GetHurtSound()
{
return 0x2F9;
}
public override int GetIdleSound()
{
return 0x2F8;
}
public override int GetDeathSound()
{
return 0x2F7;
}
public override int GetAttackSound()
{
return Utility.Random(0x2F5, 2);
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
public override int GetHurtSound()
{
return 0x2F9;
}
defender.Damage( Utility.Random( 10, 10 ), this );
defender.Stam -= Utility.Random( 10, 10 );
defender.Mana -= Utility.Random( 10, 10 );
}
public override int GetDeathSound()
{
return 0x2F7;
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
public override void OnGaveMeleeAttack(Mobile defender)
{
base.OnGaveMeleeAttack(defender);
attacker.Damage( Utility.Random( 10, 10 ), this );
attacker.Stam -= Utility.Random( 10, 10 );
attacker.Mana -= Utility.Random( 10, 10 );
}
defender.Damage(Utility.Random(10, 10), this);
defender.Stam -= Utility.Random(10, 10);
defender.Mana -= Utility.Random(10, 10);
}
public EtherealWarrior( Serial serial ) : base( serial )
{
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
attacker.Damage(Utility.Random(10, 10), this);
attacker.Stam -= Utility.Random(10, 10);
attacker.Mana -= Utility.Random(10, 10);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -2,84 +2,84 @@ using Server.Items;
namespace Server.Mobiles
{
public class Pixie : BaseCreature
{
public override string CorpseName => "a pixie corpse";
public override bool InitialInnocent => true;
public class Pixie : BaseCreature
{
[Constructible]
public Pixie() : base(AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("pixie");
Body = 128;
BaseSoundID = 0x467;
[Constructible]
public Pixie() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName( "pixie" );
Body = 128;
BaseSoundID = 0x467;
SetStr(21, 30);
SetDex(301, 400);
SetInt(201, 250);
SetStr( 21, 30 );
SetDex( 301, 400 );
SetInt( 201, 250 );
SetHits(13, 18);
SetHits( 13, 18 );
SetDamage(9, 15);
SetDamage( 9, 15 );
SetDamageType(ResistanceType.Physical, 100);
SetDamageType( ResistanceType.Physical, 100 );
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 40, 50);
SetResistance( ResistanceType.Physical, 80, 90 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 40, 50 );
SetResistance( ResistanceType.Poison, 40, 50 );
SetResistance( ResistanceType.Energy, 40, 50 );
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Magery, 90.1, 100.0);
SetSkill(SkillName.Meditation, 90.1, 100.0);
SetSkill(SkillName.MagicResist, 100.5, 150.0);
SetSkill(SkillName.Tactics, 10.1, 20.0);
SetSkill(SkillName.Wrestling, 10.1, 12.5);
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Magery, 90.1, 100.0 );
SetSkill( SkillName.Meditation, 90.1, 100.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 10.1, 20.0 );
SetSkill( SkillName.Wrestling, 10.1, 12.5 );
Fame = 7000;
Karma = 7000;
Fame = 7000;
Karma = 7000;
VirtualArmor = 100;
if (0.02 > Utility.RandomDouble())
PackStatue();
}
VirtualArmor = 100;
if ( 0.02 > Utility.RandomDouble() )
PackStatue();
}
public Pixie(Serial serial) : base(serial)
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.LowScrolls );
AddLoot( LootPack.Gems, 2 );
}
public override string CorpseName => "a pixie corpse";
public override bool InitialInnocent => true;
public override void OnDeath( Container c )
{
base.OnDeath( c );
public override HideType HideType => HideType.Spined;
public override int Hides => 5;
public override int Meat => 1;
if ( Utility.RandomDouble() < 0.35 )
c.DropItem( new PixieLeg() );
}
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override HideType HideType => HideType.Spined;
public override int Hides => 5;
public override int Meat => 1;
public override void GenerateLoot()
{
AddLoot(LootPack.LowScrolls);
AddLoot(LootPack.Gems, 2);
}
public Pixie( Serial serial ) : base( serial )
{
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
if (Utility.RandomDouble() < 0.35)
c.DropItem(new PixieLeg());
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,76 +2,96 @@ using Server.Items;
namespace Server.Mobiles
{
public class ShadowWisp : BaseCreature
{
public override string CorpseName => "a wisp corpse";
public override string DefaultName => "a shadow wisp";
public class ShadowWisp : BaseCreature
{
[Constructible]
public ShadowWisp() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.3, 0.6)
{
Body = 165;
BaseSoundID = 466;
[Constructible]
public ShadowWisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.3, 0.6 )
{
Body = 165;
BaseSoundID = 466;
SetStr(16, 40);
SetDex(16, 45);
SetInt(11, 25);
SetStr( 16, 40 );
SetDex( 16, 45 );
SetInt( 11, 25 );
SetHits(10, 24);
SetHits( 10, 24 );
SetDamage(5, 10);
SetDamage( 5, 10 );
SetDamageType(ResistanceType.Physical, 100);
SetDamageType( ResistanceType.Physical, 100 );
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Fire, 5, 10);
SetResistance(ResistanceType.Poison, 5, 10);
SetResistance(ResistanceType.Energy, 15, 20);
SetResistance( ResistanceType.Physical, 15, 20 );
SetResistance( ResistanceType.Fire, 5, 10 );
SetResistance( ResistanceType.Poison, 5, 10 );
SetResistance( ResistanceType.Energy, 15, 20 );
SetSkill(SkillName.EvalInt, 40.0);
SetSkill(SkillName.Magery, 50.0);
SetSkill(SkillName.Meditation, 40.0);
SetSkill(SkillName.MagicResist, 10.0);
SetSkill(SkillName.Tactics, 0.1, 15.0);
SetSkill(SkillName.Wrestling, 25.1, 40.0);
SetSkill( SkillName.EvalInt, 40.0 );
SetSkill( SkillName.Magery, 50.0 );
SetSkill( SkillName.Meditation, 40.0 );
SetSkill( SkillName.MagicResist, 10.0 );
SetSkill( SkillName.Tactics, 0.1, 15.0 );
SetSkill( SkillName.Wrestling, 25.1, 40.0 );
Fame = 500;
Fame = 500;
VirtualArmor = 18;
VirtualArmor = 18;
AddItem(new LightSource());
AddItem( new LightSource() );
switch (Utility.Random(10))
{
case 0:
PackItem(new LeftArm());
break;
case 1:
PackItem(new RightArm());
break;
case 2:
PackItem(new Torso());
break;
case 3:
PackItem(new Bone());
break;
case 4:
PackItem(new RibCage());
break;
case 5:
PackItem(new RibCage());
break;
case 6:
PackItem(new BonePile());
break;
case 7:
PackItem(new BonePile());
break;
case 8:
PackItem(new BonePile());
break;
case 9:
PackItem(new BonePile());
break;
}
}
switch ( Utility.Random( 10 ))
{
case 0: PackItem( new LeftArm() ); break;
case 1: PackItem( new RightArm() ); break;
case 2: PackItem( new Torso() ); break;
case 3: PackItem( new Bone() ); break;
case 4: PackItem( new RibCage() ); break;
case 5: PackItem( new RibCage() ); break;
case 6: PackItem( new BonePile() ); break;
case 7: PackItem( new BonePile() ); break;
case 8: PackItem( new BonePile() ); break;
case 9: PackItem( new BonePile() ); break;
}
}
public ShadowWisp(Serial serial) : base(serial)
{
}
public ShadowWisp( Serial serial ) : base( serial )
{
}
public override string CorpseName => "a wisp corpse";
public override string DefaultName => "a shadow wisp";
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -1,84 +1,86 @@
using System;
using Server.Misc;
using Server.Items;
using Server.Engines.Plants;
using Server.Ethics;
using Server.Factions;
using Server.Items;
using Server.Misc;
namespace Server.Mobiles
{
public class Wisp : BaseCreature
{
public override string CorpseName => "a wisp corpse";
public override InhumanSpeech SpeechType => InhumanSpeech.Wisp;
public class Wisp : BaseCreature
{
[Constructible]
public Wisp() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Body = 58;
BaseSoundID = 466;
public override Faction FactionAllegiance => CouncilOfMages.Instance;
public override Ethics.Ethic EthicAllegiance => Ethics.Ethic.Hero;
SetStr(196, 225);
SetDex(196, 225);
SetInt(196, 225);
public override TimeSpan ReacquireDelay => TimeSpan.FromSeconds( 1.0 );
SetHits(118, 135);
public override string DefaultName => "a wisp";
SetDamage(17, 18);
[Constructible]
public Wisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Body = 58;
BaseSoundID = 466;
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Energy, 50);
SetStr( 196, 225 );
SetDex( 196, 225 );
SetInt( 196, 225 );
SetResistance(ResistanceType.Physical, 35, 45);
SetResistance(ResistanceType.Fire, 20, 40);
SetResistance(ResistanceType.Cold, 10, 30);
SetResistance(ResistanceType.Poison, 5, 10);
SetResistance(ResistanceType.Energy, 50, 70);
SetHits( 118, 135 );
SetSkill(SkillName.EvalInt, 80.0);
SetSkill(SkillName.Magery, 80.0);
SetSkill(SkillName.MagicResist, 80.0);
SetSkill(SkillName.Tactics, 80.0);
SetSkill(SkillName.Wrestling, 80.0);
SetDamage( 17, 18 );
Fame = 4000;
Karma = 0;
SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Energy, 50 );
VirtualArmor = 40;
SetResistance( ResistanceType.Physical, 35, 45 );
SetResistance( ResistanceType.Fire, 20, 40 );
SetResistance( ResistanceType.Cold, 10, 30 );
SetResistance( ResistanceType.Poison, 5, 10 );
SetResistance( ResistanceType.Energy, 50, 70 );
if (Core.ML && Utility.RandomDouble() < .33)
PackItem(Seed.RandomPeculiarSeed(3));
SetSkill( SkillName.EvalInt, 80.0 );
SetSkill( SkillName.Magery, 80.0 );
SetSkill( SkillName.MagicResist, 80.0 );
SetSkill( SkillName.Tactics, 80.0 );
SetSkill( SkillName.Wrestling, 80.0 );
AddItem(new LightSource());
}
Fame = 4000;
Karma = 0;
public Wisp(Serial serial) : base(serial)
{
}
VirtualArmor = 40;
public override string CorpseName => "a wisp corpse";
public override InhumanSpeech SpeechType => InhumanSpeech.Wisp;
if ( Core.ML && Utility.RandomDouble() < .33 )
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
public override Faction FactionAllegiance => CouncilOfMages.Instance;
public override Ethic EthicAllegiance => Ethic.Hero;
AddItem( new LightSource() );
}
public override TimeSpan ReacquireDelay => TimeSpan.FromSeconds(1.0);
public override void GenerateLoot()
{
AddLoot( LootPack.Rich );
AddLoot( LootPack.Average );
}
public override string DefaultName => "a wisp";
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public Wisp( Serial serial ) : base( serial )
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -2,110 +2,110 @@
namespace Server.Mobiles
{
public class AnimatedWeapon : BaseCreature
{
public override string CorpseName => "an animated weapon corpse";
public override bool DeleteCorpseOnDeath => true;
public override bool IsHouseSummonable => true;
public class AnimatedWeapon : BaseCreature
{
[Constructible]
public AnimatedWeapon(Mobile caster, int level)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6)
{
Body = 692;
public override double DispelDifficulty => 0.0;
public override double DispelFocus => 20.0;
SetStr(10 + level);
SetDex(10 + level);
SetInt(10);
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return m.Str / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}
SetHits(20 + level * 3 / 2);
SetStam(10 + level);
SetMana(0);
public override string DefaultName => "an animated weapon";
if (level >= 120)
SetDamage(14, 18);
else if (level >= 105)
SetDamage(13, 17);
else if (level >= 90)
SetDamage(12, 15);
else if (level >= 75)
SetDamage(11, 14);
else if (level >= 60)
SetDamage(10, 12);
else if (level >= 45)
SetDamage(9, 11);
else if (level >= 30)
SetDamage(8, 9);
else
SetDamage(7, 8);
[Constructible]
public AnimatedWeapon( Mobile caster, int level )
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6 )
{
Body = 692;
SetDamageType(ResistanceType.Physical, 60);
SetDamageType(ResistanceType.Poison, 20);
SetDamageType(ResistanceType.Energy, 20);
SetStr( 10 + level );
SetDex( 10 + level );
SetInt( 10 );
SetResistance(ResistanceType.Physical, 40, 50);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 20, 30);
SetHits( 20 + ( level * 3 / 2 ) );
SetStam( 10 + level );
SetMana( 0 );
SetSkill(SkillName.MagicResist, level);
SetSkill(SkillName.Wrestling, level);
SetSkill(SkillName.Anatomy, caster.Skills[SkillName.Anatomy].Value / 2);
SetSkill(SkillName.Tactics, caster.Skills[SkillName.Tactics].Value / 2);
if ( level >= 120 )
SetDamage( 14, 18 );
else if ( level >= 105 )
SetDamage( 13, 17 );
else if ( level >= 90 )
SetDamage( 12, 15 );
else if ( level >= 75 )
SetDamage( 11, 14 );
else if ( level >= 60 )
SetDamage( 10, 12 );
else if ( level >= 45 )
SetDamage( 9, 11 );
else if ( level >= 30 )
SetDamage( 8, 9 );
else
SetDamage( 7, 8 );
Fame = 0;
Karma = 0;
SetDamageType( ResistanceType.Physical, 60 );
SetDamageType( ResistanceType.Poison, 20 );
SetDamageType( ResistanceType.Energy, 20 );
ControlSlots = 4;
}
SetResistance( ResistanceType.Physical, 40, 50 );
SetResistance( ResistanceType.Fire, 30, 40 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 20, 30 );
public AnimatedWeapon(Serial serial)
: base(serial)
{
}
SetSkill( SkillName.MagicResist, level );
SetSkill( SkillName.Wrestling, level );
SetSkill( SkillName.Anatomy, caster.Skills[SkillName.Anatomy].Value / 2 );
SetSkill( SkillName.Tactics, caster.Skills[SkillName.Tactics].Value / 2 );
public override string CorpseName => "an animated weapon corpse";
public override bool DeleteCorpseOnDeath => true;
public override bool IsHouseSummonable => true;
Fame = 0;
Karma = 0;
public override double DispelDifficulty => 0.0;
public override double DispelFocus => 20.0;
ControlSlots = 4;
}
public override string DefaultName => "an animated weapon";
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
public override int GetAngerSound()
{
return 0x23A;
}
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
{
return m.Str / Math.Max(GetDistanceToSqrt(m), 1.0);
}
public override int GetAttackSound()
{
return 0x3B8;
}
public override int GetAngerSound()
{
return 0x23A;
}
public override int GetHurtSound()
{
return 0x23A;
}
public override int GetAttackSound()
{
return 0x3B8;
}
public AnimatedWeapon( Serial serial )
: base( serial )
{
}
public override int GetHurtSound()
{
return 0x23A;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
/*int version = */
reader.ReadInt();
}
}
}
/*int version = */
reader.ReadInt();
}
}
}

View file

@ -3,120 +3,116 @@ using System.Collections;
namespace Server.Mobiles
{
public class BladeSpirits : BaseCreature
{
public override string CorpseName => "a blade spirit corpse";
public override bool DeleteCorpseOnDeath => Core.AOS;
public override bool IsHouseSummonable => true;
public class BladeSpirits : BaseCreature
{
[Constructible]
public BladeSpirits()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6)
{
Body = 574;
public override double DispelDifficulty => 0.0;
public override double DispelFocus => 20.0;
SetStr(150);
SetDex(150);
SetInt(100);
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return ( m.Str + m.Skills[SkillName.Tactics].Value ) / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}
SetHits(Core.SE ? 160 : 80);
SetStam(250);
SetMana(0);
public override string DefaultName => "a blade spirit";
SetDamage(10, 14);
[Constructible]
public BladeSpirits()
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6 )
{
Body = 574;
SetDamageType(ResistanceType.Physical, 60);
SetDamageType(ResistanceType.Poison, 20);
SetDamageType(ResistanceType.Energy, 20);
SetStr( 150 );
SetDex( 150 );
SetInt( 100 );
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 20, 30);
SetHits( ( Core.SE ) ? 160 : 80 );
SetStam( 250 );
SetMana( 0 );
SetSkill(SkillName.MagicResist, 70.0);
SetSkill(SkillName.Tactics, 90.0);
SetSkill(SkillName.Wrestling, 90.0);
SetDamage( 10, 14 );
Fame = 0;
Karma = 0;
SetDamageType( ResistanceType.Physical, 60 );
SetDamageType( ResistanceType.Poison, 20 );
SetDamageType( ResistanceType.Energy, 20 );
VirtualArmor = 40;
ControlSlots = Core.SE ? 2 : 1;
}
SetResistance( ResistanceType.Physical, 30, 40 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 100 );
SetResistance( ResistanceType.Energy, 20, 30 );
public BladeSpirits(Serial serial)
: base(serial)
{
}
SetSkill( SkillName.MagicResist, 70.0 );
SetSkill( SkillName.Tactics, 90.0 );
SetSkill( SkillName.Wrestling, 90.0 );
public override string CorpseName => "a blade spirit corpse";
public override bool DeleteCorpseOnDeath => Core.AOS;
public override bool IsHouseSummonable => true;
Fame = 0;
Karma = 0;
public override double DispelDifficulty => 0.0;
public override double DispelFocus => 20.0;
VirtualArmor = 40;
ControlSlots = ( Core.SE ) ? 2 : 1;
}
public override string DefaultName => "a blade spirit";
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
public override int GetAngerSound()
{
return 0x23A;
}
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
{
return (m.Str + m.Skills[SkillName.Tactics].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
}
public override int GetAttackSound()
{
return 0x3B8;
}
public override int GetAngerSound()
{
return 0x23A;
}
public override int GetHurtSound()
{
return 0x23A;
}
public override int GetAttackSound()
{
return 0x3B8;
}
public override void OnThink()
{
if ( Core.SE && Summoned )
{
ArrayList spirtsOrVortexes = new ArrayList();
public override int GetHurtSound()
{
return 0x23A;
}
foreach ( Mobile m in GetMobilesInRange( 5 ) )
{
if ( m is EnergyVortex || m is BladeSpirits )
{
if ( ( (BaseCreature) m ).Summoned )
spirtsOrVortexes.Add( m );
}
}
public override void OnThink()
{
if (Core.SE && Summoned)
{
ArrayList spirtsOrVortexes = new ArrayList();
while ( spirtsOrVortexes.Count > 6 )
{
int index = Utility.Random( spirtsOrVortexes.Count );
Dispel( ( (Mobile) spirtsOrVortexes[index] ) );
spirtsOrVortexes.RemoveAt( index );
}
}
foreach (Mobile m in GetMobilesInRange(5))
if (m is EnergyVortex || m is BladeSpirits)
if (((BaseCreature)m).Summoned)
spirtsOrVortexes.Add(m);
base.OnThink();
}
while (spirtsOrVortexes.Count > 6)
{
int index = Utility.Random(spirtsOrVortexes.Count);
Dispel((Mobile)spirtsOrVortexes[index]);
spirtsOrVortexes.RemoveAt(index);
}
}
public BladeSpirits( Serial serial )
: base( serial )
{
}
base.OnThink();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}

View file

@ -2,76 +2,78 @@ using Server.Items;
namespace Server.Mobiles
{
public class Centaur : BaseCreature
{
public override string CorpseName => "a centaur corpse";
[Constructible]
public Centaur() : base( AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName( "centaur" );
Body = 101;
BaseSoundID = 679;
public class Centaur : BaseCreature
{
[Constructible]
public Centaur() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("centaur");
Body = 101;
BaseSoundID = 679;
SetStr( 202, 300 );
SetDex( 104, 260 );
SetInt( 91, 100 );
SetStr(202, 300);
SetDex(104, 260);
SetInt(91, 100);
SetHits( 130, 172 );
SetHits(130, 172);
SetDamage( 13, 24 );
SetDamage(13, 24);
SetDamageType( ResistanceType.Physical, 100 );
SetDamageType(ResistanceType.Physical, 100);
SetResistance( ResistanceType.Physical, 45, 55 );
SetResistance( ResistanceType.Fire, 35, 45 );
SetResistance( ResistanceType.Cold, 25, 35 );
SetResistance( ResistanceType.Poison, 45, 55 );
SetResistance( ResistanceType.Energy, 35, 45 );
SetResistance(ResistanceType.Physical, 45, 55);
SetResistance(ResistanceType.Fire, 35, 45);
SetResistance(ResistanceType.Cold, 25, 35);
SetResistance(ResistanceType.Poison, 45, 55);
SetResistance(ResistanceType.Energy, 35, 45);
SetSkill( SkillName.Anatomy, 95.1, 115.0 );
SetSkill( SkillName.Archery, 95.1, 100.0 );
SetSkill( SkillName.MagicResist, 50.3, 80.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.Wrestling, 95.1, 100.0 );
SetSkill(SkillName.Anatomy, 95.1, 115.0);
SetSkill(SkillName.Archery, 95.1, 100.0);
SetSkill(SkillName.MagicResist, 50.3, 80.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 95.1, 100.0);
Fame = 6500;
Karma = 0;
Fame = 6500;
Karma = 0;
VirtualArmor = 50;
AddItem( new Bow() );
PackItem( new Arrow( Utility.RandomMinMax( 80, 90 ) ) ); // OSI it is different: in a sub backpack, this is probably just a limitation of their engine
}
VirtualArmor = 50;
AddItem(new Bow());
PackItem(new Arrow(Utility.RandomMinMax(80,
90))); // OSI it is different: in a sub backpack, this is probably just a limitation of their engine
}
public override void GenerateLoot()
{
AddLoot( LootPack.Rich );
AddLoot( LootPack.Average );
AddLoot( LootPack.Gems );
}
public Centaur(Serial serial) : base(serial)
{
}
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public override string CorpseName => "a centaur corpse";
public override int Meat => 1;
public override int Hides => 8;
public override HideType HideType => HideType.Spined;
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
public Centaur( Serial serial ) : base( serial )
{
}
public override int Meat => 1;
public override int Hides => 8;
public override HideType HideType => HideType.Spined;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
AddLoot(LootPack.Gems);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
if ( BaseSoundID == 678 )
BaseSoundID = 679;
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (BaseSoundID == 678)
BaseSoundID = 679;
}
}
}

View file

@ -3,128 +3,124 @@ using System.Collections;
namespace Server.Mobiles
{
public class EnergyVortex : BaseCreature
{
public override string CorpseName => "an energy vortex corpse";
public override bool DeleteCorpseOnDeath => Summoned;
public override bool AlwaysMurderer => true; // Or Llama vortices will appear gray.
public class EnergyVortex : BaseCreature
{
[Constructible]
public EnergyVortex()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
if (Core.SE && 0.002 > Utility.RandomDouble()) // Per OSI FoF, it's a 1/500 chance.
{
// Llama vortex!
Body = 0xDC;
Hue = 0x76;
}
else
{
Body = 164;
}
public override double DispelDifficulty => 80.0;
public override double DispelFocus => 20.0;
SetStr(200);
SetDex(200);
SetInt(100);
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
return ( m.Int + m.Skills[SkillName.Magery].Value ) / Math.Max( GetDistanceToSqrt( m ), 1.0 );
}
SetHits(Core.SE ? 140 : 70);
SetStam(250);
SetMana(0);
public override string DefaultName => "an energy vortex";
SetDamage(14, 17);
[Constructible]
public EnergyVortex()
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
if ( Core.SE && 0.002 > Utility.RandomDouble() ) // Per OSI FoF, it's a 1/500 chance.
{
// Llama vortex!
Body = 0xDC;
Hue = 0x76;
}
else
{
Body = 164;
}
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Energy, 100);
SetStr( 200 );
SetDex( 200 );
SetInt( 100 );
SetResistance(ResistanceType.Physical, 60, 70);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 90, 100);
SetHits( ( Core.SE ) ? 140 : 70 );
SetStam( 250 );
SetMana( 0 );
SetSkill(SkillName.MagicResist, 99.9);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.Wrestling, 120.0);
SetDamage( 14, 17 );
Fame = 0;
Karma = 0;
SetDamageType( ResistanceType.Physical, 0 );
SetDamageType( ResistanceType.Energy, 100 );
SetResistance( ResistanceType.Physical, 60, 70 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 40, 50 );
SetResistance( ResistanceType.Poison, 40, 50 );
SetResistance( ResistanceType.Energy, 90, 100 );
SetSkill( SkillName.MagicResist, 99.9 );
SetSkill( SkillName.Tactics, 100.0 );
SetSkill( SkillName.Wrestling, 120.0 );
Fame = 0;
Karma = 0;
VirtualArmor = 40;
ControlSlots = ( Core.SE ) ? 2 : 1;
}
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
public override int GetAngerSound()
{
return 0x15;
}
public override int GetAttackSound()
{
return 0x28;
}
public override void OnThink()
{
if ( Core.SE && Summoned )
{
ArrayList spirtsOrVortexes = new ArrayList();
foreach ( Mobile m in GetMobilesInRange( 5 ) )
{
if ( m is EnergyVortex || m is BladeSpirits )
{
if ( ( (BaseCreature) m ).Summoned )
spirtsOrVortexes.Add( m );
}
}
while ( spirtsOrVortexes.Count > 6 )
{
int index = Utility.Random( spirtsOrVortexes.Count );
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
Dispel( ( (Mobile) spirtsOrVortexes[index] ) );
spirtsOrVortexes.RemoveAt( index );
}
}
base.OnThink();
}
VirtualArmor = 40;
ControlSlots = Core.SE ? 2 : 1;
}
public EnergyVortex( Serial serial )
: base( serial )
{
}
public EnergyVortex(Serial serial)
: base(serial)
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override string CorpseName => "an energy vortex corpse";
public override bool DeleteCorpseOnDeath => Summoned;
public override bool AlwaysMurderer => true; // Or Llama vortices will appear gray.
writer.Write( (int) 0 ); // version
}
public override double DispelDifficulty => 80.0;
public override double DispelFocus => 20.0;
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override string DefaultName => "an energy vortex";
int version = reader.ReadInt();
public override bool BleedImmune => true;
public override Poison PoisonImmune => Poison.Lethal;
if ( BaseSoundID == 263 )
BaseSoundID = 0;
}
}
}
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
{
return (m.Int + m.Skills[SkillName.Magery].Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
}
public override int GetAngerSound()
{
return 0x15;
}
public override int GetAttackSound()
{
return 0x28;
}
public override void OnThink()
{
if (Core.SE && Summoned)
{
ArrayList spirtsOrVortexes = new ArrayList();
foreach (Mobile m in GetMobilesInRange(5))
if (m is EnergyVortex || m is BladeSpirits)
if (((BaseCreature)m).Summoned)
spirtsOrVortexes.Add(m);
while (spirtsOrVortexes.Count > 6)
{
int index = Utility.Random(spirtsOrVortexes.Count);
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
Dispel((Mobile)spirtsOrVortexes[index]);
spirtsOrVortexes.RemoveAt(index);
}
}
base.OnThink();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (BaseSoundID == 263)
BaseSoundID = 0;
}
}
}

View file

@ -1,60 +1,60 @@
namespace Server.Mobiles
{
public class FrostOoze : BaseCreature
{
public override string CorpseName => "a frost ooze corpse";
public override string DefaultName => "a frost ooze";
public class FrostOoze : BaseCreature
{
[Constructible]
public FrostOoze() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 94;
BaseSoundID = 456;
[Constructible]
public FrostOoze() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 94;
BaseSoundID = 456;
SetStr(18, 30);
SetDex(16, 21);
SetInt(16, 20);
SetStr( 18, 30 );
SetDex( 16, 21 );
SetInt( 16, 20 );
SetHits(13, 17);
SetHits( 13, 17 );
SetDamage(3, 9);
SetDamage( 3, 9 );
SetDamageType(ResistanceType.Physical, 100);
SetDamageType( ResistanceType.Physical, 100 );
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 10, 20);
SetResistance( ResistanceType.Physical, 15, 20 );
SetResistance( ResistanceType.Cold, 40, 50 );
SetResistance( ResistanceType.Poison, 20, 30 );
SetResistance( ResistanceType.Energy, 10, 20 );
SetSkill(SkillName.MagicResist, 5.1, 10.0);
SetSkill(SkillName.Tactics, 19.3, 34.0);
SetSkill(SkillName.Wrestling, 25.3, 40.0);
SetSkill( SkillName.MagicResist, 5.1, 10.0 );
SetSkill( SkillName.Tactics, 19.3, 34.0 );
SetSkill( SkillName.Wrestling, 25.3, 40.0 );
Fame = 450;
Karma = -450;
Fame = 450;
Karma = -450;
VirtualArmor = 38;
}
VirtualArmor = 38;
}
public FrostOoze(Serial serial) : base(serial)
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.Gems, Utility.RandomMinMax( 1, 2 ) );
}
public override string CorpseName => "a frost ooze corpse";
public override string DefaultName => "a frost ooze";
public FrostOoze( Serial serial ) : base( serial )
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Gems, Utility.RandomMinMax(1, 2));
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -4,227 +4,231 @@ using Server.Network;
namespace Server.Mobiles
{
public class Golem : BaseCreature
{
public override string CorpseName => "a golem corpse";
private bool m_Stunning;
public class Golem : BaseCreature
{
private bool m_Stunning;
public override bool IsScaredOfScaryThings => false;
public override bool IsScaryToPets => true;
[Constructible]
public Golem() : this(false, 1.0)
{
}
public override bool IsBondable => false;
[Constructible]
public Golem(bool summoned, double scalar) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8)
{
Body = 752;
public override FoodType FavoriteFood => FoodType.None;
if (summoned)
Hue = 2101;
public override bool CanBeDistracted => false;
SetStr((int)(251 * scalar), (int)(350 * scalar));
SetDex((int)(76 * scalar), (int)(100 * scalar));
SetInt((int)(101 * scalar), (int)(150 * scalar));
public override string DefaultName => "a golem";
SetHits((int)(151 * scalar), (int)(210 * scalar));
[Constructible]
public Golem() : this( false, 1.0 )
{
}
SetDamage((int)(13 * scalar), (int)(24 * scalar));
[Constructible]
public Golem( bool summoned, double scalar ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8 )
{
Body = 752;
SetDamageType(ResistanceType.Physical, 100);
if ( summoned )
Hue = 2101;
SetResistance(ResistanceType.Physical, (int)(35 * scalar), (int)(55 * scalar));
SetStr( (int)(251*scalar), (int)(350*scalar) );
SetDex( (int)(76*scalar), (int)(100*scalar) );
SetInt( (int)(101*scalar), (int)(150*scalar) );
if (summoned)
SetResistance(ResistanceType.Fire, (int)(50 * scalar), (int)(60 * scalar));
else
SetResistance(ResistanceType.Fire, (int)(100 * scalar));
SetHits( (int)(151*scalar), (int)(210*scalar) );
SetResistance(ResistanceType.Cold, (int)(10 * scalar), (int)(30 * scalar));
SetResistance(ResistanceType.Poison, (int)(10 * scalar), (int)(25 * scalar));
SetResistance(ResistanceType.Energy, (int)(30 * scalar), (int)(40 * scalar));
SetDamage( (int)(13*scalar), (int)(24*scalar) );
SetSkill(SkillName.MagicResist, 150.1 * scalar, 190.0 * scalar);
SetSkill(SkillName.Tactics, 60.1 * scalar, 100.0 * scalar);
SetSkill(SkillName.Wrestling, 60.1 * scalar, 100.0 * scalar);
SetDamageType( ResistanceType.Physical, 100 );
if (summoned)
{
Fame = 10;
Karma = 10;
}
else
{
Fame = 3500;
Karma = -3500;
}
SetResistance( ResistanceType.Physical, (int)(35*scalar), (int)(55*scalar) );
if (!summoned)
{
PackItem(new IronIngot(Utility.RandomMinMax(13, 21)));
if ( summoned )
SetResistance( ResistanceType.Fire, (int)(50*scalar), (int)(60*scalar) );
else
SetResistance( ResistanceType.Fire, (int)(100*scalar) );
if (0.1 > Utility.RandomDouble())
PackItem(new PowerCrystal());
SetResistance( ResistanceType.Cold, (int)(10*scalar), (int)(30*scalar) );
SetResistance( ResistanceType.Poison, (int)(10*scalar), (int)(25*scalar) );
SetResistance( ResistanceType.Energy, (int)(30*scalar), (int)(40*scalar) );
if (0.15 > Utility.RandomDouble())
PackItem(new ClockworkAssembly());
SetSkill( SkillName.MagicResist, (150.1*scalar), (190.0*scalar) );
SetSkill( SkillName.Tactics, (60.1*scalar), (100.0*scalar) );
SetSkill( SkillName.Wrestling, (60.1*scalar), (100.0*scalar) );
if (0.2 > Utility.RandomDouble())
PackItem(new ArcaneGem());
if ( summoned )
{
Fame = 10;
Karma = 10;
}
else
{
Fame = 3500;
Karma = -3500;
}
if (0.25 > Utility.RandomDouble())
PackItem(new Gears());
}
if ( !summoned )
{
PackItem( new IronIngot( Utility.RandomMinMax( 13, 21 ) ) );
ControlSlots = 3;
}
if ( 0.1 > Utility.RandomDouble() )
PackItem( new PowerCrystal() );
public Golem(Serial serial) : base(serial)
{
}
if ( 0.15 > Utility.RandomDouble() )
PackItem( new ClockworkAssembly() );
public override string CorpseName => "a golem corpse";
if ( 0.2 > Utility.RandomDouble() )
PackItem( new ArcaneGem() );
public override bool IsScaredOfScaryThings => false;
public override bool IsScaryToPets => true;
if ( 0.25 > Utility.RandomDouble() )
PackItem( new Gears() );
}
public override bool IsBondable => false;
ControlSlots = 3;
}
public override FoodType FavoriteFood => FoodType.None;
public override void OnDeath( Container c )
{
base.OnDeath( c );
public override bool CanBeDistracted => false;
if ( 0.05 > Utility.RandomDouble() )
{
if ( !IsParagon )
{
if ( 0.75 > Utility.RandomDouble() )
c.DropItem( DawnsMusicGear.RandomCommon );
else
c.DropItem( DawnsMusicGear.RandomUncommon );
}
else
c.DropItem( DawnsMusicGear.RandomRare );
}
}
public override string DefaultName => "a golem";
public override bool DeleteOnRelease => true;
public override bool DeleteOnRelease => true;
public override int GetAngerSound()
{
return 541;
}
public override bool AutoDispel => !Controlled;
public override bool BleedImmune => true;
public override int GetIdleSound()
{
if ( !Controlled )
return 542;
public override bool BardImmune => !Core.AOS || Controlled;
public override Poison PoisonImmune => Poison.Lethal;
return base.GetIdleSound();
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
public override int GetDeathSound()
{
if ( !Controlled )
return 545;
if (0.05 > Utility.RandomDouble())
{
if (!IsParagon)
{
if (0.75 > Utility.RandomDouble())
c.DropItem(DawnsMusicGear.RandomCommon);
else
c.DropItem(DawnsMusicGear.RandomUncommon);
}
else
{
c.DropItem(DawnsMusicGear.RandomRare);
}
}
}
return base.GetDeathSound();
}
public override int GetAngerSound()
{
return 541;
}
public override int GetAttackSound()
{
return 562;
}
public override int GetIdleSound()
{
if (!Controlled)
return 542;
public override int GetHurtSound()
{
if ( Controlled )
return 320;
return base.GetIdleSound();
}
return base.GetHurtSound();
}
public override int GetDeathSound()
{
if (!Controlled)
return 545;
public override bool AutoDispel => !Controlled;
public override bool BleedImmune => true;
return base.GetDeathSound();
}
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
public override int GetAttackSound()
{
return 562;
}
if ( !m_Stunning && 0.3 > Utility.RandomDouble() )
{
m_Stunning = true;
public override int GetHurtSound()
{
if (Controlled)
return 320;
defender.Animate( 21, 6, 1, true, false, 0 );
PlaySound( 0xEE );
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
return base.GetHurtSound();
}
if ( Weapon is BaseWeapon weapon )
weapon.OnHit( this, defender );
public override void OnGaveMeleeAttack(Mobile defender)
{
base.OnGaveMeleeAttack(defender);
if ( defender.Alive )
{
defender.Frozen = true;
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerStateCallback( Recover_Callback ), defender );
}
}
}
if (!m_Stunning && 0.3 > Utility.RandomDouble())
{
m_Stunning = true;
private void Recover_Callback( object state )
{
if ( state is Mobile defender )
{
defender.Frozen = false;
defender.Combatant = null;
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You recover your senses." );
}
defender.Animate(21, 6, 1, true, false, 0);
PlaySound(0xEE);
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false,
"You have been stunned by a colossal blow!");
m_Stunning = false;
}
if (Weapon is BaseWeapon weapon)
weapon.OnHit(this, defender);
public override void OnDamage( int amount, Mobile from, bool willKill )
{
if ( Controlled || Summoned )
{
Mobile master = ( ControlMaster );
if (defender.Alive)
{
defender.Frozen = true;
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerStateCallback(Recover_Callback), defender);
}
}
}
if ( master == null )
master = SummonMaster;
private void Recover_Callback(object state)
{
if (state is Mobile defender)
{
defender.Frozen = false;
defender.Combatant = null;
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
}
if ( master != null && master.Player && master.Map == Map && master.InRange( Location, 20 ) )
{
if ( master.Mana >= amount )
{
master.Mana -= amount;
}
else
{
amount -= master.Mana;
master.Mana = 0;
master.Damage( amount );
}
}
}
m_Stunning = false;
}
base.OnDamage( amount, from, willKill );
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
if (Controlled || Summoned)
{
Mobile master = ControlMaster;
public override bool BardImmune => !Core.AOS || Controlled;
public override Poison PoisonImmune => Poison.Lethal;
if (master == null)
master = SummonMaster;
public Golem( Serial serial ) : base( serial )
{
}
if (master != null && master.Player && master.Map == Map && master.InRange(Location, 20))
{
if (master.Mana >= amount)
{
master.Mana -= amount;
}
else
{
amount -= master.Mana;
master.Mana = 0;
master.Damage(amount);
}
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
base.OnDamage(amount, from, willKill);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -1,246 +1,248 @@
using System;
using Server.Engines.Plants;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
public class PlagueBeast : BaseCreature, IDevourer
{
public override string CorpseName => "a plague beast corpse";
private int m_DevourGoal;
public class PlagueBeast : BaseCreature, IDevourer
{
private int m_DevourGoal;
[CommandProperty( AccessLevel.GameMaster )]
public int TotalDevoured { get; set; }
[Constructible]
public PlagueBeast() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 775;
[CommandProperty( AccessLevel.GameMaster )]
public int DevourGoal
{
get => ( IsParagon ? m_DevourGoal + 25 : m_DevourGoal );
set => m_DevourGoal = value;
}
SetStr(302, 500);
SetDex(80);
SetInt(16, 20);
[CommandProperty( AccessLevel.GameMaster )]
public bool HasMetalChest { get; private set; }
SetHits(318, 404);
public override string DefaultName => "a plague beast";
SetDamage(20, 24);
[Constructible]
public PlagueBeast() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 775;
SetDamageType(ResistanceType.Physical, 60);
SetDamageType(ResistanceType.Poison, 40);
SetStr( 302, 500 );
SetDex( 80 );
SetInt( 16, 20 );
SetResistance(ResistanceType.Physical, 45, 55);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 25, 35);
SetResistance(ResistanceType.Poison, 65, 75);
SetResistance(ResistanceType.Energy, 25, 35);
SetHits( 318, 404 );
SetSkill(SkillName.MagicResist, 35.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.Wrestling, 100.0);
SetDamage( 20, 24 );
Fame = 13000;
Karma = -13000;
SetDamageType( ResistanceType.Physical, 60 );
SetDamageType( ResistanceType.Poison, 40 );
VirtualArmor = 30;
PackArmor(1, 5);
if (Utility.RandomDouble() < 0.80)
PackItem(new PlagueBeastGland());
SetResistance( ResistanceType.Physical, 45, 55 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 25, 35 );
SetResistance( ResistanceType.Poison, 65, 75 );
SetResistance( ResistanceType.Energy, 25, 35 );
if (Core.ML && Utility.RandomDouble() < 0.33)
PackItem(Seed.RandomPeculiarSeed(4));
SetSkill( SkillName.MagicResist, 35.0 );
SetSkill( SkillName.Tactics, 100.0 );
SetSkill( SkillName.Wrestling, 100.0 );
TotalDevoured = 0;
m_DevourGoal = Utility.RandomMinMax(15, 25); // How many corpses must be devoured before a metal chest is awarded
}
Fame = 13000;
Karma = -13000;
public PlagueBeast(Serial serial) : base(serial)
{
}
VirtualArmor = 30;
PackArmor( 1, 5 );
if ( Utility.RandomDouble() < 0.80 )
PackItem( new PlagueBeastGland() );
public override string CorpseName => "a plague beast corpse";
if ( Core.ML && Utility.RandomDouble() < 0.33 )
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
[CommandProperty(AccessLevel.GameMaster)]
public int TotalDevoured{ get; set; }
TotalDevoured = 0;
m_DevourGoal = Utility.RandomMinMax( 15, 25 ); // How many corpses must be devoured before a metal chest is awarded
}
[CommandProperty(AccessLevel.GameMaster)]
public int DevourGoal
{
get => IsParagon ? m_DevourGoal + 25 : m_DevourGoal;
set => m_DevourGoal = value;
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Gems, Utility.Random( 1, 3 ) );
// TODO: dungeon chest, healthy gland
}
[CommandProperty(AccessLevel.GameMaster)]
public bool HasMetalChest{ get; private set; }
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
public override string DefaultName => "a plague beast";
defender.ApplyPoison( this, IsParagon ? Poison.Lethal : Poison.Deadly );
defender.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
defender.PlaySound( 0x1CB );
}
public override bool AutoDispel => true;
public override Poison PoisonImmune => Poison.Lethal;
public override void OnDamagedBySpell( Mobile caster )
{
if ( Map != null && caster != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
#region IDevourer Members
spawn.Team = Team;
spawn.MoveToWorld( Location, Map );
spawn.Combatant = caster;
public bool Devour(Corpse corpse)
{
if (corpse?.Owner == null) // sorry we can't devour because the corpse's owner is null
return false;
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
}
if (corpse.Owner.Body.IsHuman)
corpse.TurnToBones(); // Not bones yet, and we are a human body therefore we turn to bones.
base.OnDamagedBySpell( caster );
}
IncreaseHits((int)Math.Ceiling(corpse.Owner.HitsMax * 0.75));
TotalDevoured++;
public override bool AutoDispel => true;
public override Poison PoisonImmune => Poison.Lethal;
PublicOverheadMessage(MessageType.Emote, 0x3B2,
1053033); // * The plague beast absorbs the fleshy remains of the corpse *
public override void OnGotMeleeAttack( Mobile attacker )
{
if ( Map != null && attacker != this && 0.25 > Utility.RandomDouble() )
{
BaseCreature spawn = new PlagueSpawn( this );
if (!HasMetalChest && TotalDevoured >= DevourGoal)
{
PackItem(new MetalChest());
HasMetalChest = true;
}
spawn.Team = Team;
spawn.MoveToWorld( Location, Map );
spawn.Combatant = attacker;
return true;
}
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
}
#endregion
base.OnGotMeleeAttack( attacker );
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Gems, Utility.Random(1, 3));
// TODO: dungeon chest, healthy gland
}
public PlagueBeast( Serial serial ) : base( serial )
{
}
public override void OnGaveMeleeAttack(Mobile defender)
{
base.OnGaveMeleeAttack(defender);
public override int GetIdleSound()
{
return 0x1BF;
}
defender.ApplyPoison(this, IsParagon ? Poison.Lethal : Poison.Deadly);
defender.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
defender.PlaySound(0x1CB);
}
public override int GetAttackSound()
{
return 0x1C0;
}
public override void OnDamagedBySpell(Mobile caster)
{
if (Map != null && caster != this && 0.25 > Utility.RandomDouble())
{
BaseCreature spawn = new PlagueSpawn(this);
public override int GetHurtSound()
{
return 0x1C1;
}
spawn.Team = Team;
spawn.MoveToWorld(Location, Map);
spawn.Combatant = caster;
public override int GetDeathSound()
{
return 0x1C2;
}
Say(1053034); // * The plague beast creates another beast from its flesh! *
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 1 );
base.OnDamagedBySpell(caster);
}
writer.Write( HasMetalChest );
writer.Write( TotalDevoured );
writer.Write( m_DevourGoal );
}
public override void OnGotMeleeAttack(Mobile attacker)
{
if (Map != null && attacker != this && 0.25 > Utility.RandomDouble())
{
BaseCreature spawn = new PlagueSpawn(this);
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
spawn.Team = Team;
spawn.MoveToWorld(Location, Map);
spawn.Combatant = attacker;
switch( version )
{
case 1:
{
HasMetalChest = reader.ReadBool();
TotalDevoured = reader.ReadInt();
m_DevourGoal = reader.ReadInt();
break;
}
}
}
Say(1053034); // * The plague beast creates another beast from its flesh! *
}
public override void OnThink()
{
base.OnThink();
base.OnGotMeleeAttack(attacker);
}
// Check to see if we need to devour any corpses
IPooledEnumerable<Corpse> eable = GetItemsInRange<Corpse>( 3 ); // Get all corpses in range
public override int GetIdleSound()
{
return 0x1BF;
}
foreach( Corpse item in eable )
{
// Ensure that the corpse was killed by us
if ( item.Killer == this && item.Owner != null )
{
if ( !item.DevourCorpse() && !item.Devoured )
PublicOverheadMessage( MessageType.Emote, 0x3B2, 1053032 ); // * The plague beast attempts to absorb the remains, but cannot! *
}
}
eable.Free();
}
public override int GetAttackSound()
{
return 0x1C0;
}
#region IDevourer Members
public override int GetHurtSound()
{
return 0x1C1;
}
public bool Devour( Corpse corpse )
{
if ( corpse?.Owner == null ) // sorry we can't devour because the corpse's owner is null
return false;
public override int GetDeathSound()
{
return 0x1C2;
}
if ( corpse.Owner.Body.IsHuman )
corpse.TurnToBones(); // Not bones yet, and we are a human body therefore we turn to bones.
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(1);
IncreaseHits( (int)Math.Ceiling( (double)corpse.Owner.HitsMax * 0.75 ) );
TotalDevoured++;
writer.Write(HasMetalChest);
writer.Write(TotalDevoured);
writer.Write(m_DevourGoal);
}
PublicOverheadMessage( MessageType.Emote, 0x3B2, 1053033 ); // * The plague beast absorbs the fleshy remains of the corpse *
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if ( !HasMetalChest && TotalDevoured >= DevourGoal )
{
PackItem( new MetalChest() );
HasMetalChest = true;
}
switch (version)
{
case 1:
{
HasMetalChest = reader.ReadBool();
TotalDevoured = reader.ReadInt();
m_DevourGoal = reader.ReadInt();
break;
}
}
}
return true;
}
public override void OnThink()
{
base.OnThink();
#endregion
// Check to see if we need to devour any corpses
IPooledEnumerable<Corpse> eable = GetItemsInRange<Corpse>(3); // Get all corpses in range
private void IncreaseHits( int hp )
{
int maxhits = 2000;
foreach (Corpse item in eable)
// Ensure that the corpse was killed by us
if (item.Killer == this && item.Owner != null)
if (!item.DevourCorpse() && !item.Devoured)
PublicOverheadMessage(MessageType.Emote, 0x3B2,
1053032); // * The plague beast attempts to absorb the remains, but cannot! *
eable.Free();
}
if ( IsParagon )
maxhits = (int)(maxhits * Paragon.HitsBuff);
private void IncreaseHits(int hp)
{
int maxhits = 2000;
if ( hp < 1000 && !Core.AOS )
hp = (hp * 100) / 60;
if (IsParagon)
maxhits = (int)(maxhits * Paragon.HitsBuff);
if ( HitsMaxSeed >= maxhits )
{
HitsMaxSeed = maxhits;
if (hp < 1000 && !Core.AOS)
hp = hp * 100 / 60;
int newHits = Hits + hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000
if (HitsMaxSeed >= maxhits)
{
HitsMaxSeed = maxhits;
Hits = Math.Min( maxhits, newHits );
// Also provide heal for each devour on top of the hp increase
}
else
{
int min = (hp / 2) + 10;
int max = hp + 20;
int hpToIncrease = Utility.RandomMinMax( min, max );
int newHits =
Hits + hp + Utility.RandomMinMax(10,
20); // increase the hp until it hits if it goes over it'll max at 2000
HitsMaxSeed += hpToIncrease;
Hits += hpToIncrease;
// Also provide heal for each devour
}
}
}
}
Hits = Math.Min(maxhits, newHits);
// Also provide heal for each devour on top of the hp increase
}
else
{
int min = hp / 2 + 10;
int max = hp + 20;
int hpToIncrease = Utility.RandomMinMax(min, max);
HitsMaxSeed += hpToIncrease;
Hits += hpToIncrease;
// Also provide heal for each devour
}
}
}
}

View file

@ -4,347 +4,354 @@ using Server.Network;
namespace Server.Mobiles
{
public class PlagueBeastLord : BaseCreature, ICarvable, IScissorable
{
public override string CorpseName => "a plague beast lord corpse";
public override Poison PoisonImmune => Poison.Lethal;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile OpenedBy { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool IsBleeding
{
get
{
Container pack = Backpack;
if ( pack != null )
{
for ( int i = 0; i < pack.Items.Count; i++ )
{
if ( pack.Items[ i ] is PlagueBeastBlood blood && !blood.Patched )
return true;
}
}
return false;
}
}
private DecayTimer m_Timer;
public override string DefaultName => "a plague beast lord";
[Constructible]
public PlagueBeastLord() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 775;
BaseSoundID = 679;
SpeechHue = 0x3B2;
SetStr( 500 );
SetDex( 100 );
SetInt( 30 );
SetHits( 1800 );
SetDamage( 20, 25 );
SetDamageType( ResistanceType.Physical, 50 );
SetDamageType( ResistanceType.Fire, 25 );
SetDamageType( ResistanceType.Poison, 25 );
SetResistance( ResistanceType.Physical, 45, 55 );
SetResistance( ResistanceType.Fire, 40, 50 );
SetResistance( ResistanceType.Cold, 25, 35 );
SetResistance( ResistanceType.Poison, 75, 85 );
SetResistance( ResistanceType.Energy, 25, 35 );
SetSkill( SkillName.Tactics, 100 );
SetSkill( SkillName.Wrestling, 100 );
Fame = 2000;
Karma = -2000;
VirtualArmor = 50;
}
public override void OnDoubleClick( Mobile from )
{
if ( IsAccessibleTo( from ) )
{
if ( OpenedBy != null && Backpack != null )
Backpack.DisplayTo( from );
else
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1071917, from.NetState ); // * You attempt to tear open the amorphous flesh, but it resists *
}
}
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( IsAccessibleTo( from ) && ( dropped is PlagueBeastInnard || dropped is PlagueBeastGland ) )
return base.OnDragDrop( from, dropped );
return false;
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
for ( int i = c.Items.Count - 1; i >= 0; i-- )
c.Items[ i ].Delete();
}
public override void OnDelete()
{
if ( OpenedBy?.Holding is PlagueBeastInnard )
OpenedBy.Holding.Delete();
if ( Backpack != null )
{
for ( int i = Backpack.Items.Count - 1; i >= 0; i-- )
Backpack.Items[ i ].Delete();
Backpack.Delete();
}
base.OnDelete();
}
public override void OnMovement( Mobile m, Point3D oldLocation )
{
base.OnMovement( m, oldLocation );
if ( Backpack != null && IsAccessibleTo( m ) && m.InRange( oldLocation, 3 ) && !m.InRange( this, 3 ) )
Backpack.SendRemovePacket();
}
public override bool CheckNonlocalLift( Mobile from, Item item )
{
return true;
}
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
{
return true;
}
public override bool IsSnoop( Mobile from )
{
return false;
}
public override int GetIdleSound()
{
return 0x1BF;
}
public override int GetAttackSound()
{
return 0x1C0;
}
public override int GetHurtSound()
{
return 0x1C1;
}
public override int GetDeathSound()
{
return 0x1C2;
}
public virtual void OnParalyzed( Mobile from )
{
FightMode = FightMode.None;
Frozen = true;
Blessed = true;
Combatant = null;
Hue = 0x480;
from.Combatant = null;
from.Warmode = false;
m_Timer = new DecayTimer( this );
m_Timer.Start();
Timer.DelayCall( TimeSpan.Zero, BroadcastMessage );
}
private void BroadcastMessage()
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071920 ); // * The plague beast's amorphous flesh hardens and becomes immobilized *
}
public virtual bool IsAccessibleTo( Mobile check )
{
if ( check.AccessLevel >= AccessLevel.GameMaster )
return true;
if ( !InRange( check, 2 ) )
PrivateOverheadMessage( MessageType.Label, 0x3B2, 500446, check.NetState ); // That is too far away.
else if ( OpenedBy != null && OpenedBy != check )
PrivateOverheadMessage( MessageType.Label, 0x3B2, 500365, check.NetState ); // That is being used by someone else
else if ( Frozen )
return true;
return false;
}
public virtual void Carve( Mobile from, Item item )
{
if ( OpenedBy == null && IsAccessibleTo( from ) )
{
OpenedBy = from;
if ( m_Timer == null )
m_Timer = new DecayTimer( this );
if ( !m_Timer.Running )
m_Timer.Start();
m_Timer.StartDissolving();
PlagueBeastBackpack pack = new PlagueBeastBackpack();
AddItem( pack );
pack.Initialize();
foreach ( NetState state in GetClientsInRange( 12 ) )
{
Mobile m = state.Mobile;
if ( m != null && m.Player && m != from )
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1071919, from.Name, m.NetState ); // * ~1_VAL~ slices through the plague beast's amorphous tissue *
}
from.LocalOverheadMessage( MessageType.Regular, 0x21, 1071904 ); // * You slice through the plague beast's amorphous tissue *
Timer.DelayCall<Mobile>( TimeSpan.Zero, pack.Open, from );
}
}
public virtual bool Scissor( Mobile from, Scissors scissors )
{
if ( IsAccessibleTo( from ) )
scissors.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071918 ); // You can't cut through the plague beast's amorphous skin with scissors!
return false;
}
public void Unfreeze()
{
FightMode = FightMode.Closest;
Frozen = false;
Blessed = false;
if ( OpenedBy == null )
Hue = 0;
}
public PlagueBeastLord( Serial serial ) : base( serial )
{
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.WriteEncodedInt( 0 ); // version
writer.Write( OpenedBy );
if ( m_Timer != null )
{
writer.Write( (bool) true );
writer.Write( (int) m_Timer.Count );
writer.Write( (int) m_Timer.Deadline );
}
else
writer.Write( (bool) false );
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadEncodedInt();
OpenedBy = reader.ReadMobile();
if ( reader.ReadBool() )
{
int count = reader.ReadInt();
int deadline = reader.ReadInt();
m_Timer = new DecayTimer( this, count, deadline );
m_Timer.Start();
}
if ( FightMode == FightMode.None )
Frozen = true;
}
private class DecayTimer : Timer
{
private PlagueBeastLord m_Lord;
public int Count { get; private set; }
public int Deadline { get; private set; }
public DecayTimer( PlagueBeastLord lord ) : this( lord, 0, 120 )
{
}
public DecayTimer( PlagueBeastLord lord, int count, int deadline ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ) )
{
m_Lord = lord;
Count = count;
Deadline = deadline;
}
protected override void OnTick()
{
if ( m_Lord == null || m_Lord.Deleted )
{
Stop();
return;
}
if ( Count + 15 == Deadline )
{
if ( m_Lord.OpenedBy != null )
m_Lord.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071921 ); // * The plague beast begins to bubble and dissolve! *
m_Lord.PlaySound( 0x103 );
}
else if ( Count + 10 == Deadline )
{
m_Lord.PlaySound( 0x21 );
}
else if ( Count + 5 == Deadline )
{
m_Lord.PlaySound( 0x1C2 );
}
else if ( Count == Deadline )
{
m_Lord.Unfreeze();
if ( m_Lord.OpenedBy != null )
m_Lord.Kill();
Stop();
}
else if ( Count % 15 == 0 )
m_Lord.PlaySound( 0x1BF );
Count++;
}
public void StartDissolving()
{
Deadline = Math.Min( Count + 60, Deadline );
}
}
}
}
public class PlagueBeastLord : BaseCreature, ICarvable, IScissorable
{
private DecayTimer m_Timer;
[Constructible]
public PlagueBeastLord() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 775;
BaseSoundID = 679;
SpeechHue = 0x3B2;
SetStr(500);
SetDex(100);
SetInt(30);
SetHits(1800);
SetDamage(20, 25);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Fire, 25);
SetDamageType(ResistanceType.Poison, 25);
SetResistance(ResistanceType.Physical, 45, 55);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 25, 35);
SetResistance(ResistanceType.Poison, 75, 85);
SetResistance(ResistanceType.Energy, 25, 35);
SetSkill(SkillName.Tactics, 100);
SetSkill(SkillName.Wrestling, 100);
Fame = 2000;
Karma = -2000;
VirtualArmor = 50;
}
public PlagueBeastLord(Serial serial) : base(serial)
{
}
public override string CorpseName => "a plague beast lord corpse";
public override Poison PoisonImmune => Poison.Lethal;
[CommandProperty(AccessLevel.GameMaster)]
public Mobile OpenedBy{ get; set; }
[CommandProperty(AccessLevel.GameMaster)]
public bool IsBleeding
{
get
{
Container pack = Backpack;
if (pack != null)
for (int i = 0; i < pack.Items.Count; i++)
if (pack.Items[i] is PlagueBeastBlood blood && !blood.Patched)
return true;
return false;
}
}
public override string DefaultName => "a plague beast lord";
public virtual void Carve(Mobile from, Item item)
{
if (OpenedBy == null && IsAccessibleTo(from))
{
OpenedBy = from;
if (m_Timer == null)
m_Timer = new DecayTimer(this);
if (!m_Timer.Running)
m_Timer.Start();
m_Timer.StartDissolving();
PlagueBeastBackpack pack = new PlagueBeastBackpack();
AddItem(pack);
pack.Initialize();
foreach (NetState state in GetClientsInRange(12))
{
Mobile m = state.Mobile;
if (m != null && m.Player && m != from)
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071919, from.Name,
m.NetState); // * ~1_VAL~ slices through the plague beast's amorphous tissue *
}
from.LocalOverheadMessage(MessageType.Regular, 0x21,
1071904); // * You slice through the plague beast's amorphous tissue *
Timer.DelayCall(TimeSpan.Zero, pack.Open, from);
}
}
public virtual bool Scissor(Mobile from, Scissors scissors)
{
if (IsAccessibleTo(from))
scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2,
1071918); // You can't cut through the plague beast's amorphous skin with scissors!
return false;
}
public override void OnDoubleClick(Mobile from)
{
if (IsAccessibleTo(from))
{
if (OpenedBy != null && Backpack != null)
Backpack.DisplayTo(from);
else
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071917,
from.NetState); // * You attempt to tear open the amorphous flesh, but it resists *
}
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (IsAccessibleTo(from) && (dropped is PlagueBeastInnard || dropped is PlagueBeastGland))
return base.OnDragDrop(from, dropped);
return false;
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
for (int i = c.Items.Count - 1; i >= 0; i--)
c.Items[i].Delete();
}
public override void OnDelete()
{
if (OpenedBy?.Holding is PlagueBeastInnard)
OpenedBy.Holding.Delete();
if (Backpack != null)
{
for (int i = Backpack.Items.Count - 1; i >= 0; i--)
Backpack.Items[i].Delete();
Backpack.Delete();
}
base.OnDelete();
}
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
if (Backpack != null && IsAccessibleTo(m) && m.InRange(oldLocation, 3) && !m.InRange(this, 3))
Backpack.SendRemovePacket();
}
public override bool CheckNonlocalLift(Mobile from, Item item)
{
return true;
}
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
{
return true;
}
public override bool IsSnoop(Mobile from)
{
return false;
}
public override int GetIdleSound()
{
return 0x1BF;
}
public override int GetAttackSound()
{
return 0x1C0;
}
public override int GetHurtSound()
{
return 0x1C1;
}
public override int GetDeathSound()
{
return 0x1C2;
}
public virtual void OnParalyzed(Mobile from)
{
FightMode = FightMode.None;
Frozen = true;
Blessed = true;
Combatant = null;
Hue = 0x480;
from.Combatant = null;
from.Warmode = false;
m_Timer = new DecayTimer(this);
m_Timer.Start();
Timer.DelayCall(TimeSpan.Zero, BroadcastMessage);
}
private void BroadcastMessage()
{
PublicOverheadMessage(MessageType.Regular, 0x3B2,
1071920); // * The plague beast's amorphous flesh hardens and becomes immobilized *
}
public virtual bool IsAccessibleTo(Mobile check)
{
if (check.AccessLevel >= AccessLevel.GameMaster)
return true;
if (!InRange(check, 2))
PrivateOverheadMessage(MessageType.Label, 0x3B2, 500446, check.NetState); // That is too far away.
else if (OpenedBy != null && OpenedBy != check)
PrivateOverheadMessage(MessageType.Label, 0x3B2, 500365,
check.NetState); // That is being used by someone else
else if (Frozen)
return true;
return false;
}
public void Unfreeze()
{
FightMode = FightMode.Closest;
Frozen = false;
Blessed = false;
if (OpenedBy == null)
Hue = 0;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
writer.Write(OpenedBy);
if (m_Timer != null)
{
writer.Write(true);
writer.Write(m_Timer.Count);
writer.Write(m_Timer.Deadline);
}
else
{
writer.Write(false);
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
OpenedBy = reader.ReadMobile();
if (reader.ReadBool())
{
int count = reader.ReadInt();
int deadline = reader.ReadInt();
m_Timer = new DecayTimer(this, count, deadline);
m_Timer.Start();
}
if (FightMode == FightMode.None)
Frozen = true;
}
private class DecayTimer : Timer
{
private PlagueBeastLord m_Lord;
public DecayTimer(PlagueBeastLord lord) : this(lord, 0, 120)
{
}
public DecayTimer(PlagueBeastLord lord, int count, int deadline) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1))
{
m_Lord = lord;
Count = count;
Deadline = deadline;
}
public int Count{ get; private set; }
public int Deadline{ get; private set; }
protected override void OnTick()
{
if (m_Lord == null || m_Lord.Deleted)
{
Stop();
return;
}
if (Count + 15 == Deadline)
{
if (m_Lord.OpenedBy != null)
m_Lord.PublicOverheadMessage(MessageType.Regular, 0x3B2,
1071921); // * The plague beast begins to bubble and dissolve! *
m_Lord.PlaySound(0x103);
}
else if (Count + 10 == Deadline)
{
m_Lord.PlaySound(0x21);
}
else if (Count + 5 == Deadline)
{
m_Lord.PlaySound(0x1C2);
}
else if (Count == Deadline)
{
m_Lord.Unfreeze();
if (m_Lord.OpenedBy != null)
m_Lord.Kill();
Stop();
}
else if (Count % 15 == 0)
{
m_Lord.PlaySound(0x1BF);
}
Count++;
}
public void StartDissolving()
{
Deadline = Math.Min(Count + 60, Deadline);
}
}
}
}

View file

@ -4,134 +4,132 @@ using Server.ContextMenus;
namespace Server.Mobiles
{
public class PlagueSpawn : BaseCreature
{
public override string CorpseName => "a plague spawn corpse";
public class PlagueSpawn : BaseCreature
{
[Constructible]
public PlagueSpawn() : this(null)
{
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner { get; set; }
public PlagueSpawn(Mobile owner) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Owner = owner;
ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes(1.0);
[CommandProperty( AccessLevel.GameMaster )]
public DateTime ExpireTime { get; set; }
Hue = Utility.Random(0x11, 15);
[Constructible]
public PlagueSpawn() : this( null )
{
}
switch (Utility.Random(12))
{
case 0: // earth elemental
Body = 14;
BaseSoundID = 268;
break;
case 1: // headless one
Body = 31;
BaseSoundID = 0x39D;
break;
case 2: // person
Body = Utility.RandomList(400, 401);
break;
case 3: // gorilla
Body = 0x1D;
BaseSoundID = 0x9E;
break;
case 4: // serpent
Body = 0x15;
BaseSoundID = 0xDB;
break;
default:
case 5: // slime
Body = 51;
BaseSoundID = 456;
break;
}
public override bool AlwaysMurderer => true;
SetStr(201, 300);
SetDex(80);
SetInt(16, 20);
public override void DisplayPaperdollTo(Mobile to)
{
}
SetHits(121, 180);
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
{
base.GetContextMenuEntries( from, list );
SetDamage(11, 17);
for ( int i = 0; i < list.Count; ++i )
{
if ( list[i] is PaperdollEntry )
list.RemoveAt( i-- );
}
}
SetDamageType(ResistanceType.Physical, 100);
public override void OnThink()
{
if ( Owner != null && ( DateTime.UtcNow >= ExpireTime || Owner.Deleted || Map != Owner.Map || !InRange( Owner, 16 ) ) )
{
PlaySound( GetIdleSound() );
Delete();
}
else
{
base.OnThink();
}
}
SetResistance(ResistanceType.Physical, 35, 45);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 25, 35);
SetResistance(ResistanceType.Poison, 65, 75);
SetResistance(ResistanceType.Energy, 25, 35);
public override string DefaultName => "a plague spawn";
SetSkill(SkillName.MagicResist, 25.0);
SetSkill(SkillName.Tactics, 25.0);
SetSkill(SkillName.Wrestling, 50.0);
public PlagueSpawn( Mobile owner ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Owner = owner;
ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
Fame = 1000;
Karma = -1000;
Hue = Utility.Random( 0x11, 15 );
VirtualArmor = 20;
}
switch ( Utility.Random( 12 ) )
{
case 0: // earth elemental
Body = 14;
BaseSoundID = 268;
break;
case 1: // headless one
Body = 31;
BaseSoundID = 0x39D;
break;
case 2: // person
Body = Utility.RandomList( 400, 401 );
break;
case 3: // gorilla
Body = 0x1D;
BaseSoundID = 0x9E;
break;
case 4: // serpent
Body = 0x15;
BaseSoundID = 0xDB;
break;
default:
case 5: // slime
Body = 51;
BaseSoundID = 456;
break;
}
public PlagueSpawn(Serial serial) : base(serial)
{
}
SetStr( 201, 300 );
SetDex( 80 );
SetInt( 16, 20 );
public override string CorpseName => "a plague spawn corpse";
SetHits( 121, 180 );
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Owner{ get; set; }
SetDamage( 11, 17 );
[CommandProperty(AccessLevel.GameMaster)]
public DateTime ExpireTime{ get; set; }
SetDamageType( ResistanceType.Physical, 100 );
public override bool AlwaysMurderer => true;
SetResistance( ResistanceType.Physical, 35, 45 );
SetResistance( ResistanceType.Fire, 30, 40 );
SetResistance( ResistanceType.Cold, 25, 35 );
SetResistance( ResistanceType.Poison, 65, 75 );
SetResistance( ResistanceType.Energy, 25, 35 );
public override string DefaultName => "a plague spawn";
SetSkill( SkillName.MagicResist, 25.0 );
SetSkill( SkillName.Tactics, 25.0 );
SetSkill( SkillName.Wrestling, 50.0 );
public override void DisplayPaperdollTo(Mobile to)
{
}
Fame = 1000;
Karma = -1000;
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
VirtualArmor = 20;
}
for (int i = 0; i < list.Count; ++i)
if (list[i] is PaperdollEntry)
list.RemoveAt(i--);
}
public override void GenerateLoot()
{
AddLoot( LootPack.Poor );
AddLoot( LootPack.Gems );
}
public override void OnThink()
{
if (Owner != null && (DateTime.UtcNow >= ExpireTime || Owner.Deleted || Map != Owner.Map || !InRange(Owner, 16)))
{
PlaySound(GetIdleSound());
Delete();
}
else
{
base.OnThink();
}
}
public PlagueSpawn( Serial serial ) : base( serial )
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Poor);
AddLoot(LootPack.Gems);
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View file

@ -3,109 +3,110 @@ using Server.Items;
namespace Server.Mobiles
{
public class SandVortex : BaseCreature
{
public override string CorpseName => "a sand vortex corpse";
public override string DefaultName => "a sand vortex";
public class SandVortex : BaseCreature
{
private DateTime m_NextAttack;
[Constructible]
public SandVortex() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 790;
BaseSoundID = 263;
[Constructible]
public SandVortex() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 790;
BaseSoundID = 263;
SetStr( 96, 120 );
SetDex( 171, 195 );
SetInt( 76, 100 );
SetStr(96, 120);
SetDex(171, 195);
SetInt(76, 100);
SetHits( 51, 62 );
SetHits(51, 62);
SetDamage( 3, 16 );
SetDamage(3, 16);
SetDamageType( ResistanceType.Physical, 90 );
SetDamageType( ResistanceType.Fire, 10 );
SetDamageType(ResistanceType.Physical, 90);
SetDamageType(ResistanceType.Fire, 10);
SetResistance( ResistanceType.Physical, 80, 90 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 60, 70 );
SetResistance( ResistanceType.Poison, 60, 70 );
SetResistance( ResistanceType.Energy, 60, 70 );
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 60, 70);
SetResistance(ResistanceType.Energy, 60, 70);
SetSkill( SkillName.MagicResist, 150.0 );
SetSkill( SkillName.Tactics, 70.0 );
SetSkill( SkillName.Wrestling, 80.0 );
SetSkill(SkillName.MagicResist, 150.0);
SetSkill(SkillName.Tactics, 70.0);
SetSkill(SkillName.Wrestling, 80.0);
Fame = 4500;
Karma = -4500;
Fame = 4500;
Karma = -4500;
VirtualArmor = 28;
PackItem( new Bone() );
}
VirtualArmor = 28;
PackItem(new Bone());
}
public override void GenerateLoot()
{
AddLoot( LootPack.Meager, 2 );
}
public SandVortex(Serial serial) : base(serial)
{
}
private DateTime m_NextAttack;
public override string CorpseName => "a sand vortex corpse";
public override string DefaultName => "a sand vortex";
public override void OnActionCombat()
{
Mobile combatant = Combatant;
public override void GenerateLoot()
{
AddLoot(LootPack.Meager, 2);
}
if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
return;
public override void OnActionCombat()
{
Mobile combatant = Combatant;
if ( DateTime.UtcNow >= m_NextAttack )
{
SandAttack( combatant );
m_NextAttack = DateTime.UtcNow + TimeSpan.FromSeconds( 10.0 + (10.0 * Utility.RandomDouble()) );
}
}
if (combatant == null || combatant.Deleted || combatant.Map != Map || !InRange(combatant, 12) ||
!CanBeHarmful(combatant) || !InLOS(combatant))
return;
public void SandAttack( Mobile m )
{
DoHarmful( m );
if (DateTime.UtcNow >= m_NextAttack)
{
SandAttack(combatant);
m_NextAttack = DateTime.UtcNow + TimeSpan.FromSeconds(10.0 + 10.0 * Utility.RandomDouble());
}
}
m.FixedParticles( 0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist );
public void SandAttack(Mobile m)
{
DoHarmful(m);
new InternalTimer( m, this ).Start();
}
m.FixedParticles(0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist);
private class InternalTimer : Timer
{
private Mobile m_Mobile, m_From;
new InternalTimer(m, this).Start();
}
public InternalTimer( Mobile m, Mobile from ) : base( TimeSpan.FromSeconds( 1.0 ) )
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
protected override void OnTick()
{
m_Mobile.PlaySound( 0x4CF );
AOS.Damage( m_Mobile, m_From, Utility.RandomMinMax( 1, 40 ), 90, 10, 0, 0, 0 );
}
}
writer.Write(0); // version
}
public SandVortex( Serial serial ) : base( serial )
{
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
int version = reader.ReadInt();
}
writer.Write( (int) 0 ); // version
}
private class InternalTimer : Timer
{
private Mobile m_Mobile, m_From;
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public InternalTimer(Mobile m, Mobile from) : base(TimeSpan.FromSeconds(1.0))
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
int version = reader.ReadInt();
}
}
}
protected override void OnTick()
{
m_Mobile.PlaySound(0x4CF);
AOS.Damage(m_Mobile, m_From, Utility.RandomMinMax(1, 40), 90, 10, 0, 0, 0);
}
}
}
}

View file

@ -1,70 +1,72 @@
namespace Server.Mobiles
{
public class Slime : BaseCreature
{
public override string CorpseName => "a slimey corpse";
public override string DefaultName => "a slime";
public class Slime : BaseCreature
{
[Constructible]
public Slime() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 51;
BaseSoundID = 456;
[Constructible]
public Slime() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 51;
BaseSoundID = 456;
Hue = Utility.RandomSlimeHue();
Hue = Utility.RandomSlimeHue();
SetStr(22, 34);
SetDex(16, 21);
SetInt(16, 20);
SetStr( 22, 34 );
SetDex( 16, 21 );
SetInt( 16, 20 );
SetHits(15, 19);
SetHits( 15, 19 );
SetDamage(1, 5);
SetDamage( 1, 5 );
SetDamageType(ResistanceType.Physical, 100);
SetDamageType( ResistanceType.Physical, 100 );
SetResistance(ResistanceType.Physical, 5, 10);
SetResistance(ResistanceType.Poison, 10, 20);
SetResistance( ResistanceType.Physical, 5, 10 );
SetResistance( ResistanceType.Poison, 10, 20 );
SetSkill(SkillName.Poisoning, 30.1, 50.0);
SetSkill(SkillName.MagicResist, 15.1, 20.0);
SetSkill(SkillName.Tactics, 19.3, 34.0);
SetSkill(SkillName.Wrestling, 19.3, 34.0);
SetSkill( SkillName.Poisoning, 30.1, 50.0 );
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
SetSkill( SkillName.Tactics, 19.3, 34.0 );
SetSkill( SkillName.Wrestling, 19.3, 34.0 );
Fame = 300;
Karma = -300;
Fame = 300;
Karma = -300;
VirtualArmor = 8;
VirtualArmor = 8;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 23.1;
}
Tamable = true;
ControlSlots = 1;
MinTameSkill = 23.1;
}
public Slime(Serial serial) : base(serial)
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.Poor );
AddLoot( LootPack.Gems );
}
public override string CorpseName => "a slimey corpse";
public override string DefaultName => "a slime";
public override Poison PoisonImmune => Poison.Lesser;
public override Poison HitPoison => Poison.Lesser;
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish | FoodType.FruitsAndVegies | FoodType.GrainsAndHay | FoodType.Eggs;
public override Poison PoisonImmune => Poison.Lesser;
public override Poison HitPoison => Poison.Lesser;
public Slime( Serial serial ) : base( serial )
{
}
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish | FoodType.FruitsAndVegies |
FoodType.GrainsAndHay | FoodType.Eggs;
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void GenerateLoot()
{
AddLoot(LootPack.Poor);
AddLoot(LootPack.Gems);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}