UO-Dev Arama


Yazar: Bilinmiyor
Tarih: 01-09-2009 10:08


Paylaş : Paylaş

Kod:
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 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;
}
}
}



Yorumlar

Henüz yorum yapılmamıştır.

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış   
Oylar: 0

Benzer Sayfalar

SayfalarYorumlarGönderenTarih
Paladin Büyüleri(Chivalry)0Kernell07-03-2010
Paladin Dialog0basic30-01-2010
Transformation Spell0The And27-09-2009
Necromancer Spell0The And27-09-2009
Blood Oath Spell0The And27-09-2009


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,