本文整理汇总了C#中Server.Spells.Spell类的典型用法代码示例。如果您正苦于以下问题:C# Spell类的具体用法?C# Spell怎么用?C# Spell使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Spell类属于Server.Spells命名空间,在下文中一共展示了Spell类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetDamageDelayForSpell
public static TimeSpan GetDamageDelayForSpell( Spell sp )
{
if( !sp.DelayedDamage )
return TimeSpan.Zero;
return OldDamageDelay;
}
示例2: GetDamageDelayForSpell
public static TimeSpan GetDamageDelayForSpell( Spell sp )
{
if( !sp.DelayedDamage )
return TimeSpan.Zero;
return (Core.AOS ? AosDamageDelay : OldDamageDelay);
}
示例3: AllowSpellCast
public bool AllowSpellCast( Mobile from, Spell spell )
{
if ( !m_StartedBeginCountdown )
return true;
if (spell == null) return false;
Type spellType = spell.GetType();
foreach (Type alwaysdisallowed in m_AlwaysDisallowedSpells)
{
if (alwaysdisallowed == spellType)
return false;
}
DuelPlayer pl = Find( from );
if ( pl == null || pl.Eliminated )
return true;
if ( CantDoAnything( from ) )
return false;
string title = null, option = null;
if( spell is MagerySpell )
{
switch( ((MagerySpell)spell).Circle )
{
case SpellCircle.First: title = "1st Circle"; break;
case SpellCircle.Second: title = "2nd Circle"; break;
case SpellCircle.Third: title = "3rd Circle"; break;
case SpellCircle.Fourth: title = "4th Circle"; break;
case SpellCircle.Fifth: title = "5th Circle"; break;
case SpellCircle.Sixth: title = "6th Circle"; break;
case SpellCircle.Seventh: title = "7th Circle"; break;
case SpellCircle.Eighth: title = "8th Circle"; break;
}
option = spell.Name;
}
else
{
title = "Other Spell";
option = spell.Name;
}
if ( title == null || option == null || m_Ruleset.GetOption( title, option ) )
return true;
from.SendMessage( "The dueling ruleset prevents you from casting this spell." );
return false;
}
示例4: GetDamageDelayForSpell
public static TimeSpan GetDamageDelayForSpell(Spell sp)
{
if (sp == null)
{
return TimeSpan.Zero;
}
if (!sp.DelayedDamage)
{
return TimeSpan.Zero;
}
return OldDamageDelay;
}
示例5: Cast
public void Cast( Spell spell )
{
bool m = Movable;
Movable = false;
spell.Cast();
Movable = m;
}
示例6: AnimTimer
public AnimTimer( Spell spell, int count ) : base( TimeSpan.Zero, AnimateDelay, count )
{
m_Spell = spell;
Priority = TimerPriority.FiftyMS;
}
示例7: HailstormTimer
public HailstormTimer(Mobile caster, Spell spell, List<Mobile> toEffect, Rectangle2D area)
: base(TimeSpan.FromMilliseconds(100.0), TimeSpan.FromMilliseconds(100.0))
{
m_ToEffect = toEffect;
m_EffectArea = area;
m_Caster = caster;
m_Map = caster.Map;
m_Spell = spell;
Start();
}
示例8: SpellDamageTimer
public SpellDamageTimer(Spell s, Mobile target, Mobile from, int damage, TimeSpan delay)
: base(delay)
{
this.m_Target = target;
this.m_From = from;
this.m_Damage = damage;
this.m_Spell = s;
if (this.m_Spell != null && this.m_Spell.DelayedDamage && !this.m_Spell.DelayedDamageStacking)
this.m_Spell.StartDelayedDamageContext(target, this);
this.Priority = TimerPriority.TwentyFiveMS;
}
示例9: ISOFFENSIVESPELL
public static bool ISOFFENSIVESPELL(TriggerObject trigObject, Spell spell)
{
if (spell == null)
{
return false;
}
return spell is MagicArrowSpell || spell is ClumsySpell || spell is FeeblemindSpell || spell is WeakenSpell ||
spell is HarmSpell || spell is FireballSpell || spell is PoisonSpell || spell is LightningSpell ||
spell is ManaDrainSpell || spell is MindBlastSpell || spell is ParalyzeSpell || spell is EnergyBoltSpell ||
spell is ExplosionSpell || spell is MassCurseSpell || spell is FlameStrikeSpell || spell is MeteorSwarmSpell ||
spell is ChainLightningSpell;
}
示例10: Damage
public static void Damage(Spell spell, Mobile target, double damage)
{
TimeSpan ts = GetDamageDelayForSpell(spell);
Damage(spell, ts, target, spell.Caster, damage);
}
示例11: NightSightTarget
public NightSightTarget( Spell spell )
: base(12, false, TargetFlags.Beneficial)
{
m_Spell = spell;
}
示例12: HordeMinionsEyesSpellTarget
public HordeMinionsEyesSpellTarget( Spell spell )
: base(10, false, TargetFlags.None)
{
m_Spell = spell;
}
示例13: Damage
public static void Damage( Spell spell, Mobile target, double damage, int phys, int fire, int cold, int pois, int nrgy )
{
TimeSpan ts = GetDamageDelayForSpell(spell);
if (target is Player)
{
Monk mk = Perk.GetByType<Monk>((Player)target);
if (mk != null && mk.ParrySpell())
{
return;
}
Warlock wlk = Perk.GetByType<Warlock>((Player)target);
if (wlk != null && wlk.ParrySpell())
{
return;
}
}
if (spell.Caster is Player)
{
Warlock wlk = Perk.GetByType<Warlock>((Player)spell.Caster);
if (wlk != null && wlk.Overclock())
{
damage += (int)(damage * .33);
}
}
Damage(spell, ts, target, spell.Caster, damage, phys, fire, cold, pois, nrgy, DFAlgorithm.Standard);
}
示例14: Cast
public void Cast(Spell spell)
{
bool m = this.Movable;
this.Movable = false;
spell.Cast();
this.Movable = m;
}
示例15: CheckCast
public static bool CheckCast( Mobile caster, Spell spell )
{
if( !caster.CanBeginAction(typeof(Spells.Seventh.PolymorphSpell)) )
{
caster.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
return false;
}
return true;
}