ModernUO/Scripts/Spells/Chivalry/PaladinSpell.cs
daedalus 95de3595cd - You can't anymore place castles or keeps in Malas facet
(http://www.runuo.com/bugs/index.php?cmd=view&id=38)

- Unfilled commodity deeds now carry the etching "Unfilled"
(http://www.runuo.com/bugs/index.php?cmd=view&id=40)

- Empty scrolls can be deeded in a commodity deed
(http://www.uodemise.com/discussion/showthread.php?t=127485)

- Dying tubs, if locked down, can allow security level choices
(http://www.uodemise.com/discussion/showthread.php?t=128546)

- Changes in Energy Vortex skills: they'll have 120 wrestling (it was 100) and 100 tactics (it was 90)
(http://www.uodemise.com/discussion/showthread.php?t=122733)

- Wooden Footlockers now show the correct container gump
(http://www.uodemise.com/discussion/showthread.php?t=126452)

- Changes to Interior Decorator (still not includes the fix to turn paragon chests):
--> single item addons can be raised/lowered
--> the gump stays visible until target is cancelled
--> target won't be cancelled automatically when the decorator is used on a target
(http://www.uodemise.com/discussion/showthread.php?t=126668)

- Doom Lever Puzzle item list changed to generics
(http://www.uodemise.com/discussion/showthread.php?t=130396)

- Morphed forms will check now the current skill level: the morph effect is lost if skill level goes under the minimum required.
(http://www.uodemise.com/discussion/showthread.php?t=116542)

- Mage NPC vendors now buy necro scrolls; the price of scrolls got tweaked (= raised) to match OSI
(http://www.runuo.com/bugs/index.php?cmd=view&id=90)
(http://www.runuo.com/bugs/index.php?cmd=view&id=113)

- You can't anymore discord NPC vendors
(http://www.runuo.com/bugs/index.php?cmd=view&id=33)

- Removing a rune from runebook won't change the default rune set
(http://www.runuo.com/bugs/index.php?cmd=view&id=41)

- Various runebook security changes (see link for the list)
(http://www.runuo.com/bugs/index.php?cmd=view&id=39)

- You can't use the Sacrifice virtue while hidden
(http://www.runuo.com/bugs/index.php?cmd=view&id=42)

- Added the Deceit Brazier: doubleclicking it will summon a random "britannian" monster (check [props for delays)
(http://www.uodemise.com/discussion/showthread.php?t=123805)

- Casting spells will raise also the secondary skill associated (example: Necro and SpiritSpeak)
(http://www.runuo.com/bugs/index.php?cmd=view&id=43)

- Word of Death changes:
--> the "pitful damage" is much powerful now
--> you have to bring the target health below (5*arcanefocus)% to strike the powerful blast of 300 chaos damage
--> the damage is influenced by SDI
(http://www.runuo.com/bugs/index.php?cmd=view&id=36)

- Teleporters generated by [telgen got corrected for the Wrong dungeon
(http://www.runuo.com/bugs/index.php?cmd=view&id=34)
2009-11-09 19:29:19 +00:00

151 lines
4 KiB
C#

using System;
using Server;
using Server.Spells;
using Server.Network;
namespace Server.Spells.Chivalry
{
public abstract class PaladinSpell : Spell
{
public abstract double RequiredSkill{ get; }
public abstract int RequiredMana{ get; }
public abstract int RequiredTithing{ get; }
public abstract int MantraNumber{ get; }
public override SkillName CastSkill{ get{ return SkillName.Chivalry; } }
public override SkillName DamageSkill{ get{ return SkillName.Chivalry; } }
public override bool ClearHandsOnCast{ get{ return false; } }
//public override int CastDelayBase{ get{ return 1; } }
public override int CastRecoveryBase{ get{ return 7; } }
public PaladinSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info )
{
}
public override bool CheckCast()
{
int mana = ScaleMana( RequiredMana );
if ( !base.CheckCast() )
return false;
if ( Caster.Skills[SkillName.Chivalry].Value < RequiredSkill )
{
Caster.SendLocalizedMessage( 1060172, RequiredSkill.ToString( "F1" ) ); // You must have at least ~1_SKILL_REQUIREMENT~ Chivalry to use this ability,
return false;
}
else if ( Caster.TithingPoints < RequiredTithing )
{
Caster.SendLocalizedMessage( 1060173, RequiredTithing.ToString() ); // You must have at least ~1_TITHE_REQUIREMENT~ Tithing Points to use this ability,
return false;
}
else if ( Caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
return true;
}
public override bool CheckFizzle()
{
int requiredTithing = this.RequiredTithing;
if ( AosAttributes.GetValue( Caster, AosAttribute.LowerRegCost ) > Utility.Random( 100 ) )
requiredTithing = 0;
int mana = ScaleMana( RequiredMana );
if ( Caster.Skills[SkillName.Chivalry].Value < RequiredSkill )
{
Caster.SendLocalizedMessage( 1060172, RequiredSkill.ToString( "F1" ) ); // You must have at least ~1_SKILL_REQUIREMENT~ Chivalry to use this ability,
return false;
}
else if ( Caster.TithingPoints < requiredTithing )
{
Caster.SendLocalizedMessage( 1060173, RequiredTithing.ToString() ); // You must have at least ~1_TITHE_REQUIREMENT~ Tithing Points to use this ability,
return false;
}
else if ( Caster.Mana < mana )
{
Caster.SendLocalizedMessage( 1060174, mana.ToString() ); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
return false;
}
Caster.TithingPoints -= requiredTithing;
if ( !base.CheckFizzle() )
return false;
Caster.Mana -= mana;
return true;
}
public override void SayMantra()
{
Caster.PublicOverheadMessage( MessageType.Regular, 0x3B2, MantraNumber, "", false );
}
public override void DoFizzle()
{
Caster.PlaySound( 0x1D6 );
Caster.NextSpellTime = DateTime.Now;
}
public override void DoHurtFizzle()
{
Caster.PlaySound( 0x1D6 );
}
public override void OnDisturb( DisturbType type, bool message )
{
base.OnDisturb( type, message );
if ( message )
Caster.PlaySound( 0x1D6 );
}
public override void OnBeginCast()
{
base.OnBeginCast();
SendCastEffect();
}
public virtual void SendCastEffect()
{
Caster.FixedEffect( 0x37C4, 10, (int)( GetCastDelay().TotalSeconds * 28 ), 4, 3 );
}
public override void GetCastSkills( out double min, out double max )
{
min = RequiredSkill;
max = RequiredSkill + 50.0;
}
public override int GetMana()
{
return 0;
}
public int ComputePowerValue( int div )
{
return ComputePowerValue( Caster, div );
}
public static int ComputePowerValue( Mobile from, int div )
{
if ( from == null )
return 0;
int v = (int) Math.Sqrt( from.Karma + 20000 + (from.Skills.Chivalry.Fixed * 10) );
return v / div;
}
}
}