ModernUO/Scripts/Spells/Fifth/Paralyze.cs
xavier 1d74d05af4 Housing
- house commit has inappropiate cost for certain parts
          http://www.uodemise.com/forum/showthread.php?t=136453

        - houses should not be placable on roads
          http://www.uodemise.com/forum/showthread.php?t=139597

Bushido

        - lightning strike should consume extra mana if player walks
          http://www.uodemise.com/forum/showthread.php?t=127699

Weapons

        - frenzied whirlwind should properly flag combatants.
          http://www.uodemise.com/forum/showthread.php?t=138625

Magery

        - PolyMorph should not turn the caster grey/criminal
          http://www.uodemise.com/forum/showthread.php?t=116438

        - Paralyze should interfere in casting paladin spells.
          http://www.uodemise.com/forum/showthread.php?t=120742

Spellweaving

        - Ethereal Voyage should not break when attempting to tame dragons, nightmares, etc.
          http://www.uodemise.com/forum/showthread.php?t=135349

Misc
        - refactor DrawRessource() to DrawResource()
          http://www.uodemise.com/forum/showthread.php?t=127202

        - random blood "spatter" itemid during combat: more visible blood.
          http://www.uodemise.com/forum/showthread.php?t=140092

Taming

        - Animal lore should check for skill modifiers when using lore on mobiles.
          http://www.uodemise.com/forum/showthread.php?t=140658

Necromany

        - Wraithform should allow push-through without stam loss always.
          http://www.uodemise.com/forum/showthread.php?t=117126

        - Wraithform mana leech should not lower the victim's mana + small cleanup to spellhelper.doleech()
          http://www.uodemise.com/forum/showthread.php?t=120238

Chivalry

        - Noble Sacrifice should work in houses.  RunUO's does not.
          http://www.uodemise.com/forum/showthread.php?t=122819

NCP Vendors

        - Add necro regs for vendors to buy from players.
          http://www.uodemise.com/forum/showthread.php?t=136435
2010-03-15 15:28:44 +00:00

110 lines
No EOL
2.4 KiB
C#

using System;
using Server.Mobiles;
using Server.Targeting;
using Server.Network;
using Server.Spells.Chivalry;
namespace Server.Spells.Fifth
{
public class ParalyzeSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Paralyze", "An Ex Por",
218,
9012,
Reagent.Garlic,
Reagent.MandrakeRoot,
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Fifth; } }
public ParalyzeSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}
public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( Core.AOS && (m.Frozen || m.Paralyzed || (m.Spell != null && m.Spell.IsCasting && !(m.Spell is PaladinSpell))) )
{
Caster.SendLocalizedMessage( 1061923 ); // The target is already frozen.
}
else if ( CheckHSequence( m ) )
{
SpellHelper.Turn( Caster, m );
SpellHelper.CheckReflect( (int)this.Circle, Caster, ref m );
double duration;
if ( Core.AOS )
{
int secs = (int)((GetDamageSkill( Caster ) / 10) - (GetResistSkill( m ) / 10));
if( !Core.SE )
secs += 2;
if ( !m.Player )
secs *= 3;
if ( secs < 0 )
secs = 0;
duration = secs;
}
else
{
// Algorithm: ((20% of magery) + 7) seconds [- 50% if resisted]
duration = 7.0 + (Caster.Skills[SkillName.Magery].Value * 0.2);
if ( CheckResisted( m ) )
duration *= 0.75;
}
if ( m is PlagueBeastLord )
{
( (PlagueBeastLord) m ).OnParalyzed( Caster );
duration = 120;
}
m.Paralyze( TimeSpan.FromSeconds( duration ) );
m.PlaySound( 0x204 );
m.FixedEffect( 0x376A, 6, 1 );
}
FinishSequence();
}
public class InternalTarget : Target
{
private ParalyzeSpell m_Owner;
public InternalTarget( ParalyzeSpell 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 OnTargetFinish( Mobile from )
{
m_Owner.FinishSequence();
}
}
}
}