#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
84
Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs
Normal file
84
Scripts/Mobiles/Monsters/Misc/Magic/DarkWisp.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a wisp corpse" )]
|
||||
public class DarkWisp : BaseCreature
|
||||
{
|
||||
public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Wisp; } }
|
||||
|
||||
public override Ethics.Ethic EthicAllegiance { get { return Ethics.Ethic.Evil; } }
|
||||
|
||||
public override TimeSpan ReacquireDelay { get { return TimeSpan.FromSeconds( 1.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public DarkWisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a wisp";
|
||||
Body = 165;
|
||||
BaseSoundID = 466;
|
||||
|
||||
SetStr( 196, 225 );
|
||||
SetDex( 196, 225 );
|
||||
SetInt( 196, 225 );
|
||||
|
||||
SetHits( 118, 135 );
|
||||
|
||||
SetDamage( 17, 18 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Energy, 50 );
|
||||
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 4000;
|
||||
Karma = -4000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
AddItem( new LightSource() );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.Average );
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public DarkWisp( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
148
Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs
Normal file
148
Scripts/Mobiles/Monsters/Misc/Magic/EtherealWarrior.cs
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ethereal warrior corpse" )]
|
||||
public class EtherealWarrior : BaseCreature
|
||||
{
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public EtherealWarrior() : base( AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = NameList.RandomName( "ethereal warrior" );
|
||||
Body = 123;
|
||||
|
||||
SetStr( 586, 785 );
|
||||
SetDex( 177, 255 );
|
||||
SetInt( 351, 450 );
|
||||
|
||||
SetHits( 352, 471 );
|
||||
|
||||
SetDamage( 13, 19 );
|
||||
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 7000;
|
||||
Karma = 7000;
|
||||
|
||||
VirtualArmor = 120;
|
||||
}
|
||||
|
||||
public override int TreasureMapLevel{ get{ return Core.AOS ? 5 : 0; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich, 3 );
|
||||
AddLoot( LootPack.Gems );
|
||||
}
|
||||
|
||||
private DateTime m_NextResurrect;
|
||||
private static TimeSpan ResurrectDelay = TimeSpan.FromSeconds(2.0);
|
||||
|
||||
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 OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override int Feathers{ get{ return 100; } }
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x2F8;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2F8;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return Utility.Random( 0x2F5, 2 );
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2F9;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2F7;
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
defender.Damage( Utility.Random( 10, 10 ), this );
|
||||
defender.Stam -= Utility.Random( 10, 10 );
|
||||
defender.Mana -= Utility.Random( 10, 10 );
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
|
||||
attacker.Damage( Utility.Random( 10, 10 ), this );
|
||||
attacker.Stam -= Utility.Random( 10, 10 );
|
||||
attacker.Mana -= Utility.Random( 10, 10 );
|
||||
}
|
||||
|
||||
public EtherealWarrior( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
91
Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs
Normal file
91
Scripts/Mobiles/Monsters/Misc/Magic/Pixie.cs
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a pixie corpse" )]
|
||||
public class Pixie : BaseCreature
|
||||
{
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
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 );
|
||||
|
||||
SetHits( 13, 18 );
|
||||
|
||||
SetDamage( 9, 15 );
|
||||
|
||||
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 );
|
||||
|
||||
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;
|
||||
|
||||
VirtualArmor = 100;
|
||||
if ( 0.02 > Utility.RandomDouble() )
|
||||
PackStatue();
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.LowScrolls );
|
||||
AddLoot( LootPack.Gems, 2 );
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
|
||||
if ( Utility.RandomDouble() < 0.35 )
|
||||
c.DropItem( new PixieLeg() );
|
||||
}
|
||||
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override int Hides{ get{ return 5; } }
|
||||
public override int Meat{ get{ return 1; } }
|
||||
|
||||
public Pixie( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs
Normal file
81
Scripts/Mobiles/Monsters/Misc/Magic/ShadowWisp.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a wisp corpse" )]
|
||||
public class ShadowWisp : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public ShadowWisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.3, 0.6 )
|
||||
{
|
||||
Name = "a shadow wisp";
|
||||
Body = 165;
|
||||
BaseSoundID = 466;
|
||||
|
||||
SetStr( 16, 40 );
|
||||
SetDex( 16, 45 );
|
||||
SetInt( 11, 25 );
|
||||
|
||||
SetHits( 10, 24 );
|
||||
|
||||
SetDamage( 5, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 500;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
public ShadowWisp( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
87
Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs
Normal file
87
Scripts/Mobiles/Monsters/Misc/Magic/Wisp.cs
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a wisp corpse" )]
|
||||
public class Wisp : BaseCreature
|
||||
{
|
||||
public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Wisp; } }
|
||||
|
||||
public override Faction FactionAllegiance{ get{ return CouncilOfMages.Instance; } }
|
||||
public override Ethics.Ethic EthicAllegiance { get { return Ethics.Ethic.Hero; } }
|
||||
|
||||
public override TimeSpan ReacquireDelay { get { return TimeSpan.FromSeconds( 1.0 ); } }
|
||||
|
||||
[Constructable]
|
||||
public Wisp() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a wisp";
|
||||
Body = 58;
|
||||
BaseSoundID = 466;
|
||||
|
||||
SetStr( 196, 225 );
|
||||
SetDex( 196, 225 );
|
||||
SetInt( 196, 225 );
|
||||
|
||||
SetHits( 118, 135 );
|
||||
|
||||
SetDamage( 17, 18 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Energy, 50 );
|
||||
|
||||
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 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 4000;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
|
||||
|
||||
AddItem( new LightSource() );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.Average );
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public Wisp( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
110
Scripts/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs
Normal file
110
Scripts/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an animated weapon corpse" )]
|
||||
public class AnimatedWeapon : BaseCreature
|
||||
{
|
||||
public override bool DeleteCorpseOnDeath { get { return true; } }
|
||||
public override bool IsHouseSummonable { get { return true; } }
|
||||
|
||||
public override double DispelDifficulty { get { return 0.0; } }
|
||||
public override double DispelFocus { get { return 20.0; } }
|
||||
|
||||
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
|
||||
{
|
||||
return m.Str / Math.Max( this.GetDistanceToSqrt( m ), 1.0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AnimatedWeapon( Mobile caster, int level )
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6 )
|
||||
{
|
||||
Name = "an animated weapon";
|
||||
Body = 692;
|
||||
|
||||
SetStr( 10 + level );
|
||||
SetDex( 10 + level );
|
||||
SetInt( 10 );
|
||||
|
||||
SetHits( 20 + ( level * 3 / 2 ) );
|
||||
SetStam( 10 + level );
|
||||
SetMana( 0 );
|
||||
|
||||
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 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 60 );
|
||||
SetDamageType( ResistanceType.Poison, 20 );
|
||||
SetDamageType( ResistanceType.Energy, 20 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 4;
|
||||
}
|
||||
|
||||
public override bool BleedImmune { get { return true; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x3B8;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public AnimatedWeapon( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
/*int version = */
|
||||
reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Scripts/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs
Normal file
123
Scripts/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Misc;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a blade spirit corpse" )]
|
||||
public class BladeSpirits : BaseCreature
|
||||
{
|
||||
public override bool DeleteCorpseOnDeath { get { return Core.AOS; } }
|
||||
public override bool IsHouseSummonable { get { return true; } }
|
||||
|
||||
public override double DispelDifficulty { get { return 0.0; } }
|
||||
public override double DispelFocus { get { return 20.0; } }
|
||||
|
||||
public override double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
|
||||
{
|
||||
return ( m.Str + m.Skills[SkillName.Tactics].Value ) / Math.Max( GetDistanceToSqrt( m ), 1.0 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BladeSpirits()
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6 )
|
||||
{
|
||||
Name = "a blade spirit";
|
||||
Body = 574;
|
||||
|
||||
SetStr( 150 );
|
||||
SetDex( 150 );
|
||||
SetInt( 100 );
|
||||
|
||||
SetHits( ( Core.SE ) ? 160 : 80 );
|
||||
SetStam( 250 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 10, 14 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 60 );
|
||||
SetDamageType( ResistanceType.Poison, 20 );
|
||||
SetDamageType( ResistanceType.Energy, 20 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30, 40 );
|
||||
SetResistance( ResistanceType.Fire, 40, 50 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 70.0 );
|
||||
SetSkill( SkillName.Tactics, 90.0 );
|
||||
SetSkill( SkillName.Wrestling, 90.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 40;
|
||||
ControlSlots = ( Core.SE ) ? 2 : 1;
|
||||
}
|
||||
|
||||
public override bool BleedImmune{ get{ return true; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x3B8;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
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 );
|
||||
Dispel( ( (Mobile) spirtsOrVortexes[index] ) );
|
||||
spirtsOrVortexes.RemoveAt( index );
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public BladeSpirits( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
83
Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs
Normal file
83
Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a centaur corpse" )]
|
||||
public class Centaur : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
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 );
|
||||
|
||||
SetHits( 130, 172 );
|
||||
|
||||
SetDamage( 13, 24 );
|
||||
|
||||
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 );
|
||||
|
||||
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;
|
||||
|
||||
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 override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 8; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
|
||||
public Centaur( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( BaseSoundID == 678 )
|
||||
BaseSoundID = 679;
|
||||
}
|
||||
}
|
||||
}
|
||||
132
Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs
Normal file
132
Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an energy vortex corpse" )]
|
||||
public class EnergyVortex : BaseCreature
|
||||
{
|
||||
public override bool DeleteCorpseOnDeath { get { return Summoned; } }
|
||||
public override bool AlwaysMurderer{ get{ return true; } } // Or Llama vortices will appear gray.
|
||||
|
||||
public override double DispelDifficulty { get { return 80.0; } }
|
||||
public override double DispelFocus { get { return 20.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 );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EnergyVortex()
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "an energy vortex";
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
SetStr( 200 );
|
||||
SetDex( 200 );
|
||||
SetInt( 100 );
|
||||
|
||||
SetHits( ( Core.SE ) ? 140 : 70 );
|
||||
SetStam( 250 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 14, 17 );
|
||||
|
||||
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{ get{ return true; } }
|
||||
public override Poison PoisonImmune { get { return 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();
|
||||
}
|
||||
|
||||
|
||||
public EnergyVortex( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( BaseSoundID == 263 )
|
||||
BaseSoundID = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Mobiles/Monsters/Misc/Melee/FrostOoze.cs
Normal file
64
Scripts/Mobiles/Monsters/Misc/Melee/FrostOoze.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a frost ooze corpse" )]
|
||||
public class FrostOoze : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public FrostOoze() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a frost ooze";
|
||||
Body = 94;
|
||||
BaseSoundID = 456;
|
||||
|
||||
SetStr( 18, 30 );
|
||||
SetDex( 16, 21 );
|
||||
SetInt( 16, 20 );
|
||||
|
||||
SetHits( 13, 17 );
|
||||
|
||||
SetDamage( 3, 9 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = -450;
|
||||
|
||||
VirtualArmor = 38;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Gems, Utility.RandomMinMax( 1, 2 ) );
|
||||
}
|
||||
|
||||
public FrostOoze( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
232
Scripts/Mobiles/Monsters/Misc/Melee/Golem.cs
Normal file
232
Scripts/Mobiles/Monsters/Misc/Melee/Golem.cs
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a golem corpse" )]
|
||||
public class Golem : BaseCreature
|
||||
{
|
||||
private bool m_Stunning;
|
||||
|
||||
public override bool IsScaredOfScaryThings{ get{ return false; } }
|
||||
public override bool IsScaryToPets{ get{ return true; } }
|
||||
|
||||
public override bool IsBondable{ get{ return false; } }
|
||||
|
||||
public override FoodType FavoriteFood { get { return FoodType.None; } }
|
||||
|
||||
public override bool CanBeDistracted { get { return false; } }
|
||||
|
||||
[Constructable]
|
||||
public Golem() : this( false, 1.0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Golem( bool summoned, double scalar ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8 )
|
||||
{
|
||||
Name = "a golem";
|
||||
Body = 752;
|
||||
|
||||
if ( summoned )
|
||||
Hue = 2101;
|
||||
|
||||
SetStr( (int)(251*scalar), (int)(350*scalar) );
|
||||
SetDex( (int)(76*scalar), (int)(100*scalar) );
|
||||
SetInt( (int)(101*scalar), (int)(150*scalar) );
|
||||
|
||||
SetHits( (int)(151*scalar), (int)(210*scalar) );
|
||||
|
||||
SetDamage( (int)(13*scalar), (int)(24*scalar) );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, (int)(35*scalar), (int)(55*scalar) );
|
||||
|
||||
if ( summoned )
|
||||
SetResistance( ResistanceType.Fire, (int)(50*scalar), (int)(60*scalar) );
|
||||
else
|
||||
SetResistance( ResistanceType.Fire, (int)(100*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) );
|
||||
|
||||
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 ( summoned )
|
||||
{
|
||||
Fame = 10;
|
||||
Karma = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
Fame = 3500;
|
||||
Karma = -3500;
|
||||
}
|
||||
|
||||
if ( !summoned )
|
||||
{
|
||||
PackItem( new IronIngot( Utility.RandomMinMax( 13, 21 ) ) );
|
||||
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
PackItem( new PowerCrystal() );
|
||||
|
||||
if ( 0.15 > Utility.RandomDouble() )
|
||||
PackItem( new ClockworkAssembly() );
|
||||
|
||||
if ( 0.2 > Utility.RandomDouble() )
|
||||
PackItem( new ArcaneGem() );
|
||||
|
||||
if ( 0.25 > Utility.RandomDouble() )
|
||||
PackItem( new Gears() );
|
||||
}
|
||||
|
||||
ControlSlots = 3;
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
|
||||
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 bool DeleteOnRelease{ get{ return true; } }
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 541;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
if ( !Controlled )
|
||||
return 542;
|
||||
|
||||
return base.GetIdleSound();
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
if ( !Controlled )
|
||||
return 545;
|
||||
|
||||
return base.GetDeathSound();
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 562;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
if ( Controlled )
|
||||
return 320;
|
||||
|
||||
return base.GetHurtSound();
|
||||
}
|
||||
|
||||
public override bool AutoDispel{ get{ return !Controlled; } }
|
||||
public override bool BleedImmune{ get{ return true; } }
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if ( !m_Stunning && 0.3 > Utility.RandomDouble() )
|
||||
{
|
||||
m_Stunning = true;
|
||||
|
||||
defender.Animate( 21, 6, 1, true, false, 0 );
|
||||
this.PlaySound( 0xEE );
|
||||
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You have been stunned by a colossal blow!" );
|
||||
|
||||
BaseWeapon weapon = this.Weapon as BaseWeapon;
|
||||
if ( weapon != null )
|
||||
weapon.OnHit( this, defender );
|
||||
|
||||
if ( defender.Alive )
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerStateCallback( Recover_Callback ), defender );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback( object state )
|
||||
{
|
||||
Mobile defender = state as Mobile;
|
||||
|
||||
if ( defender != null )
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage( MessageType.Regular, 0x3B2, false, "You recover your senses." );
|
||||
}
|
||||
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if ( Controlled || Summoned )
|
||||
{
|
||||
Mobile master = ( this.ControlMaster );
|
||||
|
||||
if ( master == null )
|
||||
master = this.SummonMaster;
|
||||
|
||||
if ( master != null && master.Player && master.Map == this.Map && master.InRange( Location, 20 ) )
|
||||
{
|
||||
if ( master.Mana >= amount )
|
||||
{
|
||||
master.Mana -= amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount -= master.Mana;
|
||||
master.Mana = 0;
|
||||
master.Damage( amount );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
public override bool BardImmune{ get{ return !Core.AOS || Controlled; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
|
||||
public Golem( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
261
Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs
Normal file
261
Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a plague beast corpse" )]
|
||||
public class PlagueBeast : BaseCreature, IDevourer
|
||||
{
|
||||
private int m_DevourTotal;
|
||||
private int m_DevourGoal;
|
||||
private bool m_HasMetalChest = false;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int TotalDevoured
|
||||
{
|
||||
get { return m_DevourTotal; }
|
||||
set { m_DevourTotal = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int DevourGoal
|
||||
{
|
||||
get { return ( IsParagon ? m_DevourGoal + 25 : m_DevourGoal ); }
|
||||
set { m_DevourGoal = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool HasMetalChest
|
||||
{
|
||||
get { return m_HasMetalChest; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PlagueBeast() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a plague beast";
|
||||
Body = 775;
|
||||
|
||||
SetStr( 302, 500 );
|
||||
SetDex( 80 );
|
||||
SetInt( 16, 20 );
|
||||
|
||||
SetHits( 318, 404 );
|
||||
|
||||
SetDamage( 20, 24 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 60 );
|
||||
SetDamageType( ResistanceType.Poison, 40 );
|
||||
|
||||
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 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 35.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.0 );
|
||||
|
||||
Fame = 13000;
|
||||
Karma = -13000;
|
||||
|
||||
VirtualArmor = 30;
|
||||
PackArmor( 1, 5 );
|
||||
if ( Utility.RandomDouble() < 0.80 )
|
||||
PackItem( new PlagueBeastGland() );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < 0.33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
|
||||
|
||||
m_DevourTotal = 0;
|
||||
m_DevourGoal = Utility.RandomMinMax( 15, 25 ); // How many corpses must be devoured before a metal chest is awarded
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich );
|
||||
AddLoot( LootPack.Gems, Utility.Random( 1, 3 ) );
|
||||
// TODO: dungeon chest, healthy gland
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
defender.ApplyPoison( this, IsParagon ? Poison.Lethal : Poison.Deadly );
|
||||
defender.FixedParticles( 0x374A, 10, 15, 5021, EffectLayer.Waist );
|
||||
defender.PlaySound( 0x1CB );
|
||||
}
|
||||
|
||||
public override void OnDamagedBySpell( Mobile caster )
|
||||
{
|
||||
if ( this.Map != null && caster != this && 0.25 > Utility.RandomDouble() )
|
||||
{
|
||||
BaseCreature spawn = new PlagueSpawn( this );
|
||||
|
||||
spawn.Team = this.Team;
|
||||
spawn.MoveToWorld( this.Location, this.Map );
|
||||
spawn.Combatant = caster;
|
||||
|
||||
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
|
||||
}
|
||||
|
||||
base.OnDamagedBySpell( caster );
|
||||
}
|
||||
|
||||
public override bool AutoDispel{ get{ return true; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
if ( this.Map != null && attacker != this && 0.25 > Utility.RandomDouble() )
|
||||
{
|
||||
BaseCreature spawn = new PlagueSpawn( this );
|
||||
|
||||
spawn.Team = this.Team;
|
||||
spawn.MoveToWorld( this.Location, this.Map );
|
||||
spawn.Combatant = attacker;
|
||||
|
||||
Say( 1053034 ); // * The plague beast creates another beast from its flesh! *
|
||||
}
|
||||
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
}
|
||||
|
||||
public PlagueBeast( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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 override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 );
|
||||
|
||||
writer.Write( m_HasMetalChest );
|
||||
writer.Write( m_DevourTotal );
|
||||
writer.Write( m_DevourGoal );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_HasMetalChest = reader.ReadBool();
|
||||
m_DevourTotal = reader.ReadInt();
|
||||
m_DevourGoal = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
// Check to see if we need to devour any corpses
|
||||
IPooledEnumerable eable = GetItemsInRange( 3 ); // Get all corpses in range
|
||||
|
||||
foreach( Item item in eable )
|
||||
{
|
||||
if( item is Corpse ) // For each Corpse
|
||||
{
|
||||
Corpse corpse = item as Corpse;
|
||||
|
||||
// Ensure that the corpse was killed by us
|
||||
if( corpse != null && corpse.Killer == this && corpse.Owner != null )
|
||||
{
|
||||
if( !corpse.DevourCorpse() && !corpse.Devoured )
|
||||
PublicOverheadMessage( MessageType.Emote, 0x3B2, 1053032 ); // * The plague beast attempts to absorb the remains, but cannot! *
|
||||
}
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
#region IDevourer Members
|
||||
|
||||
public bool Devour( Corpse corpse )
|
||||
{
|
||||
if( corpse == null || corpse.Owner == null ) // sorry we can't devour because the corpse's owner is null
|
||||
return false;
|
||||
|
||||
if( corpse.Owner.Body.IsHuman )
|
||||
corpse.TurnToBones(); // Not bones yet, and we are a human body therefore we turn to bones.
|
||||
|
||||
IncreaseHits( (int)Math.Ceiling( (double)corpse.Owner.HitsMax * 0.75 ) );
|
||||
m_DevourTotal++;
|
||||
|
||||
PublicOverheadMessage( MessageType.Emote, 0x3B2, 1053033 ); // * The plague beast absorbs the fleshy remains of the corpse *
|
||||
|
||||
if( !m_HasMetalChest && m_DevourTotal >= DevourGoal )
|
||||
{
|
||||
PackItem( new MetalChest() );
|
||||
m_HasMetalChest = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void IncreaseHits( int hp )
|
||||
{
|
||||
int maxhits = 2000;
|
||||
|
||||
if ( this.IsParagon )
|
||||
maxhits = (int)(maxhits * Paragon.HitsBuff);
|
||||
|
||||
if( hp < 1000 && !Core.AOS )
|
||||
hp = (hp * 100) / 60;
|
||||
|
||||
if( HitsMaxSeed >= maxhits )
|
||||
{
|
||||
HitsMaxSeed = maxhits;
|
||||
|
||||
int newHits = this.Hits + hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000
|
||||
|
||||
this.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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
365
Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs
Normal file
365
Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs
Normal file
|
|
@ -0,0 +1,365 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a plague beast lord corpse" )]
|
||||
public class PlagueBeastLord : BaseCreature, ICarvable, IScissorable
|
||||
{
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
|
||||
private Mobile m_OpenedBy;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile OpenedBy
|
||||
{
|
||||
get { return m_OpenedBy; }
|
||||
set { m_OpenedBy = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsBleeding
|
||||
{
|
||||
get
|
||||
{
|
||||
Container pack = Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
{
|
||||
for ( int i = 0; i < pack.Items.Count; i++ )
|
||||
{
|
||||
PlagueBeastBlood blood = pack.Items[ i ] as PlagueBeastBlood;
|
||||
|
||||
if ( blood != null && !blood.Patched )
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private DecayTimer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public PlagueBeastLord() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a plague beast lord";
|
||||
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 ( m_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 ( m_OpenedBy != null && m_OpenedBy.Holding is PlagueBeastInnard )
|
||||
m_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, new TimerCallback( 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 ( m_OpenedBy != null && m_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 ( m_OpenedBy == null && IsAccessibleTo( from ) )
|
||||
{
|
||||
m_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, new TimerStateCallback<Mobile>( 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 ( m_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( m_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();
|
||||
|
||||
m_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;
|
||||
private int m_Count;
|
||||
private int m_Deadline;
|
||||
|
||||
public int Count
|
||||
{
|
||||
get { return m_Count; }
|
||||
}
|
||||
|
||||
public int Deadline
|
||||
{
|
||||
get { return m_Deadline; }
|
||||
}
|
||||
|
||||
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;
|
||||
m_Count = count;
|
||||
m_Deadline = deadline;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Lord == null || m_Lord.Deleted )
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_Count + 15 == m_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 ( m_Count + 10 == m_Deadline )
|
||||
{
|
||||
m_Lord.PlaySound( 0x21 );
|
||||
}
|
||||
else if ( m_Count + 5 == m_Deadline )
|
||||
{
|
||||
m_Lord.PlaySound( 0x1C2 );
|
||||
}
|
||||
else if ( m_Count == m_Deadline )
|
||||
{
|
||||
m_Lord.Unfreeze();
|
||||
|
||||
if ( m_Lord.OpenedBy != null )
|
||||
m_Lord.Kill();
|
||||
|
||||
Stop();
|
||||
}
|
||||
else if ( m_Count % 15 == 0 )
|
||||
m_Lord.PlaySound( 0x1BF );
|
||||
|
||||
m_Count++;
|
||||
}
|
||||
|
||||
public void StartDissolving()
|
||||
{
|
||||
m_Deadline = Math.Min( m_Count + 60, m_Deadline );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
149
Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs
Normal file
149
Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a plague spawn corpse" )]
|
||||
public class PlagueSpawn : BaseCreature
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_ExpireTime;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Owner
|
||||
{
|
||||
get{ return m_Owner; }
|
||||
set{ m_Owner = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime ExpireTime
|
||||
{
|
||||
get{ return m_ExpireTime; }
|
||||
set{ m_ExpireTime = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PlagueSpawn() : this( null )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool AlwaysMurderer{ get{ return true; } }
|
||||
|
||||
public override void DisplayPaperdollTo(Mobile to)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
if ( list[i] is ContextMenus.PaperdollEntry )
|
||||
list.RemoveAt( i-- );
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if ( m_Owner != null && ( DateTime.UtcNow >= m_ExpireTime || m_Owner.Deleted || Map != m_Owner.Map || !InRange( m_Owner, 16 ) ) )
|
||||
{
|
||||
PlaySound( GetIdleSound() );
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnThink();
|
||||
}
|
||||
}
|
||||
|
||||
public PlagueSpawn( Mobile owner ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
m_Owner = owner;
|
||||
m_ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
|
||||
|
||||
Name = "a plague spawn";
|
||||
Hue = Utility.Random( 0x11, 15 );
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
SetStr( 201, 300 );
|
||||
SetDex( 80 );
|
||||
SetInt( 16, 20 );
|
||||
|
||||
SetHits( 121, 180 );
|
||||
|
||||
SetDamage( 11, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
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 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.0 );
|
||||
SetSkill( SkillName.Tactics, 25.0 );
|
||||
SetSkill( SkillName.Wrestling, 50.0 );
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 20;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
AddLoot( LootPack.Gems );
|
||||
}
|
||||
|
||||
public PlagueSpawn( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
111
Scripts/Mobiles/Monsters/Misc/Melee/SandVortex.cs
Normal file
111
Scripts/Mobiles/Monsters/Misc/Melee/SandVortex.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a sand vortex corpse" )]
|
||||
public class SandVortex : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public SandVortex() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a sand vortex";
|
||||
Body = 790;
|
||||
BaseSoundID = 263;
|
||||
|
||||
SetStr( 96, 120 );
|
||||
SetDex( 171, 195 );
|
||||
SetInt( 76, 100 );
|
||||
|
||||
SetHits( 51, 62 );
|
||||
|
||||
SetDamage( 3, 16 );
|
||||
|
||||
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 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 150.0 );
|
||||
SetSkill( SkillName.Tactics, 70.0 );
|
||||
SetSkill( SkillName.Wrestling, 80.0 );
|
||||
|
||||
Fame = 4500;
|
||||
Karma = -4500;
|
||||
|
||||
VirtualArmor = 28;
|
||||
PackItem( new Bone() );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager, 2 );
|
||||
}
|
||||
|
||||
private DateTime m_NextAttack;
|
||||
|
||||
public override void OnActionCombat()
|
||||
{
|
||||
Mobile combatant = Combatant;
|
||||
|
||||
if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
|
||||
return;
|
||||
|
||||
if ( DateTime.UtcNow >= m_NextAttack )
|
||||
{
|
||||
SandAttack( combatant );
|
||||
m_NextAttack = DateTime.UtcNow + TimeSpan.FromSeconds( 10.0 + (10.0 * Utility.RandomDouble()) );
|
||||
}
|
||||
}
|
||||
|
||||
public void SandAttack( Mobile m )
|
||||
{
|
||||
DoHarmful( m );
|
||||
|
||||
m.FixedParticles( 0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist );
|
||||
|
||||
new InternalTimer( m, this ).Start();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile, m_From;
|
||||
|
||||
public InternalTimer( Mobile m, Mobile from ) : base( TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_From = from;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.PlaySound( 0x4CF );
|
||||
AOS.Damage( m_Mobile, m_From, Utility.RandomMinMax( 1, 40 ), 90, 10, 0, 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
public SandVortex( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Mobiles/Monsters/Misc/Melee/Slime.cs
Normal file
74
Scripts/Mobiles/Monsters/Misc/Melee/Slime.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a slimey corpse" )]
|
||||
public class Slime : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Slime() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a slime";
|
||||
Body = 51;
|
||||
BaseSoundID = 456;
|
||||
|
||||
Hue = Utility.RandomSlimeHue();
|
||||
|
||||
SetStr( 22, 34 );
|
||||
SetDex( 16, 21 );
|
||||
SetInt( 16, 20 );
|
||||
|
||||
SetHits( 15, 19 );
|
||||
|
||||
SetDamage( 1, 5 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
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 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
AddLoot( LootPack.Gems );
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lesser; } }
|
||||
public override Poison HitPoison{ get{ return Poison.Lesser; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish | FoodType.FruitsAndVegies | FoodType.GrainsAndHay | FoodType.Eggs; } }
|
||||
|
||||
public Slime( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue