本文整理汇总了C#中DFAlgorithm类的典型用法代码示例。如果您正苦于以下问题:C# DFAlgorithm类的具体用法?C# DFAlgorithm怎么用?C# DFAlgorithm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DFAlgorithm类属于命名空间,在下文中一共展示了DFAlgorithm类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SpellDamageTimerAOS
public SpellDamageTimerAOS(Spell s, Mobile target, Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy, TimeSpan delay, DFAlgorithm dfa)
: base(delay)
{
this.m_Target = target;
this.m_From = from;
this.m_Damage = damage;
this.m_Phys = phys;
this.m_Fire = fire;
this.m_Cold = cold;
this.m_Pois = pois;
this.m_Nrgy = nrgy;
this.m_DFA = dfa;
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;
}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:18,代码来源:SpellHelper.cs
示例2: Damage
public static void Damage(TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa)
{
Damage(null, delay, target, from, damage, phys, fire, cold, pois, nrgy, dfa);
}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:4,代码来源:SpellHelper.cs
示例3: SpellDamageTimerAOS
public SpellDamageTimerAOS( Mobile target, Mobile from, int damage, int phys, int fire, int cold, int pois, int nrgy, TimeSpan delay, DFAlgorithm dfa ) : base( delay )
{
m_Target = target;
m_From = from;
m_Damage = damage;
m_Phys = phys;
m_Fire = fire;
m_Cold = cold;
m_Pois = pois;
m_Nrgy = nrgy;
m_DFA = dfa;
Priority = TimerPriority.TwentyFiveMS;
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:14,代码来源:SpellHelper.cs
示例4: Damage
public static void Damage( Spell spell, TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
int iDamage = (int)damage;
//CONFIRMED
if (target != null && target.Player)
iDamage /= 2;
bool canattack = false;
int noto = Notoriety.Compute(from, target);
if (noto == Notoriety.Enemy)
canattack = true;
else if (((from.FindItemOnLayer(Layer.TwoHanded) is OrderShield) && (target.FindItemOnLayer(Layer.TwoHanded) is ChaosShield)) && target is PlayerMobile)
canattack = true;
else if (((from.FindItemOnLayer(Layer.TwoHanded) is ChaosShield) && (target.FindItemOnLayer(Layer.TwoHanded) is OrderShield)) && target is PlayerMobile)
canattack = true;
if (IsTown(target.Location, from) && !canattack)
iDamage = 1;
if( delay == TimeSpan.Zero )
{
if( from is BaseCreature )
((BaseCreature)from).AlterSpellDamageTo( target, ref iDamage );
if( target is BaseCreature )
((BaseCreature)target).AlterSpellDamageFrom( from, ref iDamage );
WeightOverloading.DFA = dfa;
AOS.Damage( target, from, iDamage, phys, fire, cold, pois, nrgy );
WeightOverloading.DFA = DFAlgorithm.Standard;
}
else
{
new SpellDamageTimerAOS( spell, target, from, iDamage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
if( target is BaseCreature && from != null && delay == TimeSpan.Zero )
((BaseCreature)target).OnDamagedBySpell( from );
}
开发者ID:Godkong,项目名称:Origins,代码行数:41,代码来源:SpellHelper.cs
示例5: Damage
public static void Damage( TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
double Moddamage = damage;
ISpell i = from.Spell;
if ( i != null && target is BaseCreature)
{
Spell s = (Spell)i;
((BaseCreature)target).CheckSpellImmunity(s.DamageType, Moddamage, out Moddamage);
//Console.WriteLine("Old Damage {0}, new Damage {1}",damage,Moddamage);
}
if ( delay == TimeSpan.Zero )
{
WeightOverloading.DFA = dfa;
AOS.Damage( target, from, (int)Moddamage, phys, fire, cold, pois, nrgy );
WeightOverloading.DFA = DFAlgorithm.Standard;
}
else
{
new SpellDamageTimerAOS( target, from, (int)Moddamage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
if ( target is BaseCreature && from != null && delay == TimeSpan.Zero )
((BaseCreature)target).OnDamagedBySpell( from );
}
开发者ID:zerodowned,项目名称:angelisland,代码行数:24,代码来源:SpellHelper.cs
示例6: Damage
public static void Damage( TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
int iDamage = (int) damage;
if ( delay == TimeSpan.Zero )
{
if ( from is BaseCreature )
( (BaseCreature) from ).AlterSpellDamageTo( target, ref iDamage );
if ( target is BaseCreature )
( (BaseCreature) target ).AlterSpellDamageFrom( from, ref iDamage );
WeightOverloading.DFA = dfa;
int damageGiven = AOS.Damage( target, from, iDamage, phys, fire, cold, pois, nrgy );
WeightOverloading.DFA = DFAlgorithm.Standard;
SpellPlagueSpell.CheckPlague( target );
if ( target is BaseCreature && from != null )
( (BaseCreature) target ).OnDamagedBySpell( from );
}
else
{
new SpellDamageTimerAOS( target, from, iDamage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
}
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:28,代码来源:SpellHelper.cs
示例7: Damage
public static void Damage( Spell spell, TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
int iDamage = (int)damage;
#region Taran: Spell damage is based on armor difference
/*
double newDamage = damage;
if (target is PlayerMobile && from is PlayerMobile)
{
World.Broadcast(25, true, "Old damage is: " + iDamage);
double defar = ((PlayerMobile) target).BaseArmorRatingSpells;
double attar = ((PlayerMobile) from).BaseArmorRatingSpells;
double diff = defar - attar;
World.Broadcast(50, true, "Difference in armor rating is: " + diff);
if (defar - attar > 0)
newDamage = iDamage*(1.00 - ((diff * 1.6) / 100));
if (newDamage / iDamage < 0.6) //Don't deal less than 60% damage
newDamage = iDamage*0.6;
iDamage = (int) newDamage;
World.Broadcast(25, true, "New damage is: " + iDamage);
}
*/
#endregion
//Maka);
if (target == from && from.MagicDamageAbsorb > 0)
{
from.FixedEffect(0x37B9, 10, 5);
from.MagicDamageAbsorb = 0;
iDamage = 0;
DefensiveSpell.Nullify(from);
}
if( Evasion.CheckSpellEvasion( target ) )
iDamage = 0;
if ( delay == TimeSpan.Zero )
{
if( from is BaseCreature )
((BaseCreature)from).AlterSpellDamageTo( target, ref iDamage );
if( target is BaseCreature )
((BaseCreature)target).AlterSpellDamageFrom( from, ref iDamage );
//WeightOverloading.DFA = dfa;
int damageGiven = AOS.Damage(target, from, iDamage, phys, fire, cold, pois, nrgy);
DoLeech(damageGiven, from, target);
//WeightOverloading.DFA = DFAlgorithm.Standard;
}
else
{
new SpellDamageTimerAOS( spell, target, from, iDamage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
if( target is BaseCreature && from != null && delay == TimeSpan.Zero )
{
BaseCreature c = (BaseCreature)target;
c.OnHarmfulSpell(from);
c.OnDamagedBySpell(from);
}
}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:72,代码来源:SpellHelper.cs
示例8: Damage
public static void Damage( TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
if ( delay == TimeSpan.Zero )
{
WeightOverloading.DFA = dfa;
AOS.Damage( target, from, (int)damage, phys, fire, cold, pois, nrgy );
WeightOverloading.DFA = DFAlgorithm.Standard;
}
else
{
new SpellDamageTimerAOS( target, from, (int)damage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
if ( target is BaseCreature && from != null && delay == TimeSpan.Zero )
((BaseCreature)target).OnDamagedBySpell( from );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:16,代码来源:SpellHelper.cs
示例9: Damage
public static void Damage( TimeSpan delay, Mobile target, Mobile from, double damage, int phys, int fire, int cold, int pois, int nrgy, DFAlgorithm dfa )
{
if ( damage <= 0 )
return;
if ( !target.Player && !target.Body.IsHuman && !Core.AOS )
damage *= 2.0; // Double magery damage to monsters/animals if not AOS
damage = (damage + 1.0) / 2.0;
if ( delay == TimeSpan.Zero )
{
if ( target is BaseCreature && from != null )
((BaseCreature)target).OnDamagedBySpell( from );
WeightOverloading.DFA = dfa;
AOS.Damage( target, from, (int)damage, phys, fire, cold, pois, nrgy );
WeightOverloading.DFA = DFAlgorithm.Standard;
}
else
{
new SpellDamageTimerAOS( target, from, (int)damage, phys, fire, cold, pois, nrgy, delay, dfa ).Start();
}
}
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:22,代码来源:SpellHelper.cs
注:本文中的DFAlgorithm类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论