Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
35
Projects/Scripts/Mobiles/AI/AIControlMobileTarget.cs
Normal file
35
Projects/Scripts/Mobiles/AI/AIControlMobileTarget.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Targets
|
||||
{
|
||||
public class AIControlMobileTarget : Target
|
||||
{
|
||||
private List<BaseAI> m_List;
|
||||
|
||||
public AIControlMobileTarget(BaseAI ai, OrderType order) : base(-1, false,
|
||||
order == OrderType.Attack ? TargetFlags.Harmful : TargetFlags.None)
|
||||
{
|
||||
m_List = new List<BaseAI>();
|
||||
Order = order;
|
||||
|
||||
AddAI(ai);
|
||||
}
|
||||
|
||||
public OrderType Order{ get; }
|
||||
|
||||
public void AddAI(BaseAI ai)
|
||||
{
|
||||
if (!m_List.Contains(ai))
|
||||
m_List.Add(ai);
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Mobile m)
|
||||
for (int i = 0; i < m_List.Count; ++i)
|
||||
m_List[i].EndPickTarget(from, m, Order);
|
||||
}
|
||||
}
|
||||
}
|
||||
150
Projects/Scripts/Mobiles/AI/AnimalAI.cs
Normal file
150
Projects/Scripts/Mobiles/AI/AnimalAI.cs
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
// Ideas
|
||||
// When you run on animals the panic
|
||||
// When if ( distance < 8 && Utility.RandomDouble() * Math.Sqrt( (8 - distance) / 6 ) >= incoming.Skills.AnimalTaming.Value )
|
||||
// More your close, the more it can panic
|
||||
/*
|
||||
* AnimalHunterAI, AnimalHidingAI, AnimalDomesticAI...
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class AnimalAI : BaseAI
|
||||
{
|
||||
public AnimalAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
// Old:
|
||||
#if false
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, true, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay( "There is something near, I go away" );
|
||||
Action = ActionType.Backoff;
|
||||
}
|
||||
else if ( m_Mobile.IsHurt() || m_Mobile.Combatant != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am hurt or being attacked, I flee" );
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// New, only flee @ 10%
|
||||
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if (!m_Mobile.Summoned && !m_Mobile.Controlled && hitPercent < 0.1 && m_Mobile.CanFlee) // Less than 10% health
|
||||
{
|
||||
m_Mobile.DebugSay("I am low on health!");
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if (combatant?.Deleted != false || combatant.Map != m_Mobile.Map)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is gone..");
|
||||
|
||||
Action = ActionType.Wander;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WalkMobileRange(combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.GetDistanceToSqrt(combatant) > m_Mobile.RangePerception + 1)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I cannot find {0}", combatant.Name);
|
||||
|
||||
Action = ActionType.Wander;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I should be closer to {0}", combatant.Name);
|
||||
}
|
||||
|
||||
if (!m_Mobile.Controlled && !m_Mobile.Summoned && m_Mobile.CanFlee)
|
||||
{
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if (hitPercent < 0.1)
|
||||
{
|
||||
m_Mobile.DebugSay("I am low on health!");
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionBackoff()
|
||||
{
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if (!m_Mobile.Summoned && !m_Mobile.Controlled && hitPercent < 0.1 && m_Mobile.CanFlee) // Less than 10% health
|
||||
{
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception * 2, FightMode.Closest, true, false, true))
|
||||
{
|
||||
if (WalkMobileRange(m_Mobile.FocusMob, 1, false, m_Mobile.RangePerception, m_Mobile.RangePerception * 2))
|
||||
{
|
||||
m_Mobile.DebugSay("Well, here I am safe");
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay("I have lost my focus, lets relax");
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
AcquireFocusMob(m_Mobile.RangePerception * 2, m_Mobile.FightMode, true, false, true);
|
||||
|
||||
if (m_Mobile.FocusMob == null)
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
|
||||
return base.DoActionFlee();
|
||||
}
|
||||
}
|
||||
}
|
||||
120
Projects/Scripts/Mobiles/AI/ArcherAI.cs
Normal file
120
Projects/Scripts/Mobiles/AI/ArcherAI.cs
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ArcherAI : BaseAI
|
||||
{
|
||||
public ArcherAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay("I have no combatant");
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0} and I will attack", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
if (m_Mobile.Combatant?.Deleted != false || !m_Mobile.Combatant.Alive ||
|
||||
m_Mobile.Combatant.IsDeadBondedPet)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is deleted");
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Core.TickCount - m_Mobile.LastMoveTime > 1000)
|
||||
{
|
||||
if (WalkMobileRange(m_Mobile.Combatant, 1, true, m_Mobile.RangeFight, m_Mobile.Weapon.MaxRange))
|
||||
{
|
||||
// Be sure to face the combatant
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(m_Mobile.Combatant.Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.Combatant != null)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I am still not in range of {0}", m_Mobile.Combatant.Name);
|
||||
|
||||
if ((int)m_Mobile.GetDistanceToSqrt(m_Mobile.Combatant) > m_Mobile.RangePerception + 1)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have lost {0}", m_Mobile.Combatant.Name);
|
||||
|
||||
m_Mobile.Combatant = null;
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When we have no ammo, we flee
|
||||
Container pack = m_Mobile.Backpack;
|
||||
|
||||
if (pack?.FindItemByType<Arrow>() == null)
|
||||
{
|
||||
Action = ActionType.Flee;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// At 20% we should check if we must leave
|
||||
if (m_Mobile.Hits < m_Mobile.HitsMax * 20 / 100 && m_Mobile.CanFlee)
|
||||
{
|
||||
bool bFlee = false;
|
||||
// if my current hits are more than my opponent, i don't care
|
||||
if (m_Mobile.Combatant != null && m_Mobile.Hits < m_Mobile.Combatant.Hits)
|
||||
{
|
||||
int iDiff = m_Mobile.Combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
if (Utility.Random(0, 100) > 10 + iDiff) // 10% to flee + the diff of hits
|
||||
bFlee = true;
|
||||
}
|
||||
else if (m_Mobile.Combatant != null && m_Mobile.Hits >= m_Mobile.Combatant.Hits)
|
||||
{
|
||||
if (Utility.Random(0, 100) > 10) // 10% to flee
|
||||
bFlee = true;
|
||||
}
|
||||
|
||||
if (bFlee) Action = ActionType.Flee;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
2797
Projects/Scripts/Mobiles/AI/BaseAI.cs
Normal file
2797
Projects/Scripts/Mobiles/AI/BaseAI.cs
Normal file
File diff suppressed because it is too large
Load diff
82
Projects/Scripts/Mobiles/AI/BerserkAI.cs
Normal file
82
Projects/Scripts/Mobiles/AI/BerserkAI.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class BerserkAI : BaseAI
|
||||
{
|
||||
public BerserkAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay("I have No Combatant");
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, FightMode.Closest, false, true, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected " + m_Mobile.FocusMob.Name + " and I will attack");
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
if (m_Mobile.Combatant?.Deleted != false)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is deleted");
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WalkMobileRange(m_Mobile.Combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight))
|
||||
{
|
||||
// Be sure to face the combatant
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(m_Mobile.Combatant.Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.Combatant != null)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I am still not in range of " + m_Mobile.Combatant.Name);
|
||||
|
||||
if ((int)m_Mobile.GetDistanceToSqrt(m_Mobile.Combatant) > m_Mobile.RangePerception + 1)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have lost " + m_Mobile.Combatant.Name);
|
||||
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, true, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
157
Projects/Scripts/Mobiles/AI/HealerAI.cs
Normal file
157
Projects/Scripts/Mobiles/AI/HealerAI.cs
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
using Server.Spells;
|
||||
using Server.Spells.First;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Spells.Second;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HealerAI : BaseAI
|
||||
{
|
||||
private static NeedDelegate m_Cure = NeedCure;
|
||||
private static NeedDelegate m_GHeal = NeedGHeal;
|
||||
private static NeedDelegate m_LHeal = NeedLHeal;
|
||||
private static NeedDelegate[] m_ACure = { m_Cure };
|
||||
private static NeedDelegate[] m_AGHeal = { m_GHeal };
|
||||
private static NeedDelegate[] m_ALHeal = { m_LHeal };
|
||||
private static NeedDelegate[] m_All = { m_Cure, m_GHeal, m_LHeal };
|
||||
|
||||
public HealerAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Think()
|
||||
{
|
||||
if (m_Mobile.Deleted)
|
||||
return false;
|
||||
|
||||
Target targ = m_Mobile.Target;
|
||||
|
||||
if (targ != null)
|
||||
{
|
||||
ISpellTarget spellTarg = targ as ISpellTarget;
|
||||
|
||||
if (spellTarg?.Spell is CureSpell)
|
||||
ProcessTarget(targ, m_ACure);
|
||||
else if (spellTarg?.Spell is GreaterHealSpell)
|
||||
ProcessTarget(targ, m_AGHeal);
|
||||
else if (spellTarg?.Spell is HealSpell)
|
||||
ProcessTarget(targ, m_ALHeal);
|
||||
else
|
||||
targ.Cancel(m_Mobile, TargetCancelType.Canceled);
|
||||
}
|
||||
else
|
||||
{
|
||||
Mobile toHelp = Find(m_All);
|
||||
|
||||
if (toHelp != null)
|
||||
{
|
||||
if (NeedCure(toHelp))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} needs a cure", toHelp.Name);
|
||||
|
||||
if (!new CureSpell(m_Mobile).Cast())
|
||||
new CureSpell(m_Mobile).Cast();
|
||||
}
|
||||
else if (NeedGHeal(toHelp))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} needs a greater heal", toHelp.Name);
|
||||
|
||||
if (!new GreaterHealSpell(m_Mobile).Cast())
|
||||
new HealSpell(m_Mobile).Cast();
|
||||
}
|
||||
else if (NeedLHeal(toHelp))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} needs a lesser heal", toHelp.Name);
|
||||
|
||||
new HealSpell(m_Mobile).Cast();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, FightMode.Weakest, false, true, false))
|
||||
WalkMobileRange(m_Mobile.FocusMob, 1, false, 4, 7);
|
||||
else
|
||||
WalkRandomInHome(3, 2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void ProcessTarget(Target targ, NeedDelegate[] func)
|
||||
{
|
||||
Mobile toHelp = Find(func);
|
||||
|
||||
if (toHelp != null)
|
||||
{
|
||||
if (targ.Range != -1 && !m_Mobile.InRange(toHelp, targ.Range))
|
||||
DoMove(m_Mobile.GetDirectionTo(toHelp) | Direction.Running);
|
||||
else
|
||||
targ.Invoke(m_Mobile, toHelp);
|
||||
}
|
||||
else
|
||||
{
|
||||
targ.Cancel(m_Mobile, TargetCancelType.Canceled);
|
||||
}
|
||||
}
|
||||
|
||||
private Mobile Find(params NeedDelegate[] funcs)
|
||||
{
|
||||
if (m_Mobile.Deleted)
|
||||
return null;
|
||||
|
||||
Map map = m_Mobile.Map;
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
double prio = 0.0;
|
||||
Mobile found = null;
|
||||
|
||||
foreach (Mobile m in m_Mobile.GetMobilesInRange(m_Mobile.RangePerception))
|
||||
{
|
||||
if (!m_Mobile.CanSee(m) || !(m is BaseCreature) || ((BaseCreature)m).Team != m_Mobile.Team)
|
||||
continue;
|
||||
|
||||
for (int i = 0; i < funcs.Length; ++i)
|
||||
if (funcs[i](m))
|
||||
{
|
||||
double val = -m_Mobile.GetDistanceToSqrt(m);
|
||||
|
||||
if (found == null || val > prio)
|
||||
{
|
||||
prio = val;
|
||||
found = m;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static bool NeedCure(Mobile m)
|
||||
{
|
||||
return m.Poisoned;
|
||||
}
|
||||
|
||||
private static bool NeedGHeal(Mobile m)
|
||||
{
|
||||
return m.Hits < m.HitsMax - 40;
|
||||
}
|
||||
|
||||
private static bool NeedLHeal(Mobile m)
|
||||
{
|
||||
return m.Hits < m.HitsMax - 10;
|
||||
}
|
||||
|
||||
private delegate bool NeedDelegate(Mobile m);
|
||||
}
|
||||
}
|
||||
1105
Projects/Scripts/Mobiles/AI/MageAI.cs
Normal file
1105
Projects/Scripts/Mobiles/AI/MageAI.cs
Normal file
File diff suppressed because it is too large
Load diff
177
Projects/Scripts/Mobiles/AI/MeleeAI.cs
Normal file
177
Projects/Scripts/Mobiles/AI/MeleeAI.cs
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MeleeAI : BaseAI
|
||||
{
|
||||
public MeleeAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay("I have no combatant");
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if (combatant?.Deleted != false || combatant.Map != m_Mobile.Map || !combatant.Alive ||
|
||||
combatant.IsDeadBondedPet)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is gone, so my guard is up");
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!m_Mobile.InRange(combatant, m_Mobile.RangePerception))
|
||||
{
|
||||
// They are somewhat far away, can we find something else?
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
m_Mobile.FocusMob = null;
|
||||
}
|
||||
else if (!m_Mobile.InRange(combatant, m_Mobile.RangePerception * 3))
|
||||
{
|
||||
m_Mobile.Combatant = null;
|
||||
}
|
||||
|
||||
combatant = m_Mobile.Combatant;
|
||||
|
||||
if (combatant == null)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant has fled, so I am on guard");
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/*if ( !m_Mobile.InLOS( combatant ) )
|
||||
{
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
m_Mobile.Combatant = combatant = m_Mobile.FocusMob;
|
||||
m_Mobile.FocusMob = null;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (MoveTo(combatant, true, m_Mobile.RangeFight))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
}
|
||||
else if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("My move is blocked, so I am going to attack {0}", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (m_Mobile.GetDistanceToSqrt(combatant) > m_Mobile.RangePerception + 1)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I cannot find {0}, so my guard is up", combatant.Name);
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I should be closer to {0}", combatant.Name);
|
||||
}
|
||||
|
||||
if (!m_Mobile.Controlled && !m_Mobile.Summoned && m_Mobile.CanFlee)
|
||||
if (m_Mobile.Hits < m_Mobile.HitsMax * 20 / 100)
|
||||
{
|
||||
// We are low on health, should we flee?
|
||||
|
||||
bool flee = false;
|
||||
|
||||
if (m_Mobile.Hits < combatant.Hits)
|
||||
{
|
||||
// We are more hurt than them
|
||||
|
||||
int diff = combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
flee = Utility.Random(0, 100) < 10 + diff; // (10 + diff)% chance to flee
|
||||
}
|
||||
else
|
||||
{
|
||||
flee = Utility.Random(0, 100) < 10; // 10% chance to flee
|
||||
}
|
||||
|
||||
if (flee)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I am going to flee from {0}", combatant.Name);
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
if (m_Mobile.Hits > m_Mobile.HitsMax / 2)
|
||||
{
|
||||
m_Mobile.DebugSay("I am stronger now, so I will continue fighting");
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
base.DoActionFlee();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
126
Projects/Scripts/Mobiles/AI/OppositionGroup.cs
Normal file
126
Projects/Scripts/Mobiles/AI/OppositionGroup.cs
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public class OppositionGroup
|
||||
{
|
||||
private Type[][] m_Types;
|
||||
|
||||
public OppositionGroup(Type[][] types)
|
||||
{
|
||||
m_Types = types;
|
||||
}
|
||||
|
||||
public static OppositionGroup TerathansAndOphidians{ get; } = new OppositionGroup(new[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
typeof(TerathanAvenger),
|
||||
typeof(TerathanDrone),
|
||||
typeof(TerathanMatriarch),
|
||||
typeof(TerathanWarrior)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
typeof(OphidianArchmage),
|
||||
typeof(OphidianKnight),
|
||||
typeof(OphidianMage),
|
||||
typeof(OphidianMatriarch),
|
||||
typeof(OphidianWarrior)
|
||||
}
|
||||
});
|
||||
|
||||
public static OppositionGroup SavagesAndOrcs{ get; } = new OppositionGroup(new[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
typeof(Orc),
|
||||
typeof(OrcBomber),
|
||||
typeof(OrcBrute),
|
||||
typeof(OrcCaptain),
|
||||
typeof(OrcishLord),
|
||||
typeof(OrcishMage),
|
||||
typeof(SpawnedOrcishLord)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
typeof(Savage),
|
||||
typeof(SavageRider),
|
||||
typeof(SavageRidgeback),
|
||||
typeof(SavageShaman)
|
||||
}
|
||||
});
|
||||
|
||||
public static OppositionGroup FeyAndUndead{ get; } = new OppositionGroup(new[]
|
||||
{
|
||||
new[]
|
||||
{
|
||||
typeof(Centaur),
|
||||
typeof(EtherealWarrior),
|
||||
typeof(Kirin),
|
||||
typeof(LordOaks),
|
||||
typeof(Pixie),
|
||||
typeof(Silvani),
|
||||
typeof(Unicorn),
|
||||
typeof(Wisp),
|
||||
typeof(Treefellow),
|
||||
typeof(MLDryad),
|
||||
typeof(Satyr)
|
||||
},
|
||||
new[]
|
||||
{
|
||||
typeof(AncientLich),
|
||||
typeof(Bogle),
|
||||
typeof(LichLord),
|
||||
typeof(Shade),
|
||||
typeof(Spectre),
|
||||
typeof(Wraith),
|
||||
typeof(BoneKnight),
|
||||
typeof(Ghoul),
|
||||
typeof(Mummy),
|
||||
typeof(SkeletalKnight),
|
||||
typeof(Skeleton),
|
||||
typeof(Zombie),
|
||||
typeof(ShadowKnight),
|
||||
typeof(DarknightCreeper),
|
||||
typeof(RevenantLion),
|
||||
typeof(LadyOfTheSnow),
|
||||
typeof(RottingCorpse),
|
||||
typeof(SkeletalDragon),
|
||||
typeof(Lich)
|
||||
}
|
||||
});
|
||||
|
||||
public bool IsEnemy(object from, object target)
|
||||
{
|
||||
int fromGroup = IndexOf(from);
|
||||
int targGroup = IndexOf(target);
|
||||
|
||||
return fromGroup != -1 && targGroup != -1 && fromGroup != targGroup;
|
||||
}
|
||||
|
||||
public int IndexOf(object obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return -1;
|
||||
|
||||
Type type = obj.GetType();
|
||||
|
||||
for (int i = 0; i < m_Types.Length; ++i)
|
||||
{
|
||||
Type[] group = m_Types[i];
|
||||
|
||||
bool contains = false;
|
||||
|
||||
for (int j = 0; !contains && j < group.Length; ++j)
|
||||
contains = group[j].IsAssignableFrom(type);
|
||||
|
||||
if (contains)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
92
Projects/Scripts/Mobiles/AI/PredatorAI.cs
Normal file
92
Projects/Scripts/Mobiles/AI/PredatorAI.cs
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* PredatorAI, its an animal that can attack
|
||||
* Dont flee but dont attack if not hurt or attacked
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PredatorAI : BaseAI
|
||||
{
|
||||
public PredatorAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
if (m_Mobile.Combatant != null)
|
||||
{
|
||||
m_Mobile.DebugSay("I am hurt or being attacked, I kill him");
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, true, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay("There is something near, I go away");
|
||||
Action = ActionType.Backoff;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if (combatant?.Deleted != false || combatant.Map != m_Mobile.Map)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is gone, so my guard is up");
|
||||
Action = ActionType.Wander;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WalkMobileRange(combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.GetDistanceToSqrt(combatant) > m_Mobile.RangePerception + 1)
|
||||
{
|
||||
m_Mobile.DebugSay("I cannot find {0}", combatant.Name);
|
||||
|
||||
Action = ActionType.Wander;
|
||||
return true;
|
||||
}
|
||||
|
||||
m_Mobile.DebugSay("I should be closer to {0}", combatant.Name);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionBackoff()
|
||||
{
|
||||
if (m_Mobile.IsHurt() || m_Mobile.Combatant != null)
|
||||
{
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception * 2, FightMode.Closest, true, false, true))
|
||||
{
|
||||
if (WalkMobileRange(m_Mobile.FocusMob, 1, false, m_Mobile.RangePerception, m_Mobile.RangePerception * 2))
|
||||
{
|
||||
m_Mobile.DebugSay("Well, here I am safe");
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay("I have lost my focus, lets relax");
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
208
Projects/Scripts/Mobiles/AI/SpeedInfo.cs
Normal file
208
Projects/Scripts/Mobiles/AI/SpeedInfo.cs
Normal file
|
|
@ -0,0 +1,208 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public class SpeedInfo
|
||||
{
|
||||
// Should we use the new method of speeds?
|
||||
private static bool Enabled = true;
|
||||
|
||||
private static Dictionary<Type, SpeedInfo> m_Table;
|
||||
|
||||
private static SpeedInfo[] m_Speeds =
|
||||
{
|
||||
/* Slow */
|
||||
new SpeedInfo(0.3, 0.6, new[]
|
||||
{
|
||||
typeof(AntLion), typeof(ArcticOgreLord), typeof(BogThing),
|
||||
typeof(Bogle), typeof(BoneKnight), typeof(EarthElemental),
|
||||
typeof(Ettin), typeof(FrostOoze), typeof(FrostTroll),
|
||||
typeof(GazerLarva), typeof(Ghoul), typeof(Golem),
|
||||
typeof(HeadlessOne), typeof(Jwilson), typeof(Mummy),
|
||||
typeof(Ogre), typeof(OgreLord), typeof(PlagueBeast),
|
||||
typeof(Quagmire), typeof(Rat), typeof(RottingCorpse),
|
||||
typeof(SewerRat), typeof(Skeleton), typeof(Slime),
|
||||
typeof(Zombie), typeof(Walrus), typeof(RestlessSoul),
|
||||
typeof(CrystalElemental), typeof(DarknightCreeper), typeof(MoundOfMaggots),
|
||||
typeof(Juggernaut), typeof(Yamandon), typeof(Serado)
|
||||
}),
|
||||
/* Fast */
|
||||
new SpeedInfo(0.2, 0.4, new[]
|
||||
{
|
||||
typeof(LordOaks), typeof(Silvani), typeof(AirElemental),
|
||||
typeof(AncientWyrm), typeof(Balron), typeof(BladeSpirits),
|
||||
typeof(DreadSpider), typeof(Efreet), typeof(EtherealWarrior),
|
||||
typeof(Lich), typeof(Nightmare), typeof(OphidianArchmage),
|
||||
typeof(OphidianMage), typeof(OphidianWarrior), typeof(OphidianMatriarch),
|
||||
typeof(OphidianKnight), typeof(PoisonElemental), typeof(Revenant),
|
||||
typeof(SandVortex), typeof(SavageRider), typeof(SavageShaman),
|
||||
typeof(SnowElemental), typeof(WhiteWyrm), typeof(Wisp),
|
||||
typeof(DemonKnight), typeof(GiantBlackWidow), typeof(SummonedAirElemental),
|
||||
typeof(LesserHiryu), typeof(Hiryu), typeof(LadyOfTheSnow),
|
||||
typeof(RaiJu), typeof(Ronin), typeof(RuneBeetle),
|
||||
typeof(Changeling),
|
||||
|
||||
#region ML named mobs - before Paragon speedboost
|
||||
|
||||
typeof(LadyJennifyr), typeof(LadyMarai), typeof(MasterJonath),
|
||||
typeof(MasterMikael), typeof(MasterTheophilus), typeof(RedDeath),
|
||||
typeof(SirPatrick), typeof(Miasma), typeof(Rend),
|
||||
typeof(Grobu), typeof(Gnaw), typeof(Guile),
|
||||
typeof(Irk), typeof(Spite), typeof(LadyLissith),
|
||||
typeof(LadySabrix), typeof(Malefic), typeof(Silk),
|
||||
typeof(Virulent)
|
||||
// TODO: Where to put Lurg, Putrefier, Swoop and Pyre? They seem slower.
|
||||
|
||||
#endregion
|
||||
}),
|
||||
/* Very Fast */
|
||||
new SpeedInfo(0.175, 0.350, new[]
|
||||
{
|
||||
typeof(Barracoon), typeof(Mephitis), typeof(Neira),
|
||||
typeof(Rikktor), typeof(Semidar), typeof(EnergyVortex),
|
||||
typeof(EliteNinja), typeof(Pixie), typeof(SilverSerpent),
|
||||
typeof(VorpalBunny), typeof(FleshRenderer), typeof(KhaldunRevenant),
|
||||
typeof(FactionDragoon), typeof(FactionKnight), typeof(FactionPaladin),
|
||||
typeof(FactionHenchman), typeof(FactionMercenary), typeof(FactionNecromancer),
|
||||
typeof(FactionSorceress), typeof(FactionWizard), typeof(FactionBerserker),
|
||||
typeof(FactionPaladin), typeof(Leviathan), typeof(FireBeetle),
|
||||
typeof(FanDancer), typeof(FactionDeathKnight)
|
||||
}),
|
||||
/* Medium */
|
||||
new SpeedInfo(0.25, 0.5, new[]
|
||||
{
|
||||
typeof(AcidElemental), typeof(AgapiteElemental), typeof(Alligator),
|
||||
typeof(AncientLich), typeof(Betrayer), typeof(Bird),
|
||||
typeof(BlackBear), typeof(BlackSolenInfiltratorQueen), typeof(BlackSolenInfiltratorWarrior),
|
||||
typeof(BlackSolenQueen), typeof(BlackSolenWarrior), typeof(BlackSolenWorker),
|
||||
typeof(BloodElemental), typeof(Boar), typeof(Bogling),
|
||||
typeof(BoneMagi), typeof(Brigand), typeof(BronzeElemental),
|
||||
typeof(BrownBear), typeof(Bull), typeof(BullFrog),
|
||||
typeof(Cat), typeof(Centaur), typeof(ChaosDaemon),
|
||||
typeof(Chicken), typeof(GolemController), typeof(CopperElemental),
|
||||
typeof(CopperElemental), typeof(Cougar), typeof(Cow),
|
||||
typeof(Cyclops), typeof(Daemon), typeof(DeepSeaSerpent),
|
||||
typeof(DesertOstard), typeof(DireWolf), typeof(Dog),
|
||||
typeof(Dolphin), typeof(Dragon), typeof(Drake),
|
||||
typeof(DullCopperElemental), typeof(Eagle), typeof(ElderGazer),
|
||||
typeof(EvilMage), typeof(EvilMageLord), typeof(Executioner),
|
||||
typeof(Savage), typeof(FireElemental), typeof(FireGargoyle),
|
||||
typeof(FireSteed), typeof(ForestOstard), typeof(FrenziedOstard),
|
||||
typeof(FrostSpider), typeof(Gargoyle), typeof(Gazer),
|
||||
typeof(IceSerpent), typeof(GiantRat), typeof(GiantSerpent),
|
||||
typeof(GiantSpider), typeof(GiantToad), typeof(Goat),
|
||||
typeof(GoldenElemental), typeof(Gorilla), typeof(GreatHart),
|
||||
typeof(GreyWolf), typeof(GrizzlyBear), typeof(Guardian),
|
||||
typeof(Harpy), typeof(Harrower), typeof(HellHound),
|
||||
typeof(Hind), typeof(HordeMinion), typeof(Horse),
|
||||
typeof(Horse), typeof(IceElemental), typeof(IceFiend),
|
||||
typeof(IceSnake), typeof(Imp), typeof(JackRabbit),
|
||||
typeof(Kirin), typeof(Kraken), typeof(PredatorHellCat),
|
||||
typeof(LavaLizard), typeof(LavaSerpent), typeof(LavaSnake),
|
||||
typeof(Lizardman), typeof(Llama), typeof(Mongbat),
|
||||
typeof(StrongMongbat), typeof(MountainGoat), typeof(Orc),
|
||||
typeof(OrcBomber), typeof(OrcBrute), typeof(OrcCaptain),
|
||||
typeof(OrcishLord), typeof(OrcishMage), typeof(PackHorse),
|
||||
typeof(PackLlama), typeof(Panther), typeof(Pig),
|
||||
typeof(PlagueSpawn), typeof(PolarBear), typeof(Rabbit),
|
||||
typeof(Ratman), typeof(RatmanArcher), typeof(RatmanMage),
|
||||
typeof(RedSolenInfiltratorQueen), typeof(RedSolenInfiltratorWarrior), typeof(RedSolenQueen),
|
||||
typeof(RedSolenWarrior), typeof(RedSolenWorker), typeof(RidableLlama),
|
||||
typeof(Ridgeback), typeof(Scorpion), typeof(SeaSerpent),
|
||||
typeof(SerpentineDragon), typeof(Shade), typeof(ShadowIronElemental),
|
||||
typeof(ShadowWisp), typeof(ShadowWyrm), typeof(Sheep),
|
||||
typeof(SilverSteed), typeof(SkeletalDragon), typeof(SkeletalMage),
|
||||
typeof(SkeletalMount), typeof(HellCat), typeof(Snake),
|
||||
typeof(SnowLeopard), typeof(SpectralArmour), typeof(Spectre),
|
||||
typeof(StoneGargoyle), typeof(StoneHarpy), typeof(SwampDragon),
|
||||
typeof(ScaledSwampDragon), typeof(SwampTentacle), typeof(TerathanAvenger),
|
||||
typeof(TerathanDrone), typeof(TerathanMatriarch), typeof(TerathanWarrior),
|
||||
typeof(TimberWolf), typeof(Titan), typeof(Troll),
|
||||
typeof(Unicorn), typeof(ValoriteElemental), typeof(VeriteElemental),
|
||||
typeof(CoMWarHorse), typeof(MinaxWarHorse), typeof(SLWarHorse),
|
||||
typeof(TBWarHorse), typeof(WaterElemental), typeof(WhippingVine),
|
||||
typeof(WhiteWolf), typeof(Wraith), typeof(Wyvern),
|
||||
typeof(KhaldunZealot), typeof(KhaldunSummoner), typeof(SavageRidgeback),
|
||||
typeof(LichLord), typeof(SkeletalKnight), typeof(SummonedDaemon),
|
||||
typeof(SummonedEarthElemental), typeof(SummonedWaterElemental), typeof(SummonedFireElemental),
|
||||
typeof(MeerWarrior), typeof(MeerEternal), typeof(MeerMage),
|
||||
typeof(MeerCaptain), typeof(JukaLord), typeof(JukaMage),
|
||||
typeof(JukaWarrior), typeof(AbysmalHorror), typeof(BoneDemon),
|
||||
typeof(Devourer), typeof(FleshGolem), typeof(Gibberling),
|
||||
typeof(GoreFiend), typeof(Impaler), typeof(PatchworkSkeleton),
|
||||
typeof(Ravager), typeof(ShadowKnight), typeof(SkitteringHopper),
|
||||
typeof(Treefellow), typeof(VampireBat), typeof(WailingBanshee),
|
||||
typeof(WandererOfTheVoid), typeof(Cursed), typeof(GrimmochDrummel),
|
||||
typeof(LysanderGathenwale), typeof(MorgBergen), typeof(ShadowFiend),
|
||||
typeof(SpectralArmour), typeof(TavaraSewel), typeof(ArcaneDaemon),
|
||||
typeof(Doppleganger), typeof(EnslavedGargoyle), typeof(ExodusMinion),
|
||||
typeof(ExodusOverseer), typeof(GargoyleDestroyer), typeof(GargoyleEnforcer),
|
||||
typeof(Moloch), typeof(BakeKitsune), typeof(DeathwatchBeetleHatchling),
|
||||
typeof(Kappa), typeof(KazeKemono), typeof(DeathwatchBeetle),
|
||||
typeof(TsukiWolf), typeof(YomotsuElder), typeof(YomotsuPriest),
|
||||
typeof(YomotsuWarrior), typeof(RevenantLion), typeof(Oni),
|
||||
typeof(Gaman), typeof(Crane), typeof(Beetle)
|
||||
})
|
||||
};
|
||||
|
||||
public SpeedInfo(double activeSpeed, double passiveSpeed, Type[] types)
|
||||
{
|
||||
ActiveSpeed = activeSpeed;
|
||||
PassiveSpeed = passiveSpeed;
|
||||
Types = types;
|
||||
}
|
||||
|
||||
public double ActiveSpeed{ get; set; }
|
||||
|
||||
public double PassiveSpeed{ get; set; }
|
||||
|
||||
public Type[] Types{ get; set; }
|
||||
|
||||
public static bool Contains(object obj)
|
||||
{
|
||||
if (!Enabled)
|
||||
return false;
|
||||
|
||||
if (m_Table == null)
|
||||
LoadTable();
|
||||
|
||||
;
|
||||
|
||||
return m_Table.ContainsKey(obj.GetType());
|
||||
}
|
||||
|
||||
public static bool GetSpeeds(object obj, ref double activeSpeed, ref double passiveSpeed)
|
||||
{
|
||||
if (!Enabled)
|
||||
return false;
|
||||
|
||||
if (m_Table == null)
|
||||
LoadTable();
|
||||
|
||||
if (!m_Table.TryGetValue(obj.GetType(), out SpeedInfo sp))
|
||||
return false;
|
||||
|
||||
activeSpeed = sp.ActiveSpeed;
|
||||
passiveSpeed = sp.PassiveSpeed;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void LoadTable()
|
||||
{
|
||||
m_Table = new Dictionary<Type, SpeedInfo>();
|
||||
|
||||
for (int i = 0; i < m_Speeds.Length; ++i)
|
||||
{
|
||||
SpeedInfo info = m_Speeds[i];
|
||||
Type[] types = info.Types;
|
||||
|
||||
for (int j = 0; j < types.Length; ++j)
|
||||
m_Table[types[j]] = info;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
180
Projects/Scripts/Mobiles/AI/ThiefAI.cs
Normal file
180
Projects/Scripts/Mobiles/AI/ThiefAI.cs
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
using Server.Items;
|
||||
|
||||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ThiefAI : BaseAI
|
||||
{
|
||||
private Item m_toDisarm;
|
||||
|
||||
public ThiefAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay("I have no combatant");
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if (combatant?.Deleted != false || combatant.Map != m_Mobile.Map)
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is gone, so my guard is up");
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (WalkMobileRange(combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight))
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(combatant);
|
||||
|
||||
if (m_toDisarm?.IsChildOf(m_Mobile.Backpack) != false)
|
||||
m_toDisarm = combatant.FindItemOnLayer(Layer.OneHanded) ?? combatant.FindItemOnLayer(Layer.TwoHanded);
|
||||
|
||||
if (!Core.AOS && !m_Mobile.DisarmReady && m_Mobile.Skills.Wrestling.Value >= 80.0 &&
|
||||
m_Mobile.Skills.ArmsLore.Value >= 80.0 && m_toDisarm != null)
|
||||
EventSink.InvokeDisarmRequest(new DisarmRequestEventArgs(m_Mobile));
|
||||
|
||||
if (m_toDisarm?.IsChildOf(combatant.Backpack) == true &&
|
||||
Core.TickCount - m_Mobile.NextSkillTime >= 0 && m_toDisarm.LootType != LootType.Blessed &&
|
||||
m_toDisarm.LootType != LootType.Newbied)
|
||||
{
|
||||
m_Mobile.DebugSay("Trying to steal from combatant.");
|
||||
m_Mobile.UseSkill(SkillName.Stealing);
|
||||
m_Mobile.Target?.Invoke(m_Mobile, m_toDisarm);
|
||||
}
|
||||
else if (m_toDisarm == null && Core.TickCount - m_Mobile.NextSkillTime >= 0)
|
||||
{
|
||||
Container cpack = combatant.Backpack;
|
||||
|
||||
if (cpack != null)
|
||||
{
|
||||
Item steala = cpack.FindItemByType<Bandage>();
|
||||
if (steala != null)
|
||||
{
|
||||
m_Mobile.DebugSay("Trying to steal from combatant.");
|
||||
m_Mobile.UseSkill(SkillName.Stealing);
|
||||
m_Mobile.Target?.Invoke(m_Mobile, steala);
|
||||
}
|
||||
|
||||
Item stealb = cpack.FindItemByType<Nightshade>();
|
||||
if (stealb != null)
|
||||
{
|
||||
m_Mobile.DebugSay("Trying to steal from combatant.");
|
||||
m_Mobile.UseSkill(SkillName.Stealing);
|
||||
m_Mobile.Target?.Invoke(m_Mobile, stealb);
|
||||
}
|
||||
|
||||
Item stealc = cpack.FindItemByType<BlackPearl>();
|
||||
if (stealc != null)
|
||||
{
|
||||
m_Mobile.DebugSay("Trying to steal from combatant.");
|
||||
m_Mobile.UseSkill(SkillName.Stealing);
|
||||
m_Mobile.Target?.Invoke(m_Mobile, stealc);
|
||||
}
|
||||
|
||||
Item steald = cpack.FindItemByType<MandrakeRoot>();
|
||||
if (steald != null)
|
||||
{
|
||||
m_Mobile.DebugSay("Trying to steal from combatant.");
|
||||
m_Mobile.UseSkill(SkillName.Stealing);
|
||||
m_Mobile.Target?.Invoke(m_Mobile, steald);
|
||||
}
|
||||
else if (steala == null && stealb == null && stealc == null)
|
||||
{
|
||||
m_Mobile.DebugSay("I am going to flee from {0}", combatant.Name);
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay("I should be closer to {0}", combatant.Name);
|
||||
}
|
||||
|
||||
if (m_Mobile.Hits >= m_Mobile.HitsMax * 20 / 100 || !m_Mobile.CanFlee)
|
||||
return true;
|
||||
// We are low on health, should we flee?
|
||||
|
||||
bool flee;
|
||||
|
||||
if (m_Mobile.Hits < combatant.Hits)
|
||||
{
|
||||
// We are more hurt than them
|
||||
int diff = combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
flee = Utility.Random(0, 100) > 10 + diff; // (10 + diff)% chance to flee
|
||||
}
|
||||
else
|
||||
{
|
||||
flee = Utility.Random(0, 100) > 10; // 10% chance to flee
|
||||
}
|
||||
|
||||
if (flee)
|
||||
{
|
||||
m_Mobile.DebugSay("I am going to flee from {0}", combatant.Name);
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay("I have detected {0}, attacking", m_Mobile.FocusMob.Name);
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
if (m_Mobile.Hits > m_Mobile.HitsMax / 2)
|
||||
{
|
||||
m_Mobile.DebugSay("I am stronger now, so I will continue fighting");
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
base.DoActionFlee();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
150
Projects/Scripts/Mobiles/AI/VendorAI.cs
Normal file
150
Projects/Scripts/Mobiles/AI/VendorAI.cs
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class VendorAI : BaseAI
|
||||
{
|
||||
public VendorAI(BaseCreature m) : base(m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay("I'm fine");
|
||||
|
||||
if (m_Mobile.Combatant != null)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} is attacking me", m_Mobile.Combatant.Name);
|
||||
|
||||
m_Mobile.Say(Utility.RandomList(1005305, 501603));
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.FocusMob != null)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} has talked to me", m_Mobile.FocusMob.Name);
|
||||
|
||||
Action = ActionType.Interact;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.Warmode = false;
|
||||
|
||||
base.DoActionWander();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionInteract()
|
||||
{
|
||||
Mobile customer = m_Mobile.FocusMob;
|
||||
|
||||
if (m_Mobile.Combatant != null)
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} is attacking me", m_Mobile.Combatant.Name);
|
||||
|
||||
m_Mobile.Say(Utility.RandomList(1005305, 501603));
|
||||
|
||||
Action = ActionType.Flee;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (customer?.Deleted != false || customer.Map != m_Mobile.Map)
|
||||
{
|
||||
m_Mobile.DebugSay("My customer have disapeared");
|
||||
m_Mobile.FocusMob = null;
|
||||
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (customer.InRange(m_Mobile, m_Mobile.RangeFight))
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("I am with {0}", customer.Name);
|
||||
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(customer);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Mobile.Debug)
|
||||
m_Mobile.DebugSay("{0} is gone", customer.Name);
|
||||
|
||||
m_Mobile.FocusMob = null;
|
||||
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
return base.DoActionGuard();
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech(Mobile from)
|
||||
{
|
||||
if (from.InRange(m_Mobile, 4))
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech(from);
|
||||
}
|
||||
|
||||
// Temporary
|
||||
public override void OnSpeech(SpeechEventArgs e)
|
||||
{
|
||||
base.OnSpeech(e);
|
||||
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if (m_Mobile is BaseVendor vendor && from.InRange(m_Mobile, Core.AOS ? 1 : 4) && !e.Handled)
|
||||
{
|
||||
if (e.HasKeyword(0x14D)) // *vendor sell*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
vendor.VendorSell(from);
|
||||
vendor.FocusMob = from;
|
||||
}
|
||||
else if (e.HasKeyword(0x3C)) // *vendor buy*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
vendor.VendorBuy(from);
|
||||
vendor.FocusMob = from;
|
||||
}
|
||||
else if (WasNamed(e.Speech))
|
||||
{
|
||||
if (e.HasKeyword(0x177)) // *sell*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
vendor.VendorSell(from);
|
||||
}
|
||||
else if (e.HasKeyword(0x171)) // *buy*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
vendor.VendorBuy(from);
|
||||
}
|
||||
|
||||
vendor.FocusMob = from;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Projects/Scripts/Mobiles/Animals/Bears/BlackBear.cs
Normal file
67
Projects/Scripts/Mobiles/Animals/Bears/BlackBear.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Bear")]
|
||||
public class BlackBear : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public BlackBear() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 211;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr(76, 100);
|
||||
SetDex(56, 75);
|
||||
SetInt(11, 14);
|
||||
|
||||
SetHits(46, 60);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 20.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public BlackBear(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bear corpse";
|
||||
public override string DefaultName => "a black bear";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Bear;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Projects/Scripts/Mobiles/Animals/Bears/BrownBear.cs
Normal file
66
Projects/Scripts/Mobiles/Animals/Bears/BrownBear.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class BrownBear : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public BrownBear() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 167;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr(76, 100);
|
||||
SetDex(26, 45);
|
||||
SetInt(23, 47);
|
||||
|
||||
SetHits(46, 60);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(6, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 30);
|
||||
SetResistance(ResistanceType.Cold, 15, 20);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 35.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 41.1;
|
||||
}
|
||||
|
||||
public BrownBear(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bear corpse";
|
||||
public override string DefaultName => "a brown bear";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Bear;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Bears/GrizzlyBear.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Bears/GrizzlyBear.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Grizzlybear")]
|
||||
public class GrizzlyBear : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GrizzlyBear() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 212;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr(126, 155);
|
||||
SetDex(81, 105);
|
||||
SetInt(16, 40);
|
||||
|
||||
SetHits(76, 93);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(8, 13);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Cold, 15, 25);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 70.1, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 70.0);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public GrizzlyBear(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a grizzly bear corpse";
|
||||
public override string DefaultName => "a grizzly bear";
|
||||
|
||||
public override int Meat => 2;
|
||||
public override int Hides => 16;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Bear;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Bears/PolarBear.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Bears/PolarBear.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Polarbear")]
|
||||
public class PolarBear : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public PolarBear() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 213;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr(116, 140);
|
||||
SetDex(81, 105);
|
||||
SetInt(26, 50);
|
||||
|
||||
SetHits(70, 84);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(7, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Cold, 60, 80);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 45.1, 60.0);
|
||||
SetSkill(SkillName.Tactics, 60.1, 90.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 70.0);
|
||||
|
||||
Fame = 1500;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public PolarBear(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a polar bear corpse";
|
||||
public override string DefaultName => "a polar bear";
|
||||
|
||||
public override int Meat => 2;
|
||||
public override int Hides => 16;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Bear;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Projects/Scripts/Mobiles/Animals/Birds/Chicken.cs
Normal file
66
Projects/Scripts/Mobiles/Animals/Birds/Chicken.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Chicken : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Chicken() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xD0;
|
||||
BaseSoundID = 0x6E;
|
||||
|
||||
SetStr(5);
|
||||
SetDex(15);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(3);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 1, 5);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 4.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 2;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public Chicken(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a chicken corpse";
|
||||
public override string DefaultName => "a chicken";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override MeatType MeatType => MeatType.Bird;
|
||||
public override FoodType FavoriteFood => FoodType.GrainsAndHay;
|
||||
public override bool CanFly => true;
|
||||
|
||||
public override int Feathers => 25;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Projects/Scripts/Mobiles/Animals/Birds/Crane.cs
Normal file
84
Projects/Scripts/Mobiles/Animals/Birds/Crane.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Crane : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Crane() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 254;
|
||||
BaseSoundID = 0x4D7;
|
||||
|
||||
SetStr(26, 35);
|
||||
SetDex(16, 25);
|
||||
SetInt(11, 15);
|
||||
|
||||
SetHits(26, 35);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 5);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 4.1, 5.0);
|
||||
SetSkill(SkillName.Tactics, 10.1, 11.0);
|
||||
SetSkill(SkillName.Wrestling, 10.1, 11.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 5;
|
||||
}
|
||||
|
||||
public Crane(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bird corpse";
|
||||
public override string DefaultName => "a crane";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Feathers => 25;
|
||||
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4D9;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4D8;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4D7;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4DA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4D6;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Birds/Eagle.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Birds/Eagle.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Eagle : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Eagle() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 5;
|
||||
BaseSoundID = 0x2EE;
|
||||
|
||||
SetStr(31, 47);
|
||||
SetDex(36, 60);
|
||||
SetInt(8, 20);
|
||||
|
||||
SetHits(20, 27);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 20, 25);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.3, 30.0);
|
||||
SetSkill(SkillName.Tactics, 18.1, 37.0);
|
||||
SetSkill(SkillName.Wrestling, 20.1, 30.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 22;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 17.1;
|
||||
}
|
||||
|
||||
public Eagle(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bird corpse";
|
||||
public override string DefaultName => "an eagle";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override MeatType MeatType => MeatType.Bird;
|
||||
public override int Feathers => 36;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish;
|
||||
public override bool CanFly => true;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Projects/Scripts/Mobiles/Animals/Birds/Phoenix.cs
Normal file
71
Projects/Scripts/Mobiles/Animals/Birds/Phoenix.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Phoenix : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Phoenix() : base(AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 5;
|
||||
Hue = 0x674;
|
||||
BaseSoundID = 0x8F;
|
||||
|
||||
SetStr(504, 700);
|
||||
SetDex(202, 300);
|
||||
SetInt(504, 700);
|
||||
|
||||
SetHits(340, 383);
|
||||
|
||||
SetDamage(25);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Fire, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 45, 55);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 25, 35);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 90.2, 100.0);
|
||||
SetSkill(SkillName.Magery, 90.2, 100.0);
|
||||
SetSkill(SkillName.Meditation, 75.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 86.0, 135.0);
|
||||
SetSkill(SkillName.Tactics, 80.1, 90.0);
|
||||
SetSkill(SkillName.Wrestling, 90.1, 100.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 60;
|
||||
}
|
||||
|
||||
public Phoenix(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a phoenix corpse";
|
||||
public override string DefaultName => "a phoenix";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override MeatType MeatType => MeatType.Bird;
|
||||
public override int Feathers => 36;
|
||||
public override bool CanFly => true;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Rich);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Canines/DireWolf.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Canines/DireWolf.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Direwolf")]
|
||||
public class DireWolf : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public DireWolf() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 23;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr(96, 120);
|
||||
SetDex(81, 105);
|
||||
SetInt(36, 60);
|
||||
|
||||
SetHits(58, 72);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(11, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 10, 20);
|
||||
SetResistance(ResistanceType.Cold, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 57.6, 75.0);
|
||||
SetSkill(SkillName.Tactics, 50.1, 70.0);
|
||||
SetSkill(SkillName.Wrestling, 60.1, 80.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 22;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public DireWolf(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a dire wolf corpse";
|
||||
public override string DefaultName => "a dire wolf";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 7;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Canine;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Canines/GreyWolf.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Canines/GreyWolf.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Greywolf")]
|
||||
public class GreyWolf : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GreyWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = Utility.RandomList(25, 27);
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr(56, 80);
|
||||
SetDex(56, 75);
|
||||
SetInt(31, 55);
|
||||
|
||||
SetHits(34, 48);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 20, 25);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 20.1, 35.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public GreyWolf(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a grey wolf corpse";
|
||||
public override string DefaultName => "a grey wolf";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 6;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Canine;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Canines/TimberWolf.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Canines/TimberWolf.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Timberwolf")]
|
||||
public class TimberWolf : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public TimberWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 225;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr(56, 80);
|
||||
SetDex(56, 75);
|
||||
SetInt(11, 25);
|
||||
|
||||
SetHits(34, 48);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 9);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 27.6, 45.0);
|
||||
SetSkill(SkillName.Tactics, 30.1, 50.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public TimberWolf(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a timber wolf corpse";
|
||||
public override string DefaultName => "a timber wolf";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 5;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Canine;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Canines/WhiteWolf.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Canines/WhiteWolf.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Whitewolf")]
|
||||
public class WhiteWolf : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteWolf() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = Utility.RandomList(34, 37);
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr(56, 80);
|
||||
SetDex(56, 75);
|
||||
SetInt(31, 55);
|
||||
|
||||
SetHits(34, 48);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 20, 25);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 20.1, 35.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 65.1;
|
||||
}
|
||||
|
||||
public WhiteWolf(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a white wolf corpse";
|
||||
public override string DefaultName => "a white wolf";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 6;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Canine;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Bull : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Bull() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = Utility.RandomList(0xE8, 0xE9);
|
||||
BaseSoundID = 0x64;
|
||||
|
||||
if (0.5 >= Utility.RandomDouble())
|
||||
Hue = 0x901;
|
||||
|
||||
SetStr(77, 111);
|
||||
SetDex(56, 75);
|
||||
SetInt(47, 75);
|
||||
|
||||
SetHits(50, 64);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 9);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 30);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 17.6, 25.0);
|
||||
SetSkill(SkillName.Tactics, 67.6, 85.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 57.5);
|
||||
|
||||
Fame = 600;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 28;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 71.1;
|
||||
}
|
||||
|
||||
public Bull(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bull corpse";
|
||||
public override string DefaultName => "a bull";
|
||||
|
||||
public override int Meat => 10;
|
||||
public override int Hides => 15;
|
||||
public override FoodType FavoriteFood => FoodType.GrainsAndHay;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Bull;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
130
Projects/Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
130
Projects/Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
|
|
@ -0,0 +1,130 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cow : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Cow() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = Utility.RandomList(0xD8, 0xE7);
|
||||
BaseSoundID = 0x78;
|
||||
|
||||
SetStr(30);
|
||||
SetDex(15);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(18);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 4);
|
||||
|
||||
SetDamage(1, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.5);
|
||||
SetSkill(SkillName.Tactics, 5.5);
|
||||
SetSkill(SkillName.Wrestling, 5.5);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
if (Core.AOS && Utility.Random(1000) == 0) // 0.1% chance to have mad cows
|
||||
FightMode = FightMode.Closest;
|
||||
}
|
||||
|
||||
public Cow(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a cow corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime MilkedOn{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Milk{ get; set; }
|
||||
|
||||
public override string DefaultName => "a cow";
|
||||
|
||||
public override int Meat => 8;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
base.OnDoubleClick(from);
|
||||
|
||||
int random = Utility.Random(100);
|
||||
|
||||
if (random < 5)
|
||||
Tip();
|
||||
else if (random < 20)
|
||||
PlaySound(120);
|
||||
else if (random < 40)
|
||||
PlaySound(121);
|
||||
}
|
||||
|
||||
public void Tip()
|
||||
{
|
||||
PlaySound(121);
|
||||
Animate(8, 0, 3, true, false, 0);
|
||||
}
|
||||
|
||||
public bool TryMilk(Mobile from)
|
||||
{
|
||||
if (!from.InLOS(this) || !from.InRange(Location, 2))
|
||||
from.SendLocalizedMessage(1080400); // You can not milk the cow from this location.
|
||||
if (Controlled && ControlMaster != from)
|
||||
from.SendLocalizedMessage(1071182); // The cow nimbly escapes your attempts to milk it.
|
||||
if (Milk == 0 && MilkedOn + TimeSpan.FromDays(1) > DateTime.UtcNow)
|
||||
{
|
||||
from.SendLocalizedMessage(1080198); // This cow can not be milked now. Please wait for some time.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Milk == 0)
|
||||
Milk = 4;
|
||||
|
||||
MilkedOn = DateTime.UtcNow;
|
||||
Milk--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1);
|
||||
|
||||
writer.Write(MilkedOn);
|
||||
writer.Write(Milk);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version > 0)
|
||||
{
|
||||
MilkedOn = reader.ReadDateTime();
|
||||
Milk = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Projects/Scripts/Mobiles/Animals/Felines/Cougar.cs
Normal file
67
Projects/Scripts/Mobiles/Animals/Felines/Cougar.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Cougar : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Cougar() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 63;
|
||||
BaseSoundID = 0x73;
|
||||
|
||||
SetStr(56, 80);
|
||||
SetDex(66, 85);
|
||||
SetInt(26, 50);
|
||||
|
||||
SetHits(34, 48);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 60.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 41.1;
|
||||
}
|
||||
|
||||
public Cougar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a cougar corpse";
|
||||
public override string DefaultName => "a cougar";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 10;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Projects/Scripts/Mobiles/Animals/Felines/HellCat.cs
Normal file
74
Projects/Scripts/Mobiles/Animals/Felines/HellCat.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Hellcat")]
|
||||
public class HellCat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public HellCat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr(51, 100);
|
||||
SetDex(52, 150);
|
||||
SetInt(13, 85);
|
||||
|
||||
SetHits(48, 67);
|
||||
|
||||
SetDamage(6, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 40);
|
||||
SetDamageType(ResistanceType.Fire, 60);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 80, 90);
|
||||
SetResistance(ResistanceType.Energy, 15, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 45.1, 60.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 55.0);
|
||||
SetSkill(SkillName.Wrestling, 30.1, 40.0);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 71.1;
|
||||
}
|
||||
|
||||
public HellCat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hell cat corpse";
|
||||
public override string DefaultName => "a hell cat";
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Hides => 10;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Felines/Panther.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Felines/Panther.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Panther : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Panther() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xD6;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 0x462;
|
||||
|
||||
SetStr(61, 85);
|
||||
SetDex(86, 105);
|
||||
SetInt(26, 50);
|
||||
|
||||
SetHits(37, 51);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 50.1, 65.0);
|
||||
SetSkill(SkillName.Wrestling, 50.1, 65.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public Panther(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a panther corpse";
|
||||
public override string DefaultName => "a panther";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 10;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Projects/Scripts/Mobiles/Animals/Felines/PredatorHellCat.cs
Normal file
73
Projects/Scripts/Mobiles/Animals/Felines/PredatorHellCat.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Preditorhellcat")]
|
||||
public class PredatorHellCat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public PredatorHellCat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 127;
|
||||
BaseSoundID = 0xBA;
|
||||
|
||||
SetStr(161, 185);
|
||||
SetDex(96, 115);
|
||||
SetInt(76, 100);
|
||||
|
||||
SetHits(97, 131);
|
||||
|
||||
SetDamage(5, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Fire, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 5, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 75.1, 90.0);
|
||||
SetSkill(SkillName.Tactics, 50.1, 65.0);
|
||||
SetSkill(SkillName.Wrestling, 50.1, 65.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 89.1;
|
||||
}
|
||||
|
||||
public PredatorHellCat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hell cat corpse";
|
||||
public override string DefaultName => "a hell cat";
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Hides => 10;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Felines/SnowLeopard.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Felines/SnowLeopard.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Snowleopard")]
|
||||
public class SnowLeopard : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public SnowLeopard() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = Utility.RandomList(64, 65);
|
||||
BaseSoundID = 0x73;
|
||||
|
||||
SetStr(56, 80);
|
||||
SetDex(66, 85);
|
||||
SetInt(26, 50);
|
||||
|
||||
SetHits(34, 48);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 9);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 10, 20);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 35.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 50.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public SnowLeopard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a leopard corpse";
|
||||
public override string DefaultName => "a snow leopard";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 8;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Projects/Scripts/Mobiles/Animals/Misc/Boar.cs
Normal file
64
Projects/Scripts/Mobiles/Animals/Misc/Boar.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Boar : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Boar() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x122;
|
||||
BaseSoundID = 0xC4;
|
||||
|
||||
SetStr(25);
|
||||
SetDex(15);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(15);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 6);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 9.0);
|
||||
SetSkill(SkillName.Tactics, 9.0);
|
||||
SetSkill(SkillName.Wrestling, 9.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public Boar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a pig corpse";
|
||||
public override string DefaultName => "a boar";
|
||||
|
||||
public override int Meat => 2;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Misc/BullFrog.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Misc/BullFrog.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Bullfrog")]
|
||||
public class BullFrog : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public BullFrog() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 81;
|
||||
Hue = Utility.RandomList(0x5AC, 0x5A3, 0x59A, 0x591, 0x588, 0x57F);
|
||||
BaseSoundID = 0x266;
|
||||
|
||||
SetStr(46, 70);
|
||||
SetDex(6, 25);
|
||||
SetInt(11, 20);
|
||||
|
||||
SetHits(28, 42);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 2);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 350;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public BullFrog(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bull frog corpse";
|
||||
public override string DefaultName => "a bull frog";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 4;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.Meat;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Projects/Scripts/Mobiles/Animals/Misc/Dolphin.cs
Normal file
86
Projects/Scripts/Mobiles/Animals/Misc/Dolphin.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Dolphin : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Dolphin()
|
||||
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x97;
|
||||
BaseSoundID = 0x8A;
|
||||
|
||||
SetStr(21, 49);
|
||||
SetDex(66, 85);
|
||||
SetInt(96, 110);
|
||||
|
||||
SetHits(15, 27);
|
||||
|
||||
SetDamage(3, 6);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 70, 80);
|
||||
SetResistance(ResistanceType.Cold, 25, 30);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 29.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 29.0);
|
||||
|
||||
Fame = 500;
|
||||
Karma = 2000;
|
||||
|
||||
VirtualArmor = 16;
|
||||
CanSwim = true;
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public Dolphin(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a dolphin corpse";
|
||||
public override string DefaultName => "a dolphin";
|
||||
|
||||
public override int Meat => 1;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.AccessLevel >= AccessLevel.GameMaster)
|
||||
Jump();
|
||||
}
|
||||
|
||||
public virtual void Jump()
|
||||
{
|
||||
if (Utility.RandomBool())
|
||||
Animate(3, 16, 1, true, false, 0);
|
||||
else
|
||||
Animate(4, 20, 1, true, false, 0);
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (Utility.RandomDouble() < .005) // slim chance to jump
|
||||
Jump();
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
95
Projects/Scripts/Mobiles/Animals/Misc/Gaman.cs
Normal file
95
Projects/Scripts/Mobiles/Animals/Misc/Gaman.cs
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Gaman : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Gaman() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 248;
|
||||
|
||||
SetStr(146, 175);
|
||||
SetDex(111, 150);
|
||||
SetInt(46, 60);
|
||||
|
||||
SetHits(131, 160);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(6, 11);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 50, 70);
|
||||
SetResistance(ResistanceType.Fire, 30, 50);
|
||||
SetResistance(ResistanceType.Cold, 30, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 60);
|
||||
SetResistance(ResistanceType.Energy, 30, 50);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 37.6, 42.5);
|
||||
SetSkill(SkillName.Tactics, 70.6, 83.0);
|
||||
SetSkill(SkillName.Wrestling, 50.1, 57.5);
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 68.7;
|
||||
}
|
||||
|
||||
public Gaman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a gaman corpse";
|
||||
public override string DefaultName => "a gaman";
|
||||
|
||||
public override int Meat => 10;
|
||||
public override int Hides => 15;
|
||||
public override FoodType FavoriteFood => FoodType.GrainsAndHay;
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4F8;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4F7;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4F6;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4F9;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4F5;
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
c.DropItem(new GamanHorns(Utility.RandomBool() ? 1 : 2));
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
76
Projects/Scripts/Mobiles/Animals/Misc/GiantToad.cs
Normal file
76
Projects/Scripts/Mobiles/Animals/Misc/GiantToad.cs
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Gianttoad")]
|
||||
public class GiantToad : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GiantToad() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 80;
|
||||
BaseSoundID = 0x26B;
|
||||
|
||||
SetStr(76, 100);
|
||||
SetDex(6, 25);
|
||||
SetInt(11, 20);
|
||||
|
||||
SetHits(46, 60);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 750;
|
||||
Karma = -750;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 77.1;
|
||||
}
|
||||
|
||||
public GiantToad(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a giant toad corpse";
|
||||
public override string DefaultName => "a giant toad";
|
||||
|
||||
public override int Hides => 12;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.Meat;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
if (version < 1)
|
||||
{
|
||||
AI = AIType.AI_Melee;
|
||||
FightMode = FightMode.Closest;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Projects/Scripts/Mobiles/Animals/Misc/Goat.cs
Normal file
63
Projects/Scripts/Mobiles/Animals/Misc/Goat.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Goat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Goat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xD1;
|
||||
BaseSoundID = 0x99;
|
||||
|
||||
SetStr(19);
|
||||
SetDex(15);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(12);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public Goat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a goat corpse";
|
||||
public override string DefaultName => "a goat";
|
||||
|
||||
public override int Meat => 2;
|
||||
public override int Hides => 8;
|
||||
public override FoodType FavoriteFood => FoodType.GrainsAndHay | FoodType.FruitsAndVegies;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Projects/Scripts/Mobiles/Animals/Misc/Gorilla.cs
Normal file
65
Projects/Scripts/Mobiles/Animals/Misc/Gorilla.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Gorilla : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Gorilla() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x1D;
|
||||
BaseSoundID = 0x9E;
|
||||
|
||||
SetStr(53, 95);
|
||||
SetDex(36, 55);
|
||||
SetInt(36, 60);
|
||||
|
||||
SetHits(38, 51);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 45.1, 60.0);
|
||||
SetSkill(SkillName.Tactics, 43.3, 58.0);
|
||||
SetSkill(SkillName.Wrestling, 43.3, 58.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 20;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public Gorilla(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a gorilla corpse";
|
||||
public override string DefaultName => "a gorilla";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 6;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Projects/Scripts/Mobiles/Animals/Misc/GreatHart.cs
Normal file
79
Projects/Scripts/Mobiles/Animals/Misc/GreatHart.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Greathart")]
|
||||
public class GreatHart : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GreatHart() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xEA;
|
||||
|
||||
SetStr(41, 71);
|
||||
SetDex(47, 77);
|
||||
SetInt(27, 57);
|
||||
|
||||
SetHits(27, 41);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 9);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Cold, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 26.8, 44.5);
|
||||
SetSkill(SkillName.Tactics, 29.8, 47.5);
|
||||
SetSkill(SkillName.Wrestling, 29.8, 47.5);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public GreatHart(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a deer corpse";
|
||||
public override string DefaultName => "a great hart";
|
||||
|
||||
public override int Meat => 6;
|
||||
public override int Hides => 15;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Projects/Scripts/Mobiles/Animals/Misc/Hind.cs
Normal file
78
Projects/Scripts/Mobiles/Animals/Misc/Hind.cs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Hind : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Hind() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xED;
|
||||
|
||||
SetStr(21, 51);
|
||||
SetDex(47, 77);
|
||||
SetInt(17, 47);
|
||||
|
||||
SetHits(15, 29);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 15);
|
||||
SetResistance(ResistanceType.Cold, 5);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.0);
|
||||
SetSkill(SkillName.Tactics, 19.0);
|
||||
SetSkill(SkillName.Wrestling, 26.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public Hind(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a deer corpse";
|
||||
public override string DefaultName => "a hind";
|
||||
|
||||
public override int Meat => 5;
|
||||
public override int Hides => 8;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Projects/Scripts/Mobiles/Animals/Misc/Llama.cs
Normal file
63
Projects/Scripts/Mobiles/Animals/Misc/Llama.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Llama : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Llama() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xDC;
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr(21, 49);
|
||||
SetDex(36, 55);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(15, 27);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 5);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 29.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 29.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public Llama(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a llama corpse";
|
||||
public override string DefaultName => "a llama";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Projects/Scripts/Mobiles/Animals/Misc/MountainGoat.cs
Normal file
67
Projects/Scripts/Mobiles/Animals/Misc/MountainGoat.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class MountainGoat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public MountainGoat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 88;
|
||||
BaseSoundID = 0x99;
|
||||
|
||||
SetStr(22, 64);
|
||||
SetDex(56, 75);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(20, 33);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 20);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 20);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public MountainGoat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a mountain goat corpse";
|
||||
public override string DefaultName => "a mountain goat";
|
||||
|
||||
public override int Meat => 2;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.GrainsAndHay | FoodType.FruitsAndVegies;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
222
Projects/Scripts/Mobiles/Animals/Misc/PackHorse.cs
Normal file
222
Projects/Scripts/Mobiles/Animals/Misc/PackHorse.cs
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PackHorse : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public PackHorse() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 291;
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr(44, 120);
|
||||
SetDex(36, 55);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(61, 80);
|
||||
SetStam(81, 100);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 11);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 20, 25);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
pack?.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public PackHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a horse corpse";
|
||||
public override string DefaultName => "a pack horse";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override int Hides => 10;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
return false;
|
||||
|
||||
return base.IsSnoop(from);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (CheckFeed(from, item))
|
||||
return true;
|
||||
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
{
|
||||
AddToBackpack(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, item);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
PackAnimal.TryPackOpen(this, from);
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class PackAnimalBackpackEntry : ContextMenuEntry
|
||||
{
|
||||
private BaseCreature m_Animal;
|
||||
private Mobile m_From;
|
||||
|
||||
public PackAnimalBackpackEntry(BaseCreature animal, Mobile from) : base(6145, 3)
|
||||
{
|
||||
m_Animal = animal;
|
||||
m_From = from;
|
||||
|
||||
if (animal.IsDeadPet)
|
||||
Enabled = false;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
PackAnimal.TryPackOpen(m_Animal, m_From);
|
||||
}
|
||||
}
|
||||
|
||||
public class PackAnimal
|
||||
{
|
||||
public static void GetContextMenuEntries(BaseCreature animal, Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
if (CheckAccess(animal, from))
|
||||
list.Add(new PackAnimalBackpackEntry(animal, from));
|
||||
}
|
||||
|
||||
public static bool CheckAccess(BaseCreature animal, Mobile from)
|
||||
{
|
||||
if (from == animal || from.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
if (from.Alive && animal.Controlled && !animal.IsDeadPet &&
|
||||
(from == animal.ControlMaster || from == animal.SummonMaster || animal.IsPetFriend(from)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void CombineBackpacks(BaseCreature animal)
|
||||
{
|
||||
if (Core.AOS)
|
||||
return;
|
||||
|
||||
if (animal.IsBonded || animal.IsDeadPet)
|
||||
return;
|
||||
|
||||
Container pack = animal.Backpack;
|
||||
|
||||
if (pack != null)
|
||||
{
|
||||
Container newPack = new Backpack();
|
||||
|
||||
for (int i = pack.Items.Count - 1; i >= 0; --i)
|
||||
{
|
||||
if (i >= pack.Items.Count)
|
||||
continue;
|
||||
|
||||
newPack.DropItem(pack.Items[i]);
|
||||
}
|
||||
|
||||
pack.DropItem(newPack);
|
||||
}
|
||||
}
|
||||
|
||||
public static void TryPackOpen(BaseCreature animal, Mobile from)
|
||||
{
|
||||
if (animal.IsDeadPet)
|
||||
return;
|
||||
|
||||
Container item = animal.Backpack;
|
||||
|
||||
if (item != null)
|
||||
from.Use(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
143
Projects/Scripts/Mobiles/Animals/Misc/PackLlama.cs
Normal file
143
Projects/Scripts/Mobiles/Animals/Misc/PackLlama.cs
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PackLlama : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public PackLlama() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 292;
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr(52, 80);
|
||||
SetDex(36, 55);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(50);
|
||||
SetStam(86, 105);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(2, 6);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 29.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 29.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
pack?.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public PackLlama(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a llama corpse";
|
||||
public override string DefaultName => "a pack llama";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
return false;
|
||||
|
||||
return base.IsSnoop(from);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (CheckFeed(from, item))
|
||||
return true;
|
||||
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
{
|
||||
AddToBackpack(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, item);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
PackAnimal.TryPackOpen(this, from);
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
62
Projects/Scripts/Mobiles/Animals/Misc/Pig.cs
Normal file
62
Projects/Scripts/Mobiles/Animals/Misc/Pig.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Pig : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Pig() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xCB;
|
||||
BaseSoundID = 0xC4;
|
||||
|
||||
SetStr(20);
|
||||
SetDex(20);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(12);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(2, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 12;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public Pig(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a pig corpse";
|
||||
public override string DefaultName => "a pig";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Projects/Scripts/Mobiles/Animals/Misc/Sheep.cs
Normal file
115
Projects/Scripts/Mobiles/Animals/Misc/Sheep.cs
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Sheep : BaseCreature, ICarvable
|
||||
{
|
||||
private DateTime m_NextWoolTime;
|
||||
|
||||
[Constructible]
|
||||
public Sheep() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xCF;
|
||||
BaseSoundID = 0xD6;
|
||||
|
||||
SetStr(19);
|
||||
SetDex(25);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(12);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 2);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 6.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public Sheep(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a sheep corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime NextWoolTime
|
||||
{
|
||||
get => m_NextWoolTime;
|
||||
set
|
||||
{
|
||||
m_NextWoolTime = value;
|
||||
Body = DateTime.UtcNow >= m_NextWoolTime ? 0xCF : 0xDF;
|
||||
}
|
||||
}
|
||||
|
||||
public override string DefaultName => "a sheep";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override MeatType MeatType => MeatType.LambLeg;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override int Wool => Body == 0xCF ? 3 : 0;
|
||||
|
||||
public void Carve(Mobile from, Item item)
|
||||
{
|
||||
if (DateTime.UtcNow < m_NextWoolTime)
|
||||
{
|
||||
// This sheep is not yet ready to be shorn.
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 500449, from.NetState);
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(500452); // You place the gathered wool into your backpack.
|
||||
from.AddToBackpack(new Wool(Map == Map.Felucca ? 2 : 1));
|
||||
|
||||
NextWoolTime = DateTime.UtcNow + TimeSpan.FromHours(3.0); // TODO: Proper time delay
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
Body = DateTime.UtcNow >= m_NextWoolTime ? 0xCF : 0xDF;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1);
|
||||
|
||||
writer.WriteDeltaTime(m_NextWoolTime);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
NextWoolTime = reader.ReadDeltaTime();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Projects/Scripts/Mobiles/Animals/Misc/Walrus.cs
Normal file
67
Projects/Scripts/Mobiles/Animals/Misc/Walrus.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Walrus : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Walrus() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xDD;
|
||||
BaseSoundID = 0xE0;
|
||||
|
||||
SetStr(21, 29);
|
||||
SetDex(46, 55);
|
||||
SetInt(16, 20);
|
||||
|
||||
SetHits(14, 17);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 20, 25);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 29.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 29.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public Walrus(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a walrus corpse";
|
||||
public override string DefaultName => "a walrus";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.Fish;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
351
Projects/Scripts/Mobiles/Animals/Mounts/BaseMount.cs
Normal file
351
Projects/Scripts/Mobiles/Animals/Mounts/BaseMount.cs
Normal file
|
|
@ -0,0 +1,351 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseMount : BaseCreature, IMount
|
||||
{
|
||||
private Mobile m_Rider;
|
||||
|
||||
public BaseMount(string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception,
|
||||
int rangeFight, double activeSpeed, double passiveSpeed) : base(aiType, fightMode, rangePerception, rangeFight,
|
||||
activeSpeed, passiveSpeed)
|
||||
{
|
||||
Name = name;
|
||||
Body = bodyID;
|
||||
|
||||
InternalItem = new MountItem(this, itemID);
|
||||
}
|
||||
|
||||
public BaseMount(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual TimeSpan MountAbilityDelay => TimeSpan.Zero;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime NextMountAbility{ get; set; }
|
||||
|
||||
protected Item InternalItem{ get; private set; }
|
||||
|
||||
public virtual bool AllowMaleRider => true;
|
||||
public virtual bool AllowFemaleRider => true;
|
||||
|
||||
[Hue]
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public override int Hue
|
||||
{
|
||||
get => base.Hue;
|
||||
set
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if (InternalItem != null)
|
||||
InternalItem.Hue = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int ItemID
|
||||
{
|
||||
get => InternalItem?.ItemID ?? 0;
|
||||
set
|
||||
{
|
||||
if (InternalItem != null)
|
||||
InternalItem.ItemID = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Rider
|
||||
{
|
||||
get => m_Rider;
|
||||
set
|
||||
{
|
||||
if (m_Rider != value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
Point3D loc = m_Rider.Location;
|
||||
Map map = m_Rider.Map;
|
||||
|
||||
if (map == null || map == Map.Internal)
|
||||
{
|
||||
loc = m_Rider.LogoutLocation;
|
||||
map = m_Rider.LogoutMap;
|
||||
}
|
||||
|
||||
Direction = m_Rider.Direction;
|
||||
Location = loc;
|
||||
Map = map;
|
||||
|
||||
InternalItem?.Internalize();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Rider != null) Dismount(m_Rider);
|
||||
|
||||
Dismount(value);
|
||||
|
||||
if (InternalItem != null)
|
||||
value.AddItem(InternalItem);
|
||||
|
||||
value.Direction = Direction;
|
||||
|
||||
Internalize();
|
||||
|
||||
if (value.Target is Bola.BolaTarget) Target.Cancel(value);
|
||||
}
|
||||
|
||||
m_Rider = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnRiderDamaged(int amount, Mobile from, bool willKill)
|
||||
{
|
||||
if (m_Rider == null)
|
||||
return;
|
||||
|
||||
Mobile attacker = from ?? m_Rider.FindMostRecentDamager(true);
|
||||
|
||||
if (!(attacker == this || attacker == m_Rider || willKill || DateTime.UtcNow < NextMountAbility)
|
||||
&& DoMountAbility(amount, from))
|
||||
NextMountAbility = DateTime.UtcNow + MountAbilityDelay;
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
Rider = null;
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
InternalItem?.Delete();
|
||||
InternalItem = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
Rider = null;
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
|
||||
writer.Write(NextMountAbility);
|
||||
|
||||
writer.Write(m_Rider);
|
||||
writer.Write(InternalItem);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
NextMountAbility = reader.ReadDateTime();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Rider = reader.ReadMobile();
|
||||
InternalItem = reader.ReadItem();
|
||||
|
||||
if (InternalItem == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnDisallowedRider(Mobile m)
|
||||
{
|
||||
m.SendMessage("You may not ride this creature.");
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsDeadPet)
|
||||
return;
|
||||
|
||||
if (from.IsBodyMod && !from.Body.IsHuman)
|
||||
{
|
||||
if (Core.AOS) // You cannot ride a mount in your current form.
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1062061, from.NetState);
|
||||
else
|
||||
from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CheckMountAllowed(from))
|
||||
return;
|
||||
|
||||
if (from.Mounted)
|
||||
{
|
||||
from.SendLocalizedMessage(1005583); // Please dismount first.
|
||||
return;
|
||||
}
|
||||
|
||||
if (from.Female ? !AllowFemaleRider : !AllowMaleRider)
|
||||
{
|
||||
OnDisallowedRider(from);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DesignContext.Check(from))
|
||||
return;
|
||||
|
||||
if (from.HasTrade)
|
||||
{
|
||||
from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
|
||||
return;
|
||||
}
|
||||
|
||||
if (from.InRange(this, 1))
|
||||
{
|
||||
bool canAccess = from.AccessLevel >= AccessLevel.GameMaster
|
||||
|| Controlled && ControlMaster == from
|
||||
|| Summoned && SummonMaster == from;
|
||||
|
||||
if (canAccess)
|
||||
{
|
||||
if (Poisoned)
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1049692,
|
||||
from.NetState); // This mount is too ill to ride.
|
||||
else
|
||||
Rider = from;
|
||||
}
|
||||
else if (!Controlled && !Summoned)
|
||||
{
|
||||
// That mount does not look broken! You would have to tame it to ride it.
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 501263, from.NetState);
|
||||
}
|
||||
else
|
||||
{
|
||||
// This isn't your mount; it refuses to let you ride.
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 501264, from.NetState);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500206); // That is too far away to ride.
|
||||
}
|
||||
}
|
||||
|
||||
public static void Dismount(Mobile m)
|
||||
{
|
||||
IMount mount = m.Mount;
|
||||
|
||||
if (mount != null)
|
||||
mount.Rider = null;
|
||||
}
|
||||
|
||||
// 1040024 You are still too dazed from being knocked off your mount to ride!
|
||||
// 1062910 You cannot mount while recovering from a bola throw.
|
||||
// 1070859 You cannot mount while recovering from a dismount special maneuver.
|
||||
|
||||
public static bool CheckMountAllowed(Mobile mob)
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
if (mob is PlayerMobile mobile && mobile.MountBlockReason != BlockMountType.None)
|
||||
{
|
||||
mobile.SendLocalizedMessage((int)mobile.MountBlockReason);
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual bool DoMountAbility(int damage, Mobile attacker)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class MountItem : Item, IMountItem
|
||||
{
|
||||
private BaseMount m_Mount;
|
||||
|
||||
public MountItem(BaseMount mount, int itemID) : base(itemID)
|
||||
{
|
||||
Layer = Layer.Mount;
|
||||
Movable = false;
|
||||
|
||||
m_Mount = mount;
|
||||
}
|
||||
|
||||
public MountItem(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0;
|
||||
|
||||
public IMount Mount => m_Mount;
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
m_Mount?.Delete();
|
||||
m_Mount = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
if (m_Mount != null)
|
||||
m_Mount.Rider = null;
|
||||
|
||||
return DeathMoveResult.RemainEquipped;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Mount);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Mount = reader.ReadMobile() as BaseMount;
|
||||
|
||||
if (m_Mount == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
171
Projects/Scripts/Mobiles/Animals/Mounts/Beetle.cs
Normal file
171
Projects/Scripts/Mobiles/Animals/Mounts/Beetle.cs
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Beetle : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Beetle(string name = "a giant beetle") :
|
||||
base(name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.25, 0.5)
|
||||
{
|
||||
SetStr(300);
|
||||
SetDex(100);
|
||||
SetInt(500);
|
||||
|
||||
SetHits(200);
|
||||
|
||||
SetDamage(7, 20);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 30, 40);
|
||||
SetResistance(ResistanceType.Fire, 20, 30);
|
||||
SetResistance(ResistanceType.Cold, 20, 30);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 80.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 100.0);
|
||||
|
||||
Fame = 4000;
|
||||
Karma = -4000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 3;
|
||||
MinTameSkill = 29.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
pack?.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public Beetle(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a giant beetle corpse";
|
||||
public virtual double BoostedSpeed => 0.1;
|
||||
|
||||
public override bool SubdueBeforeTame => true; // Must be beaten into submission
|
||||
public override bool ReduceSpeedWithDamage => false;
|
||||
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x162;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x163;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override void OnHarmfulSpell(Mobile from)
|
||||
{
|
||||
if (!Controlled && ControlMaster == null)
|
||||
CurrentSpeed = BoostedSpeed;
|
||||
}
|
||||
|
||||
public override void OnCombatantChange()
|
||||
{
|
||||
if (Combatant == null && !Controlled && ControlMaster == null)
|
||||
CurrentSpeed = PassiveSpeed;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
return false;
|
||||
|
||||
return base.IsSnoop(from);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (CheckFeed(from, item))
|
||||
return true;
|
||||
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
{
|
||||
AddToBackpack(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, item);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
61
Projects/Scripts/Mobiles/Animals/Mounts/DesertOstard.cs
Normal file
61
Projects/Scripts/Mobiles/Animals/Mounts/DesertOstard.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class DesertOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public DesertOstard(string name = "a desert ostard") :
|
||||
base(name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
SetStr(94, 170);
|
||||
SetDex(56, 75);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(71, 88);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 11);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 5, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 25.3, 40.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public DesertOstard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an ostard corpse";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Ostard;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
839
Projects/Scripts/Mobiles/Animals/Mounts/Ethereals.cs
Normal file
839
Projects/Scripts/Mobiles/Animals/Mounts/Ethereals.cs
Normal file
|
|
@ -0,0 +1,839 @@
|
|||
using System;
|
||||
using Server.Engines.VeteranRewards;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EtherealMount : Item, IMount, IMountItem, IRewardItem
|
||||
{
|
||||
private bool m_IsDonationItem;
|
||||
private int m_MountedID;
|
||||
private int m_RegularID;
|
||||
private Mobile m_Rider;
|
||||
|
||||
[Constructible]
|
||||
public EtherealMount(int itemID, int mountID)
|
||||
: base(itemID)
|
||||
{
|
||||
m_MountedID = mountID;
|
||||
m_RegularID = itemID;
|
||||
m_Rider = null;
|
||||
|
||||
Layer = Layer.Invalid;
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public EtherealMount(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster, AccessLevel.Administrator)]
|
||||
public bool IsDonationItem
|
||||
{
|
||||
get => m_IsDonationItem;
|
||||
set
|
||||
{
|
||||
m_IsDonationItem = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int MountedID
|
||||
{
|
||||
get => m_MountedID;
|
||||
set
|
||||
{
|
||||
if (m_MountedID != value)
|
||||
{
|
||||
m_MountedID = value;
|
||||
|
||||
if (m_Rider != null)
|
||||
ItemID = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int RegularID
|
||||
{
|
||||
get => m_RegularID;
|
||||
set
|
||||
{
|
||||
if (m_RegularID != value)
|
||||
{
|
||||
m_RegularID = value;
|
||||
|
||||
if (m_Rider == null)
|
||||
ItemID = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool DisplayLootType => false;
|
||||
|
||||
public virtual int FollowerSlots => 1;
|
||||
|
||||
public virtual int EtherealHue => 0x4001;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Rider
|
||||
{
|
||||
get => m_Rider;
|
||||
set
|
||||
{
|
||||
if (value != m_Rider)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
Internalize();
|
||||
UnmountMe();
|
||||
|
||||
RemoveFollowers();
|
||||
m_Rider = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Rider != null)
|
||||
Dismount(m_Rider);
|
||||
|
||||
Dismount(value);
|
||||
|
||||
RemoveFollowers();
|
||||
m_Rider = value;
|
||||
AddFollowers();
|
||||
|
||||
MountMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnRiderDamaged(int amount, Mobile from, bool willKill)
|
||||
{
|
||||
}
|
||||
|
||||
public IMount Mount => this;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool IsRewardItem{ get; set; }
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (m_IsDonationItem)
|
||||
{
|
||||
list.Add("Donation Ethereal");
|
||||
list.Add("7.5 sec slower cast time if not a 9mo. Veteran");
|
||||
}
|
||||
|
||||
if (Core.ML && IsRewardItem)
|
||||
list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { })); // X Year Veteran Reward
|
||||
}
|
||||
|
||||
public void RemoveFollowers()
|
||||
{
|
||||
if (m_Rider != null)
|
||||
m_Rider.Followers -= FollowerSlots;
|
||||
|
||||
if (m_Rider?.Followers < 0)
|
||||
m_Rider.Followers = 0;
|
||||
}
|
||||
|
||||
public void AddFollowers()
|
||||
{
|
||||
if (m_Rider != null)
|
||||
m_Rider.Followers += FollowerSlots;
|
||||
}
|
||||
|
||||
public virtual bool Validate(Mobile from)
|
||||
{
|
||||
if (Parent == null)
|
||||
{
|
||||
from.SayTo(from, 1010095); // This must be on your person to use.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this) || !BaseMount.CheckMountAllowed(from))
|
||||
return false;
|
||||
|
||||
if (from.Mounted)
|
||||
{
|
||||
from.SendLocalizedMessage(1005583); // Please dismount first.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (from.IsBodyMod && !from.Body.IsHuman)
|
||||
{
|
||||
from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (from.HasTrade)
|
||||
{
|
||||
from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time
|
||||
return false;
|
||||
}
|
||||
|
||||
if (from.Followers + FollowerSlots > from.FollowersMax)
|
||||
{
|
||||
from.SendLocalizedMessage(1049679); // You have too many followers to summon your mount.
|
||||
return false;
|
||||
}
|
||||
|
||||
return DesignContext.Check(from);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Validate(from))
|
||||
new EtherealSpell(this, from).Cast();
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
base.OnSingleClick(from);
|
||||
|
||||
LabelTo(from, m_IsDonationItem ? "Donation Ethereal" : "Veteran Reward");
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(3); // version
|
||||
|
||||
writer.Write(m_IsDonationItem);
|
||||
writer.Write(IsRewardItem);
|
||||
|
||||
writer.Write(m_MountedID);
|
||||
writer.Write(m_RegularID);
|
||||
writer.Write(m_Rider);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_IsDonationItem = reader.ReadBool();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
IsRewardItem = reader.ReadBool();
|
||||
goto case 0;
|
||||
}
|
||||
case 1:
|
||||
reader.ReadInt();
|
||||
goto case 0;
|
||||
case 0:
|
||||
{
|
||||
m_MountedID = reader.ReadInt();
|
||||
m_RegularID = reader.ReadInt();
|
||||
m_Rider = reader.ReadMobile();
|
||||
|
||||
if (m_MountedID == 0x3EA2)
|
||||
m_MountedID = 0x3EAA;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddFollowers();
|
||||
|
||||
if (version < 3 && Weight == 0)
|
||||
Weight = -1;
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
Rider = null; //get off, move to pack
|
||||
|
||||
return DeathMoveResult.RemainEquipped;
|
||||
}
|
||||
|
||||
public static void Dismount(Mobile m)
|
||||
{
|
||||
IMount mount = m.Mount;
|
||||
|
||||
if (mount != null)
|
||||
mount.Rider = null;
|
||||
}
|
||||
|
||||
public void UnmountMe()
|
||||
{
|
||||
Container bp = m_Rider.Backpack;
|
||||
|
||||
ItemID = m_RegularID;
|
||||
Layer = Layer.Invalid;
|
||||
Movable = true;
|
||||
|
||||
if (Hue == EtherealHue)
|
||||
Hue = 0;
|
||||
|
||||
if (bp != null)
|
||||
{
|
||||
bp.DropItem(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
Point3D loc = m_Rider.Location;
|
||||
Map map = m_Rider.Map;
|
||||
|
||||
if (map == null || map == Map.Internal)
|
||||
{
|
||||
loc = m_Rider.LogoutLocation;
|
||||
map = m_Rider.LogoutMap;
|
||||
}
|
||||
|
||||
MoveToWorld(loc, map);
|
||||
}
|
||||
}
|
||||
|
||||
public void MountMe()
|
||||
{
|
||||
ItemID = m_MountedID;
|
||||
Layer = Layer.Mount;
|
||||
Movable = false;
|
||||
|
||||
if (Hue == 0)
|
||||
Hue = EtherealHue;
|
||||
|
||||
ProcessDelta();
|
||||
m_Rider.ProcessDelta();
|
||||
m_Rider.EquipItem(this);
|
||||
m_Rider.ProcessDelta();
|
||||
ProcessDelta();
|
||||
}
|
||||
|
||||
public static void StopMounting(Mobile mob)
|
||||
{
|
||||
(mob.Spell as EtherealSpell)?.Stop();
|
||||
}
|
||||
|
||||
private class EtherealSpell : Spell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo("Ethereal Mount", "", 230);
|
||||
|
||||
private EtherealMount m_Mount;
|
||||
private Mobile m_Rider;
|
||||
|
||||
private bool m_Stop;
|
||||
|
||||
public EtherealSpell(EtherealMount mount, Mobile rider)
|
||||
: base(rider, null, m_Info)
|
||||
{
|
||||
m_Rider = rider;
|
||||
m_Mount = mount;
|
||||
}
|
||||
|
||||
public override bool ClearHandsOnCast => false;
|
||||
public override bool RevealOnCast => false;
|
||||
|
||||
public override double CastDelayFastScalar => 0;
|
||||
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(
|
||||
m_Mount.IsDonationItem && RewardSystem.GetRewardLevel(m_Rider) < 3 ? 7.5 + (Core.AOS ? 3.0 : 2.0) :
|
||||
Core.AOS ? 3.0 : 2.0);
|
||||
|
||||
public override TimeSpan GetCastRecovery()
|
||||
{
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override int GetMana()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool ConsumeReagents()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckFizzle()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_Stop = true;
|
||||
Disturb(DisturbType.Hurt, false);
|
||||
}
|
||||
|
||||
public override bool CheckDisturb(DisturbType type, bool checkFirst, bool resistable)
|
||||
{
|
||||
if (type == DisturbType.EquipRequest || type == DisturbType.UseRequest /* || type == DisturbType.Hurt*/)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void DoHurtFizzle()
|
||||
{
|
||||
if (!m_Stop)
|
||||
base.DoHurtFizzle();
|
||||
}
|
||||
|
||||
public override void DoFizzle()
|
||||
{
|
||||
if (!m_Stop)
|
||||
base.DoFizzle();
|
||||
}
|
||||
|
||||
public override void OnDisturb(DisturbType type, bool message)
|
||||
{
|
||||
if (message && !m_Stop)
|
||||
Caster.SendLocalizedMessage(
|
||||
1049455); // You have been disrupted while attempting to summon your ethereal mount!
|
||||
|
||||
//m_Mount.UnmountMe();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if (!m_Mount.Deleted && m_Mount.Rider == null && m_Mount.Validate(m_Rider))
|
||||
m_Mount.Rider = m_Rider;
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealHorse : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealHorse()
|
||||
: base(0x20DD, 0x3EAA)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealHorse(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041298; // Ethereal Horse Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal horse")
|
||||
Name = null;
|
||||
|
||||
if (ItemID == 0x2124)
|
||||
ItemID = 0x20DD;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealLlama : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealLlama()
|
||||
: base(0x20F6, 0x3EAB)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealLlama(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041300; // Ethereal Llama Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal llama")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealOstard : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealOstard()
|
||||
: base(0x2135, 0x3EAC)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealOstard(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041299; // Ethereal Ostard Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal ostard")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealRidgeback : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealRidgeback()
|
||||
: base(0x2615, 0x3E9A)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealRidgeback(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049747; // Ethereal Ridgeback Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal ridgeback")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealUnicorn : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealUnicorn()
|
||||
: base(0x25CE, 0x3E9B)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealUnicorn(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049745; // Ethereal Unicorn Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal unicorn")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealBeetle : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealBeetle()
|
||||
: base(0x260F, 0x3E97)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealBeetle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049748; // Ethereal Beetle Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal beetle")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealKirin : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealKirin()
|
||||
: base(0x25A0, 0x3E9C)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealKirin(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049746; // Ethereal Ki-Rin Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal kirin")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealSwampDragon : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealSwampDragon()
|
||||
: base(0x2619, 0x3E98)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealSwampDragon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1049749; // Ethereal Swamp Dragon Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Name == "an ethereal swamp dragon")
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class RideablePolarBear : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public RideablePolarBear()
|
||||
: base(0x20E1, 0x3EC5)
|
||||
{
|
||||
}
|
||||
|
||||
public RideablePolarBear(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1076159; // Rideable Polar Bear
|
||||
public override int EtherealHue => 0;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealCuSidhe : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealCuSidhe()
|
||||
: base(0x2D96, 0x3E91)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealCuSidhe(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1080386; // Ethereal Cu Sidhe Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealHiryu : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealHiryu()
|
||||
: base(0x276A, 0x3E94)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealHiryu(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1113813; // Ethereal Hiryu Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealReptalon : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public EtherealReptalon()
|
||||
: base(0x2d95, 0x3e90)
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealReptalon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1113812; // Ethereal Reptalon Statuette
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ChargerOfTheFallen : EtherealMount
|
||||
{
|
||||
[Constructible]
|
||||
public ChargerOfTheFallen()
|
||||
: base(0x2D9C, 0x3E92)
|
||||
{
|
||||
}
|
||||
|
||||
public ChargerOfTheFallen(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074816; // Charger of the Fallen Statuette
|
||||
|
||||
public override int EtherealHue => 0;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version <= 1 && Hue != 0) Hue = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Projects/Scripts/Mobiles/Animals/Mounts/FireSteed.cs
Normal file
84
Projects/Scripts/Mobiles/Animals/Mounts/FireSteed.cs
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class FireSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public FireSteed(string name = "a fire steed") :
|
||||
base(name, 0xBE, 0x3E9E, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr(376, 400);
|
||||
SetDex(91, 120);
|
||||
SetInt(291, 300);
|
||||
|
||||
SetHits(226, 240);
|
||||
|
||||
SetDamage(11, 30);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 20);
|
||||
SetDamageType(ResistanceType.Fire, 80);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 30, 40);
|
||||
SetResistance(ResistanceType.Fire, 70, 80);
|
||||
SetResistance(ResistanceType.Cold, 20, 30);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 100.0, 120.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 100.0);
|
||||
|
||||
Fame = 20000;
|
||||
Karma = -20000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 106.0;
|
||||
}
|
||||
|
||||
public FireSteed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a fire steed corpse";
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Daemon | PackInstinct.Equine;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
PackItem(new SulfurousAsh(Utility.RandomMinMax(151, 300)));
|
||||
PackItem(new Ruby(Utility.RandomMinMax(16, 30)));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (BaseSoundID <= 0)
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
if (version < 1)
|
||||
for (int i = 0; i < Skills.Length; ++i)
|
||||
{
|
||||
Skills[i].Cap = Math.Max(100.0, Skills[i].Cap * 0.9);
|
||||
|
||||
if (Skills[i].Base > Skills[i].Cap) Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Projects/Scripts/Mobiles/Animals/Mounts/ForestOstard.cs
Normal file
62
Projects/Scripts/Mobiles/Animals/Mounts/ForestOstard.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class ForestOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public ForestOstard(string name = "a forest ostard") :
|
||||
base(name, 0xDB, 0x3EA5, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Utility.RandomSlimeHue() | 0x8000;
|
||||
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
SetStr(94, 170);
|
||||
SetDex(56, 75);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(71, 88);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(8, 14);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 27.1, 32.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public ForestOstard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an ostard corpse";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Ostard;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Projects/Scripts/Mobiles/Animals/Mounts/FrenziedOstard.cs
Normal file
65
Projects/Scripts/Mobiles/Animals/Mounts/FrenziedOstard.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class FrenziedOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public FrenziedOstard(string name = "a frenzied ostard") :
|
||||
base(name, 0xDA, 0x3EA4, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Race.Human.RandomHairHue() | 0x8000;
|
||||
|
||||
BaseSoundID = 0x275;
|
||||
|
||||
SetStr(94, 170);
|
||||
SetDex(96, 115);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(71, 110);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(11, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 30);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 20, 25);
|
||||
SetResistance(ResistanceType.Energy, 20, 25);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 75.1, 80.0);
|
||||
SetSkill(SkillName.Tactics, 79.3, 94.0);
|
||||
SetSkill(SkillName.Wrestling, 79.3, 94.0);
|
||||
|
||||
Fame = 1500;
|
||||
Karma = -1500;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 77.1;
|
||||
}
|
||||
|
||||
public FrenziedOstard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an ostard corpse";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish | FoodType.Eggs | FoodType.FruitsAndVegies;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Ostard;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Projects/Scripts/Mobiles/Animals/Mounts/HellSteed.cs
Normal file
60
Projects/Scripts/Mobiles/Animals/Mounts/HellSteed.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class HellSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public HellSteed(string name = "a hellsteed") :
|
||||
base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStats(this);
|
||||
}
|
||||
|
||||
public HellSteed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hellsteed corpse";
|
||||
public override bool HasBreath => true;
|
||||
public override int BreathChaosDamage => 100;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public static void SetStats(BaseCreature steed)
|
||||
{
|
||||
steed.SetStr(201, 210);
|
||||
steed.SetDex(101, 110);
|
||||
steed.SetInt(101, 115);
|
||||
|
||||
steed.SetHits(201, 220);
|
||||
|
||||
steed.SetDamage(20, 24);
|
||||
|
||||
steed.SetDamageType(ResistanceType.Physical, 25);
|
||||
steed.SetDamageType(ResistanceType.Fire, 75);
|
||||
|
||||
steed.SetResistance(ResistanceType.Physical, 60, 70);
|
||||
steed.SetResistance(ResistanceType.Fire, 90);
|
||||
steed.SetResistance(ResistanceType.Poison, 100);
|
||||
|
||||
steed.SetSkill(SkillName.MagicResist, 90.1, 110.0);
|
||||
steed.SetSkill(SkillName.Tactics, 50.0);
|
||||
steed.SetSkill(SkillName.Wrestling, 90.1, 110.0);
|
||||
|
||||
steed.Fame = 0;
|
||||
steed.Karma = 0;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
258
Projects/Scripts/Mobiles/Animals/Mounts/Hiryu.cs
Normal file
258
Projects/Scripts/Mobiles/Animals/Mounts/Hiryu.cs
Normal file
|
|
@ -0,0 +1,258 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Hiryu : BaseMount
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public Hiryu()
|
||||
: base("a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = GetHue();
|
||||
|
||||
SetStr(1201, 1410);
|
||||
SetDex(171, 270);
|
||||
SetInt(301, 325);
|
||||
|
||||
SetHits(901, 1100);
|
||||
SetMana(60);
|
||||
|
||||
SetDamage(20, 30);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 55, 70);
|
||||
SetResistance(ResistanceType.Fire, 70, 90);
|
||||
SetResistance(ResistanceType.Cold, 15, 25);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 40, 50);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 75.1, 80.0);
|
||||
SetSkill(SkillName.MagicResist, 85.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 100.1, 110.0);
|
||||
SetSkill(SkillName.Wrestling, 100.1, 120.0);
|
||||
|
||||
Fame = 18000;
|
||||
Karma = -18000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 4;
|
||||
MinTameSkill = 98.7;
|
||||
|
||||
if (Utility.RandomDouble() < .33)
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
|
||||
if (Core.ML && Utility.RandomDouble() < .33)
|
||||
PackItem(Seed.RandomPeculiarSeed(3));
|
||||
}
|
||||
|
||||
public Hiryu(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hiryu corpse";
|
||||
public override double WeaponAbilityChance => 0.07; /* 1 in 15 chance of using per landed hit */
|
||||
|
||||
public override bool StatLossAfterTame => true;
|
||||
|
||||
public override int TreasureMapLevel => 5;
|
||||
public override int Meat => 16;
|
||||
public override int Hides => 60;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override bool CanAngerOnTame => true;
|
||||
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.Dismount;
|
||||
}
|
||||
|
||||
private static int GetHue()
|
||||
{
|
||||
int rand = Utility.Random(1075);
|
||||
|
||||
/*
|
||||
1000 1075 No Hue Color 93.02% 0x0
|
||||
*
|
||||
10 1075 Ice Green 0.93% 0x847F
|
||||
10 1075 Light Blue 0.93% 0x848D
|
||||
10 1075 Strong Cyan 0.93% 0x8495
|
||||
10 1075 Agapite 0.93% 0x8899
|
||||
10 1075 Gold 0.93% 0x8032
|
||||
*
|
||||
8 1075 Blue and Yellow 0.74% 0x8487
|
||||
*
|
||||
5 1075 Ice Blue 0.47% 0x8482
|
||||
*
|
||||
3 1075 Cyan 0.28% 0x8123
|
||||
3 1075 Light Green 0.28% 0x8295
|
||||
*
|
||||
2 1075 Strong Yellow 0.19% 0x8037
|
||||
2 1075 Green 0.19% 0x8030 //this one is an approximation
|
||||
*
|
||||
1 1075 Strong Purple 0.09% 0x8490
|
||||
1 1075 Strong Green 0.09% 0x855C
|
||||
* */
|
||||
|
||||
if (rand <= 0)
|
||||
return 0x855C;
|
||||
if (rand <= 1)
|
||||
return 0x8490;
|
||||
if (rand <= 3)
|
||||
return 0x8030;
|
||||
if (rand <= 5)
|
||||
return 0x8037;
|
||||
if (rand <= 8)
|
||||
return 0x8295;
|
||||
if (rand <= 11)
|
||||
return 0x8123;
|
||||
if (rand <= 16)
|
||||
return 0x8482;
|
||||
if (rand <= 24)
|
||||
return 0x8487;
|
||||
if (rand <= 34)
|
||||
return 0x8032;
|
||||
if (rand <= 44)
|
||||
return 0x8899;
|
||||
if (rand <= 54)
|
||||
return 0x8495;
|
||||
if (rand <= 64)
|
||||
return 0x848D;
|
||||
if (rand <= 74)
|
||||
return 0x847F;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4FE;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4FD;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4FC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4FF;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4FB;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 3);
|
||||
AddLoot(LootPack.Gems, 4);
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
if (m_Table.TryGetValue(defender, out ExpireTimer timer))
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(2);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate { Hue = GetHue(); });
|
||||
|
||||
if (version <= 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
{
|
||||
if (InternalItem != null) InternalItem.Hue = Hue;
|
||||
});
|
||||
|
||||
if (version < 2)
|
||||
for (int i = 0; i < Skills.Length; ++i)
|
||||
{
|
||||
Skills[i].Cap = Math.Max(100.0, Skills[i].Cap * 0.9);
|
||||
|
||||
if (Skills[i].Base > Skills[i].Cap) Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, TimeSpan delay)
|
||||
: base(delay)
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Mod = mod;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
public void DoExpire()
|
||||
{
|
||||
m_Mobile.RemoveResistanceMod(m_Mod);
|
||||
Stop();
|
||||
m_Table.Remove(m_Mobile);
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage(1070838); // Your resistance to physical attacks has returned.
|
||||
DoExpire();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Projects/Scripts/Mobiles/Animals/Mounts/Horse.cs
Normal file
74
Projects/Scripts/Mobiles/Animals/Mounts/Horse.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.BrownHorse", "Server.Mobiles.DirtyHorse", "Server.Mobiles.GrayHorse",
|
||||
"Server.Mobiles.TanHorse")]
|
||||
public class Horse : BaseMount
|
||||
{
|
||||
private static int[] m_IDs =
|
||||
{
|
||||
0xC8, 0x3E9F,
|
||||
0xE2, 0x3EA0,
|
||||
0xE4, 0x3EA1,
|
||||
0xCC, 0x3EA2
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public Horse(string name = "a horse") :
|
||||
base(name, 0xE2, 0x3EA0, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
int random = Utility.Random(4);
|
||||
|
||||
Body = m_IDs[random * 2];
|
||||
ItemID = m_IDs[random * 2 + 1];
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr(22, 98);
|
||||
SetDex(56, 75);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(28, 45);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 300;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public Horse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a horse corpse";
|
||||
|
||||
public override int Meat => 3;
|
||||
public override int Hides => 10;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
128
Projects/Scripts/Mobiles/Animals/Mounts/Kirin.cs
Normal file
128
Projects/Scripts/Mobiles/Animals/Mounts/Kirin.cs
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Kirin : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Kirin(string name = "a ki-rin") :
|
||||
base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3C5;
|
||||
|
||||
SetStr(296, 325);
|
||||
SetDex(86, 105);
|
||||
SetInt(186, 225);
|
||||
|
||||
SetHits(191, 210);
|
||||
|
||||
SetDamage(16, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 70);
|
||||
SetDamageType(ResistanceType.Fire, 10);
|
||||
SetDamageType(ResistanceType.Cold, 10);
|
||||
SetDamageType(ResistanceType.Energy, 10);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 55, 65);
|
||||
SetResistance(ResistanceType.Fire, 35, 45);
|
||||
SetResistance(ResistanceType.Cold, 25, 35);
|
||||
SetResistance(ResistanceType.Poison, 25, 35);
|
||||
SetResistance(ResistanceType.Energy, 25, 35);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 80.1, 90.0);
|
||||
SetSkill(SkillName.Magery, 60.4, 100.0);
|
||||
SetSkill(SkillName.Meditation, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 85.3, 100.0);
|
||||
SetSkill(SkillName.Tactics, 20.1, 22.5);
|
||||
SetSkill(SkillName.Wrestling, 80.5, 92.5);
|
||||
|
||||
Fame = 9000;
|
||||
Karma = 9000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
}
|
||||
|
||||
public Kirin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a ki-rin corpse";
|
||||
public override bool AllowFemaleRider => false;
|
||||
public override bool AllowFemaleTamer => false;
|
||||
|
||||
public override bool InitialInnocent => true;
|
||||
|
||||
public override TimeSpan MountAbilityDelay => TimeSpan.FromHours(1.0);
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public override int Meat => 3;
|
||||
public override int Hides => 10;
|
||||
public override HideType HideType => HideType.Horned;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void OnDisallowedRider(Mobile m)
|
||||
{
|
||||
m.SendLocalizedMessage(1042319); // The Ki-Rin refuses your attempts to mount it.
|
||||
}
|
||||
|
||||
public override bool DoMountAbility(int damage, Mobile attacker)
|
||||
{
|
||||
if (Rider == null || attacker == null) //sanity
|
||||
return false;
|
||||
|
||||
if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18)
|
||||
) //Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
{
|
||||
attacker.BoltEffect(0);
|
||||
// 35~100 damage, unresistable, by the Ki-rin.
|
||||
attacker.Damage(Utility.RandomMinMax(35, 100), this,
|
||||
false); //Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player. If changed to player, without the extra bool it'd be an infinite loop
|
||||
|
||||
Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1042534); // Your mount calls down the forces of nature on your opponent.
|
||||
Rider.FixedParticles(0, 0, 0, 0x13A7, EffectLayer.Waist);
|
||||
Rider.PlaySound(0xA9); // Ki-rin's whinny.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.LowScrolls);
|
||||
AddLoot(LootPack.Potions);
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (Utility.RandomDouble() < 0.35)
|
||||
c.DropItem(new KirinBrains());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
AI = AIType.AI_Mage;
|
||||
}
|
||||
}
|
||||
}
|
||||
252
Projects/Scripts/Mobiles/Animals/Mounts/LesserHiryu.cs
Normal file
252
Projects/Scripts/Mobiles/Animals/Mounts/LesserHiryu.cs
Normal file
|
|
@ -0,0 +1,252 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class LesserHiryu : BaseMount
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public LesserHiryu()
|
||||
: base("a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = GetHue();
|
||||
|
||||
SetStr(301, 410);
|
||||
SetDex(171, 270);
|
||||
SetInt(301, 325);
|
||||
|
||||
SetHits(401, 600);
|
||||
SetMana(60);
|
||||
|
||||
SetDamage(18, 23);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 45, 70);
|
||||
SetResistance(ResistanceType.Fire, 60, 80);
|
||||
SetResistance(ResistanceType.Cold, 5, 15);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 75.1, 80.0);
|
||||
SetSkill(SkillName.MagicResist, 85.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 100.1, 110.0);
|
||||
SetSkill(SkillName.Wrestling, 100.1, 120.0);
|
||||
|
||||
Fame = 10000;
|
||||
Karma = -10000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 3;
|
||||
MinTameSkill = 98.7;
|
||||
|
||||
if (Utility.RandomDouble() < .33)
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
}
|
||||
|
||||
public LesserHiryu(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hiryu corpse";
|
||||
public override double WeaponAbilityChance => 0.07; /* 1 in 15 chance of using; 1 in 5 chance of success */
|
||||
|
||||
public override bool StatLossAfterTame => true;
|
||||
|
||||
public override int TreasureMapLevel => 3;
|
||||
public override int Meat => 16;
|
||||
public override int Hides => 60;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override bool CanAngerOnTame => true;
|
||||
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.Dismount;
|
||||
}
|
||||
|
||||
private static int GetHue()
|
||||
{
|
||||
int rand = Utility.Random(527);
|
||||
|
||||
/*
|
||||
|
||||
500 527 No Hue Color 94.88% 0
|
||||
10 527 Green 1.90% 0x8295
|
||||
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
|
||||
5 527 Dark Green 0.95% 0x87D4
|
||||
1 527 Valorite 0.19% 0x88AB
|
||||
1 527 Midnight Blue 0.19% 0x8258
|
||||
|
||||
* */
|
||||
|
||||
if (rand <= 0)
|
||||
return 0x8258;
|
||||
if (rand <= 1)
|
||||
return 0x88AB;
|
||||
if (rand <= 6)
|
||||
return 0x87D4;
|
||||
if (rand <= 16)
|
||||
return 0x8163;
|
||||
if (rand <= 26)
|
||||
return 0x8295;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
if (ControlMaster.Skills.Bushido.Base >= 90.0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4FE;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4FD;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4FC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4FF;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4FB;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 2);
|
||||
AddLoot(LootPack.Gems, 4);
|
||||
}
|
||||
|
||||
public override double GetControlChance(Mobile m, bool useBaseSkill = false)
|
||||
{
|
||||
double tamingChance = base.GetControlChance(m, useBaseSkill);
|
||||
|
||||
if (tamingChance >= 0.95) return tamingChance;
|
||||
|
||||
double skill = useBaseSkill ? m.Skills.Bushido.Base : m.Skills.Bushido.Value;
|
||||
|
||||
if (skill < 90.0) return tamingChance;
|
||||
|
||||
double bushidoChance = (skill - 30.0) / 100;
|
||||
|
||||
if (m.Skills.Bushido.Base >= 120)
|
||||
bushidoChance += 0.05;
|
||||
|
||||
return bushidoChance > tamingChance ? bushidoChance : tamingChance;
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
if (m_Table.TryGetValue(defender, out ExpireTimer timer))
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage(1070837); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
{
|
||||
defender.SendLocalizedMessage(
|
||||
1070836); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
}
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod(ResistanceType.Physical, effect);
|
||||
|
||||
defender.FixedEffect(0x37B9, 10, 5);
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
timer = new ExpireTimer(defender, mod, TimeSpan.FromSeconds(5.0));
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(2);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate { Hue = GetHue(); });
|
||||
|
||||
if (version <= 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
{
|
||||
if (InternalItem != null) InternalItem.Hue = Hue;
|
||||
});
|
||||
|
||||
if (version < 2)
|
||||
for (int i = 0; i < Skills.Length; ++i)
|
||||
{
|
||||
Skills[i].Cap = Math.Max(100.0, Skills[i].Cap * 0.9);
|
||||
|
||||
if (Skills[i].Base > Skills[i].Cap) Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, TimeSpan delay)
|
||||
: base(delay)
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Mod = mod;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
public void DoExpire()
|
||||
{
|
||||
m_Mobile.RemoveResistanceMod(m_Mod);
|
||||
Stop();
|
||||
m_Table.Remove(m_Mobile);
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage(1070838); // Your resistance to physical attacks has returned.
|
||||
DoExpire();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
119
Projects/Scripts/Mobiles/Animals/Mounts/Nightmare.cs
Normal file
119
Projects/Scripts/Mobiles/Animals/Mounts/Nightmare.cs
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Nightmare : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Nightmare(string name = "a nightmare") :
|
||||
base(name, 0x74, 0x3EA7, AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = Core.AOS ? 0xA8 : 0x16A;
|
||||
|
||||
SetStr(496, 525);
|
||||
SetDex(86, 105);
|
||||
SetInt(86, 125);
|
||||
|
||||
SetHits(298, 315);
|
||||
|
||||
SetDamage(16, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 40);
|
||||
SetDamageType(ResistanceType.Fire, 40);
|
||||
SetDamageType(ResistanceType.Energy, 20);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 55, 65);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 10.4, 50.0);
|
||||
SetSkill(SkillName.Magery, 10.4, 50.0);
|
||||
SetSkill(SkillName.MagicResist, 85.3, 100.0);
|
||||
SetSkill(SkillName.Tactics, 97.6, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 80.5, 92.5);
|
||||
|
||||
Fame = 14000;
|
||||
Karma = -14000;
|
||||
|
||||
VirtualArmor = 60;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
BodyValue = 116;
|
||||
ItemID = 16039;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
BodyValue = 178;
|
||||
ItemID = 16041;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
BodyValue = 179;
|
||||
ItemID = 16055;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PackItem(new SulfurousAsh(Utility.RandomMinMax(3, 5)));
|
||||
}
|
||||
|
||||
public Nightmare(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a nightmare corpse";
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Meat => 5;
|
||||
public override int Hides => 10;
|
||||
public override HideType HideType => HideType.Barbed;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override bool CanAngerOnTame => true;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.Average);
|
||||
AddLoot(LootPack.LowScrolls);
|
||||
AddLoot(LootPack.Potions);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
if (!Controlled)
|
||||
return 0x16A;
|
||||
|
||||
return base.GetAngerSound();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (Core.AOS && BaseSoundID == 0x16A)
|
||||
BaseSoundID = 0xA8;
|
||||
else if (!Core.AOS && BaseSoundID == 0xA8)
|
||||
BaseSoundID = 0x16A;
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Projects/Scripts/Mobiles/Animals/Mounts/RidableLlama.cs
Normal file
64
Projects/Scripts/Mobiles/Animals/Mounts/RidableLlama.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class RidableLlama : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public RidableLlama(string name = "a ridable llama") :
|
||||
base(name, 0xDC, 0x3EA6, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr(21, 49);
|
||||
SetDex(56, 75);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(15, 27);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 5);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 29.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 29.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public RidableLlama(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a llama corpse";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Projects/Scripts/Mobiles/Animals/Mounts/Ridgeback.cs
Normal file
75
Projects/Scripts/Mobiles/Animals/Mounts/Ridgeback.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Ridgeback : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Ridgeback(string name = "a ridgeback") :
|
||||
base(name, 187, 0x3EBA, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr(58, 100);
|
||||
SetDex(56, 75);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(41, 54);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 5);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 25);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.3, 40.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 35.1, 45.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public Ridgeback(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a ridgeback corpse";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance(Mobile m, bool useBaseSkill = false)
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Projects/Scripts/Mobiles/Animals/Mounts/SavageRidgeback.cs
Normal file
75
Projects/Scripts/Mobiles/Animals/Mounts/SavageRidgeback.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class SavageRidgeback : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SavageRidgeback(string name = "a savage ridgeback") :
|
||||
base(name, 188, 0x3EB8, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr(58, 100);
|
||||
SetDex(56, 75);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(41, 54);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(3, 5);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 15, 20);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.3, 40.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 35.1, 45.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public SavageRidgeback(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a savage ridgeback corpse";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance(Mobile m, bool useBaseSkill = false)
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Projects/Scripts/Mobiles/Animals/Mounts/ScaledSwampDragon.cs
Normal file
72
Projects/Scripts/Mobiles/Animals/Mounts/ScaledSwampDragon.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class ScaledSwampDragon : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public ScaledSwampDragon(string name = "a swamp dragon") :
|
||||
base(name, 0x31F, 0x3EBE, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStr(201, 300);
|
||||
SetDex(66, 85);
|
||||
SetInt(61, 100);
|
||||
|
||||
SetHits(121, 180);
|
||||
|
||||
SetDamage(3, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Poison, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 40);
|
||||
SetResistance(ResistanceType.Fire, 20, 30);
|
||||
SetResistance(ResistanceType.Cold, 20, 40);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 45.1, 55.0);
|
||||
SetSkill(SkillName.MagicResist, 45.1, 55.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 55.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 55.0);
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 93.9;
|
||||
}
|
||||
|
||||
public ScaledSwampDragon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a swamp dragon corpse";
|
||||
|
||||
public override bool AutoDispel => !Controlled;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance(Mobile m, bool useBaseSkill = false)
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
35
Projects/Scripts/Mobiles/Animals/Mounts/SeaHorse.cs
Normal file
35
Projects/Scripts/Mobiles/Animals/Mounts/SeaHorse.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class SeaHorse : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SeaHorse(string name = "a sea horse") :
|
||||
base(name, 0x90, 0x3EB3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10);
|
||||
Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0;
|
||||
Skills.Wrestling.Base = 35.0 + Utility.RandomDouble() * 10.0;
|
||||
Skills.Tactics.Base = 30.0 + Utility.RandomDouble() * 15.0;
|
||||
}
|
||||
|
||||
public SeaHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a sea horse corpse";
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Projects/Scripts/Mobiles/Animals/Mounts/SilverSteed.cs
Normal file
39
Projects/Scripts/Mobiles/Animals/Mounts/SilverSteed.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class SilverSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SilverSteed(string name = "a silver steed") :
|
||||
base(name, 0x75, 0x3EA8, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10);
|
||||
Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0;
|
||||
Skills.Wrestling.Base = 35.0 + Utility.RandomDouble() * 10.0;
|
||||
Skills.Tactics.Base = 30.0 + Utility.RandomDouble() * 15.0;
|
||||
|
||||
ControlSlots = 1;
|
||||
Tamable = true;
|
||||
MinTameSkill = 103.1;
|
||||
}
|
||||
|
||||
public SilverSteed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a silver steed corpse";
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Mounts/SkeletalMount.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Mounts/SkeletalMount.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class SkeletalMount : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SkeletalMount(string name = null) :
|
||||
base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStr(91, 100);
|
||||
SetDex(46, 55);
|
||||
SetInt(46, 60);
|
||||
|
||||
SetHits(41, 50);
|
||||
|
||||
SetDamage(5, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Cold, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 50, 60);
|
||||
SetResistance(ResistanceType.Cold, 90, 95);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 95.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
SetSkill(SkillName.Wrestling, 70.1, 80.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
}
|
||||
|
||||
public SkeletalMount(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an undead horse corpse";
|
||||
public override string DefaultName => "a skeletal steed";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool BleedImmune => true;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Tamable = false;
|
||||
MinTameSkill = 0.0;
|
||||
ControlSlots = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
219
Projects/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs
Normal file
219
Projects/Scripts/Mobiles/Animals/Mounts/SwampDragon.cs
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SwampDragon : BaseMount
|
||||
{
|
||||
private Mobile m_BardingCrafter;
|
||||
private bool m_BardingExceptional;
|
||||
private int m_BardingHP;
|
||||
private CraftResource m_BardingResource;
|
||||
private bool m_HasBarding;
|
||||
|
||||
[Constructible]
|
||||
public SwampDragon(string name = "a swamp dragon") :
|
||||
base(name, 0x31A, 0x3EBD, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x16A;
|
||||
|
||||
SetStr(201, 300);
|
||||
SetDex(66, 85);
|
||||
SetInt(61, 100);
|
||||
|
||||
SetHits(121, 180);
|
||||
|
||||
SetDamage(3, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Poison, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 40);
|
||||
SetResistance(ResistanceType.Fire, 20, 30);
|
||||
SetResistance(ResistanceType.Cold, 20, 40);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 45.1, 55.0);
|
||||
SetSkill(SkillName.MagicResist, 45.1, 55.0);
|
||||
SetSkill(SkillName.Tactics, 45.1, 55.0);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 55.0);
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Hue = 0x851;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 93.9;
|
||||
}
|
||||
|
||||
public SwampDragon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a swamp dragon corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile BardingCrafter
|
||||
{
|
||||
get => m_BardingCrafter;
|
||||
set
|
||||
{
|
||||
m_BardingCrafter = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool BardingExceptional
|
||||
{
|
||||
get => m_BardingExceptional;
|
||||
set
|
||||
{
|
||||
m_BardingExceptional = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int BardingHP
|
||||
{
|
||||
get => m_BardingHP;
|
||||
set
|
||||
{
|
||||
m_BardingHP = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool HasBarding
|
||||
{
|
||||
get => m_HasBarding;
|
||||
set
|
||||
{
|
||||
m_HasBarding = value;
|
||||
|
||||
if (m_HasBarding)
|
||||
{
|
||||
Hue = CraftResources.GetHue(m_BardingResource);
|
||||
BodyValue = 0x31F;
|
||||
ItemID = 0x3EBE;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0x851;
|
||||
BodyValue = 0x31A;
|
||||
ItemID = 0x3EBD;
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource BardingResource
|
||||
{
|
||||
get => m_BardingResource;
|
||||
set
|
||||
{
|
||||
m_BardingResource = value;
|
||||
|
||||
if (m_HasBarding)
|
||||
Hue = CraftResources.GetHue(value);
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int BardingMaxHP => m_BardingExceptional ? 2500 : 1000;
|
||||
|
||||
public override bool ReacquireOnMovement => true;
|
||||
public override bool AutoDispel => !Controlled;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override int Meat => 19;
|
||||
public override int Hides => 20;
|
||||
public override int Scales => 5;
|
||||
public override ScaleType ScaleType => ScaleType.Green;
|
||||
public override bool CanAngerOnTame => true;
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2CE;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2CC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2D1;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x2C8;
|
||||
}
|
||||
|
||||
public override double GetControlChance(Mobile m, bool useBaseSkill = false)
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (m_HasBarding && m_BardingExceptional && m_BardingCrafter != null)
|
||||
list.Add(1060853, m_BardingCrafter.Name); // armor exceptionally crafted by ~1_val~
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
|
||||
writer.Write(m_BardingExceptional);
|
||||
writer.Write(m_BardingCrafter);
|
||||
writer.Write(m_HasBarding);
|
||||
writer.Write(m_BardingHP);
|
||||
writer.Write((int)m_BardingResource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_BardingExceptional = reader.ReadBool();
|
||||
m_BardingCrafter = reader.ReadMobile();
|
||||
m_HasBarding = reader.ReadBool();
|
||||
m_BardingHP = reader.ReadInt();
|
||||
m_BardingResource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Hue == 0 && !m_HasBarding)
|
||||
Hue = 0x851;
|
||||
|
||||
if (BaseSoundID == -1)
|
||||
BaseSoundID = 0x16A;
|
||||
}
|
||||
}
|
||||
}
|
||||
133
Projects/Scripts/Mobiles/Animals/Mounts/Unicorn.cs
Normal file
133
Projects/Scripts/Mobiles/Animals/Mounts/Unicorn.cs
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Unicorn : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Unicorn(string name = "a unicorn") :
|
||||
base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x4BC;
|
||||
|
||||
SetStr(296, 325);
|
||||
SetDex(96, 115);
|
||||
SetInt(186, 225);
|
||||
|
||||
SetHits(191, 210);
|
||||
|
||||
SetDamage(16, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Energy, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 55, 65);
|
||||
SetResistance(ResistanceType.Fire, 25, 40);
|
||||
SetResistance(ResistanceType.Cold, 25, 40);
|
||||
SetResistance(ResistanceType.Poison, 55, 65);
|
||||
SetResistance(ResistanceType.Energy, 25, 40);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 80.1, 90.0);
|
||||
SetSkill(SkillName.Magery, 60.2, 80.0);
|
||||
SetSkill(SkillName.Meditation, 50.1, 60.0);
|
||||
SetSkill(SkillName.MagicResist, 75.3, 90.0);
|
||||
SetSkill(SkillName.Tactics, 20.1, 22.5);
|
||||
SetSkill(SkillName.Wrestling, 80.5, 92.5);
|
||||
|
||||
Fame = 9000;
|
||||
Karma = 9000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
}
|
||||
|
||||
public Unicorn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a unicorn corpse";
|
||||
public override bool AllowMaleRider => false;
|
||||
public override bool AllowMaleTamer => false;
|
||||
|
||||
public override bool InitialInnocent => true;
|
||||
|
||||
public override TimeSpan MountAbilityDelay => TimeSpan.FromHours(1.0);
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override int Meat => 3;
|
||||
public override int Hides => 10;
|
||||
public override HideType HideType => HideType.Horned;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void OnDisallowedRider(Mobile m)
|
||||
{
|
||||
m.SendLocalizedMessage(1042318); // The unicorn refuses to allow you to ride it.
|
||||
}
|
||||
|
||||
public override bool DoMountAbility(int damage, Mobile attacker)
|
||||
{
|
||||
if (Rider == null || attacker == null) //sanity
|
||||
return false;
|
||||
|
||||
if (Rider.Poisoned && Rider.Hits - damage < 40)
|
||||
{
|
||||
Poison p = Rider.Poison;
|
||||
|
||||
if (p != null)
|
||||
{
|
||||
int chanceToCure = 10000 + (int)(Skills.Magery.Value * 75) -
|
||||
(p.Level + 1) * (Core.AOS ? p.Level < 4 ? 3300 : 3100 : 1750);
|
||||
chanceToCure /= 100;
|
||||
|
||||
if (chanceToCure > Utility.Random(100))
|
||||
if (Rider.CurePoison(this)) //TODO: Confirm if mount is the one flagged for curing it or the rider is
|
||||
{
|
||||
Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2, true,
|
||||
"Your mount senses you are in danger and aids you with magic.");
|
||||
Rider.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
|
||||
Rider.PlaySound(0x1E0); // Cure spell effect.
|
||||
Rider.PlaySound(0xA9); // Unicorn's whinny.
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.LowScrolls);
|
||||
AddLoot(LootPack.Potions);
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (Utility.RandomDouble() < 0.35)
|
||||
c.DropItem(new UnicornRibs());
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseWarHorse : BaseMount
|
||||
{
|
||||
public BaseWarHorse(int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight,
|
||||
double activeSpeed, double passiveSpeed) : base("a war horse", bodyID, itemID, aiType, fightMode,
|
||||
rangePerception, rangeFight, activeSpeed, passiveSpeed)
|
||||
{
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
InitStats(Utility.Random(300, 100), 125, 60);
|
||||
|
||||
SetStr(400);
|
||||
SetDex(125);
|
||||
SetInt(51, 55);
|
||||
|
||||
SetHits(240);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 40, 50);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = 300;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public BaseWarHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a war horse corpse";
|
||||
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class CoMWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructible]
|
||||
public CoMWarHorse() : base(0x77, 0x3EB1, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
}
|
||||
|
||||
public CoMWarHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class MinaxWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructible]
|
||||
public MinaxWarHorse() : base(0x78, 0x3EAF, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
}
|
||||
|
||||
public MinaxWarHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class SLWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructible]
|
||||
public SLWarHorse() : base(0x79, 0x3EB0, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
}
|
||||
|
||||
public SLWarHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class TBWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructible]
|
||||
public TBWarHorse() : base(0x76, 0x3EB2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
}
|
||||
|
||||
public TBWarHorse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Reptiles/Alligator.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Reptiles/Alligator.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Alligator : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Alligator() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xCA;
|
||||
BaseSoundID = 660;
|
||||
|
||||
SetStr(76, 100);
|
||||
SetDex(6, 25);
|
||||
SetInt(11, 20);
|
||||
|
||||
SetHits(46, 60);
|
||||
SetStam(46, 65);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 15);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 25, 35);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 40.1, 60.0);
|
||||
SetSkill(SkillName.Wrestling, 40.1, 60.0);
|
||||
|
||||
Fame = 600;
|
||||
Karma = -600;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 47.1;
|
||||
}
|
||||
|
||||
public Alligator(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an alligator corpse";
|
||||
public override string DefaultName => "an alligator";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 12;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish;
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == 0x5A)
|
||||
BaseSoundID = 660;
|
||||
}
|
||||
}
|
||||
}
|
||||
85
Projects/Scripts/Mobiles/Animals/Reptiles/GiantSerpent.cs
Normal file
85
Projects/Scripts/Mobiles/Animals/Reptiles/GiantSerpent.cs
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Serpant")]
|
||||
public class GiantSerpent : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GiantSerpent() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x15;
|
||||
Hue = Utility.RandomSnakeHue();
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr(186, 215);
|
||||
SetDex(56, 80);
|
||||
SetInt(66, 85);
|
||||
|
||||
SetHits(112, 129);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(7, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 40);
|
||||
SetDamageType(ResistanceType.Poison, 60);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 30, 35);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 10, 20);
|
||||
SetResistance(ResistanceType.Poison, 70, 90);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.Poisoning, 70.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 65.1, 70.0);
|
||||
SetSkill(SkillName.Wrestling, 60.1, 80.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 32;
|
||||
|
||||
PackItem(new Bone());
|
||||
// TODO: Body parts
|
||||
}
|
||||
|
||||
public GiantSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a giant serpent corpse";
|
||||
public override string DefaultName => "a giant snake";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Greater;
|
||||
public override Poison HitPoison => 0.8 >= Utility.RandomDouble() ? Poison.Greater : Poison.Deadly;
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override int Meat => 4;
|
||||
public override int Hides => 15;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == -1)
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
116
Projects/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs
Normal file
116
Projects/Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Iceserpant")]
|
||||
public class IceSerpent : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public IceSerpent() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 89;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr(216, 245);
|
||||
SetDex(26, 50);
|
||||
SetInt(66, 85);
|
||||
|
||||
SetHits(130, 147);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(7, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 10);
|
||||
SetDamageType(ResistanceType.Cold, 90);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 30, 35);
|
||||
SetResistance(ResistanceType.Cold, 80, 90);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 27.5, 50.0);
|
||||
SetSkill(SkillName.MagicResist, 25.1, 40.0);
|
||||
SetSkill(SkillName.Tactics, 75.1, 80.0);
|
||||
SetSkill(SkillName.Wrestling, 60.1, 80.0);
|
||||
|
||||
Fame = 3500;
|
||||
Karma = -3500;
|
||||
|
||||
VirtualArmor = 32;
|
||||
|
||||
PackItem(Loot.RandomArmorOrShieldOrWeapon());
|
||||
|
||||
switch (Utility.Random(10))
|
||||
{
|
||||
case 0:
|
||||
PackItem(new LeftArm());
|
||||
break;
|
||||
case 1:
|
||||
PackItem(new RightArm());
|
||||
break;
|
||||
case 2:
|
||||
PackItem(new Torso());
|
||||
break;
|
||||
case 3:
|
||||
PackItem(new Bone());
|
||||
break;
|
||||
case 4:
|
||||
PackItem(new RibCage());
|
||||
break;
|
||||
case 5:
|
||||
PackItem(new RibCage());
|
||||
break;
|
||||
case 6:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 7:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 8:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
case 9:
|
||||
PackItem(new BonePile());
|
||||
break;
|
||||
}
|
||||
|
||||
if (0.025 > Utility.RandomDouble())
|
||||
PackItem(new GlacialStaff());
|
||||
}
|
||||
|
||||
public IceSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an ice serpent corpse";
|
||||
public override string DefaultName => "a giant ice serpent";
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override int Meat => 4;
|
||||
public override int Hides => 15;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == -1)
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Reptiles/IceSnake.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Reptiles/IceSnake.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Icesnake")]
|
||||
public class IceSnake : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public IceSnake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 52;
|
||||
Hue = 0x480;
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr(42, 54);
|
||||
SetDex(36, 45);
|
||||
SetInt(26, 30);
|
||||
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 25);
|
||||
SetDamageType(ResistanceType.Cold, 25);
|
||||
SetDamageType(ResistanceType.Poison, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Cold, 80, 90);
|
||||
SetResistance(ResistanceType.Poison, 60, 70);
|
||||
SetResistance(ResistanceType.Energy, 30, 40);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 39.3, 54.0);
|
||||
SetSkill(SkillName.Wrestling, 39.3, 54.0);
|
||||
|
||||
Fame = 900;
|
||||
Karma = -900;
|
||||
|
||||
VirtualArmor = 30;
|
||||
}
|
||||
|
||||
public IceSnake(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an ice snake corpse";
|
||||
public override string DefaultName => "an ice snake";
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override int Meat => 1;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
77
Projects/Scripts/Mobiles/Animals/Reptiles/LavaLizard.cs
Normal file
77
Projects/Scripts/Mobiles/Animals/Reptiles/LavaLizard.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Lavalizard")]
|
||||
public class LavaLizard : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public LavaLizard() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xCE;
|
||||
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);
|
||||
BaseSoundID = 0x5A;
|
||||
|
||||
SetStr(126, 150);
|
||||
SetDex(56, 75);
|
||||
SetInt(11, 20);
|
||||
|
||||
SetHits(76, 90);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(6, 24);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 45);
|
||||
SetResistance(ResistanceType.Fire, 30, 45);
|
||||
SetResistance(ResistanceType.Poison, 25, 35);
|
||||
SetResistance(ResistanceType.Energy, 25, 35);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 55.1, 70.0);
|
||||
SetSkill(SkillName.Tactics, 60.1, 80.0);
|
||||
SetSkill(SkillName.Wrestling, 60.1, 80.0);
|
||||
|
||||
Fame = 3000;
|
||||
Karma = -3000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 80.7;
|
||||
|
||||
PackItem(new SulfurousAsh(Utility.Random(4, 10)));
|
||||
}
|
||||
|
||||
public LavaLizard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a lava lizard corpse";
|
||||
public override string DefaultName => "a lava lizard";
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Hides => 12;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Projects/Scripts/Mobiles/Animals/Reptiles/LavaSerpent.cs
Normal file
81
Projects/Scripts/Mobiles/Animals/Reptiles/LavaSerpent.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Lavaserpant")]
|
||||
public class LavaSerpent : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public LavaSerpent() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 90;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr(386, 415);
|
||||
SetDex(56, 80);
|
||||
SetInt(66, 85);
|
||||
|
||||
SetHits(232, 249);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(10, 22);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 20);
|
||||
SetDamageType(ResistanceType.Fire, 80);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 45);
|
||||
SetResistance(ResistanceType.Fire, 70, 80);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.3, 70.0);
|
||||
SetSkill(SkillName.Tactics, 65.1, 70.0);
|
||||
SetSkill(SkillName.Wrestling, 60.1, 80.0);
|
||||
|
||||
Fame = 4500;
|
||||
Karma = -4500;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
PackItem(new SulfurousAsh(3));
|
||||
PackItem(new Bone());
|
||||
// TODO: body parts, armour
|
||||
}
|
||||
|
||||
public LavaSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a lava serpent corpse";
|
||||
public override string DefaultName => "a lava serpent";
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Meat => 4;
|
||||
public override int Hides => 15;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == -1)
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Projects/Scripts/Mobiles/Animals/Reptiles/LavaSnake.cs
Normal file
74
Projects/Scripts/Mobiles/Animals/Reptiles/LavaSnake.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Lavasnake")]
|
||||
public class LavaSnake : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public LavaSnake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 52;
|
||||
Hue = Utility.RandomList(0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr(43, 55);
|
||||
SetDex(16, 25);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(28, 32);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 20, 25);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.3, 34.0);
|
||||
SetSkill(SkillName.Wrestling, 19.3, 34.0);
|
||||
|
||||
Fame = 600;
|
||||
Karma = -600;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
PackItem(new SulfurousAsh());
|
||||
}
|
||||
|
||||
public LavaSnake(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a lava snake corpse";
|
||||
public override string DefaultName => "a lava snake";
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override bool HasBreath => true; // fire breath enabled
|
||||
public override int Meat => 1;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Projects/Scripts/Mobiles/Animals/Reptiles/SilverSerpent.cs
Normal file
82
Projects/Scripts/Mobiles/Animals/Reptiles/SilverSerpent.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using Server.Ethics;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Silverserpant")]
|
||||
public class SilverSerpent : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public SilverSerpent() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 92;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr(161, 360);
|
||||
SetDex(151, 300);
|
||||
SetInt(21, 40);
|
||||
|
||||
SetHits(97, 216);
|
||||
|
||||
SetDamage(5, 21);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Poison, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 45);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Cold, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.Poisoning, 90.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 95.1, 100.0);
|
||||
SetSkill(SkillName.Tactics, 80.1, 95.0);
|
||||
SetSkill(SkillName.Wrestling, 85.1, 100.0);
|
||||
|
||||
Fame = 7000;
|
||||
Karma = -7000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
}
|
||||
|
||||
public SilverSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a silver serpent corpse";
|
||||
public override Faction FactionAllegiance => TrueBritannians.Instance;
|
||||
public override Ethic EthicAllegiance => Ethic.Hero;
|
||||
|
||||
public override string DefaultName => "a silver serpent";
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override int Meat => 1;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override Poison HitPoison => Poison.Lethal;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == -1)
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Reptiles/Snake.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Reptiles/Snake.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Snake : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Snake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 52;
|
||||
Hue = Utility.RandomSnakeHue();
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr(22, 34);
|
||||
SetDex(16, 25);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(15, 19);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 4);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
|
||||
SetSkill(SkillName.Poisoning, 50.1, 70.0);
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.3, 34.0);
|
||||
SetSkill(SkillName.Wrestling, 19.3, 34.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public Snake(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a snake corpse";
|
||||
public override string DefaultName => "a snake";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lesser;
|
||||
public override Poison HitPoison => Poison.Lesser;
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.Eggs;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Projects/Scripts/Mobiles/Animals/Rodents/GiantRat.cs
Normal file
71
Projects/Scripts/Mobiles/Animals/Rodents/GiantRat.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Giantrat")]
|
||||
public class GiantRat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public GiantRat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xD7;
|
||||
BaseSoundID = 0x188;
|
||||
|
||||
SetStr(32, 74);
|
||||
SetDex(46, 65);
|
||||
SetInt(16, 30);
|
||||
|
||||
SetHits(26, 39);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 25, 35);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public GiantRat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a giant rat corpse";
|
||||
public override string DefaultName => "a giant rat";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 6;
|
||||
public override FoodType FavoriteFood => FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies | FoodType.Eggs;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Projects/Scripts/Mobiles/Animals/Rodents/JackRabbit.cs
Normal file
79
Projects/Scripts/Mobiles/Animals/Rodents/JackRabbit.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Jackrabbit")]
|
||||
public class JackRabbit : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public JackRabbit() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xCD;
|
||||
Hue = 0x1BB;
|
||||
|
||||
SetStr(15);
|
||||
SetDex(25);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(9);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 2);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 2, 5);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 4;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public JackRabbit(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a jack rabbit corpse";
|
||||
public override string DefaultName => "a jack rabbit";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 1;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies;
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Projects/Scripts/Mobiles/Animals/Rodents/Rabbit.cs
Normal file
80
Projects/Scripts/Mobiles/Animals/Rodents/Rabbit.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Rabbit : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Rabbit() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 205;
|
||||
|
||||
if (Utility.RandomBool())
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
|
||||
SetStr(6, 10);
|
||||
SetDex(26, 38);
|
||||
SetInt(6, 14);
|
||||
|
||||
SetHits(4, 6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public Rabbit(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a hare corpse";
|
||||
public override string DefaultName => "a rabbit";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 1;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies;
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Projects/Scripts/Mobiles/Animals/Rodents/SewerRat.cs
Normal file
70
Projects/Scripts/Mobiles/Animals/Rodents/SewerRat.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Sewerrat")]
|
||||
public class SewerRat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public SewerRat() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 238;
|
||||
BaseSoundID = 0xCC;
|
||||
|
||||
SetStr(9);
|
||||
SetDex(25);
|
||||
SetInt(6, 10);
|
||||
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 2);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 5.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public SewerRat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a rat corpse";
|
||||
public override string DefaultName => "a sewer rat";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Eggs | FoodType.FruitsAndVegies;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Projects/Scripts/Mobiles/Animals/Slimes/Jwilson.cs
Normal file
69
Projects/Scripts/Mobiles/Animals/Slimes/Jwilson.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Jwilson : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Jwilson() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Utility.RandomList(0x89C, 0x8A2, 0x8A8, 0x8AE);
|
||||
Body = 0x33;
|
||||
VirtualArmor = 8;
|
||||
|
||||
InitStats(Utility.Random(22, 13), Utility.Random(16, 6), Utility.Random(16, 5));
|
||||
|
||||
Skills.Wrestling.Base = Utility.Random(24, 17);
|
||||
Skills.Tactics.Base = Utility.Random(18, 14);
|
||||
Skills.MagicResist.Base = Utility.Random(15, 6);
|
||||
Skills.Poisoning.Base = Utility.Random(31, 20);
|
||||
|
||||
Fame = Utility.Random(0, 1249);
|
||||
Karma = Utility.Random(0, -624);
|
||||
}
|
||||
|
||||
public Jwilson(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a jwilson corpse";
|
||||
public override string DefaultName => "a jwilson";
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x1C8;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1C9;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1CA;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1CB;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1CC;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Parrot : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Parrot() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 831;
|
||||
VirtualArmor = Utility.Random(0, 6);
|
||||
|
||||
InitStats(10, Utility.Random(25, 16), 10);
|
||||
|
||||
Skills.Wrestling.Base = 6;
|
||||
Skills.Tactics.Base = 6;
|
||||
Skills.MagicResist.Base = 5;
|
||||
|
||||
Fame = Utility.Random(0, 1249);
|
||||
Karma = Utility.Random(0, -624);
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 0.0;
|
||||
}
|
||||
|
||||
public Parrot(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a parrot corpse";
|
||||
public override string DefaultName => "a parrot";
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x1B;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1C;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1D;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1E;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1F;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
143
Projects/Scripts/Mobiles/Animals/Town Critters/Bird.cs
Normal file
143
Projects/Scripts/Mobiles/Animals/Town Critters/Bird.cs
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Bird : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Bird() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
Hue = 0x901;
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
Name = "a crow";
|
||||
break;
|
||||
case 2:
|
||||
Name = "a raven";
|
||||
break;
|
||||
case 1:
|
||||
Name = "a magpie";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = Utility.RandomBirdHue();
|
||||
Name = NameList.RandomName("bird");
|
||||
}
|
||||
|
||||
Body = 6;
|
||||
BaseSoundID = 0x1B;
|
||||
|
||||
VirtualArmor = Utility.RandomMinMax(0, 6);
|
||||
|
||||
SetStr(10);
|
||||
SetDex(25, 35);
|
||||
SetInt(10);
|
||||
|
||||
SetDamage(0);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 4.2, 6.4);
|
||||
SetSkill(SkillName.Tactics, 4.0, 6.0);
|
||||
SetSkill(SkillName.MagicResist, 4.0, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -6.9;
|
||||
}
|
||||
|
||||
public Bird(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bird corpse";
|
||||
|
||||
public override MeatType MeatType => MeatType.Bird;
|
||||
public override int Meat => 1;
|
||||
public override int Feathers => 25;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
|
||||
if (Hue == 0)
|
||||
Hue = Utility.RandomBirdHue();
|
||||
}
|
||||
}
|
||||
|
||||
public class TropicalBird : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public TropicalBird() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Utility.RandomBirdHue();
|
||||
|
||||
Body = 6;
|
||||
BaseSoundID = 0xBF;
|
||||
|
||||
VirtualArmor = Utility.RandomMinMax(0, 6);
|
||||
|
||||
SetStr(10);
|
||||
SetDex(25, 35);
|
||||
SetInt(10);
|
||||
|
||||
SetDamage(0);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 4.2, 6.4);
|
||||
SetSkill(SkillName.Tactics, 4.0, 6.0);
|
||||
SetSkill(SkillName.MagicResist, 4.0, 5.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -6.9;
|
||||
}
|
||||
|
||||
public TropicalBird(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a bird corpse";
|
||||
public override string DefaultName => "a tropical bird";
|
||||
|
||||
public override MeatType MeatType => MeatType.Bird;
|
||||
public override int Meat => 1;
|
||||
public override int Feathers => 25;
|
||||
public override FoodType FavoriteFood => FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Projects/Scripts/Mobiles/Animals/Town Critters/Cat.cs
Normal file
65
Projects/Scripts/Mobiles/Animals/Town Critters/Cat.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
[TypeAlias("Server.Mobiles.Housecat")]
|
||||
public class Cat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Cat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr(9);
|
||||
SetDex(35);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.0);
|
||||
SetSkill(SkillName.Tactics, 4.0);
|
||||
SetSkill(SkillName.Wrestling, 5.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 150;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public Cat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a cat corpse";
|
||||
public override string DefaultName => "a cat";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Feline;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Projects/Scripts/Mobiles/Animals/Town Critters/Dog.cs
Normal file
64
Projects/Scripts/Mobiles/Animals/Town Critters/Dog.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Dog : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Dog() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0xD9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x85;
|
||||
|
||||
SetStr(27, 37);
|
||||
SetDex(28, 43);
|
||||
SetInt(29, 37);
|
||||
|
||||
SetHits(17, 22);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(4, 7);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 22.1, 47.0);
|
||||
SetSkill(SkillName.Tactics, 19.2, 31.0);
|
||||
SetSkill(SkillName.Wrestling, 19.2, 31.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 300;
|
||||
|
||||
VirtualArmor = 12;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -15.3;
|
||||
}
|
||||
|
||||
public Dog(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a dog corpse";
|
||||
public override string DefaultName => "a dog";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
public override PackInstinct PackInstinct => PackInstinct.Canine;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Projects/Scripts/Mobiles/Animals/Town Critters/Rat.cs
Normal file
68
Projects/Scripts/Mobiles/Animals/Town Critters/Rat.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Rat : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Rat() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 238;
|
||||
BaseSoundID = 0xCC;
|
||||
|
||||
SetStr(9);
|
||||
SetDex(35);
|
||||
SetInt(5);
|
||||
|
||||
SetHits(6);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 2);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 5, 10);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 4.0);
|
||||
SetSkill(SkillName.Tactics, 4.0);
|
||||
SetSkill(SkillName.Wrestling, 4.0);
|
||||
|
||||
Fame = 150;
|
||||
Karma = -150;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public Rat(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a rat corpse";
|
||||
public override string DefaultName => "a rat";
|
||||
|
||||
public override int Meat => 1;
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish | FoodType.Eggs | FoodType.GrainsAndHay;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
5269
Projects/Scripts/Mobiles/BaseCreature.cs
Normal file
5269
Projects/Scripts/Mobiles/BaseCreature.cs
Normal file
File diff suppressed because it is too large
Load diff
175
Projects/Scripts/Mobiles/Familiars/BaseFamiliar.cs
Normal file
175
Projects/Scripts/Mobiles/Familiars/BaseFamiliar.cs
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseFamiliar : BaseCreature
|
||||
{
|
||||
private bool m_LastHidden;
|
||||
|
||||
public BaseFamiliar()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, .1, .1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseFamiliar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool BardImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
public override bool Commandable => false;
|
||||
|
||||
public override bool PlayerRangeSensitive => false;
|
||||
|
||||
public virtual void RangeCheck()
|
||||
{
|
||||
if (Deleted || ControlMaster?.Deleted != false)
|
||||
return;
|
||||
|
||||
int range = RangeHome - 2;
|
||||
|
||||
if (InRange(ControlMaster.Location, RangeHome))
|
||||
return;
|
||||
|
||||
Mobile master = ControlMaster;
|
||||
|
||||
Point3D m_Loc = Point3D.Zero;
|
||||
|
||||
if (Map != master.Map)
|
||||
return;
|
||||
|
||||
int x = X > master.X ? master.X + range : master.X - range;
|
||||
int y = Y > master.Y ? master.Y + range : master.Y - range;
|
||||
|
||||
for (int i = 0; i < 10; i++)
|
||||
{
|
||||
m_Loc.X = x + Utility.RandomMinMax(-1, 1);
|
||||
m_Loc.Y = y + Utility.RandomMinMax(-1, 1);
|
||||
|
||||
m_Loc.Z = Map.GetAverageZ(m_Loc.X, m_Loc.Y);
|
||||
|
||||
if (Map.CanSpawnMobile(m_Loc)) break;
|
||||
|
||||
m_Loc = master.Location;
|
||||
}
|
||||
|
||||
if (!Deleted)
|
||||
SetLocation(m_Loc, true);
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
Mobile master = ControlMaster;
|
||||
|
||||
if (Deleted) return;
|
||||
if (master?.Deleted != false)
|
||||
{
|
||||
DropPackContents();
|
||||
EndRelease(null);
|
||||
return;
|
||||
}
|
||||
|
||||
RangeCheck();
|
||||
|
||||
if (m_LastHidden != master.Hidden)
|
||||
Hidden = m_LastHidden = master.Hidden;
|
||||
|
||||
if (AIObject?.WalkMobileRange(master, 5, true, 1, 1) == true)
|
||||
{
|
||||
Warmode = master.Warmode;
|
||||
Combatant = master.Combatant;
|
||||
|
||||
CurrentSpeed = 0.10;
|
||||
}
|
||||
else
|
||||
{
|
||||
Warmode = false;
|
||||
FocusMob = Combatant = null;
|
||||
|
||||
CurrentSpeed = .01;
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (from.Alive && Controlled && from == ControlMaster && from.InRange(this, 14))
|
||||
list.Add(new ReleaseEntry(from, this));
|
||||
}
|
||||
|
||||
public virtual void BeginRelease(Mobile from)
|
||||
{
|
||||
if (!Deleted && Controlled && from == ControlMaster && from.CheckAlive())
|
||||
EndRelease(from);
|
||||
}
|
||||
|
||||
public virtual void EndRelease(Mobile from)
|
||||
{
|
||||
if (from?.CheckAlive() != false && !Deleted && Controlled && from == ControlMaster)
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 1, 13,
|
||||
2100, 3, 5042, 0);
|
||||
PlaySound(0x201);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void DropPackContents()
|
||||
{
|
||||
Map map = Map;
|
||||
Container pack = Backpack;
|
||||
|
||||
if (map != null && map != Map.Internal && pack != null)
|
||||
{
|
||||
List<Item> list = new List<Item>(pack.Items);
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
list[i].MoveToWorld(Location, map);
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
ValidationQueue<BaseFamiliar>.Add(this);
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
DropPackContents();
|
||||
Delete();
|
||||
}
|
||||
|
||||
private class ReleaseEntry : ContextMenuEntry
|
||||
{
|
||||
private BaseFamiliar m_Familiar;
|
||||
private Mobile m_From;
|
||||
|
||||
public ReleaseEntry(Mobile from, BaseFamiliar familiar) : base(6118, 14)
|
||||
{
|
||||
m_From = from;
|
||||
m_Familiar = familiar;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if (!m_Familiar.Deleted && m_Familiar.Controlled && m_From == m_Familiar.ControlMaster &&
|
||||
m_From.CheckAlive())
|
||||
m_Familiar.BeginRelease(m_From);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Projects/Scripts/Mobiles/Familiars/DarkWolf.cs
Normal file
75
Projects/Scripts/Mobiles/Familiars/DarkWolf.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class DarkWolfFamiliar : BaseFamiliar
|
||||
{
|
||||
private DateTime m_NextRestore;
|
||||
|
||||
public DarkWolfFamiliar()
|
||||
{
|
||||
Body = 99;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr(100);
|
||||
SetDex(90);
|
||||
SetInt(90);
|
||||
|
||||
SetHits(60);
|
||||
SetStam(90);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 40, 50);
|
||||
SetResistance(ResistanceType.Fire, 25, 40);
|
||||
SetResistance(ResistanceType.Cold, 25, 40);
|
||||
SetResistance(ResistanceType.Poison, 25, 40);
|
||||
SetResistance(ResistanceType.Energy, 25, 40);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 85.1, 90.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public DarkWolfFamiliar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a dark wolf corpse";
|
||||
public override string DefaultName => "a dark wolf";
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if (DateTime.UtcNow < m_NextRestore)
|
||||
return;
|
||||
|
||||
m_NextRestore = DateTime.UtcNow + TimeSpan.FromSeconds(2.0);
|
||||
|
||||
Mobile caster = ControlMaster ?? SummonMaster;
|
||||
|
||||
if (caster != null)
|
||||
++caster.Stam;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Projects/Scripts/Mobiles/Familiars/DeathAdder.cs
Normal file
56
Projects/Scripts/Mobiles/Familiars/DeathAdder.cs
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class DeathAdder : BaseFamiliar
|
||||
{
|
||||
public DeathAdder()
|
||||
{
|
||||
Body = 0x15;
|
||||
Hue = 0x455;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr(70);
|
||||
SetDex(150);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(50);
|
||||
SetStam(150);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(1, 4);
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 90.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
SetSkill(SkillName.MagicResist, 100.0);
|
||||
SetSkill(SkillName.Poisoning, 150.0);
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public DeathAdder(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a death adder corpse";
|
||||
public override string DefaultName => "a death adder";
|
||||
|
||||
public override Poison HitPoison => 0.8 >= Utility.RandomDouble() ? Poison.Greater : Poison.Deadly;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
190
Projects/Scripts/Mobiles/Familiars/HordeMinion.cs
Normal file
190
Projects/Scripts/Mobiles/Familiars/HordeMinion.cs
Normal file
|
|
@ -0,0 +1,190 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.ContextMenus;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HordeMinionFamiliar : BaseFamiliar
|
||||
{
|
||||
private DateTime m_NextPickup;
|
||||
|
||||
public HordeMinionFamiliar()
|
||||
{
|
||||
Body = 776;
|
||||
BaseSoundID = 0x39D;
|
||||
|
||||
SetStr(100);
|
||||
SetDex(110);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(70);
|
||||
SetStam(110);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 50, 60);
|
||||
SetResistance(ResistanceType.Fire, 50, 55);
|
||||
SetResistance(ResistanceType.Poison, 25, 30);
|
||||
SetResistance(ResistanceType.Energy, 25, 30);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 70.1, 75.0);
|
||||
SetSkill(SkillName.Tactics, 50.0);
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
pack?.Delete();
|
||||
|
||||
pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
pack.Weight = 13.0;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public HordeMinionFamiliar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a horde minion corpse";
|
||||
public override bool DisplayWeight => true;
|
||||
|
||||
public override string DefaultName => "a horde minion";
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if (DateTime.UtcNow < m_NextPickup)
|
||||
return;
|
||||
|
||||
m_NextPickup = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10));
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if (pack == null)
|
||||
return;
|
||||
|
||||
IEnumerable<Item> eable = GetItemsInRange(2).Where(item => item.Movable && item.Stackable);
|
||||
|
||||
int pickedUp = 0;
|
||||
|
||||
foreach (Item item in eable)
|
||||
{
|
||||
if (!pack.CheckHold(this, item, false, true))
|
||||
return;
|
||||
|
||||
NextActionTime = Core.TickCount;
|
||||
|
||||
Lift(item, item.Amount, out bool rejected, out LRReason _);
|
||||
|
||||
if (rejected)
|
||||
continue;
|
||||
|
||||
Drop(this, Point3D.Zero);
|
||||
|
||||
if (++pickedUp == 3)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfirmRelease_Callback(Mobile from, bool okay)
|
||||
{
|
||||
if (okay)
|
||||
EndRelease(from);
|
||||
}
|
||||
|
||||
public override void BeginRelease(Mobile from)
|
||||
{
|
||||
if (Backpack?.Items.Count > 0)
|
||||
from.SendGump(new WarningGump(1060635, 30720, 1061672, 32512, 420, 280, okay => ConfirmRelease_Callback(from, okay)));
|
||||
else
|
||||
EndRelease(from);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks(this);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
return false;
|
||||
|
||||
return base.IsSnoop(from);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (CheckFeed(from, item))
|
||||
return true;
|
||||
|
||||
if (PackAnimal.CheckAccess(this, from))
|
||||
{
|
||||
AddToBackpack(item);
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, item);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
return PackAnimal.CheckAccess(this, from);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
PackAnimal.TryPackOpen(this, from);
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
106
Projects/Scripts/Mobiles/Familiars/ShadowWisp.cs
Normal file
106
Projects/Scripts/Mobiles/Familiars/ShadowWisp.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ShadowWispFamiliar : BaseFamiliar
|
||||
{
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public ShadowWispFamiliar()
|
||||
{
|
||||
Body = 165;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 466;
|
||||
|
||||
SetStr(50);
|
||||
SetDex(60);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(50);
|
||||
SetStam(60);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(5, 10);
|
||||
|
||||
SetDamageType(ResistanceType.Energy, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 99);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 40.0);
|
||||
SetSkill(SkillName.Tactics, 40.0);
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public ShadowWispFamiliar(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a shadow wisp corpse";
|
||||
public override string DefaultName => "a shadow wisp";
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if (DateTime.UtcNow < m_NextFlare)
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.UtcNow + TimeSpan.FromSeconds(5.0 + 25.0 * Utility.RandomDouble());
|
||||
|
||||
FixedEffect(0x37C4, 1, 12, 1109, 6);
|
||||
PlaySound(0x1D3);
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(0.5), Flare);
|
||||
}
|
||||
|
||||
private void Flare()
|
||||
{
|
||||
Mobile caster = ControlMaster ?? SummonMaster;
|
||||
|
||||
if (caster == null)
|
||||
return;
|
||||
|
||||
List<Mobile> list = GetMobilesInRange(5).Where(m =>
|
||||
m.Player && m.Alive && !m.IsDeadBondedPet && m.Karma <= 0 && m.AccessLevel < AccessLevel.Counselor).ToList();
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
{
|
||||
Mobile m = list[i];
|
||||
bool friendly = true;
|
||||
|
||||
for (int j = 0; friendly && j < caster.Aggressors.Count; ++j)
|
||||
friendly = caster.Aggressors[j].Attacker != m;
|
||||
|
||||
for (int j = 0; friendly && j < caster.Aggressed.Count; ++j)
|
||||
friendly = caster.Aggressed[j].Defender != m;
|
||||
|
||||
if (friendly)
|
||||
{
|
||||
m.FixedEffect(0x37C4, 1, 12, 1109, 3); // At player
|
||||
m.Mana += 1 - m.Karma / 1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue