Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,240 +1,250 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Spells.Seventh;
|
||||
using Server.Spells.Fifth;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
using Server.Spells.Fifth;
|
||||
using Server.Spells.Seventh;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Barracoon : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Greed;
|
||||
public class Barracoon : BaseChampion
|
||||
{
|
||||
[Constructible]
|
||||
public Barracoon() : base(AIType.AI_Melee)
|
||||
{
|
||||
Title = "the piper";
|
||||
Body = 0x190;
|
||||
Hue = 0x83EC;
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( FangOfRactus ) };
|
||||
public override Type[] SharedList => new[] { typeof( EmbroideredOakLeafCloak ),
|
||||
typeof( DjinnisRing ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( GuantletsOfAnger ) };
|
||||
SetStr(305, 425);
|
||||
SetDex(72, 150);
|
||||
SetInt(505, 750);
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof( SwampTile ), typeof( MonsterStatuette ) };
|
||||
SetHits(4200);
|
||||
SetStam(102, 300);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.Slime };
|
||||
SetDamage(25, 35);
|
||||
|
||||
public override string DefaultName => "Barracoon";
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
[Constructible]
|
||||
public Barracoon() : base( AIType.AI_Melee )
|
||||
{
|
||||
Title = "the piper";
|
||||
Body = 0x190;
|
||||
Hue = 0x83EC;
|
||||
SetResistance(ResistanceType.Physical, 60, 70);
|
||||
SetResistance(ResistanceType.Fire, 50, 60);
|
||||
SetResistance(ResistanceType.Cold, 50, 60);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetStr( 305, 425 );
|
||||
SetDex( 72, 150 );
|
||||
SetInt( 505, 750 );
|
||||
SetSkill(SkillName.MagicResist, 100.0);
|
||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
||||
|
||||
SetHits( 4200 );
|
||||
SetStam( 102, 300 );
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
|
||||
SetDamage( 25, 35 );
|
||||
VirtualArmor = 70;
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
AddItem(new FancyShirt(Utility.RandomGreenHue()));
|
||||
AddItem(new LongPants(Utility.RandomYellowHue()));
|
||||
AddItem(new JesterHat(Utility.RandomPinkHue()));
|
||||
AddItem(new Cloak(Utility.RandomPinkHue()));
|
||||
AddItem(new Sandals());
|
||||
|
||||
SetResistance( ResistanceType.Physical, 60, 70 );
|
||||
SetResistance( ResistanceType.Fire, 50, 60 );
|
||||
SetResistance( ResistanceType.Cold, 50, 60 );
|
||||
SetResistance( ResistanceType.Poison, 40, 50 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
HairItemID = 0x203B; // Short Hair
|
||||
HairHue = 0x94;
|
||||
}
|
||||
|
||||
SetSkill( SkillName.MagicResist, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 97.6, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
|
||||
public Barracoon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Greed;
|
||||
|
||||
VirtualArmor = 70;
|
||||
public override Type[] UniqueList => new[] { typeof(FangOfRactus) };
|
||||
|
||||
AddItem( new FancyShirt( Utility.RandomGreenHue() ) );
|
||||
AddItem( new LongPants( Utility.RandomYellowHue() ) );
|
||||
AddItem( new JesterHat( Utility.RandomPinkHue() ) );
|
||||
AddItem( new Cloak( Utility.RandomPinkHue() ) );
|
||||
AddItem( new Sandals() );
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(EmbroideredOakLeafCloak),
|
||||
typeof(DjinnisRing),
|
||||
typeof(DetectiveBoots),
|
||||
typeof(GuantletsOfAnger)
|
||||
};
|
||||
|
||||
HairItemID = 0x203B; // Short Hair
|
||||
HairHue = 0x94;
|
||||
}
|
||||
public override Type[] DecorativeList => new[] { typeof(SwampTile), typeof(MonsterStatuette) };
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 3 );
|
||||
}
|
||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.Slime };
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool AutoDispel => true;
|
||||
public override double AutoDispelChance => 1.0;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
public override string DefaultName => "Barracoon";
|
||||
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool AutoDispel => true;
|
||||
public override double AutoDispelChance => 1.0;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
|
||||
public void Polymorph( Mobile m )
|
||||
{
|
||||
if ( !m.CanBeginAction( typeof( PolymorphSpell ) ) || !m.CanBeginAction( typeof( IncognitoSpell ) ) || m.IsBodyMod )
|
||||
return;
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
IMount mount = m.Mount;
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 3);
|
||||
}
|
||||
|
||||
if ( mount != null )
|
||||
mount.Rider = null;
|
||||
public void Polymorph(Mobile m)
|
||||
{
|
||||
if (!m.CanBeginAction(typeof(PolymorphSpell)) || !m.CanBeginAction(typeof(IncognitoSpell)) || m.IsBodyMod)
|
||||
return;
|
||||
|
||||
if ( m.Mounted )
|
||||
return;
|
||||
IMount mount = m.Mount;
|
||||
|
||||
if ( m.BeginAction( typeof( PolymorphSpell ) ) )
|
||||
{
|
||||
Item disarm = m.FindItemOnLayer( Layer.OneHanded );
|
||||
if (mount != null)
|
||||
mount.Rider = null;
|
||||
|
||||
if ( disarm != null && disarm.Movable )
|
||||
m.AddToBackpack( disarm );
|
||||
if (m.Mounted)
|
||||
return;
|
||||
|
||||
disarm = m.FindItemOnLayer( Layer.TwoHanded );
|
||||
if (m.BeginAction(typeof(PolymorphSpell)))
|
||||
{
|
||||
Item disarm = m.FindItemOnLayer(Layer.OneHanded);
|
||||
|
||||
if ( disarm != null && disarm.Movable )
|
||||
m.AddToBackpack( disarm );
|
||||
if (disarm != null && disarm.Movable)
|
||||
m.AddToBackpack(disarm);
|
||||
|
||||
m.BodyMod = 42;
|
||||
m.HueMod = 0;
|
||||
disarm = m.FindItemOnLayer(Layer.TwoHanded);
|
||||
|
||||
new ExpirePolymorphTimer( m ).Start();
|
||||
}
|
||||
}
|
||||
if (disarm != null && disarm.Movable)
|
||||
m.AddToBackpack(disarm);
|
||||
|
||||
private class ExpirePolymorphTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
m.BodyMod = 42;
|
||||
m.HueMod = 0;
|
||||
|
||||
public ExpirePolymorphTimer( Mobile owner ) : base( TimeSpan.FromMinutes( 3.0 ) )
|
||||
{
|
||||
m_Owner = owner;
|
||||
new ExpirePolymorphTimer(m).Start();
|
||||
}
|
||||
}
|
||||
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
public void SpawnRatmen(Mobile target)
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( !m_Owner.CanBeginAction( typeof( PolymorphSpell ) ) )
|
||||
{
|
||||
m_Owner.BodyMod = 0;
|
||||
m_Owner.HueMod = -1;
|
||||
m_Owner.EndAction( typeof( PolymorphSpell ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
if (map == null)
|
||||
return;
|
||||
|
||||
public void SpawnRatmen( Mobile target )
|
||||
{
|
||||
Map map = Map;
|
||||
int rats = 0;
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
foreach (Mobile m in GetMobilesInRange(10))
|
||||
if (m is Ratman || m is RatmanArcher || m is RatmanMage)
|
||||
++rats;
|
||||
|
||||
int rats = 0;
|
||||
if (rats < 16)
|
||||
{
|
||||
PlaySound(0x3D);
|
||||
|
||||
foreach ( Mobile m in GetMobilesInRange( 10 ) )
|
||||
{
|
||||
if ( m is Ratman || m is RatmanArcher || m is RatmanMage )
|
||||
++rats;
|
||||
}
|
||||
int newRats = Utility.RandomMinMax(3, 6);
|
||||
|
||||
if ( rats < 16 )
|
||||
{
|
||||
PlaySound( 0x3D );
|
||||
for (int i = 0; i < newRats; ++i)
|
||||
{
|
||||
BaseCreature rat;
|
||||
|
||||
int newRats = Utility.RandomMinMax( 3, 6 );
|
||||
switch (Utility.Random(5))
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
case 1:
|
||||
rat = new Ratman();
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
rat = new RatmanArcher();
|
||||
break;
|
||||
case 4:
|
||||
rat = new RatmanMage();
|
||||
break;
|
||||
}
|
||||
|
||||
for ( int i = 0; i < newRats; ++i )
|
||||
{
|
||||
BaseCreature rat;
|
||||
rat.Team = Team;
|
||||
|
||||
switch ( Utility.Random( 5 ) )
|
||||
{
|
||||
default:
|
||||
case 0: case 1: rat = new Ratman(); break;
|
||||
case 2: case 3: rat = new RatmanArcher(); break;
|
||||
case 4: rat = new RatmanMage(); break;
|
||||
}
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
rat.Team = Team;
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
for ( int j = 0; !validLocation && j < 10; ++j )
|
||||
{
|
||||
int x = X + Utility.Random( 3 ) - 1;
|
||||
int y = Y + Utility.Random( 3 ) - 1;
|
||||
int z = map.GetAverageZ( x, y );
|
||||
rat.MoveToWorld(loc, map);
|
||||
rat.Combatant = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, Z );
|
||||
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, z );
|
||||
}
|
||||
public void DoSpecialAbility(Mobile target)
|
||||
{
|
||||
if (target == null || target.Deleted) //sanity
|
||||
return;
|
||||
if (0.6 >= Utility.RandomDouble()) // 60% chance to polymorph attacker into a ratman
|
||||
Polymorph(target);
|
||||
|
||||
rat.MoveToWorld( loc, map );
|
||||
rat.Combatant = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (0.2 >= Utility.RandomDouble()) // 20% chance to more ratmen
|
||||
SpawnRatmen(target);
|
||||
|
||||
public void DoSpecialAbility( Mobile target )
|
||||
{
|
||||
if ( target == null || target.Deleted ) //sanity
|
||||
return;
|
||||
if ( 0.6 >= Utility.RandomDouble() ) // 60% chance to polymorph attacker into a ratman
|
||||
Polymorph( target );
|
||||
if (Hits < 500 && !IsBodyMod) // Baracoon is low on life, polymorph into a ratman
|
||||
Polymorph(this);
|
||||
}
|
||||
|
||||
if ( 0.2 >= Utility.RandomDouble() ) // 20% chance to more ratmen
|
||||
SpawnRatmen( target );
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
if ( Hits < 500 && !IsBodyMod ) // Baracoon is low on life, polymorph into a ratman
|
||||
Polymorph( this );
|
||||
}
|
||||
DoSpecialAbility(attacker);
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
DoSpecialAbility( attacker );
|
||||
}
|
||||
DoSpecialAbility(defender);
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
DoSpecialAbility( defender );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public Barracoon( 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 ExpirePolymorphTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public ExpirePolymorphTimer(Mobile owner) : base(TimeSpan.FromMinutes(3.0))
|
||||
{
|
||||
m_Owner = owner;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Priority = TimerPriority.OneSecond;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (!m_Owner.CanBeginAction(typeof(PolymorphSpell)))
|
||||
{
|
||||
m_Owner.BodyMod = 0;
|
||||
m_Owner.HueMod = -1;
|
||||
m_Owner.EndAction(typeof(PolymorphSpell));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,326 +1,331 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseChampion : BaseCreature
|
||||
{
|
||||
public override bool CanMoveOverObstacles => true;
|
||||
public override bool CanDestroyObstacles => true;
|
||||
public abstract class BaseChampion : BaseCreature
|
||||
{
|
||||
public BaseChampion(AIType aiType) : this(aiType, FightMode.Closest)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseChampion( AIType aiType ) : this( aiType, FightMode.Closest )
|
||||
{
|
||||
}
|
||||
public BaseChampion(AIType aiType, FightMode mode) : base(aiType, mode, 18, 1, 0.1, 0.2)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseChampion( AIType aiType, FightMode mode ) : base( aiType, mode, 18, 1, 0.1, 0.2 )
|
||||
{
|
||||
}
|
||||
public BaseChampion(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseChampion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool CanMoveOverObstacles => true;
|
||||
public override bool CanDestroyObstacles => true;
|
||||
|
||||
public abstract ChampionSkullType SkullType{ get; }
|
||||
public abstract ChampionSkullType SkullType{ get; }
|
||||
|
||||
public abstract Type[] UniqueList{ get; }
|
||||
public abstract Type[] SharedList{ get; }
|
||||
public abstract Type[] DecorativeList{ get; }
|
||||
public abstract MonsterStatuetteType[] StatueTypes{ get; }
|
||||
public abstract Type[] UniqueList{ get; }
|
||||
public abstract Type[] SharedList{ get; }
|
||||
public abstract Type[] DecorativeList{ get; }
|
||||
public abstract MonsterStatuetteType[] StatueTypes{ get; }
|
||||
|
||||
public virtual bool NoGoodies => false;
|
||||
public virtual bool NoGoodies => false;
|
||||
|
||||
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 );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public Item GetArtifact()
|
||||
{
|
||||
double random = Utility.RandomDouble();
|
||||
if ( 0.05 >= random )
|
||||
return CreateArtifact( UniqueList );
|
||||
if ( 0.15 >= random )
|
||||
return CreateArtifact( SharedList );
|
||||
if ( 0.30 >= random )
|
||||
return CreateArtifact( DecorativeList );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public Item GetArtifact()
|
||||
{
|
||||
double random = Utility.RandomDouble();
|
||||
if (0.05 >= random)
|
||||
return CreateArtifact(UniqueList);
|
||||
if (0.15 >= random)
|
||||
return CreateArtifact(SharedList);
|
||||
if (0.30 >= random)
|
||||
return CreateArtifact(DecorativeList);
|
||||
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Item CreateArtifact( Type[] list )
|
||||
{
|
||||
if ( list.Length == 0 )
|
||||
return null;
|
||||
public Item CreateArtifact(Type[] list)
|
||||
{
|
||||
if (list.Length == 0)
|
||||
return null;
|
||||
|
||||
int random = Utility.Random( list.Length );
|
||||
|
||||
Type type = list[random];
|
||||
|
||||
Item artifact = Loot.Construct( type );
|
||||
|
||||
if ( artifact is MonsterStatuette && StatueTypes.Length > 0 )
|
||||
{
|
||||
((MonsterStatuette)artifact).Type = StatueTypes[Utility.Random( StatueTypes.Length )];
|
||||
((MonsterStatuette)artifact).LootType = LootType.Regular;
|
||||
}
|
||||
|
||||
return artifact;
|
||||
}
|
||||
|
||||
private PowerScroll CreateRandomPowerScroll()
|
||||
{
|
||||
int level;
|
||||
double random = Utility.RandomDouble();
|
||||
|
||||
if ( 0.05 >= random )
|
||||
level = 20;
|
||||
else if ( 0.4 >= random )
|
||||
level = 15;
|
||||
else
|
||||
level = 10;
|
||||
|
||||
return PowerScroll.CreateRandomNoCraft( level, level );
|
||||
}
|
||||
|
||||
public void GivePowerScrolls()
|
||||
{
|
||||
if ( Map != Map.Felucca )
|
||||
return;
|
||||
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
|
||||
|
||||
for ( int i = rights.Count - 1; i >= 0; --i )
|
||||
{
|
||||
DamageStore ds = rights[i];
|
||||
|
||||
if ( ds.m_HasRight )
|
||||
toGive.Add( ds.m_Mobile );
|
||||
}
|
||||
|
||||
if ( toGive.Count == 0 )
|
||||
return;
|
||||
|
||||
for( int i = 0; i < toGive.Count; i++ )
|
||||
{
|
||||
Mobile m = toGive[i];
|
||||
|
||||
if ( !(m is PlayerMobile) )
|
||||
continue;
|
||||
|
||||
bool gainedPath = false;
|
||||
|
||||
int pointsToGain = 800;
|
||||
|
||||
if ( VirtueHelper.Award( m, VirtueName.Valor, pointsToGain, ref gainedPath ) )
|
||||
{
|
||||
if ( gainedPath )
|
||||
m.SendLocalizedMessage( 1054032 ); // You have gained a path in Valor!
|
||||
else
|
||||
m.SendLocalizedMessage( 1054030 ); // You have gained in Valor!
|
||||
|
||||
//No delay on Valor gains
|
||||
}
|
||||
}
|
||||
|
||||
// Randomize
|
||||
for ( int i = 0; i < toGive.Count; ++i )
|
||||
{
|
||||
int rand = Utility.Random( toGive.Count );
|
||||
Mobile hold = toGive[i];
|
||||
toGive[i] = toGive[rand];
|
||||
toGive[rand] = hold;
|
||||
}
|
||||
|
||||
for ( int i = 0; i < 6; ++i )
|
||||
{
|
||||
Mobile m = toGive[i % toGive.Count];
|
||||
|
||||
PowerScroll ps = CreateRandomPowerScroll();
|
||||
|
||||
GivePowerScrollTo( m, ps );
|
||||
}
|
||||
}
|
||||
|
||||
public static void GivePowerScrollTo( Mobile m, PowerScroll ps )
|
||||
{
|
||||
if ( ps == null || m == null ) //sanity
|
||||
return;
|
||||
|
||||
m.SendLocalizedMessage( 1049524 ); // You have received a scroll of power!
|
||||
|
||||
if ( !Core.SE || m.Alive )
|
||||
m.AddToBackpack( ps );
|
||||
else
|
||||
{
|
||||
if ( m.Corpse != null && !m.Corpse.Deleted )
|
||||
m.Corpse.DropItem( ps );
|
||||
else
|
||||
m.AddToBackpack( ps );
|
||||
}
|
||||
|
||||
if ( m is PlayerMobile pm )
|
||||
{
|
||||
for( int j = 0; j < pm.JusticeProtectors.Count; ++j )
|
||||
{
|
||||
Mobile prot = pm.JusticeProtectors[j];
|
||||
|
||||
if ( prot.Map != pm.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion( pm, prot ) )
|
||||
continue;
|
||||
|
||||
int chance = 0;
|
||||
|
||||
switch( VirtueHelper.GetLevel( prot, VirtueName.Justice ) )
|
||||
{
|
||||
case VirtueLevel.Seeker: chance = 60; break;
|
||||
case VirtueLevel.Follower: chance = 80; break;
|
||||
case VirtueLevel.Knight: chance = 100; break;
|
||||
}
|
||||
|
||||
if ( chance > Utility.Random( 100 ) )
|
||||
{
|
||||
PowerScroll powerScroll = new PowerScroll( ps.Skill, ps.Value );
|
||||
|
||||
prot.SendLocalizedMessage( 1049368 ); // You have been rewarded for your dedication to Justice!
|
||||
|
||||
if ( !Core.SE || prot.Alive )
|
||||
prot.AddToBackpack( powerScroll );
|
||||
else
|
||||
{
|
||||
if ( prot.Corpse != null && !prot.Corpse.Deleted )
|
||||
prot.Corpse.DropItem( powerScroll );
|
||||
else
|
||||
prot.AddToBackpack( powerScroll );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if ( !NoKillAwards )
|
||||
{
|
||||
GivePowerScrolls();
|
||||
|
||||
if ( NoGoodies )
|
||||
return base.OnBeforeDeath();
|
||||
|
||||
Map map = Map;
|
||||
|
||||
if ( map != null )
|
||||
{
|
||||
for ( int x = -12; x <= 12; ++x )
|
||||
{
|
||||
for ( int y = -12; y <= 12; ++y )
|
||||
{
|
||||
double dist = Math.Sqrt(x*x+y*y);
|
||||
|
||||
if ( dist <= 12 )
|
||||
new GoodiesTimer( map, X + x, Y + y ).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
if ( Map == Map.Felucca )
|
||||
{
|
||||
//TODO: Confirm SE change or AoS one too?
|
||||
List<DamageStore> rights = GetLootingRights( DamageEntries, HitsMax );
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
|
||||
for ( int i = rights.Count - 1; i >= 0; --i )
|
||||
{
|
||||
DamageStore ds = rights[i];
|
||||
|
||||
if ( ds.m_HasRight )
|
||||
toGive.Add( ds.m_Mobile );
|
||||
}
|
||||
|
||||
if ( toGive.Count > 0 )
|
||||
toGive[Utility.Random( toGive.Count )].AddToBackpack( new ChampionSkull( SkullType ) );
|
||||
else
|
||||
c.DropItem( new ChampionSkull( SkullType ) );
|
||||
}
|
||||
|
||||
base.OnDeath( c );
|
||||
}
|
||||
|
||||
private class GoodiesTimer : Timer
|
||||
{
|
||||
private Map m_Map;
|
||||
private int m_X, m_Y;
|
||||
|
||||
public GoodiesTimer( Map map, int x, int y ) : base( TimeSpan.FromSeconds( Utility.RandomDouble() * 10.0 ) )
|
||||
{
|
||||
m_Map = map;
|
||||
m_X = x;
|
||||
m_Y = y;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
int z = m_Map.GetAverageZ( m_X, m_Y );
|
||||
bool canFit = m_Map.CanFit( m_X, m_Y, z, 6, false, false );
|
||||
|
||||
for ( int i = -3; !canFit && i <= 3; ++i )
|
||||
{
|
||||
canFit = m_Map.CanFit( m_X, m_Y, z + i, 6, false, false );
|
||||
|
||||
if ( canFit )
|
||||
z += i;
|
||||
}
|
||||
|
||||
if ( !canFit )
|
||||
return;
|
||||
|
||||
Gold g = new Gold( 500, 1000 );
|
||||
|
||||
g.MoveToWorld( new Point3D( m_X, m_Y, z ), m_Map );
|
||||
|
||||
if ( 0.5 >= Utility.RandomDouble() )
|
||||
{
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: // Fire column
|
||||
{
|
||||
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x3709, 10, 30, 5052 );
|
||||
Effects.PlaySound( g, g.Map, 0x208 );
|
||||
|
||||
break;
|
||||
}
|
||||
case 1: // Explosion
|
||||
{
|
||||
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36BD, 20, 10, 5044 );
|
||||
Effects.PlaySound( g, g.Map, 0x307 );
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: // Ball of fire
|
||||
{
|
||||
Effects.SendLocationParticles( EffectItem.Create( g.Location, g.Map, EffectItem.DefaultDuration ), 0x36FE, 10, 10, 5052 );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
int random = Utility.Random(list.Length);
|
||||
|
||||
Type type = list[random];
|
||||
|
||||
Item artifact = Loot.Construct(type);
|
||||
|
||||
if (artifact is MonsterStatuette && StatueTypes.Length > 0)
|
||||
{
|
||||
((MonsterStatuette)artifact).Type = StatueTypes[Utility.Random(StatueTypes.Length)];
|
||||
((MonsterStatuette)artifact).LootType = LootType.Regular;
|
||||
}
|
||||
|
||||
return artifact;
|
||||
}
|
||||
|
||||
private PowerScroll CreateRandomPowerScroll()
|
||||
{
|
||||
int level;
|
||||
double random = Utility.RandomDouble();
|
||||
|
||||
if (0.05 >= random)
|
||||
level = 20;
|
||||
else if (0.4 >= random)
|
||||
level = 15;
|
||||
else
|
||||
level = 10;
|
||||
|
||||
return PowerScroll.CreateRandomNoCraft(level, level);
|
||||
}
|
||||
|
||||
public void GivePowerScrolls()
|
||||
{
|
||||
if (Map != Map.Felucca)
|
||||
return;
|
||||
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
List<DamageStore> rights = GetLootingRights(DamageEntries, HitsMax);
|
||||
|
||||
for (int i = rights.Count - 1; i >= 0; --i)
|
||||
{
|
||||
DamageStore ds = rights[i];
|
||||
|
||||
if (ds.m_HasRight)
|
||||
toGive.Add(ds.m_Mobile);
|
||||
}
|
||||
|
||||
if (toGive.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < toGive.Count; i++)
|
||||
{
|
||||
Mobile m = toGive[i];
|
||||
|
||||
if (!(m is PlayerMobile))
|
||||
continue;
|
||||
|
||||
bool gainedPath = false;
|
||||
|
||||
int pointsToGain = 800;
|
||||
|
||||
if (VirtueHelper.Award(m, VirtueName.Valor, pointsToGain, ref gainedPath))
|
||||
{
|
||||
if (gainedPath)
|
||||
m.SendLocalizedMessage(1054032); // You have gained a path in Valor!
|
||||
else
|
||||
m.SendLocalizedMessage(1054030); // You have gained in Valor!
|
||||
|
||||
//No delay on Valor gains
|
||||
}
|
||||
}
|
||||
|
||||
// Randomize
|
||||
for (int i = 0; i < toGive.Count; ++i)
|
||||
{
|
||||
int rand = Utility.Random(toGive.Count);
|
||||
Mobile hold = toGive[i];
|
||||
toGive[i] = toGive[rand];
|
||||
toGive[rand] = hold;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 6; ++i)
|
||||
{
|
||||
Mobile m = toGive[i % toGive.Count];
|
||||
|
||||
PowerScroll ps = CreateRandomPowerScroll();
|
||||
|
||||
GivePowerScrollTo(m, ps);
|
||||
}
|
||||
}
|
||||
|
||||
public static void GivePowerScrollTo(Mobile m, PowerScroll ps)
|
||||
{
|
||||
if (ps == null || m == null) //sanity
|
||||
return;
|
||||
|
||||
m.SendLocalizedMessage(1049524); // You have received a scroll of power!
|
||||
|
||||
if (!Core.SE || m.Alive)
|
||||
{
|
||||
m.AddToBackpack(ps);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m.Corpse != null && !m.Corpse.Deleted)
|
||||
m.Corpse.DropItem(ps);
|
||||
else
|
||||
m.AddToBackpack(ps);
|
||||
}
|
||||
|
||||
if (m is PlayerMobile pm)
|
||||
for (int j = 0; j < pm.JusticeProtectors.Count; ++j)
|
||||
{
|
||||
Mobile prot = pm.JusticeProtectors[j];
|
||||
|
||||
if (prot.Map != pm.Map || prot.Kills >= 5 || prot.Criminal || !JusticeVirtue.CheckMapRegion(pm, prot))
|
||||
continue;
|
||||
|
||||
int chance = 0;
|
||||
|
||||
switch (VirtueHelper.GetLevel(prot, VirtueName.Justice))
|
||||
{
|
||||
case VirtueLevel.Seeker:
|
||||
chance = 60;
|
||||
break;
|
||||
case VirtueLevel.Follower:
|
||||
chance = 80;
|
||||
break;
|
||||
case VirtueLevel.Knight:
|
||||
chance = 100;
|
||||
break;
|
||||
}
|
||||
|
||||
if (chance > Utility.Random(100))
|
||||
{
|
||||
PowerScroll powerScroll = new PowerScroll(ps.Skill, ps.Value);
|
||||
|
||||
prot.SendLocalizedMessage(1049368); // You have been rewarded for your dedication to Justice!
|
||||
|
||||
if (!Core.SE || prot.Alive)
|
||||
{
|
||||
prot.AddToBackpack(powerScroll);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (prot.Corpse != null && !prot.Corpse.Deleted)
|
||||
prot.Corpse.DropItem(powerScroll);
|
||||
else
|
||||
prot.AddToBackpack(powerScroll);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!NoKillAwards)
|
||||
{
|
||||
GivePowerScrolls();
|
||||
|
||||
if (NoGoodies)
|
||||
return base.OnBeforeDeath();
|
||||
|
||||
Map map = Map;
|
||||
|
||||
if (map != null)
|
||||
for (int x = -12; x <= 12; ++x)
|
||||
for (int y = -12; y <= 12; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist <= 12)
|
||||
new GoodiesTimer(map, X + x, Y + y).Start();
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
if (Map == Map.Felucca)
|
||||
{
|
||||
//TODO: Confirm SE change or AoS one too?
|
||||
List<DamageStore> rights = GetLootingRights(DamageEntries, HitsMax);
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
|
||||
for (int i = rights.Count - 1; i >= 0; --i)
|
||||
{
|
||||
DamageStore ds = rights[i];
|
||||
|
||||
if (ds.m_HasRight)
|
||||
toGive.Add(ds.m_Mobile);
|
||||
}
|
||||
|
||||
if (toGive.Count > 0)
|
||||
toGive[Utility.Random(toGive.Count)].AddToBackpack(new ChampionSkull(SkullType));
|
||||
else
|
||||
c.DropItem(new ChampionSkull(SkullType));
|
||||
}
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
private class GoodiesTimer : Timer
|
||||
{
|
||||
private Map m_Map;
|
||||
private int m_X, m_Y;
|
||||
|
||||
public GoodiesTimer(Map map, int x, int y) : base(TimeSpan.FromSeconds(Utility.RandomDouble() * 10.0))
|
||||
{
|
||||
m_Map = map;
|
||||
m_X = x;
|
||||
m_Y = y;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
int z = m_Map.GetAverageZ(m_X, m_Y);
|
||||
bool canFit = m_Map.CanFit(m_X, m_Y, z, 6, false, false);
|
||||
|
||||
for (int i = -3; !canFit && i <= 3; ++i)
|
||||
{
|
||||
canFit = m_Map.CanFit(m_X, m_Y, z + i, 6, false, false);
|
||||
|
||||
if (canFit)
|
||||
z += i;
|
||||
}
|
||||
|
||||
if (!canFit)
|
||||
return;
|
||||
|
||||
Gold g = new Gold(500, 1000);
|
||||
|
||||
g.MoveToWorld(new Point3D(m_X, m_Y, z), m_Map);
|
||||
|
||||
if (0.5 >= Utility.RandomDouble())
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0: // Fire column
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration),
|
||||
0x3709, 10, 30, 5052);
|
||||
Effects.PlaySound(g, g.Map, 0x208);
|
||||
|
||||
break;
|
||||
}
|
||||
case 1: // Explosion
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration),
|
||||
0x36BD, 20, 10, 5044);
|
||||
Effects.PlaySound(g, g.Map, 0x307);
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: // Ball of fire
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration),
|
||||
0x36FE, 10, 10, 5052);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,148 +1,163 @@
|
|||
using Server.Items;
|
||||
using Server.Guilds;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseShieldGuard : BaseCreature
|
||||
{
|
||||
public BaseShieldGuard() : base( AIType.AI_Melee, FightMode.Aggressor, 14, 1, 0.8, 1.6 )
|
||||
{
|
||||
InitStats( 1000, 1000, 1000 );
|
||||
Title = "the guard";
|
||||
public abstract class BaseShieldGuard : BaseCreature
|
||||
{
|
||||
public BaseShieldGuard() : base(AIType.AI_Melee, FightMode.Aggressor, 14, 1, 0.8, 1.6)
|
||||
{
|
||||
InitStats(1000, 1000, 1000);
|
||||
Title = "the guard";
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
if ( Female = Utility.RandomBool() )
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName( "female" );
|
||||
if (Female = Utility.RandomBool())
|
||||
{
|
||||
Body = 0x191;
|
||||
Name = NameList.RandomName("female");
|
||||
|
||||
AddItem( new FemalePlateChest() );
|
||||
AddItem( new PlateArms() );
|
||||
AddItem( new PlateLegs() );
|
||||
AddItem(new FemalePlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
switch( Utility.Random( 2 ) )
|
||||
{
|
||||
case 0: AddItem( new Doublet( Utility.RandomNondyedHue() ) ); break;
|
||||
case 1: AddItem( new BodySash( Utility.RandomNondyedHue() ) ); break;
|
||||
}
|
||||
switch (Utility.Random(2))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Doublet(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new BodySash(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
}
|
||||
|
||||
switch( Utility.Random( 2 ) )
|
||||
{
|
||||
case 0: AddItem( new Skirt( Utility.RandomNondyedHue() ) ); break;
|
||||
case 1: AddItem( new Kilt( Utility.RandomNondyedHue() ) ); break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName( "male" );
|
||||
switch (Utility.Random(2))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Skirt(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Kilt(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
AddItem( new PlateChest() );
|
||||
AddItem( new PlateArms() );
|
||||
AddItem( new PlateLegs() );
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
switch( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: AddItem( new Doublet( Utility.RandomNondyedHue() ) ); break;
|
||||
case 1: AddItem( new Tunic( Utility.RandomNondyedHue() ) ); break;
|
||||
case 2: AddItem( new BodySash( Utility.RandomNondyedHue() ) ); break;
|
||||
}
|
||||
}
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
AddItem(new Doublet(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
case 1:
|
||||
AddItem(new Tunic(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
case 2:
|
||||
AddItem(new BodySash(Utility.RandomNondyedHue()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Utility.AssignRandomHair( this );
|
||||
if ( Utility.RandomBool() )
|
||||
Utility.AssignRandomFacialHair( this, HairHue );
|
||||
Utility.AssignRandomHair(this);
|
||||
if (Utility.RandomBool())
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
VikingSword weapon = new VikingSword();
|
||||
weapon.Movable = false;
|
||||
AddItem( weapon );
|
||||
VikingSword weapon = new VikingSword();
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
|
||||
BaseShield shield = Shield;
|
||||
shield.Movable = false;
|
||||
AddItem( shield );
|
||||
BaseShield shield = Shield;
|
||||
shield.Movable = false;
|
||||
AddItem(shield);
|
||||
|
||||
PackGold( 250, 500 );
|
||||
PackGold(250, 500);
|
||||
|
||||
Skills[SkillName.Anatomy].Base = 120.0;
|
||||
Skills[SkillName.Tactics].Base = 120.0;
|
||||
Skills[SkillName.Swords].Base = 120.0;
|
||||
Skills[SkillName.MagicResist].Base = 120.0;
|
||||
Skills[SkillName.DetectHidden].Base = 100.0;
|
||||
}
|
||||
Skills[SkillName.Anatomy].Base = 120.0;
|
||||
Skills[SkillName.Tactics].Base = 120.0;
|
||||
Skills[SkillName.Swords].Base = 120.0;
|
||||
Skills[SkillName.MagicResist].Base = 120.0;
|
||||
Skills[SkillName.DetectHidden].Base = 100.0;
|
||||
}
|
||||
|
||||
public abstract int Keyword{ get; }
|
||||
public abstract BaseShield Shield{ get; }
|
||||
public abstract int SignupNumber{ get; }
|
||||
public abstract GuildType Type{ get; }
|
||||
public BaseShieldGuard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
if ( from.InRange( Location, 2 ) )
|
||||
return true;
|
||||
public abstract int Keyword{ get; }
|
||||
public abstract BaseShield Shield{ get; }
|
||||
public abstract int SignupNumber{ get; }
|
||||
public abstract GuildType Type{ get; }
|
||||
|
||||
return base.HandlesOnSpeech( from );
|
||||
}
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(Location, 2))
|
||||
return true;
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
if ( !e.Handled && e.HasKeyword( Keyword ) && e.Mobile.InRange( Location, 2 ) )
|
||||
{
|
||||
e.Handled = true;
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
Mobile from = e.Mobile;
|
||||
Guild g = from.Guild as Guild;
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
if (!e.Handled && e.HasKeyword(Keyword) && e.Mobile.InRange(Location, 2))
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
if ( g == null || g.Type != Type )
|
||||
{
|
||||
Say( SignupNumber );
|
||||
}
|
||||
else
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
BaseShield shield = Shield;
|
||||
Item twoHanded = from.FindItemOnLayer( Layer.TwoHanded );
|
||||
Mobile from = e.Mobile;
|
||||
Guild g = from.Guild as Guild;
|
||||
|
||||
if ( (pack?.FindItemByType( shield.GetType() ) != null) || ( twoHanded != null && shield.GetType().IsAssignableFrom( twoHanded.GetType() ) ) )
|
||||
{
|
||||
Say( 1007110 ); // Why dost thou ask about virtue guards when thou art one?
|
||||
shield.Delete();
|
||||
}
|
||||
else if ( from.PlaceInBackpack( shield ) )
|
||||
{
|
||||
Say( Utility.Random( 1007101, 5 ) );
|
||||
Say( 1007139 ); // I see you are in need of our shield, Here you go.
|
||||
from.AddToBackpack( shield );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502868 ); // Your backpack is too full.
|
||||
shield.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (g == null || g.Type != Type)
|
||||
{
|
||||
Say(SignupNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
BaseShield shield = Shield;
|
||||
Item twoHanded = from.FindItemOnLayer(Layer.TwoHanded);
|
||||
|
||||
base.OnSpeech( e );
|
||||
}
|
||||
if (pack?.FindItemByType(shield.GetType()) != null ||
|
||||
twoHanded != null && shield.GetType().IsAssignableFrom(twoHanded.GetType()))
|
||||
{
|
||||
Say(1007110); // Why dost thou ask about virtue guards when thou art one?
|
||||
shield.Delete();
|
||||
}
|
||||
else if (from.PlaceInBackpack(shield))
|
||||
{
|
||||
Say(Utility.Random(1007101, 5));
|
||||
Say(1007139); // I see you are in need of our shield, Here you go.
|
||||
from.AddToBackpack(shield);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502868); // Your backpack is too full.
|
||||
shield.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseShieldGuard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
base.OnSpeech(e);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +1,36 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class CapturedHordeMinion : HordeMinion
|
||||
{
|
||||
[Constructible]
|
||||
public CapturedHordeMinion()
|
||||
{
|
||||
FightMode = FightMode.None;
|
||||
}
|
||||
public class CapturedHordeMinion : HordeMinion
|
||||
{
|
||||
[Constructible]
|
||||
public CapturedHordeMinion()
|
||||
{
|
||||
FightMode = FightMode.None;
|
||||
}
|
||||
|
||||
public override bool InitialInnocent => true;
|
||||
public CapturedHordeMinion(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool InitialInnocent => true;
|
||||
|
||||
public CapturedHordeMinion( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
using Server.Items;
|
||||
using Server.Guilds;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ChaosGuard : BaseShieldGuard
|
||||
{
|
||||
public override int Keyword => 0x22; // *chaos shield*
|
||||
public override BaseShield Shield => new ChaosShield();
|
||||
public override int SignupNumber => 1007140; // Sign up with a guild of chaos if thou art interested.
|
||||
public override GuildType Type => GuildType.Chaos;
|
||||
public class ChaosGuard : BaseShieldGuard
|
||||
{
|
||||
[Constructible]
|
||||
public ChaosGuard()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool BardImmune => true;
|
||||
public ChaosGuard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ChaosGuard()
|
||||
{
|
||||
}
|
||||
public override int Keyword => 0x22; // *chaos shield*
|
||||
public override BaseShield Shield => new ChaosShield();
|
||||
public override int SignupNumber => 1007140; // Sign up with a guild of chaos if thou art interested.
|
||||
public override GuildType Type => GuildType.Chaos;
|
||||
|
||||
public ChaosGuard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool BardImmune => true;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,79 +2,78 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class DarkGuardian : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "a dark guardians' corpse";
|
||||
public override string DefaultName => "a dark guardian";
|
||||
public class DarkGuardian : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public DarkGuardian() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 78;
|
||||
BaseSoundID = 0x3E9;
|
||||
|
||||
[Constructible]
|
||||
public DarkGuardian() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Body = 78;
|
||||
BaseSoundID = 0x3E9;
|
||||
SetStr(125, 150);
|
||||
SetDex(100, 120);
|
||||
SetInt(200, 235);
|
||||
|
||||
SetStr( 125, 150 );
|
||||
SetDex( 100, 120 );
|
||||
SetInt( 200, 235 );
|
||||
SetHits(150, 180);
|
||||
|
||||
SetHits( 150, 180 );
|
||||
SetDamage(43, 48);
|
||||
|
||||
SetDamage( 43, 48 );
|
||||
SetDamageType(ResistanceType.Physical, 10);
|
||||
SetDamageType(ResistanceType.Cold, 40);
|
||||
SetDamageType(ResistanceType.Energy, 50);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 10 );
|
||||
SetDamageType( ResistanceType.Cold, 40 );
|
||||
SetDamageType( ResistanceType.Energy, 50 );
|
||||
SetResistance(ResistanceType.Physical, 40, 50);
|
||||
SetResistance(ResistanceType.Fire, 20, 45);
|
||||
SetResistance(ResistanceType.Cold, 50, 60);
|
||||
SetResistance(ResistanceType.Poison, 20, 45);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 20, 45 );
|
||||
SetResistance( ResistanceType.Cold, 50, 60 );
|
||||
SetResistance( ResistanceType.Poison, 20, 45 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
SetSkill(SkillName.EvalInt, 40.1, 50);
|
||||
SetSkill(SkillName.Magery, 50.1, 60.0);
|
||||
SetSkill(SkillName.Meditation, 85.1, 95.0);
|
||||
SetSkill(SkillName.MagicResist, 50.1, 70.0);
|
||||
SetSkill(SkillName.Tactics, 50.1, 70.0);
|
||||
|
||||
SetSkill( SkillName.EvalInt, 40.1, 50);
|
||||
SetSkill( SkillName.Magery, 50.1, 60.0 );
|
||||
SetSkill( SkillName.Meditation, 85.1, 95.0 );
|
||||
SetSkill( SkillName.MagicResist, 50.1, 70.0 );
|
||||
SetSkill( SkillName.Tactics, 50.1, 70.0 );
|
||||
Fame = 5000;
|
||||
Karma = -5000;
|
||||
|
||||
Fame = 5000;
|
||||
Karma = -5000;
|
||||
VirtualArmor = 50;
|
||||
PackNecroReg(15, 25);
|
||||
PackItem(new DaemonBone(30));
|
||||
}
|
||||
|
||||
VirtualArmor = 50;
|
||||
PackNecroReg( 15, 25 );
|
||||
PackItem( new DaemonBone( 30 ) );
|
||||
}
|
||||
public DarkGuardian(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public DarkGuardian( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override string CorpseName => "a dark guardians' corpse";
|
||||
public override string DefaultName => "a dark guardian";
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.MedScrolls, 2 );
|
||||
}
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
public override int TreasureMapLevel => 2;
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool Unprovokable => true;
|
||||
|
||||
public override int TreasureMapLevel => 2;
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool Unprovokable => true;
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.MedScrolls, 2);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,148 +3,144 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
/// <summary>
|
||||
/// This is a test creature
|
||||
/// You can set its value in game
|
||||
/// It die after 5 minutes, so your test server stay clean
|
||||
/// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2"
|
||||
///
|
||||
/// A iTeam of negative will set a faction at random
|
||||
///
|
||||
/// Say Kill if you want them to die
|
||||
///
|
||||
/// </summary>
|
||||
public class Dummy : BaseCreature
|
||||
{
|
||||
public Timer m_Timer;
|
||||
/// <summary>
|
||||
/// This is a test creature
|
||||
/// You can set its value in game
|
||||
/// It die after 5 minutes, so your test server stay clean
|
||||
/// Create a macro to help your creation "[add Dummy 1 15 7 -1 0.5 2"
|
||||
/// A iTeam of negative will set a faction at random
|
||||
/// Say Kill if you want them to die
|
||||
/// </summary>
|
||||
public class Dummy : BaseCreature
|
||||
{
|
||||
public Timer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public Dummy(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
|
||||
{
|
||||
Body = 400 + Utility.Random(2);
|
||||
Hue = Utility.RandomSkinHue();
|
||||
[Constructible]
|
||||
public Dummy(AIType iAI, FightMode iFightMode, int iRangePerception, int iRangeFight, double dActiveSpeed,
|
||||
double dPassiveSpeed) : base(iAI, iFightMode, iRangePerception, iRangeFight, dActiveSpeed, dPassiveSpeed)
|
||||
{
|
||||
Body = 400 + Utility.Random(2);
|
||||
Hue = Utility.RandomSkinHue();
|
||||
|
||||
Skills[SkillName.DetectHidden].Base = 100;
|
||||
Skills[SkillName.MagicResist].Base = 120;
|
||||
Skills[SkillName.DetectHidden].Base = 100;
|
||||
Skills[SkillName.MagicResist].Base = 120;
|
||||
|
||||
Team = Utility.Random(3);
|
||||
Team = Utility.Random(3);
|
||||
|
||||
int iHue = 20 + Team * 40;
|
||||
int jHue = 25 + Team * 40;
|
||||
int iHue = 20 + Team * 40;
|
||||
int jHue = 25 + Team * 40;
|
||||
|
||||
Utility.AssignRandomHair( this, iHue );
|
||||
Utility.AssignRandomHair(this, iHue);
|
||||
|
||||
LeatherGloves glv = new LeatherGloves();
|
||||
glv.Hue = iHue;
|
||||
glv.LootType = LootType.Newbied;
|
||||
AddItem(glv);
|
||||
LeatherGloves glv = new LeatherGloves();
|
||||
glv.Hue = iHue;
|
||||
glv.LootType = LootType.Newbied;
|
||||
AddItem(glv);
|
||||
|
||||
Container pack = new Backpack();
|
||||
Container pack = new Backpack();
|
||||
|
||||
pack.Movable = false;
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
AddItem(pack);
|
||||
|
||||
m_Timer = new AutokillTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
m_Timer = new AutokillTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public Dummy( Serial serial ) : base( serial )
|
||||
{
|
||||
m_Timer = new AutokillTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
public Dummy(Serial serial) : base(serial)
|
||||
{
|
||||
m_Timer = new AutokillTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
if ( from.AccessLevel >= AccessLevel.GameMaster )
|
||||
return true;
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech( from );
|
||||
}
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
base.OnSpeech( e );
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
base.OnSpeech(e);
|
||||
|
||||
if (e.Mobile.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
if (e.Speech == "kill")
|
||||
{
|
||||
m_Timer.Stop();
|
||||
m_Timer.Delay = TimeSpan.FromSeconds( Utility.Random(1, 5) );
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (e.Mobile.AccessLevel >= AccessLevel.GameMaster)
|
||||
if (e.Speech == "kill")
|
||||
{
|
||||
m_Timer.Stop();
|
||||
m_Timer.Delay = TimeSpan.FromSeconds(Utility.Random(1, 5));
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnTeamChange()
|
||||
{
|
||||
int iHue = 20 + Team * 40;
|
||||
int jHue = 25 + Team * 40;
|
||||
public override void OnTeamChange()
|
||||
{
|
||||
int iHue = 20 + Team * 40;
|
||||
int jHue = 25 + Team * 40;
|
||||
|
||||
Item item = FindItemOnLayer( Layer.OuterTorso );
|
||||
Item item = FindItemOnLayer(Layer.OuterTorso);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = jHue;
|
||||
if (item != null)
|
||||
item.Hue = jHue;
|
||||
|
||||
item = FindItemOnLayer( Layer.Helm );
|
||||
item = FindItemOnLayer(Layer.Helm);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = iHue;
|
||||
if (item != null)
|
||||
item.Hue = iHue;
|
||||
|
||||
item = FindItemOnLayer( Layer.Gloves );
|
||||
item = FindItemOnLayer(Layer.Gloves);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = iHue;
|
||||
if (item != null)
|
||||
item.Hue = iHue;
|
||||
|
||||
item = FindItemOnLayer( Layer.Shoes );
|
||||
item = FindItemOnLayer(Layer.Shoes);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = iHue;
|
||||
if (item != null)
|
||||
item.Hue = iHue;
|
||||
|
||||
HairHue = iHue;
|
||||
HairHue = iHue;
|
||||
|
||||
item = FindItemOnLayer( Layer.MiddleTorso );
|
||||
item = FindItemOnLayer(Layer.MiddleTorso);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = iHue;
|
||||
if (item != null)
|
||||
item.Hue = iHue;
|
||||
|
||||
item = FindItemOnLayer( Layer.OuterLegs );
|
||||
item = FindItemOnLayer(Layer.OuterLegs);
|
||||
|
||||
if ( item != null )
|
||||
item.Hue = iHue;
|
||||
}
|
||||
if (item != null)
|
||||
item.Hue = iHue;
|
||||
}
|
||||
|
||||
private class AutokillTimer : Timer
|
||||
{
|
||||
private Dummy m_Owner;
|
||||
private class AutokillTimer : Timer
|
||||
{
|
||||
private Dummy m_Owner;
|
||||
|
||||
public AutokillTimer( Dummy owner ) : base( TimeSpan.FromMinutes(5.0) )
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
public AutokillTimer(Dummy owner) : base(TimeSpan.FromMinutes(5.0))
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Owner.Kill();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Owner.Kill();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -3,204 +3,203 @@ using System.Collections;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HarrowerTentacles : BaseCreature
|
||||
{
|
||||
public override string CorpseName => "a tentacles corpse";
|
||||
public class HarrowerTentacles : BaseCreature
|
||||
{
|
||||
private DrainTimer m_Timer;
|
||||
|
||||
private DrainTimer m_Timer;
|
||||
[Constructible]
|
||||
public HarrowerTentacles() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Harrower { get; set; }
|
||||
public HarrowerTentacles(Mobile harrower) : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Harrower = harrower;
|
||||
Body = 129;
|
||||
|
||||
public override string DefaultName => "tentacles of the harrower";
|
||||
SetStr(901, 1000);
|
||||
SetDex(126, 140);
|
||||
SetInt(1001, 1200);
|
||||
|
||||
[Constructible]
|
||||
public HarrowerTentacles() : this( null )
|
||||
{
|
||||
}
|
||||
SetHits(541, 600);
|
||||
|
||||
public HarrowerTentacles( Mobile harrower ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Harrower = harrower;
|
||||
Body = 129;
|
||||
SetDamage(13, 20);
|
||||
|
||||
SetStr( 901, 1000 );
|
||||
SetDex( 126, 140 );
|
||||
SetInt( 1001, 1200 );
|
||||
SetDamageType(ResistanceType.Physical, 20);
|
||||
SetDamageType(ResistanceType.Fire, 20);
|
||||
SetDamageType(ResistanceType.Cold, 20);
|
||||
SetDamageType(ResistanceType.Poison, 20);
|
||||
SetDamageType(ResistanceType.Energy, 20);
|
||||
|
||||
SetHits( 541, 600 );
|
||||
SetResistance(ResistanceType.Physical, 55, 65);
|
||||
SetResistance(ResistanceType.Fire, 35, 45);
|
||||
SetResistance(ResistanceType.Cold, 35, 45);
|
||||
SetResistance(ResistanceType.Poison, 35, 45);
|
||||
SetResistance(ResistanceType.Energy, 35, 45);
|
||||
|
||||
SetDamage( 13, 20 );
|
||||
SetSkill(SkillName.Meditation, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.1, 140.0);
|
||||
SetSkill(SkillName.Swords, 90.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 20 );
|
||||
SetDamageType( ResistanceType.Fire, 20 );
|
||||
SetDamageType( ResistanceType.Cold, 20 );
|
||||
SetDamageType( ResistanceType.Poison, 20 );
|
||||
SetDamageType( ResistanceType.Energy, 20 );
|
||||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 65 );
|
||||
SetResistance( ResistanceType.Fire, 35, 45 );
|
||||
SetResistance( ResistanceType.Cold, 35, 45 );
|
||||
SetResistance( ResistanceType.Poison, 35, 45 );
|
||||
SetResistance( ResistanceType.Energy, 35, 45 );
|
||||
VirtualArmor = 60;
|
||||
|
||||
SetSkill( SkillName.Meditation, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 120.1, 140.0 );
|
||||
SetSkill( SkillName.Swords, 90.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 90.1, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 90.1, 100.0 );
|
||||
m_Timer = new DrainTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
PackReg(50);
|
||||
PackNecroReg(15, 75);
|
||||
}
|
||||
|
||||
VirtualArmor = 60;
|
||||
public HarrowerTentacles(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
m_Timer = new DrainTimer( this );
|
||||
m_Timer.Start();
|
||||
public override string CorpseName => "a tentacles corpse";
|
||||
|
||||
PackReg( 50 );
|
||||
PackNecroReg( 15, 75 );
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Harrower{ get; set; }
|
||||
|
||||
public override void CheckReflect( Mobile caster, ref bool reflect )
|
||||
{
|
||||
reflect = true;
|
||||
}
|
||||
public override string DefaultName => "tentacles of the harrower";
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x101;
|
||||
}
|
||||
public override bool AutoDispel => true;
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool DisallowAllMoves => true;
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x5E;
|
||||
}
|
||||
public override void CheckReflect(Mobile caster, ref bool reflect)
|
||||
{
|
||||
reflect = true;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1C2;
|
||||
}
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x101;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return -1; // unknown
|
||||
}
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x5E;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x289;
|
||||
}
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1C2;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich, 2 );
|
||||
AddLoot( LootPack.MedScrolls, 3 );
|
||||
AddLoot( LootPack.HighScrolls, 2 );
|
||||
}
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return -1; // unknown
|
||||
}
|
||||
|
||||
public override bool AutoDispel => true;
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool DisallowAllMoves => true;
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x289;
|
||||
}
|
||||
|
||||
public HarrowerTentacles( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 2);
|
||||
AddLoot(LootPack.MedScrolls, 3);
|
||||
AddLoot(LootPack.HighScrolls, 2);
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
writer.Write( Harrower );
|
||||
}
|
||||
writer.Write(Harrower);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Harrower = reader.ReadMobile();
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Harrower = reader.ReadMobile();
|
||||
|
||||
m_Timer = new DrainTimer( this );
|
||||
m_Timer.Start();
|
||||
m_Timer = new DrainTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
m_Timer?.Stop();
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
m_Timer?.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
private class DrainTimer : Timer
|
||||
{
|
||||
private HarrowerTentacles m_Owner;
|
||||
private class DrainTimer : Timer
|
||||
{
|
||||
private static ArrayList m_ToDrain = new ArrayList();
|
||||
private HarrowerTentacles m_Owner;
|
||||
|
||||
public DrainTimer( HarrowerTentacles owner ) : base( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromSeconds( 5.0 ) )
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
public DrainTimer(HarrowerTentacles owner) : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
private static ArrayList m_ToDrain = new ArrayList();
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Owner.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Owner.Deleted )
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
foreach (Mobile m in m_Owner.GetMobilesInRange(9))
|
||||
{
|
||||
if (m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
foreach ( Mobile m in m_Owner.GetMobilesInRange( 9 ) )
|
||||
{
|
||||
if ( m == m_Owner || m == m_Owner.Harrower || !m_Owner.CanBeHarmful( m ) )
|
||||
continue;
|
||||
if (m is BaseCreature bc)
|
||||
{
|
||||
if (bc.Controlled || bc.Summoned)
|
||||
m_ToDrain.Add(m);
|
||||
}
|
||||
else if (m.Player)
|
||||
{
|
||||
m_ToDrain.Add(m);
|
||||
}
|
||||
}
|
||||
|
||||
if ( m is BaseCreature bc )
|
||||
{
|
||||
if ( bc.Controlled || bc.Summoned )
|
||||
m_ToDrain.Add( m );
|
||||
}
|
||||
else if ( m.Player )
|
||||
{
|
||||
m_ToDrain.Add( m );
|
||||
}
|
||||
}
|
||||
foreach (Mobile m in m_ToDrain)
|
||||
{
|
||||
m_Owner.DoHarmful(m);
|
||||
|
||||
foreach ( Mobile m in m_ToDrain )
|
||||
{
|
||||
m_Owner.DoHarmful( m );
|
||||
m.FixedParticles(0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist);
|
||||
m.PlaySound(0x1F1);
|
||||
|
||||
m.FixedParticles( 0x374A, 10, 15, 5013, 0x455, 0, EffectLayer.Waist );
|
||||
m.PlaySound( 0x1F1 );
|
||||
int drain = Utility.RandomMinMax(14, 30);
|
||||
|
||||
int drain = Utility.RandomMinMax( 14, 30 );
|
||||
m_Owner.Hits += drain;
|
||||
|
||||
m_Owner.Hits += drain;
|
||||
if (m_Owner.Harrower != null)
|
||||
m_Owner.Harrower.Hits += drain;
|
||||
|
||||
if ( m_Owner.Harrower != null )
|
||||
m_Owner.Harrower.Hits += drain;
|
||||
m.Damage(drain, m_Owner);
|
||||
}
|
||||
|
||||
m.Damage( drain, m_Owner );
|
||||
}
|
||||
|
||||
m_ToDrain.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_ToDrain.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,235 +1,242 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class LordOaks : BaseChampion
|
||||
{
|
||||
private Mobile m_Queen;
|
||||
private bool m_SpawnedQueen;
|
||||
public class LordOaks : BaseChampion
|
||||
{
|
||||
private Mobile m_Queen;
|
||||
private bool m_SpawnedQueen;
|
||||
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Enlightenment;
|
||||
[Constructible]
|
||||
public LordOaks() : base(AIType.AI_Mage, FightMode.Evil)
|
||||
{
|
||||
Body = 175;
|
||||
SetStr(403, 850);
|
||||
SetDex(101, 150);
|
||||
SetInt(503, 800);
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( OrcChieftainHelm ) };
|
||||
public override Type[] SharedList => new[] { typeof( RoyalGuardSurvivalKnife ),
|
||||
typeof( DjinnisRing ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ),
|
||||
typeof( SamaritanRobe ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( TheMostKnowledgePerson ) };
|
||||
SetHits(3000);
|
||||
SetStam(202, 400);
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof( WaterTile ),
|
||||
typeof( WindSpirit ),
|
||||
typeof( Pier ),
|
||||
typeof( DirtPatch )};
|
||||
SetDamage(21, 33);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Fire, 25);
|
||||
|
||||
public override string DefaultName => "Lord Oaks";
|
||||
SetResistance(ResistanceType.Physical, 85, 90);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 80, 90);
|
||||
SetResistance(ResistanceType.Energy, 80, 90);
|
||||
|
||||
[Constructible]
|
||||
public LordOaks() : base( AIType.AI_Mage, FightMode.Evil )
|
||||
{
|
||||
Body = 175;
|
||||
SetStr( 403, 850 );
|
||||
SetDex( 101, 150 );
|
||||
SetInt( 503, 800 );
|
||||
SetSkill(SkillName.Anatomy, 75.1, 100.0);
|
||||
SetSkill(SkillName.EvalInt, 120.1, 130.0);
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
SetSkill(SkillName.Meditation, 120.1, 130.0);
|
||||
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 100.0);
|
||||
|
||||
SetHits( 3000 );
|
||||
SetStam( 202, 400 );
|
||||
Fame = 22500;
|
||||
Karma = 22500;
|
||||
|
||||
SetDamage( 21, 33 );
|
||||
VirtualArmor = 100;
|
||||
}
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Fire, 25 );
|
||||
public LordOaks(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
SetResistance( ResistanceType.Physical, 85, 90 );
|
||||
SetResistance( ResistanceType.Fire, 60, 70 );
|
||||
SetResistance( ResistanceType.Cold, 60, 70 );
|
||||
SetResistance( ResistanceType.Poison, 80, 90 );
|
||||
SetResistance( ResistanceType.Energy, 80, 90 );
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Enlightenment;
|
||||
|
||||
SetSkill( SkillName.Anatomy, 75.1, 100.0 );
|
||||
SetSkill( SkillName.EvalInt, 120.1, 130.0 );
|
||||
SetSkill( SkillName.Magery, 120.0 );
|
||||
SetSkill( SkillName.Meditation, 120.1, 130.0 );
|
||||
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.0 );
|
||||
public override Type[] UniqueList => new[] { typeof(OrcChieftainHelm) };
|
||||
|
||||
Fame = 22500;
|
||||
Karma = 22500;
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(RoyalGuardSurvivalKnife),
|
||||
typeof(DjinnisRing),
|
||||
typeof(LieutenantOfTheBritannianRoyalGuard),
|
||||
typeof(SamaritanRobe),
|
||||
typeof(DetectiveBoots),
|
||||
typeof(TheMostKnowledgePerson)
|
||||
};
|
||||
|
||||
VirtualArmor = 100;
|
||||
}
|
||||
public override Type[] DecorativeList => new[]
|
||||
{
|
||||
typeof(WaterTile),
|
||||
typeof(WindSpirit),
|
||||
typeof(Pier),
|
||||
typeof(DirtPatch)
|
||||
};
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 5 );
|
||||
}
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
|
||||
public override bool AutoDispel => true;
|
||||
public override bool CanFly => true;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
public override string DefaultName => "Lord Oaks";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
public override bool AutoDispel => true;
|
||||
public override bool CanFly => true;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public void SpawnPixies( Mobile target )
|
||||
{
|
||||
Map map = Map;
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 5);
|
||||
}
|
||||
|
||||
Say( 1042154 ); // You shall never defeat me as long as I have my queen!
|
||||
public void SpawnPixies(Mobile target)
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
int newPixies = Utility.RandomMinMax( 3, 6 );
|
||||
if (map == null)
|
||||
return;
|
||||
|
||||
for ( int i = 0; i < newPixies; ++i )
|
||||
{
|
||||
Pixie pixie = new Pixie();
|
||||
Say(1042154); // You shall never defeat me as long as I have my queen!
|
||||
|
||||
pixie.Team = Team;
|
||||
pixie.FightMode = FightMode.Closest;
|
||||
int newPixies = Utility.RandomMinMax(3, 6);
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
for (int i = 0; i < newPixies; ++i)
|
||||
{
|
||||
Pixie pixie = new Pixie();
|
||||
|
||||
for ( int j = 0; !validLocation && j < 10; ++j )
|
||||
{
|
||||
int x = X + Utility.Random( 3 ) - 1;
|
||||
int y = Y + Utility.Random( 3 ) - 1;
|
||||
int z = map.GetAverageZ( x, y );
|
||||
pixie.Team = Team;
|
||||
pixie.FightMode = FightMode.Closest;
|
||||
|
||||
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, Z );
|
||||
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, z );
|
||||
}
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
pixie.MoveToWorld( loc, map );
|
||||
pixie.Combatant = target;
|
||||
}
|
||||
}
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x2F8;
|
||||
}
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2F8;
|
||||
}
|
||||
pixie.MoveToWorld(loc, map);
|
||||
pixie.Combatant = target;
|
||||
}
|
||||
}
|
||||
|
||||
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 void CheckQueen()
|
||||
{
|
||||
if ( Map == null )
|
||||
return;
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2F9;
|
||||
}
|
||||
|
||||
if ( !m_SpawnedQueen )
|
||||
{
|
||||
Say( 1042153 ); // Come forth my queen!
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2F7;
|
||||
}
|
||||
|
||||
m_Queen = new Silvani();
|
||||
public void CheckQueen()
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
((BaseCreature)m_Queen).Team = Team;
|
||||
if (!m_SpawnedQueen)
|
||||
{
|
||||
Say(1042153); // Come forth my queen!
|
||||
|
||||
m_Queen.MoveToWorld( Location, Map );
|
||||
m_Queen = new Silvani();
|
||||
|
||||
m_SpawnedQueen = true;
|
||||
}
|
||||
else if ( m_Queen != null && m_Queen.Deleted )
|
||||
{
|
||||
m_Queen = null;
|
||||
}
|
||||
}
|
||||
((BaseCreature)m_Queen).Team = Team;
|
||||
|
||||
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
|
||||
{
|
||||
CheckQueen();
|
||||
m_Queen.MoveToWorld(Location, Map);
|
||||
|
||||
if ( m_Queen != null )
|
||||
{
|
||||
scalar *= 0.1;
|
||||
m_SpawnedQueen = true;
|
||||
}
|
||||
else if (m_Queen != null && m_Queen.Deleted)
|
||||
{
|
||||
m_Queen = null;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0.1 >= Utility.RandomDouble() )
|
||||
SpawnPixies( caster );
|
||||
}
|
||||
}
|
||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||
{
|
||||
CheckQueen();
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
if (m_Queen != null)
|
||||
{
|
||||
scalar *= 0.1;
|
||||
|
||||
defender.Damage( Utility.Random( 20, 10 ), this );
|
||||
defender.Stam -= Utility.Random( 20, 10 );
|
||||
defender.Mana -= Utility.Random( 20, 10 );
|
||||
}
|
||||
if (0.1 >= Utility.RandomDouble())
|
||||
SpawnPixies(caster);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
CheckQueen();
|
||||
defender.Damage(Utility.Random(20, 10), this);
|
||||
defender.Stam -= Utility.Random(20, 10);
|
||||
defender.Mana -= Utility.Random(20, 10);
|
||||
}
|
||||
|
||||
if ( m_Queen != null && 0.1 >= Utility.RandomDouble() )
|
||||
SpawnPixies( attacker );
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
attacker.Damage( Utility.Random( 20, 10 ), this );
|
||||
attacker.Stam -= Utility.Random( 20, 10 );
|
||||
attacker.Mana -= Utility.Random( 20, 10 );
|
||||
}
|
||||
CheckQueen();
|
||||
|
||||
public LordOaks( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (m_Queen != null && 0.1 >= Utility.RandomDouble())
|
||||
SpawnPixies(attacker);
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
attacker.Damage(Utility.Random(20, 10), this);
|
||||
attacker.Stam -= Utility.Random(20, 10);
|
||||
attacker.Mana -= Utility.Random(20, 10);
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( m_Queen );
|
||||
writer.Write( m_SpawnedQueen );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(m_Queen);
|
||||
writer.Write(m_SpawnedQueen);
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Queen = reader.ReadMobile();
|
||||
m_SpawnedQueen = reader.ReadBool();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Queen = reader.ReadMobile();
|
||||
m_SpawnedQueen = reader.ReadBool();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,86 +1,92 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mephitis : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Venom;
|
||||
public class Mephitis : BaseChampion
|
||||
{
|
||||
[Constructible]
|
||||
public Mephitis() : base(AIType.AI_Melee)
|
||||
{
|
||||
Body = 173;
|
||||
BaseSoundID = 0x183;
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( Calm ) };
|
||||
public override Type[] SharedList => new[] { typeof(OblivionsNeedle), typeof(ANecromancerShroud), typeof(EmbroideredOakLeafCloak), typeof(TheMostKnowledgePerson) };
|
||||
public override Type[] DecorativeList => new[] { typeof( Web ), typeof( MonsterStatuette ) };
|
||||
SetStr(505, 1000);
|
||||
SetDex(102, 300);
|
||||
SetInt(402, 600);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.Spider };
|
||||
SetHits(3000);
|
||||
SetStam(105, 600);
|
||||
|
||||
public override string DefaultName => "Mephitis";
|
||||
SetDamage(21, 33);
|
||||
|
||||
[Constructible]
|
||||
public Mephitis() : base( AIType.AI_Melee )
|
||||
{
|
||||
Body = 173;
|
||||
BaseSoundID = 0x183;
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Poison, 50);
|
||||
|
||||
SetStr( 505, 1000 );
|
||||
SetDex( 102, 300 );
|
||||
SetInt( 402, 600 );
|
||||
SetResistance(ResistanceType.Physical, 75, 80);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 60, 70);
|
||||
|
||||
SetHits( 3000 );
|
||||
SetStam( 105, 600 );
|
||||
SetSkill(SkillName.MagicResist, 70.7, 140.0);
|
||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
||||
|
||||
SetDamage( 21, 33 );
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Poison, 50 );
|
||||
VirtualArmor = 80;
|
||||
}
|
||||
|
||||
SetResistance( ResistanceType.Physical, 75, 80 );
|
||||
SetResistance( ResistanceType.Fire, 60, 70 );
|
||||
SetResistance( ResistanceType.Cold, 60, 70 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
SetResistance( ResistanceType.Energy, 60, 70 );
|
||||
public Mephitis(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
SetSkill( SkillName.MagicResist, 70.7, 140.0 );
|
||||
SetSkill( SkillName.Tactics, 97.6, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Venom;
|
||||
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
public override Type[] UniqueList => new[] { typeof(Calm) };
|
||||
|
||||
VirtualArmor = 80;
|
||||
}
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(OblivionsNeedle), typeof(ANecromancerShroud), typeof(EmbroideredOakLeafCloak),
|
||||
typeof(TheMostKnowledgePerson)
|
||||
};
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 4 );
|
||||
}
|
||||
public override Type[] DecorativeList => new[] { typeof(Web), typeof(MonsterStatuette) };
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override Poison HitPoison => Poison.Lethal;
|
||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.Spider };
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
public override string DefaultName => "Mephitis";
|
||||
|
||||
// TODO: Web ability
|
||||
}
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override Poison HitPoison => Poison.Lethal;
|
||||
|
||||
public Mephitis( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 4);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
// TODO: Web ability
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,293 +1,297 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Neira : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Death;
|
||||
public class Neira : BaseChampion
|
||||
{
|
||||
private const double SpeedBoostScalar = 1.2;
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( ShroudOfDeciet ) };
|
||||
public override Type[] SharedList => new[] { typeof( ANecromancerShroud ),
|
||||
private bool m_SpeedBoost;
|
||||
|
||||
typeof( CaptainJohnsHat ) };
|
||||
[Constructible]
|
||||
public Neira() : base(AIType.AI_Mage)
|
||||
{
|
||||
Title = "the necromancer";
|
||||
Body = 401;
|
||||
Hue = 0x83EC;
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof( WallBlood ), typeof( TatteredAncientMummyWrapping ) };
|
||||
SetStr(305, 425);
|
||||
SetDex(72, 150);
|
||||
SetInt(505, 750);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
SetHits(4800);
|
||||
SetStam(102, 300);
|
||||
|
||||
public override string DefaultName => "Neira";
|
||||
SetDamage(25, 35);
|
||||
|
||||
[Constructible]
|
||||
public Neira() : base( AIType.AI_Mage )
|
||||
{
|
||||
Title = "the necromancer";
|
||||
Body = 401;
|
||||
Hue = 0x83EC;
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetStr( 305, 425 );
|
||||
SetDex( 72, 150 );
|
||||
SetInt( 505, 750 );
|
||||
SetResistance(ResistanceType.Physical, 25, 30);
|
||||
SetResistance(ResistanceType.Fire, 35, 45);
|
||||
SetResistance(ResistanceType.Cold, 50, 60);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetHits( 4800 );
|
||||
SetStam( 102, 300 );
|
||||
SetSkill(SkillName.EvalInt, 120.0);
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
SetSkill(SkillName.Meditation, 120.0);
|
||||
SetSkill(SkillName.MagicResist, 150.0);
|
||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
||||
|
||||
SetDamage( 25, 35 );
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
VirtualArmor = 30;
|
||||
Female = true;
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 30 );
|
||||
SetResistance( ResistanceType.Fire, 35, 45 );
|
||||
SetResistance( ResistanceType.Cold, 50, 60 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
Item shroud = new HoodedShroudOfShadows();
|
||||
|
||||
SetSkill( SkillName.EvalInt, 120.0 );
|
||||
SetSkill( SkillName.Magery, 120.0 );
|
||||
SetSkill( SkillName.Meditation, 120.0 );
|
||||
SetSkill( SkillName.MagicResist, 150.0 );
|
||||
SetSkill( SkillName.Tactics, 97.6, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
|
||||
shroud.Movable = false;
|
||||
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
AddItem(shroud);
|
||||
|
||||
VirtualArmor = 30;
|
||||
Female = true;
|
||||
Scimitar weapon = new Scimitar();
|
||||
|
||||
Item shroud = new HoodedShroudOfShadows();
|
||||
weapon.Skill = SkillName.Wrestling;
|
||||
weapon.Hue = 38;
|
||||
weapon.Movable = false;
|
||||
|
||||
shroud.Movable = false;
|
||||
AddItem(weapon);
|
||||
|
||||
AddItem( shroud );
|
||||
//new SkeletalMount().Rider = this;
|
||||
AddItem(new VirtualMountItem(this));
|
||||
}
|
||||
|
||||
Scimitar weapon = new Scimitar();
|
||||
public Neira(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
weapon.Skill = SkillName.Wrestling;
|
||||
weapon.Hue = 38;
|
||||
weapon.Movable = false;
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Death;
|
||||
|
||||
AddItem( weapon );
|
||||
public override Type[] UniqueList => new[] { typeof(ShroudOfDeciet) };
|
||||
|
||||
//new SkeletalMount().Rider = this;
|
||||
AddItem( new VirtualMountItem( this ) );
|
||||
}
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(ANecromancerShroud),
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 3 );
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
typeof(CaptainJohnsHat)
|
||||
};
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof(WallBlood), typeof(TatteredAncientMummyWrapping) };
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
IMount mount = Mount;
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
|
||||
public override string DefaultName => "Neira";
|
||||
|
||||
if ( mount != null )
|
||||
mount.Rider = null;
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
(mount as Mobile)?.Delete();
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
private bool m_SpeedBoost;
|
||||
|
||||
public override void OnDamage( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
CheckSpeedBoost();
|
||||
base.OnDamage( amount, from, willKill );
|
||||
}
|
||||
|
||||
private const double SpeedBoostScalar = 1.2;
|
||||
|
||||
private void CheckSpeedBoost()
|
||||
{
|
||||
if ( Hits < (HitsMax / 4 ) )
|
||||
{
|
||||
if ( !m_SpeedBoost )
|
||||
{
|
||||
ActiveSpeed /= SpeedBoostScalar;
|
||||
PassiveSpeed /= SpeedBoostScalar;
|
||||
m_SpeedBoost = true;
|
||||
}
|
||||
}
|
||||
else if ( m_SpeedBoost )
|
||||
{
|
||||
ActiveSpeed *= SpeedBoostScalar;
|
||||
PassiveSpeed *= SpeedBoostScalar;
|
||||
m_SpeedBoost = false;
|
||||
}
|
||||
}
|
||||
|
||||
private class VirtualMount : IMount
|
||||
{
|
||||
private VirtualMountItem m_Item;
|
||||
|
||||
public Mobile Rider
|
||||
{
|
||||
get => m_Item.Rider;
|
||||
set { }
|
||||
}
|
||||
|
||||
public VirtualMount( VirtualMountItem item )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
public virtual void OnRiderDamaged( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private class VirtualMountItem : Item, IMountItem
|
||||
{
|
||||
private VirtualMount m_Mount;
|
||||
|
||||
public Mobile Rider { get; private set; }
|
||||
|
||||
public VirtualMountItem( Mobile mob )
|
||||
: base( 0x3EBB )
|
||||
{
|
||||
Layer = Layer.Mount;
|
||||
|
||||
Movable = false;
|
||||
|
||||
Rider = mob;
|
||||
m_Mount = new VirtualMount( this );
|
||||
}
|
||||
|
||||
public IMount Mount => m_Mount;
|
||||
|
||||
public VirtualMountItem( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
m_Mount = new VirtualMount( this );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)0 ); // version
|
||||
|
||||
writer.Write( (Mobile)Rider );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Rider = reader.ReadMobile();
|
||||
|
||||
if ( Rider == null )
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
public override bool BardImmune => !Core.SE;
|
||||
public override bool Unprovokable => Core.SE;
|
||||
public override bool Uncalmable => Core.SE;
|
||||
public override Poison PoisonImmune => Poison.Deadly;
|
||||
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to drop or throw an unholy bone
|
||||
AddUnholyBone( defender, 0.25 );
|
||||
|
||||
CheckSpeedBoost();
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
|
||||
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to drop or throw an unholy bone
|
||||
AddUnholyBone( attacker, 0.25 );
|
||||
}
|
||||
|
||||
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
|
||||
{
|
||||
base.AlterDamageScalarFrom( caster, ref scalar );
|
||||
|
||||
if ( 0.1 >= Utility.RandomDouble() ) // 10% chance to throw an unholy bone
|
||||
AddUnholyBone( caster, 1.0 );
|
||||
}
|
||||
|
||||
public void AddUnholyBone( Mobile target, double chanceToThrow )
|
||||
{
|
||||
if ( Map == null )
|
||||
return;
|
||||
|
||||
if ( chanceToThrow >= Utility.RandomDouble() )
|
||||
{
|
||||
Direction = GetDirectionTo( target );
|
||||
MovingEffect( target, 0xF7E, 10, 1, true, false, 0x496, 0 );
|
||||
new DelayTimer( this, target ).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
new UnholyBone().MoveToWorld( Location, Map );
|
||||
}
|
||||
}
|
||||
|
||||
private class DelayTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private Mobile m_Target;
|
||||
|
||||
public DelayTimer( Mobile m, Mobile target ) : base( TimeSpan.FromSeconds( 1.0 ) )
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Target = target;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Mobile.CanBeHarmful( m_Target ) )
|
||||
{
|
||||
m_Mobile.DoHarmful( m_Target );
|
||||
AOS.Damage( m_Target, m_Mobile, Utility.RandomMinMax( 10, 20 ), 100, 0, 0, 0, 0 );
|
||||
new UnholyBone().MoveToWorld( m_Target.Location, m_Target.Map );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Neira( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
writer.Write( m_SpeedBoost );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_SpeedBoost = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 3);
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
IMount mount = Mount;
|
||||
|
||||
if (mount != null)
|
||||
mount.Rider = null;
|
||||
|
||||
(mount as Mobile)?.Delete();
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public override void OnDamage(int amount, Mobile from, bool willKill)
|
||||
{
|
||||
CheckSpeedBoost();
|
||||
base.OnDamage(amount, from, willKill);
|
||||
}
|
||||
|
||||
private void CheckSpeedBoost()
|
||||
{
|
||||
if (Hits < HitsMax / 4)
|
||||
{
|
||||
if (!m_SpeedBoost)
|
||||
{
|
||||
ActiveSpeed /= SpeedBoostScalar;
|
||||
PassiveSpeed /= SpeedBoostScalar;
|
||||
m_SpeedBoost = true;
|
||||
}
|
||||
}
|
||||
else if (m_SpeedBoost)
|
||||
{
|
||||
ActiveSpeed *= SpeedBoostScalar;
|
||||
PassiveSpeed *= SpeedBoostScalar;
|
||||
m_SpeedBoost = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 >= Utility.RandomDouble()) // 10% chance to drop or throw an unholy bone
|
||||
AddUnholyBone(defender, 0.25);
|
||||
|
||||
CheckSpeedBoost();
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
if (0.1 >= Utility.RandomDouble()) // 10% chance to drop or throw an unholy bone
|
||||
AddUnholyBone(attacker, 0.25);
|
||||
}
|
||||
|
||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||
{
|
||||
base.AlterDamageScalarFrom(caster, ref scalar);
|
||||
|
||||
if (0.1 >= Utility.RandomDouble()) // 10% chance to throw an unholy bone
|
||||
AddUnholyBone(caster, 1.0);
|
||||
}
|
||||
|
||||
public void AddUnholyBone(Mobile target, double chanceToThrow)
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
if (chanceToThrow >= Utility.RandomDouble())
|
||||
{
|
||||
Direction = GetDirectionTo(target);
|
||||
MovingEffect(target, 0xF7E, 10, 1, true, false, 0x496, 0);
|
||||
new DelayTimer(this, target).Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
new UnholyBone().MoveToWorld(Location, Map);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
writer.Write(m_SpeedBoost);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_SpeedBoost = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class VirtualMount : IMount
|
||||
{
|
||||
private VirtualMountItem m_Item;
|
||||
|
||||
public VirtualMount(VirtualMountItem item)
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
public Mobile Rider
|
||||
{
|
||||
get => m_Item.Rider;
|
||||
set { }
|
||||
}
|
||||
|
||||
public virtual void OnRiderDamaged(int amount, Mobile from, bool willKill)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private class VirtualMountItem : Item, IMountItem
|
||||
{
|
||||
private VirtualMount m_Mount;
|
||||
|
||||
public VirtualMountItem(Mobile mob)
|
||||
: base(0x3EBB)
|
||||
{
|
||||
Layer = Layer.Mount;
|
||||
|
||||
Movable = false;
|
||||
|
||||
Rider = mob;
|
||||
m_Mount = new VirtualMount(this);
|
||||
}
|
||||
|
||||
public VirtualMountItem(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
m_Mount = new VirtualMount(this);
|
||||
}
|
||||
|
||||
public Mobile Rider{ get; private set; }
|
||||
|
||||
public IMount Mount => m_Mount;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(Rider);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Rider = reader.ReadMobile();
|
||||
|
||||
if (Rider == null)
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private class DelayTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private Mobile m_Target;
|
||||
|
||||
public DelayTimer(Mobile m, Mobile target) : base(TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Target = target;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Mobile.CanBeHarmful(m_Target))
|
||||
{
|
||||
m_Mobile.DoHarmful(m_Target);
|
||||
AOS.Damage(m_Target, m_Mobile, Utility.RandomMinMax(10, 20), 100, 0, 0, 0, 0);
|
||||
new UnholyBone().MoveToWorld(m_Target.Location, m_Target.Map);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,38 +1,38 @@
|
|||
using Server.Items;
|
||||
using Server.Guilds;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class OrderGuard : BaseShieldGuard
|
||||
{
|
||||
public override int Keyword => 0x21; // *order shield*
|
||||
public override BaseShield Shield => new OrderShield();
|
||||
public override int SignupNumber => 1007141; // Sign up with a guild of order if thou art interested.
|
||||
public override GuildType Type => GuildType.Order;
|
||||
public class OrderGuard : BaseShieldGuard
|
||||
{
|
||||
[Constructible]
|
||||
public OrderGuard()
|
||||
{
|
||||
}
|
||||
|
||||
public override bool BardImmune => true;
|
||||
public OrderGuard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public OrderGuard()
|
||||
{
|
||||
}
|
||||
public override int Keyword => 0x21; // *order shield*
|
||||
public override BaseShield Shield => new OrderShield();
|
||||
public override int SignupNumber => 1007141; // Sign up with a guild of order if thou art interested.
|
||||
public override GuildType Type => GuildType.Order;
|
||||
|
||||
public OrderGuard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override bool BardImmune => true;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,212 +3,219 @@ using Server.Items;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Paragon
|
||||
{
|
||||
public static double ChestChance = .10; // Chance that a paragon will carry a paragon chest
|
||||
public static double ChocolateIngredientChance = .20; // Chance that a paragon will drop a chocolatiering ingredient
|
||||
public static Map[] Maps = {
|
||||
Map.Ilshenar
|
||||
};
|
||||
public class Paragon
|
||||
{
|
||||
public static double ChestChance = .10; // Chance that a paragon will carry a paragon chest
|
||||
public static double ChocolateIngredientChance = .20; // Chance that a paragon will drop a chocolatiering ingredient
|
||||
|
||||
private static TimeSpan FastRegenRate = TimeSpan.FromSeconds( .5 );
|
||||
private static TimeSpan CPUSaverRate = TimeSpan.FromSeconds( 2 );
|
||||
public static Map[] Maps =
|
||||
{
|
||||
Map.Ilshenar
|
||||
};
|
||||
|
||||
private class ParagonStamRegen : Timer
|
||||
{
|
||||
private BaseCreature m_Owner;
|
||||
private static TimeSpan FastRegenRate = TimeSpan.FromSeconds(.5);
|
||||
private static TimeSpan CPUSaverRate = TimeSpan.FromSeconds(2);
|
||||
|
||||
public ParagonStamRegen( Mobile m )
|
||||
: base( FastRegenRate, FastRegenRate )
|
||||
{
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
public static Type[] Artifacts =
|
||||
{
|
||||
typeof(GoldBricks), typeof(PhillipsWoodenSteed),
|
||||
typeof(AlchemistsBauble), typeof(ArcticDeathDealer),
|
||||
typeof(BlazeOfDeath), typeof(BowOfTheJukaKing),
|
||||
typeof(BurglarsBandana), typeof(CavortingClub),
|
||||
typeof(EnchantedTitanLegBone), typeof(GwennosHarp),
|
||||
typeof(IolosLute), typeof(LunaLance),
|
||||
typeof(NightsKiss), typeof(NoxRangersHeavyCrossbow),
|
||||
typeof(OrcishVisage), typeof(PolarBearMask),
|
||||
typeof(ShieldOfInvulnerability), typeof(StaffOfPower),
|
||||
typeof(VioletCourage), typeof(HeartOfTheLion),
|
||||
typeof(WrathOfTheDryad), typeof(PixieSwatter),
|
||||
typeof(GlovesOfThePugilist)
|
||||
};
|
||||
|
||||
m_Owner = m as BaseCreature;
|
||||
}
|
||||
public static int Hue = 0x501; // Paragon hue
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( !m_Owner.Deleted && m_Owner.IsParagon && m_Owner .Map != Map.Internal )
|
||||
{
|
||||
m_Owner.Stam++;
|
||||
// Buffs
|
||||
public static double HitsBuff = 5.0;
|
||||
public static double StrBuff = 1.05;
|
||||
public static double IntBuff = 1.20;
|
||||
public static double DexBuff = 1.20;
|
||||
public static double SkillsBuff = 1.20;
|
||||
public static double SpeedBuff = 1.20;
|
||||
public static double FameBuff = 1.40;
|
||||
public static double KarmaBuff = 1.40;
|
||||
public static int DamageBuff = 5;
|
||||
|
||||
Delay = Interval = ( m_Owner.Stam < ( m_Owner.StamMax * .75 ) ) ? FastRegenRate : CPUSaverRate;
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void Convert(BaseCreature bc)
|
||||
{
|
||||
if (bc.IsParagon)
|
||||
return;
|
||||
|
||||
public static Type[] Artifacts = {
|
||||
typeof( GoldBricks ), typeof( PhillipsWoodenSteed ),
|
||||
typeof( AlchemistsBauble ), typeof( ArcticDeathDealer ),
|
||||
typeof( BlazeOfDeath ), typeof( BowOfTheJukaKing ),
|
||||
typeof( BurglarsBandana ), typeof( CavortingClub ),
|
||||
typeof( EnchantedTitanLegBone ), typeof( GwennosHarp ),
|
||||
typeof( IolosLute ), typeof( LunaLance ),
|
||||
typeof( NightsKiss ), typeof( NoxRangersHeavyCrossbow ),
|
||||
typeof( OrcishVisage ), typeof( PolarBearMask ),
|
||||
typeof( ShieldOfInvulnerability ), typeof( StaffOfPower ),
|
||||
typeof( VioletCourage ), typeof( HeartOfTheLion ),
|
||||
typeof( WrathOfTheDryad ), typeof( PixieSwatter ),
|
||||
typeof( GlovesOfThePugilist )
|
||||
};
|
||||
bc.Hue = Hue;
|
||||
|
||||
public static int Hue = 0x501; // Paragon hue
|
||||
if (bc.HitsMaxSeed >= 0)
|
||||
bc.HitsMaxSeed = (int)(bc.HitsMaxSeed * HitsBuff);
|
||||
|
||||
// Buffs
|
||||
public static double HitsBuff = 5.0;
|
||||
public static double StrBuff = 1.05;
|
||||
public static double IntBuff = 1.20;
|
||||
public static double DexBuff = 1.20;
|
||||
public static double SkillsBuff = 1.20;
|
||||
public static double SpeedBuff = 1.20;
|
||||
public static double FameBuff = 1.40;
|
||||
public static double KarmaBuff = 1.40;
|
||||
public static int DamageBuff = 5;
|
||||
bc.RawStr = (int)(bc.RawStr * StrBuff);
|
||||
bc.RawInt = (int)(bc.RawInt * IntBuff);
|
||||
bc.RawDex = (int)(bc.RawDex * DexBuff);
|
||||
|
||||
public static void Convert( BaseCreature bc )
|
||||
{
|
||||
if ( bc.IsParagon )
|
||||
return;
|
||||
bc.Hits = bc.HitsMax;
|
||||
bc.Mana = bc.ManaMax;
|
||||
bc.Stam = bc.StamMax;
|
||||
|
||||
bc.Hue = Hue;
|
||||
for (int i = 0; i < bc.Skills.Length; i++)
|
||||
{
|
||||
Skill skill = bc.Skills[i];
|
||||
|
||||
if ( bc.HitsMaxSeed >= 0 )
|
||||
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed * HitsBuff );
|
||||
if (skill.Base > 0.0)
|
||||
skill.Base *= SkillsBuff;
|
||||
}
|
||||
|
||||
bc.RawStr = (int)( bc.RawStr * StrBuff );
|
||||
bc.RawInt = (int)( bc.RawInt * IntBuff );
|
||||
bc.RawDex = (int)( bc.RawDex * DexBuff );
|
||||
bc.PassiveSpeed /= SpeedBuff;
|
||||
bc.ActiveSpeed /= SpeedBuff;
|
||||
bc.CurrentSpeed = bc.PassiveSpeed;
|
||||
|
||||
bc.Hits = bc.HitsMax;
|
||||
bc.Mana = bc.ManaMax;
|
||||
bc.Stam = bc.StamMax;
|
||||
bc.DamageMin += DamageBuff;
|
||||
bc.DamageMax += DamageBuff;
|
||||
|
||||
for( int i = 0; i < bc.Skills.Length; i++ )
|
||||
{
|
||||
Skill skill = (Skill)bc.Skills[i];
|
||||
if (bc.Fame > 0)
|
||||
bc.Fame = (int)(bc.Fame * FameBuff);
|
||||
|
||||
if ( skill.Base > 0.0 )
|
||||
skill.Base *= SkillsBuff;
|
||||
}
|
||||
if (bc.Fame > 32000)
|
||||
bc.Fame = 32000;
|
||||
|
||||
bc.PassiveSpeed /= SpeedBuff;
|
||||
bc.ActiveSpeed /= SpeedBuff;
|
||||
bc.CurrentSpeed = bc.PassiveSpeed;
|
||||
// TODO: Mana regeneration rate = Sqrt( buffedFame ) / 4
|
||||
|
||||
bc.DamageMin += DamageBuff;
|
||||
bc.DamageMax += DamageBuff;
|
||||
if (bc.Karma != 0)
|
||||
{
|
||||
bc.Karma = (int)(bc.Karma * KarmaBuff);
|
||||
|
||||
if ( bc.Fame > 0 )
|
||||
bc.Fame = (int)( bc.Fame * FameBuff );
|
||||
if (Math.Abs(bc.Karma) > 32000)
|
||||
bc.Karma = 32000 * Math.Sign(bc.Karma);
|
||||
}
|
||||
|
||||
if ( bc.Fame > 32000 )
|
||||
bc.Fame = 32000;
|
||||
new ParagonStamRegen(bc).Start();
|
||||
}
|
||||
|
||||
// TODO: Mana regeneration rate = Sqrt( buffedFame ) / 4
|
||||
public static void UnConvert(BaseCreature bc)
|
||||
{
|
||||
if (!bc.IsParagon)
|
||||
return;
|
||||
|
||||
if ( bc.Karma != 0 )
|
||||
{
|
||||
bc.Karma = (int)( bc.Karma * KarmaBuff );
|
||||
bc.Hue = 0;
|
||||
|
||||
if ( Math.Abs( bc.Karma ) > 32000 )
|
||||
bc.Karma = 32000 * Math.Sign( bc.Karma );
|
||||
}
|
||||
if (bc.HitsMaxSeed >= 0)
|
||||
bc.HitsMaxSeed = (int)(bc.HitsMaxSeed / HitsBuff);
|
||||
|
||||
new ParagonStamRegen( bc ).Start();
|
||||
}
|
||||
bc.RawStr = (int)(bc.RawStr / StrBuff);
|
||||
bc.RawInt = (int)(bc.RawInt / IntBuff);
|
||||
bc.RawDex = (int)(bc.RawDex / DexBuff);
|
||||
|
||||
public static void UnConvert( BaseCreature bc )
|
||||
{
|
||||
if ( !bc.IsParagon )
|
||||
return;
|
||||
bc.Hits = bc.HitsMax;
|
||||
bc.Mana = bc.ManaMax;
|
||||
bc.Stam = bc.StamMax;
|
||||
|
||||
bc.Hue = 0;
|
||||
for (int i = 0; i < bc.Skills.Length; i++)
|
||||
{
|
||||
Skill skill = bc.Skills[i];
|
||||
|
||||
if ( bc.HitsMaxSeed >= 0 )
|
||||
bc.HitsMaxSeed = (int)( bc.HitsMaxSeed / HitsBuff );
|
||||
if (skill.Base > 0.0)
|
||||
skill.Base /= SkillsBuff;
|
||||
}
|
||||
|
||||
bc.RawStr = (int)( bc.RawStr / StrBuff );
|
||||
bc.RawInt = (int)( bc.RawInt / IntBuff );
|
||||
bc.RawDex = (int)( bc.RawDex / DexBuff );
|
||||
bc.PassiveSpeed *= SpeedBuff;
|
||||
bc.ActiveSpeed *= SpeedBuff;
|
||||
bc.CurrentSpeed = bc.PassiveSpeed;
|
||||
|
||||
bc.Hits = bc.HitsMax;
|
||||
bc.Mana = bc.ManaMax;
|
||||
bc.Stam = bc.StamMax;
|
||||
bc.DamageMin -= DamageBuff;
|
||||
bc.DamageMax -= DamageBuff;
|
||||
|
||||
for( int i = 0; i < bc.Skills.Length; i++ )
|
||||
{
|
||||
Skill skill = (Skill)bc.Skills[i];
|
||||
if (bc.Fame > 0)
|
||||
bc.Fame = (int)(bc.Fame / FameBuff);
|
||||
if (bc.Karma != 0)
|
||||
bc.Karma = (int)(bc.Karma / KarmaBuff);
|
||||
}
|
||||
|
||||
if ( skill.Base > 0.0 )
|
||||
skill.Base /= SkillsBuff;
|
||||
}
|
||||
public static bool CheckConvert(BaseCreature bc)
|
||||
{
|
||||
return CheckConvert(bc, bc.Location, bc.Map);
|
||||
}
|
||||
|
||||
bc.PassiveSpeed *= SpeedBuff;
|
||||
bc.ActiveSpeed *= SpeedBuff;
|
||||
bc.CurrentSpeed = bc.PassiveSpeed;
|
||||
public static bool CheckConvert(BaseCreature bc, Point3D location, Map m)
|
||||
{
|
||||
if (!Core.AOS)
|
||||
return false;
|
||||
|
||||
bc.DamageMin -= DamageBuff;
|
||||
bc.DamageMax -= DamageBuff;
|
||||
if (Array.IndexOf(Maps, m) == -1)
|
||||
return false;
|
||||
|
||||
if ( bc.Fame > 0 )
|
||||
bc.Fame = (int)( bc.Fame / FameBuff );
|
||||
if ( bc.Karma != 0 )
|
||||
bc.Karma = (int)( bc.Karma / KarmaBuff );
|
||||
}
|
||||
if (bc is BaseChampion || bc is Harrower || bc is BaseVendor || bc is BaseEscortable || bc is Clone ||
|
||||
bc.IsParagon)
|
||||
return false;
|
||||
|
||||
public static bool CheckConvert( BaseCreature bc )
|
||||
{
|
||||
return CheckConvert( bc, bc.Location, bc.Map );
|
||||
}
|
||||
int fame = bc.Fame;
|
||||
|
||||
public static bool CheckConvert( BaseCreature bc, Point3D location, Map m )
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return false;
|
||||
if (fame > 32000)
|
||||
fame = 32000;
|
||||
|
||||
if ( Array.IndexOf( Maps, m ) == -1 )
|
||||
return false;
|
||||
double chance = 1 / Math.Round(20.0 - fame / 3200);
|
||||
|
||||
if ( bc is BaseChampion || bc is Harrower || bc is BaseVendor || bc is BaseEscortable || bc is Clone || bc.IsParagon )
|
||||
return false;
|
||||
return chance > Utility.RandomDouble();
|
||||
}
|
||||
|
||||
int fame = bc.Fame;
|
||||
public static bool CheckArtifactChance(Mobile m, BaseCreature bc)
|
||||
{
|
||||
if (!Core.AOS)
|
||||
return false;
|
||||
|
||||
if ( fame > 32000 )
|
||||
fame = 32000;
|
||||
double fame = bc.Fame;
|
||||
|
||||
double chance = 1 / Math.Round( 20.0 - ( fame / 3200 ));
|
||||
if (fame > 32000)
|
||||
fame = 32000;
|
||||
|
||||
return ( chance > Utility.RandomDouble() );
|
||||
}
|
||||
double chance =
|
||||
1 / (Math.Max(10, 100 * (0.83 - Math.Round(Math.Log(Math.Round(fame / 6000, 3) + 0.001, 10), 3))) *
|
||||
(100 - Math.Sqrt(m.Luck)) / 100.0);
|
||||
|
||||
public static bool CheckArtifactChance( Mobile m, BaseCreature bc )
|
||||
{
|
||||
if ( !Core.AOS )
|
||||
return false;
|
||||
return chance > Utility.RandomDouble();
|
||||
}
|
||||
|
||||
double fame = (double)bc.Fame;
|
||||
public static void GiveArtifactTo(Mobile m)
|
||||
{
|
||||
Item item = (Item)Activator.CreateInstance(Artifacts[Utility.Random(Artifacts.Length)]);
|
||||
|
||||
if ( fame > 32000 )
|
||||
fame = 32000;
|
||||
if (m.AddToBackpack(item))
|
||||
m.SendMessage("As a reward for slaying the mighty paragon, an artifact has been placed in your backpack.");
|
||||
else
|
||||
m.SendMessage(
|
||||
"As your backpack is full, your reward for destroying the legendary paragon has been placed at your feet.");
|
||||
}
|
||||
|
||||
double chance = 1 / ( Math.Max( 10, 100 * ( 0.83 - Math.Round( Math.Log( Math.Round( fame / 6000, 3 ) + 0.001, 10 ), 3 ) ) ) * ( 100 - Math.Sqrt( m.Luck ) ) / 100.0 );
|
||||
private class ParagonStamRegen : Timer
|
||||
{
|
||||
private BaseCreature m_Owner;
|
||||
|
||||
return chance > Utility.RandomDouble();
|
||||
}
|
||||
public ParagonStamRegen(Mobile m)
|
||||
: base(FastRegenRate, FastRegenRate)
|
||||
{
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
|
||||
public static void GiveArtifactTo( Mobile m )
|
||||
{
|
||||
Item item = (Item)Activator.CreateInstance( Artifacts[Utility.Random(Artifacts.Length)] );
|
||||
m_Owner = m as BaseCreature;
|
||||
}
|
||||
|
||||
if ( m.AddToBackpack( item ) )
|
||||
m.SendMessage( "As a reward for slaying the mighty paragon, an artifact has been placed in your backpack." );
|
||||
else
|
||||
m.SendMessage( "As your backpack is full, your reward for destroying the legendary paragon has been placed at your feet." );
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (!m_Owner.Deleted && m_Owner.IsParagon && m_Owner.Map != Map.Internal)
|
||||
{
|
||||
m_Owner.Stam++;
|
||||
|
||||
Delay = Interval = m_Owner.Stam < m_Owner.StamMax * .75 ? FastRegenRate : CPUSaverRate;
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,162 +1,173 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Rikktor : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Power;
|
||||
public class Rikktor : BaseChampion
|
||||
{
|
||||
[Constructible]
|
||||
public Rikktor() : base(AIType.AI_Melee)
|
||||
{
|
||||
Body = 172;
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( CrownOfTalKeesh ) };
|
||||
public override Type[] SharedList => new[] { typeof( TheMostKnowledgePerson ),
|
||||
typeof( BraveKnightOfTheBritannia ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ) };
|
||||
SetStr(701, 900);
|
||||
SetDex(201, 350);
|
||||
SetInt(51, 100);
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof( LavaTile ),
|
||||
typeof( MonsterStatuette ),
|
||||
typeof( MonsterStatuette ) };
|
||||
SetHits(3000);
|
||||
SetStam(203, 650);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new[] { MonsterStatuetteType.OphidianArchMage,
|
||||
MonsterStatuetteType.OphidianWarrior };
|
||||
SetDamage(28, 55);
|
||||
|
||||
public override string DefaultName => "Rikktor";
|
||||
SetDamageType(ResistanceType.Physical, 25);
|
||||
SetDamageType(ResistanceType.Fire, 50);
|
||||
SetDamageType(ResistanceType.Energy, 25);
|
||||
|
||||
[Constructible]
|
||||
public Rikktor() : base( AIType.AI_Melee )
|
||||
{
|
||||
Body = 172;
|
||||
SetResistance(ResistanceType.Physical, 80, 90);
|
||||
SetResistance(ResistanceType.Fire, 80, 90);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 80, 90);
|
||||
SetResistance(ResistanceType.Energy, 80, 90);
|
||||
|
||||
SetStr( 701, 900 );
|
||||
SetDex( 201, 350 );
|
||||
SetInt( 51, 100 );
|
||||
SetSkill(SkillName.Anatomy, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 140.2, 160.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
|
||||
SetHits( 3000 );
|
||||
SetStam( 203, 650 );
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
|
||||
SetDamage( 28, 55 );
|
||||
VirtualArmor = 130;
|
||||
}
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 25 );
|
||||
SetDamageType( ResistanceType.Fire, 50 );
|
||||
SetDamageType( ResistanceType.Energy, 25 );
|
||||
public Rikktor(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
SetResistance( ResistanceType.Physical, 80, 90 );
|
||||
SetResistance( ResistanceType.Fire, 80, 90 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 80, 90 );
|
||||
SetResistance( ResistanceType.Energy, 80, 90 );
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Power;
|
||||
|
||||
SetSkill( SkillName.Anatomy, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 140.2, 160.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
public override Type[] UniqueList => new[] { typeof(CrownOfTalKeesh) };
|
||||
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(TheMostKnowledgePerson),
|
||||
typeof(BraveKnightOfTheBritannia),
|
||||
typeof(LieutenantOfTheBritannianRoyalGuard)
|
||||
};
|
||||
|
||||
VirtualArmor = 130;
|
||||
}
|
||||
public override Type[] DecorativeList => new[]
|
||||
{
|
||||
typeof(LavaTile),
|
||||
typeof(MonsterStatuette),
|
||||
typeof(MonsterStatuette)
|
||||
};
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 4 );
|
||||
}
|
||||
public override MonsterStatuetteType[] StatueTypes => new[]
|
||||
{
|
||||
MonsterStatuetteType.OphidianArchMage,
|
||||
MonsterStatuetteType.OphidianWarrior
|
||||
};
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override ScaleType ScaleType => ScaleType.All;
|
||||
public override int Scales => 20;
|
||||
public override string DefaultName => "Rikktor";
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override ScaleType ScaleType => ScaleType.All;
|
||||
public override int Scales => 20;
|
||||
|
||||
if ( 0.2 >= Utility.RandomDouble() )
|
||||
Earthquake();
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 4);
|
||||
}
|
||||
|
||||
public void Earthquake()
|
||||
{
|
||||
Map map = Map;
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
if (0.2 >= Utility.RandomDouble())
|
||||
Earthquake();
|
||||
}
|
||||
|
||||
ArrayList targets = new ArrayList();
|
||||
public void Earthquake()
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
foreach ( Mobile m in GetMobilesInRange( 8 ) )
|
||||
{
|
||||
if ( m == this || !CanBeHarmful( m ) )
|
||||
continue;
|
||||
if (map == null)
|
||||
return;
|
||||
|
||||
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
|
||||
targets.Add( m );
|
||||
else if ( m.Player )
|
||||
targets.Add( m );
|
||||
}
|
||||
ArrayList targets = new ArrayList();
|
||||
|
||||
PlaySound( 0x2F3 );
|
||||
foreach (Mobile m in GetMobilesInRange(8))
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
for ( int i = 0; i < targets.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
if (m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned ||
|
||||
((BaseCreature)m).Team != Team))
|
||||
targets.Add(m);
|
||||
else if (m.Player)
|
||||
targets.Add(m);
|
||||
}
|
||||
|
||||
double damage = m.Hits * 0.6;
|
||||
PlaySound(0x2F3);
|
||||
|
||||
if ( damage < 10.0 )
|
||||
damage = 10.0;
|
||||
else if ( damage > 75.0 )
|
||||
damage = 75.0;
|
||||
for (int i = 0; i < targets.Count; ++i)
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
|
||||
DoHarmful( m );
|
||||
double damage = m.Hits * 0.6;
|
||||
|
||||
AOS.Damage( m, this, (int)damage, 100, 0, 0, 0, 0 );
|
||||
if (damage < 10.0)
|
||||
damage = 10.0;
|
||||
else if (damage > 75.0)
|
||||
damage = 75.0;
|
||||
|
||||
if ( m.Alive && m.Body.IsHuman && !m.Mounted )
|
||||
m.Animate( 20, 7, 1, true, false, 0 ); // take hit
|
||||
}
|
||||
}
|
||||
DoHarmful(m);
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return Utility.Random( 0x2CE, 2 );
|
||||
}
|
||||
AOS.Damage(m, this, (int)damage, 100, 0, 0, 0, 0);
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2D2;
|
||||
}
|
||||
if (m.Alive && m.Body.IsHuman && !m.Mounted)
|
||||
m.Animate(20, 7, 1, true, false, 0); // take hit
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return Utility.Random( 0x2C7, 5 );
|
||||
}
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return Utility.Random(0x2CE, 2);
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2D1;
|
||||
}
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2D2;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2CC;
|
||||
}
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return Utility.Random(0x2C7, 5);
|
||||
}
|
||||
|
||||
public Rikktor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2D1;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2CC;
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,144 +1,148 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Semidar : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Pain;
|
||||
public class Semidar : BaseChampion
|
||||
{
|
||||
[Constructible]
|
||||
public Semidar() : base(AIType.AI_Mage)
|
||||
{
|
||||
Body = 174;
|
||||
BaseSoundID = 0x4B0;
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( GladiatorsCollar ) };
|
||||
public override Type[] SharedList => new[] { typeof(RoyalGuardSurvivalKnife), typeof(ANecromancerShroud), typeof(LieutenantOfTheBritannianRoyalGuard) };
|
||||
public override Type[] DecorativeList => new[] { typeof( LavaTile ), typeof( DemonSkull ) };
|
||||
SetStr(502, 600);
|
||||
SetDex(102, 200);
|
||||
SetInt(601, 750);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
SetHits(1500);
|
||||
SetStam(103, 250);
|
||||
|
||||
public override string DefaultName => "Semidar";
|
||||
SetDamage(29, 35);
|
||||
|
||||
[Constructible]
|
||||
public Semidar() : base( AIType.AI_Mage )
|
||||
{
|
||||
Body = 174;
|
||||
BaseSoundID = 0x4B0;
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Fire, 25);
|
||||
|
||||
SetStr( 502, 600 );
|
||||
SetDex( 102, 200 );
|
||||
SetInt( 601, 750 );
|
||||
SetResistance(ResistanceType.Physical, 20, 30);
|
||||
SetResistance(ResistanceType.Fire, 50, 60);
|
||||
SetResistance(ResistanceType.Cold, 20, 30);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetHits( 1500 );
|
||||
SetStam( 103, 250 );
|
||||
SetSkill(SkillName.EvalInt, 95.1, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.1, 105.0);
|
||||
SetSkill(SkillName.Meditation, 95.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 120.2, 140.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 105.0);
|
||||
SetSkill(SkillName.Wrestling, 90.1, 105.0);
|
||||
|
||||
SetDamage( 29, 35 );
|
||||
Fame = 24000;
|
||||
Karma = -24000;
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Fire, 25 );
|
||||
VirtualArmor = 20;
|
||||
}
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 30 );
|
||||
SetResistance( ResistanceType.Fire, 50, 60 );
|
||||
SetResistance( ResistanceType.Cold, 20, 30 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 10, 20 );
|
||||
public Semidar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
SetSkill( SkillName.EvalInt, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Magery, 90.1, 105.0 );
|
||||
SetSkill( SkillName.Meditation, 95.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 120.2, 140.0 );
|
||||
SetSkill( SkillName.Tactics, 90.1, 105.0 );
|
||||
SetSkill( SkillName.Wrestling, 90.1, 105.0 );
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Pain;
|
||||
|
||||
Fame = 24000;
|
||||
Karma = -24000;
|
||||
public override Type[] UniqueList => new[] { typeof(GladiatorsCollar) };
|
||||
|
||||
VirtualArmor = 20;
|
||||
}
|
||||
public override Type[] SharedList => new[]
|
||||
{ typeof(RoyalGuardSurvivalKnife), typeof(ANecromancerShroud), typeof(LieutenantOfTheBritannianRoyalGuard) };
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 4 );
|
||||
AddLoot( LootPack.FilthyRich );
|
||||
}
|
||||
public override Type[] DecorativeList => new[] { typeof(LavaTile), typeof(DemonSkull) };
|
||||
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
|
||||
public override void CheckReflect( Mobile caster, ref bool reflect )
|
||||
{
|
||||
if ( caster.Body.IsMale )
|
||||
reflect = true; // Always reflect if caster isn't female
|
||||
}
|
||||
public override string DefaultName => "Semidar";
|
||||
|
||||
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
|
||||
{
|
||||
if ( caster.Body.IsMale )
|
||||
scalar = 20; // Male bodies always reflect.. damage scaled 20x
|
||||
}
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public void DrainLife()
|
||||
{
|
||||
if ( Map == null )
|
||||
return;
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 4);
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
}
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
public override void CheckReflect(Mobile caster, ref bool reflect)
|
||||
{
|
||||
if (caster.Body.IsMale)
|
||||
reflect = true; // Always reflect if caster isn't female
|
||||
}
|
||||
|
||||
foreach ( Mobile m in GetMobilesInRange( 2 ) )
|
||||
{
|
||||
if ( m == this || !CanBeHarmful( m ) )
|
||||
continue;
|
||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||
{
|
||||
if (caster.Body.IsMale)
|
||||
scalar = 20; // Male bodies always reflect.. damage scaled 20x
|
||||
}
|
||||
|
||||
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
|
||||
list.Add( m );
|
||||
else if ( m.Player )
|
||||
list.Add( m );
|
||||
}
|
||||
public void DrainLife()
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
foreach ( Mobile m in list )
|
||||
{
|
||||
DoHarmful( m );
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
m.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist );
|
||||
m.PlaySound( 0x231 );
|
||||
foreach (Mobile m in GetMobilesInRange(2))
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
m.SendMessage( "You feel the life drain out of you!" );
|
||||
if (m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned ||
|
||||
((BaseCreature)m).Team != Team))
|
||||
list.Add(m);
|
||||
else if (m.Player)
|
||||
list.Add(m);
|
||||
}
|
||||
|
||||
int toDrain = Utility.RandomMinMax( 10, 40 );
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
DoHarmful(m);
|
||||
|
||||
Hits += toDrain;
|
||||
m.Damage( toDrain, this );
|
||||
}
|
||||
}
|
||||
m.FixedParticles(0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist);
|
||||
m.PlaySound(0x231);
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
m.SendMessage("You feel the life drain out of you!");
|
||||
|
||||
if ( 0.25 >= Utility.RandomDouble() )
|
||||
DrainLife();
|
||||
}
|
||||
int toDrain = Utility.RandomMinMax(10, 40);
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
Hits += toDrain;
|
||||
m.Damage(toDrain, this);
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0.25 >= Utility.RandomDouble() )
|
||||
DrainLife();
|
||||
}
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
public Semidar( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (0.25 >= Utility.RandomDouble())
|
||||
DrainLife();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (0.25 >= Utility.RandomDouble())
|
||||
DrainLife();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,185 +1,194 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Engines.CannedEvil;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Serado : BaseChampion
|
||||
{
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Power;
|
||||
public class Serado : BaseChampion
|
||||
{
|
||||
[Constructible]
|
||||
public Serado() : base(AIType.AI_Melee)
|
||||
{
|
||||
Title = "the awakened";
|
||||
|
||||
public override Type[] UniqueList => new[] { typeof( Pacify ) };
|
||||
public override Type[] SharedList => new[] { typeof( BraveKnightOfTheBritannia ),
|
||||
typeof( DetectiveBoots ),
|
||||
typeof( EmbroideredOakLeafCloak ),
|
||||
typeof( LieutenantOfTheBritannianRoyalGuard ) };
|
||||
Body = 249;
|
||||
Hue = 0x96C;
|
||||
|
||||
public override Type[] DecorativeList => new[] { typeof( Futon ), typeof( SwampTile ) };
|
||||
SetStr(1000);
|
||||
SetDex(150);
|
||||
SetInt(300);
|
||||
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
SetHits(9000);
|
||||
SetMana(300);
|
||||
|
||||
public override WeaponAbility GetWeaponAbility() => WeaponAbility.DoubleStrike;
|
||||
SetDamage(29, 35);
|
||||
|
||||
public override string DefaultName => "Serado";
|
||||
SetDamageType(ResistanceType.Physical, 70);
|
||||
SetDamageType(ResistanceType.Poison, 20);
|
||||
SetDamageType(ResistanceType.Energy, 10);
|
||||
|
||||
[Constructible]
|
||||
public Serado() : base( AIType.AI_Melee )
|
||||
{
|
||||
Title = "the awakened";
|
||||
SetResistance(ResistanceType.Physical, 30);
|
||||
SetResistance(ResistanceType.Fire, 60);
|
||||
SetResistance(ResistanceType.Cold, 60);
|
||||
SetResistance(ResistanceType.Poison, 90);
|
||||
SetResistance(ResistanceType.Energy, 50);
|
||||
|
||||
Body = 249;
|
||||
Hue = 0x96C;
|
||||
SetSkill(SkillName.MagicResist, 120.0);
|
||||
SetSkill(SkillName.Tactics, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 70.0);
|
||||
SetSkill(SkillName.Poisoning, 150.0);
|
||||
|
||||
SetStr( 1000 );
|
||||
SetDex( 150 );
|
||||
SetInt( 300 );
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
|
||||
SetHits( 9000 );
|
||||
SetMana( 300 );
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
}
|
||||
|
||||
SetDamage( 29, 35 );
|
||||
public Serado(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 70 );
|
||||
SetDamageType( ResistanceType.Poison, 20 );
|
||||
SetDamageType( ResistanceType.Energy, 10 );
|
||||
public override ChampionSkullType SkullType => ChampionSkullType.Power;
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30 );
|
||||
SetResistance( ResistanceType.Fire, 60 );
|
||||
SetResistance( ResistanceType.Cold, 60 );
|
||||
SetResistance( ResistanceType.Poison, 90 );
|
||||
SetResistance( ResistanceType.Energy, 50 );
|
||||
public override Type[] UniqueList => new[] { typeof(Pacify) };
|
||||
|
||||
SetSkill( SkillName.MagicResist, 120.0 );
|
||||
SetSkill( SkillName.Tactics, 120.0 );
|
||||
SetSkill( SkillName.Wrestling, 70.0 );
|
||||
SetSkill( SkillName.Poisoning, 150.0 );
|
||||
public override Type[] SharedList => new[]
|
||||
{
|
||||
typeof(BraveKnightOfTheBritannia),
|
||||
typeof(DetectiveBoots),
|
||||
typeof(EmbroideredOakLeafCloak),
|
||||
typeof(LieutenantOfTheBritannianRoyalGuard)
|
||||
};
|
||||
|
||||
Fame = 22500;
|
||||
Karma = -22500;
|
||||
public override Type[] DecorativeList => new[] { typeof(Futon), typeof(SwampTile) };
|
||||
|
||||
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
|
||||
}
|
||||
public override MonsterStatuetteType[] StatueTypes => new MonsterStatuetteType[] { };
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 4 );
|
||||
AddLoot( LootPack.FilthyRich );
|
||||
AddLoot( LootPack.Gems, 6 );
|
||||
}
|
||||
public override string DefaultName => "Serado";
|
||||
|
||||
public override int TreasureMapLevel => 5;
|
||||
public override int TreasureMapLevel => 5;
|
||||
|
||||
public override Poison HitPoison => Poison.Lethal;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override double HitPoisonChance => 0.8;
|
||||
public override Poison HitPoison => Poison.Lethal;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override double HitPoisonChance => 0.8;
|
||||
|
||||
public override int Feathers => 30;
|
||||
public override int Feathers => 30;
|
||||
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
public override bool ShowFameTitle => false;
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
// TODO: Hit Lightning Area
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.DoubleStrike;
|
||||
}
|
||||
|
||||
public override void OnDamagedBySpell( Mobile attacker )
|
||||
{
|
||||
base.OnDamagedBySpell( attacker );
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 4);
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Gems, 6);
|
||||
}
|
||||
|
||||
ScaleResistances();
|
||||
DoCounter( attacker );
|
||||
}
|
||||
// TODO: Hit Lightning Area
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
public override void OnDamagedBySpell(Mobile attacker)
|
||||
{
|
||||
base.OnDamagedBySpell(attacker);
|
||||
|
||||
ScaleResistances();
|
||||
DoCounter( attacker );
|
||||
}
|
||||
ScaleResistances();
|
||||
DoCounter(attacker);
|
||||
}
|
||||
|
||||
private void ScaleResistances()
|
||||
{
|
||||
double hitsLost = (HitsMax - Hits) / (double)HitsMax;
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30 + (int)(hitsLost * ( 95 - 30 )) );
|
||||
SetResistance( ResistanceType.Fire, 60 + (int)(hitsLost * ( 95 - 60 )) );
|
||||
SetResistance( ResistanceType.Cold, 60 + (int)(hitsLost * ( 95 - 60 )) );
|
||||
SetResistance( ResistanceType.Poison, 90 + (int)(hitsLost * ( 95 - 90 )) );
|
||||
SetResistance( ResistanceType.Energy, 50 + (int)(hitsLost * ( 95 - 50 )) );
|
||||
}
|
||||
ScaleResistances();
|
||||
DoCounter(attacker);
|
||||
}
|
||||
|
||||
private void DoCounter( Mobile attacker )
|
||||
{
|
||||
if ( Map == null || ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked ) )
|
||||
return;
|
||||
private void ScaleResistances()
|
||||
{
|
||||
double hitsLost = (HitsMax - Hits) / (double)HitsMax;
|
||||
|
||||
if ( 0.2 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Counterattack with Hit Poison Area
|
||||
* 20-25 damage, unresistable
|
||||
* Lethal poison, 100% of the time
|
||||
* Particle effect: Type: "2" From: "0x4061A107" To: "0x0" ItemId: "0x36BD" ItemIdName: "explosion" FromLocation: "(296 615, 17)" ToLocation: "(296 615, 17)" Speed: "1" Duration: "10" FixedDirection: "True" Explode: "False" Hue: "0xA6" RenderMode: "0x0" Effect: "0x1F78" ExplodeEffect: "0x1" ExplodeSound: "0x0" Serial: "0x4061A107" Layer: "255" Unknown: "0x0"
|
||||
* Doesn't work on provoked monsters
|
||||
*/
|
||||
SetResistance(ResistanceType.Physical, 30 + (int)(hitsLost * (95 - 30)));
|
||||
SetResistance(ResistanceType.Fire, 60 + (int)(hitsLost * (95 - 60)));
|
||||
SetResistance(ResistanceType.Cold, 60 + (int)(hitsLost * (95 - 60)));
|
||||
SetResistance(ResistanceType.Poison, 90 + (int)(hitsLost * (95 - 90)));
|
||||
SetResistance(ResistanceType.Energy, 50 + (int)(hitsLost * (95 - 50)));
|
||||
}
|
||||
|
||||
Mobile target = null;
|
||||
private void DoCounter(Mobile attacker)
|
||||
{
|
||||
if (Map == null || attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked)
|
||||
return;
|
||||
|
||||
if ( attacker is BaseCreature )
|
||||
{
|
||||
Mobile m = ((BaseCreature)attacker).GetMaster();
|
||||
if (0.2 > Utility.RandomDouble())
|
||||
{
|
||||
/* Counterattack with Hit Poison Area
|
||||
* 20-25 damage, unresistable
|
||||
* Lethal poison, 100% of the time
|
||||
* Particle effect: Type: "2" From: "0x4061A107" To: "0x0" ItemId: "0x36BD" ItemIdName: "explosion" FromLocation: "(296 615, 17)" ToLocation: "(296 615, 17)" Speed: "1" Duration: "10" FixedDirection: "True" Explode: "False" Hue: "0xA6" RenderMode: "0x0" Effect: "0x1F78" ExplodeEffect: "0x1" ExplodeSound: "0x0" Serial: "0x4061A107" Layer: "255" Unknown: "0x0"
|
||||
* Doesn't work on provoked monsters
|
||||
*/
|
||||
|
||||
if ( m != null )
|
||||
target = m;
|
||||
}
|
||||
Mobile target = null;
|
||||
|
||||
if ( target == null || !target.InRange( this, 25 ) )
|
||||
target = attacker;
|
||||
if (attacker is BaseCreature)
|
||||
{
|
||||
Mobile m = ((BaseCreature)attacker).GetMaster();
|
||||
|
||||
Animate( 10, 4, 1, true, false, 0 );
|
||||
if (m != null)
|
||||
target = m;
|
||||
}
|
||||
|
||||
ArrayList targets = new ArrayList();
|
||||
if (target == null || !target.InRange(this, 25))
|
||||
target = attacker;
|
||||
|
||||
foreach ( Mobile m in target.GetMobilesInRange( 8 ) )
|
||||
{
|
||||
if ( m == this || !CanBeHarmful( m ) )
|
||||
continue;
|
||||
Animate(10, 4, 1, true, false, 0);
|
||||
|
||||
if ( m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team) )
|
||||
targets.Add( m );
|
||||
else if ( m.Player )
|
||||
targets.Add( m );
|
||||
}
|
||||
ArrayList targets = new ArrayList();
|
||||
|
||||
for ( int i = 0; i < targets.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
foreach (Mobile m in target.GetMobilesInRange(8))
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
DoHarmful( m );
|
||||
if (m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned ||
|
||||
((BaseCreature)m).Team != Team))
|
||||
targets.Add(m);
|
||||
else if (m.Player)
|
||||
targets.Add(m);
|
||||
}
|
||||
|
||||
AOS.Damage( m, this, Utility.RandomMinMax( 20, 25 ), true, 0, 0, 0, 100, 0 );
|
||||
for (int i = 0; i < targets.Count; ++i)
|
||||
{
|
||||
Mobile m = (Mobile)targets[i];
|
||||
|
||||
m.FixedParticles( 0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255 );
|
||||
m.ApplyPoison( this, Poison.Lethal );
|
||||
}
|
||||
}
|
||||
}
|
||||
DoHarmful(m);
|
||||
|
||||
public Serado( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
AOS.Damage(m, this, Utility.RandomMinMax(20, 25), true, 0, 0, 0, 100, 0);
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
m.FixedParticles(0x36BD, 1, 10, 0x1F78, 0xA6, 0, (EffectLayer)255);
|
||||
m.ApplyPoison(this, Poison.Lethal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,47 +1,47 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class ServantOfSemidar : BaseCreature
|
||||
{
|
||||
public override string DefaultName => "a Servant of Semidar";
|
||||
public class ServantOfSemidar : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public ServantOfSemidar() : base(AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x26;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public ServantOfSemidar() : base( AIType.AI_Melee, FightMode.None, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Body = 0x26;
|
||||
}
|
||||
public ServantOfSemidar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DisallowAllMoves => true;
|
||||
public override string DefaultName => "a Servant of Semidar";
|
||||
|
||||
public override bool InitialInnocent => true;
|
||||
public override bool DisallowAllMoves => true;
|
||||
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool InitialInnocent => true;
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
list.Add( 1005494 ); // enslaved
|
||||
}
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
public ServantOfSemidar( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
list.Add(1005494); // enslaved
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,132 +1,132 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Silvani : BaseCreature
|
||||
{
|
||||
public override string DefaultName => "Silvani";
|
||||
public class Silvani : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Silvani() : base(AIType.AI_Mage, FightMode.Evil, 18, 1, 0.1, 0.2)
|
||||
{
|
||||
Body = 176;
|
||||
BaseSoundID = 0x467;
|
||||
|
||||
[Constructible]
|
||||
public Silvani() : base( AIType.AI_Mage, FightMode.Evil, 18, 1, 0.1, 0.2 )
|
||||
{
|
||||
Body = 176;
|
||||
BaseSoundID = 0x467;
|
||||
SetStr(253, 400);
|
||||
SetDex(157, 850);
|
||||
SetInt(503, 800);
|
||||
|
||||
SetStr( 253, 400 );
|
||||
SetDex( 157, 850 );
|
||||
SetInt( 503, 800 );
|
||||
SetHits(600);
|
||||
|
||||
SetHits( 600 );
|
||||
SetDamage(27, 38);
|
||||
|
||||
SetDamage( 27, 38 );
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Cold, 25);
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Cold, 25 );
|
||||
SetResistance(ResistanceType.Physical, 45, 55);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 55 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 40, 50 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
SetSkill(SkillName.EvalInt, 100.0);
|
||||
SetSkill(SkillName.Magery, 97.6, 107.5);
|
||||
SetSkill(SkillName.Meditation, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 100.5, 150.0);
|
||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 97.6, 100.0);
|
||||
|
||||
SetSkill( SkillName.EvalInt, 100.0 );
|
||||
SetSkill( SkillName.Magery, 97.6, 107.5 );
|
||||
SetSkill( SkillName.Meditation, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
|
||||
SetSkill( SkillName.Tactics, 97.6, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 97.6, 100.0 );
|
||||
Fame = 20000;
|
||||
Karma = 20000;
|
||||
|
||||
Fame = 20000;
|
||||
Karma = 20000;
|
||||
VirtualArmor = 50;
|
||||
}
|
||||
|
||||
VirtualArmor = 50;
|
||||
}
|
||||
public Silvani(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.UltraRich, 2 );
|
||||
}
|
||||
public override string DefaultName => "Silvani";
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public override bool CanFly => true;
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Regular;
|
||||
public override int TreasureMapLevel => 5;
|
||||
public override bool CanFly => true;
|
||||
public override bool Unprovokable => true;
|
||||
public override Poison PoisonImmune => Poison.Regular;
|
||||
public override int TreasureMapLevel => 5;
|
||||
|
||||
public void SpawnPixies( Mobile target )
|
||||
{
|
||||
Map map = Map;
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.UltraRich, 2);
|
||||
}
|
||||
|
||||
if ( map == null )
|
||||
return;
|
||||
public void SpawnPixies(Mobile target)
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
int newPixies = Utility.RandomMinMax( 3, 6 );
|
||||
if (map == null)
|
||||
return;
|
||||
|
||||
for ( int i = 0; i < newPixies; ++i )
|
||||
{
|
||||
Pixie pixie = new Pixie();
|
||||
int newPixies = Utility.RandomMinMax(3, 6);
|
||||
|
||||
pixie.Team = Team;
|
||||
pixie.FightMode = FightMode.Closest;
|
||||
for (int i = 0; i < newPixies; ++i)
|
||||
{
|
||||
Pixie pixie = new Pixie();
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
pixie.Team = Team;
|
||||
pixie.FightMode = FightMode.Closest;
|
||||
|
||||
for ( int j = 0; !validLocation && j < 10; ++j )
|
||||
{
|
||||
int x = X + Utility.Random( 3 ) - 1;
|
||||
int y = Y + Utility.Random( 3 ) - 1;
|
||||
int z = map.GetAverageZ( x, y );
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
if ( validLocation = map.CanFit( x, y, Z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, Z );
|
||||
else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) )
|
||||
loc = new Point3D( x, y, z );
|
||||
}
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
pixie.MoveToWorld( loc, map );
|
||||
pixie.Combatant = target;
|
||||
}
|
||||
}
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
public override void AlterDamageScalarFrom( Mobile caster, ref double scalar )
|
||||
{
|
||||
if ( 0.1 >= Utility.RandomDouble() )
|
||||
SpawnPixies( caster );
|
||||
}
|
||||
pixie.MoveToWorld(loc, map);
|
||||
pixie.Combatant = target;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||
{
|
||||
if (0.1 >= Utility.RandomDouble())
|
||||
SpawnPixies(caster);
|
||||
}
|
||||
|
||||
defender.Damage( Utility.Random( 20, 10 ), this );
|
||||
defender.Stam -= Utility.Random( 20, 10 );
|
||||
defender.Mana -= Utility.Random( 20, 10 );
|
||||
}
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
public override void OnGotMeleeAttack( Mobile attacker )
|
||||
{
|
||||
base.OnGotMeleeAttack( attacker );
|
||||
defender.Damage(Utility.Random(20, 10), this);
|
||||
defender.Stam -= Utility.Random(20, 10);
|
||||
defender.Mana -= Utility.Random(20, 10);
|
||||
}
|
||||
|
||||
if ( 0.1 >= Utility.RandomDouble() )
|
||||
SpawnPixies( attacker );
|
||||
}
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
public Silvani( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (0.1 >= Utility.RandomDouble())
|
||||
SpawnPixies(attacker);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,67 +2,64 @@ using System;
|
|||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Wanderer : Mobile
|
||||
{
|
||||
private Timer m_Timer;
|
||||
public class Wanderer : Mobile
|
||||
{
|
||||
private Timer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public Wanderer()
|
||||
{
|
||||
Name = "Me";
|
||||
Body = 0x1;
|
||||
AccessLevel = AccessLevel.Counselor;
|
||||
[Constructible]
|
||||
public Wanderer()
|
||||
{
|
||||
Name = "Me";
|
||||
Body = 0x1;
|
||||
AccessLevel = AccessLevel.Counselor;
|
||||
|
||||
m_Timer = new InternalTimer( this );
|
||||
m_Timer.Start();
|
||||
}
|
||||
m_Timer = new InternalTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public Wanderer( Serial serial ) : base( serial )
|
||||
{
|
||||
m_Timer = new InternalTimer( this );
|
||||
m_Timer.Start();
|
||||
}
|
||||
public Wanderer(Serial serial) : base(serial)
|
||||
{
|
||||
m_Timer = new InternalTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
m_Timer.Stop();
|
||||
public override void OnDelete()
|
||||
{
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Wanderer m_Owner;
|
||||
private int m_Count;
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Wanderer m_Owner;
|
||||
|
||||
public InternalTimer( Wanderer owner ) : base( TimeSpan.FromSeconds( 0.1 ), TimeSpan.FromSeconds( 0.1 ) )
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
public InternalTimer(Wanderer owner) : base(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1))
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( (m_Count++ & 0x3) == 0 )
|
||||
{
|
||||
m_Owner.Direction = (Direction)(Utility.Random( 8 ) | 0x80);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ((m_Count++ & 0x3) == 0) m_Owner.Direction = (Direction)(Utility.Random(8) | 0x80);
|
||||
|
||||
m_Owner.Move( m_Owner.Direction );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m_Owner.Move(m_Owner.Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue