Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,94 +1,95 @@
|
|||
using System;
|
||||
using Server.Targeting;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Spells.Necromancy
|
||||
{
|
||||
public class VengefulSpiritSpell : NecromancerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Vengeful Spirit", "Kal Xen Bal Beh",
|
||||
203,
|
||||
9031,
|
||||
Reagent.BatWing,
|
||||
Reagent.GraveDust,
|
||||
Reagent.PigIron
|
||||
);
|
||||
public class VengefulSpiritSpell : NecromancerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Vengeful Spirit", "Kal Xen Bal Beh",
|
||||
203,
|
||||
9031,
|
||||
Reagent.BatWing,
|
||||
Reagent.GraveDust,
|
||||
Reagent.PigIron
|
||||
);
|
||||
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds( 2.0 );
|
||||
public VengefulSpiritSpell(Mobile caster, Item scroll) : base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override double RequiredSkill => 80.0;
|
||||
public override int RequiredMana => 41;
|
||||
public override TimeSpan CastDelayBase => TimeSpan.FromSeconds(2.0);
|
||||
|
||||
public VengefulSpiritSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
public override double RequiredSkill => 80.0;
|
||||
public override int RequiredMana => 41;
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new InternalTarget( this );
|
||||
}
|
||||
public override void OnCast()
|
||||
{
|
||||
Caster.Target = new InternalTarget(this);
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if (!base.CheckCast())
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 3) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
if (Caster.Followers + 3 > Caster.FollowersMax)
|
||||
{
|
||||
Caster.SendLocalizedMessage(1049645); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Target( Mobile m )
|
||||
{
|
||||
if ( Caster == m )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061832 ); // You cannot exact vengeance on yourself.
|
||||
}
|
||||
else if ( CheckHSequence( m ) )
|
||||
{
|
||||
SpellHelper.Turn( Caster, m );
|
||||
public void Target(Mobile m)
|
||||
{
|
||||
if (Caster == m)
|
||||
{
|
||||
Caster.SendLocalizedMessage(1061832); // You cannot exact vengeance on yourself.
|
||||
}
|
||||
else if (CheckHSequence(m))
|
||||
{
|
||||
SpellHelper.Turn(Caster, m);
|
||||
|
||||
/* Summons a Revenant which haunts the target until either the target or the Revenant is dead.
|
||||
* Revenants have the ability to track down their targets wherever they may travel.
|
||||
* A Revenant's strength is determined by the Necromancy and Spirit Speak skills of the Caster.
|
||||
* The effect lasts for ((Spirit Speak skill level * 80) / 120) + 10 seconds.
|
||||
*/
|
||||
/* Summons a Revenant which haunts the target until either the target or the Revenant is dead.
|
||||
* Revenants have the ability to track down their targets wherever they may travel.
|
||||
* A Revenant's strength is determined by the Necromancy and Spirit Speak skills of the Caster.
|
||||
* The effect lasts for ((Spirit Speak skill level * 80) / 120) + 10 seconds.
|
||||
*/
|
||||
|
||||
TimeSpan duration = TimeSpan.FromSeconds( ((GetDamageSkill( Caster ) * 80) / 120) + 10 );
|
||||
TimeSpan duration = TimeSpan.FromSeconds(GetDamageSkill(Caster) * 80 / 120 + 10);
|
||||
|
||||
Revenant rev = new Revenant( Caster, m, duration );
|
||||
Revenant rev = new Revenant(Caster, m, duration);
|
||||
|
||||
if ( BaseCreature.Summon( rev, false, Caster, m.Location, 0x81, TimeSpan.FromSeconds( duration.TotalSeconds + 2.0 ) ) )
|
||||
rev.FixedParticles( 0x373A, 1, 15, 9909, EffectLayer.Waist );
|
||||
}
|
||||
if (BaseCreature.Summon(rev, false, Caster, m.Location, 0x81,
|
||||
TimeSpan.FromSeconds(duration.TotalSeconds + 2.0)))
|
||||
rev.FixedParticles(0x373A, 1, 15, 9909, EffectLayer.Waist);
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private VengefulSpiritSpell m_Owner;
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private VengefulSpiritSpell m_Owner;
|
||||
|
||||
public InternalTarget( VengefulSpiritSpell owner ) : base( Core.ML ? 10 : 12, false, TargetFlags.Harmful )
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
public InternalTarget(VengefulSpiritSpell owner) : base(Core.ML ? 10 : 12, false, TargetFlags.Harmful)
|
||||
{
|
||||
m_Owner = owner;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile )
|
||||
m_Owner.Target( (Mobile) o );
|
||||
}
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Mobile)
|
||||
m_Owner.Target((Mobile)o);
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnTargetFinish(Mobile from)
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue