Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ancient
|
||||
{
|
||||
[CorpseName("a corpse")]
|
||||
public class CharmedMobile : BaseCreature
|
||||
{
|
||||
private BaseCreature m_Owner;
|
||||
|
||||
[Constructable]
|
||||
public CharmedMobile(BaseCreature owner)
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
owner = m_Owner;
|
||||
Body = 777;
|
||||
Title = " The Mystic Lama Herder";
|
||||
}
|
||||
|
||||
public CharmedMobile(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public BaseCreature Owner
|
||||
{
|
||||
get { return m_Owner; }
|
||||
set { m_Owner = value; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override bool ClickTitle { get { return false; } }
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
list.Add(1042971, this.Name);
|
||||
|
||||
list.Add(1049644, "charmed");
|
||||
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
BaseCreature m_Own = this.m_Owner;
|
||||
|
||||
if (m_Own != null)
|
||||
{
|
||||
m_Own.Location = this.Location;
|
||||
m_Own.Blessed = false;
|
||||
m_Own.RevealingAction();
|
||||
}
|
||||
Delete();
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
BaseCreature m_Own = this.m_Owner;
|
||||
|
||||
if (m_Own != null)
|
||||
{
|
||||
m_Own.Location = this.Location;
|
||||
m_Own.Blessed = false;
|
||||
m_Own.RevealingAction();
|
||||
}
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
writer.Write(m_Owner);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile() as BaseCreature;
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,138 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Spells;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ancient
|
||||
{
|
||||
public class DeathVortex : BaseCreature
|
||||
{
|
||||
private Timer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public DeathVortex()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = "Death Vortex";
|
||||
Body = 573;
|
||||
|
||||
m_Timer = new InternalTimer(this);
|
||||
m_Timer.Start();
|
||||
AddItem(new LightSource());
|
||||
|
||||
SetStr(50);
|
||||
SetDex(200);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(70);
|
||||
SetStam(250);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(14, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Energy, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 60, 70);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 90, 100);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 99.9);
|
||||
SetSkill(SkillName.Tactics, 90.0);
|
||||
SetSkill(SkillName.Wrestling, 100.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 40;
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x15;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x28;
|
||||
}
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
attacker.BoltEffect(0);
|
||||
AOS.Damage(this, attacker, 20, 0, 0, 0, 0, 100);
|
||||
}
|
||||
public override void OnGaveMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGaveMeleeAttack(attacker);
|
||||
|
||||
attacker.BoltEffect(0);
|
||||
AOS.Damage(this, attacker, 20, 0, 0, 0, 0, 100);
|
||||
}
|
||||
|
||||
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
|
||||
{
|
||||
base.AlterDamageScalarFrom(caster, ref scalar);
|
||||
caster.BoltEffect(0);
|
||||
AOS.Damage(this, caster, 20, 0, 0, 0, 0, 100);
|
||||
|
||||
}
|
||||
public DeathVortex(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
m_Timer = new InternalTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private DeathVortex m_Owner;
|
||||
private int m_Count = 0;
|
||||
|
||||
public InternalTimer(DeathVortex 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);
|
||||
}
|
||||
|
||||
m_Owner.Move(m_Owner.Direction);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ancient
|
||||
{
|
||||
[CorpseName("a corpse")]
|
||||
public class Souless : BaseCreature
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private int m_OldBody;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Owner
|
||||
{
|
||||
get { return m_Owner; }
|
||||
set { m_Owner = value; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int OldBody
|
||||
{
|
||||
get { return m_OldBody; }
|
||||
set { m_OldBody = value; }
|
||||
}
|
||||
|
||||
private AncientPeerSpell spell;
|
||||
|
||||
[Constructable]
|
||||
public Souless(AncientPeerSpell m_spell)
|
||||
: base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 777;
|
||||
Title = " The Mystic Lama Herder";
|
||||
CantWalk = true;
|
||||
spell = m_spell;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_Owner != null && m_Owner == from)
|
||||
{
|
||||
m_Owner.Map = this.Map;
|
||||
m_Owner.Location = this.Location;
|
||||
m_Owner.BodyValue = m_OldBody;
|
||||
m_Owner.Blessed = this.Blessed;
|
||||
m_Owner.Direction = this.Direction;
|
||||
this.Delete();
|
||||
m_Owner.SendMessage("You return to your body");
|
||||
if (spell != null)
|
||||
{
|
||||
spell.RemovePeerMod();
|
||||
}
|
||||
if (!m_Owner.CanBeginAction(typeof(AncientPeerSpell)))
|
||||
m_Owner.EndAction(typeof(AncientPeerSpell));
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (m_Owner != null)
|
||||
m_Owner.Map = this.Map;
|
||||
m_Owner.Location = this.Location;
|
||||
m_Owner.Blessed = this.Blessed;
|
||||
m_Owner.Direction = this.Direction;
|
||||
AFKKiller();
|
||||
m_Owner.Kill();
|
||||
m_Owner.BodyValue = 402;
|
||||
Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
public void AFKKiller()
|
||||
{
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
|
||||
List<AggressorInfo> list = Aggressors;
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
AggressorInfo info = (AggressorInfo)list[i];
|
||||
|
||||
if (info.Attacker.Player && (DateTime.Now - info.LastCombatTime) < TimeSpan.FromSeconds(30.0) && !toGive.Contains(info.Attacker))
|
||||
toGive.Add(info.Attacker);
|
||||
}
|
||||
|
||||
list = Aggressed;
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
AggressorInfo info = (AggressorInfo)list[i];
|
||||
|
||||
if (info.Defender.Player && (DateTime.Now - info.LastCombatTime) < TimeSpan.FromSeconds(30.0) && !toGive.Contains(info.Defender))
|
||||
toGive.Add(info.Defender);
|
||||
}
|
||||
|
||||
if (toGive.Count == 0)
|
||||
return;
|
||||
|
||||
for (int i = 0; i < toGive.Count; ++i)
|
||||
{
|
||||
Mobile m = (Mobile)toGive[i % toGive.Count];
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
m.DoHarmful(m_Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override bool ClickTitle { get { return false; } }
|
||||
public Souless(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
writer.Write(m_Owner);
|
||||
writer.Write(m_OldBody);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_OldBody = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user