本文整理汇总了C#中SNOPower.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# SNOPower.Equals方法的具体用法?C# SNOPower.Equals怎么用?C# SNOPower.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SNOPower
的用法示例。
在下文中一共展示了SNOPower.Equals方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateAbility
public override Ability CreateAbility(SNOPower Power)
{
Ability returnAbility=null;
#region Shadow Power
// Shadow Power
if (Power.Equals(SNOPower.DemonHunter_ShadowPower))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(1, 1, true),
Cost=14,
SecondaryEnergy=true,
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckRecastTimer|AbilityConditions.CheckEnergy),
Fcriteria=new Func<bool>(() =>
{
return (Bot.Character.dCurrentHealthPct<=0.99d||Bot.Character.bIsRooted||Bot.Combat.iElitesWithinRange[(int)RangeIntervals.Range_25]>=1||Bot.Combat.iAnythingWithinRange[(int)RangeIntervals.Range_15]>=3);
}),
};
}
#endregion
#region Smoke Screen
// Smoke Screen
if (Power.Equals(SNOPower.DemonHunter_SmokeScreen))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 1, true),
Cost=28,
SecondaryEnergy=true,
Range=0,
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.High,
//PreCastConditions=,
Fcriteria=new Func<bool>(() =>
{
return (!HasBuff(SNOPower.DemonHunter_ShadowPower)||Bot.Character.bIsIncapacitated)
&&(Bot.Character.dDiscipline>=28||(Bot.Character.dDiscipline>=14&&Bot.Combat.IsFleeing))
&&(Bot.Character.dCurrentHealthPct<=0.90||Bot.Character.bIsRooted||Bot.Combat.iElitesWithinRange[(int)RangeIntervals.Range_20]>=1||Bot.Combat.iAnythingWithinRange[(int)RangeIntervals.Range_15]>=3||Bot.Character.bIsIncapacitated);
}),
};
}
#endregion
#region Preparation
// Preparation
if (Power.Equals(SNOPower.DemonHunter_Preparation))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(1, 1, true),
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckRecastTimer|AbilityConditions.CheckCanCast),
Cost=this.RuneIndexCache[SNOPower.DemonHunter_Preparation]==0?25:0,
Fcriteria=new Func<bool>(() =>
{
return Bot.Character.dDisciplinePct<0.25d
//Rune: Punishment (Restores all Hatered for 25 disc)
||(this.RuneIndexCache[Power]==0&&Bot.Character.dCurrentEnergyPct<0.20d);
}),
};
}
#endregion
#region Evasive Fire
// Evasive Fire
if (Power.Equals(SNOPower.DemonHunter_EvasiveFire))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Target,
WaitVars=new WaitLoops(1, 1, true),
Cost=0,
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.Low,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckRecastTimer),
UnitsWithinRangeConditions=new Tuple<RangeIntervals,int>(RangeIntervals.Range_20,1),
};
}
#endregion
#region Companion
// Companion
//.........这里部分代码省略.........
示例2: CreateAbility
public override Ability CreateAbility(SNOPower Power)
{
Ability returnAbility=null;
#region Spirit Walk
// Spirit Walk Cast on 65% health or while avoiding anything but molten core or incapacitated or Chasing Goblins
if (Power.Equals(SNOPower.Witchdoctor_SpiritWalk))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 0, true),
Cost=49,
UseAvoiding=true,
UseOOCBuff=true,
IsNavigationSpecial=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckEnergy|AbilityConditions.CheckCanCast),
//TestCustomCombatConditionAlways=true,
Fcriteria=new Func<bool>(() =>
{
return (Bot.Character.dCurrentHealthPct<=0.65
||(Bot.Combat.FleeingLastTarget&&Bot.Combat.iAnythingWithinRange[(int)RangeIntervals.Range_25]>1)
||(Bot.Combat.AvoidanceLastTarget&&Bot.Combat.NearbyAvoidances.Count>0)
||Bot.Character.bIsIncapacitated
||Bot.Character.bIsRooted
||Bot.SettingsFunky.OutOfCombatMovement);
}),
};
}
#endregion
#region Soul Harvest
// Soul Harvest Any Elites or 2+ Norms and baby it's harvest season
if (Power.Equals(SNOPower.Witchdoctor_SoulHarvest))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 1, true),
Cost=59,
Counter=5,
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated| AbilityConditions.CheckCanCast | AbilityConditions.CheckExisitingBuff | AbilityConditions.CheckEnergy),
UnitsWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_12, 3),
};
}
#endregion
#region Sacrifice
// Sacrifice AKA Zombie Dog Jihad, use on Elites Only or to try and Save yourself
if (Power.Equals(SNOPower.Witchdoctor_Sacrifice))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(1, 0, true),
Cost=10,
Range=48,
UseAvoiding=true,
UseOOCBuff=false,
Priority=AbilityPriority.None,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated| AbilityConditions.CheckCanCast),
ElitesWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_15, 1),
TargetUnitConditionFlags=new UnitTargetConditions(TargetProperties.IsSpecial, 15),
};
}
#endregion
#region Gargantuan
// Gargantuan, Recast on 1+ Elites or Bosses to trigger Restless Giant
if (Power.Equals(SNOPower.Witchdoctor_Gargantuan))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(2, 1, true),
Cost=147,
Counter=1,
UseAvoiding=true,
UseOOCBuff=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated| AbilityConditions.CheckCanCast | AbilityConditions.CheckEnergy | AbilityConditions.CheckPetCount),
Fbuff=new Func<bool>(() => { return this.RuneIndexCache[SNOPower.Witchdoctor_Gargantuan]!=0&&Bot.Character.PetData.Gargantuan==0; }),
Fcriteria=new Func<bool>(() =>
{
return (this.RuneIndexCache[SNOPower.Witchdoctor_Gargantuan]==0&&(Bot.Combat.iElitesWithinRange[(int)RangeIntervals.Range_15]>=1||(Bot.Target.CurrentUnitTarget.IsEliteRareUnique&&Bot.Target.CurrentTarget.RadiusDistance<=15f))
||this.RuneIndexCache[SNOPower.Witchdoctor_Gargantuan]!=0&&Bot.Character.PetData.Gargantuan==0);
}),
};
}
#endregion
#region Zombie dogs
// Zombie dogs Woof Woof, good for being blown up, cast when less than or equal to 1 Dog or Not Blowing them up and cast when less than 4
if (Power.Equals(SNOPower.Witchdoctor_SummonZombieDog))
//.........这里部分代码省略.........
示例3: CreateAbility
public override Ability CreateAbility(SNOPower Power)
{
Ability returnAbility=null;
#region IgnorePain
// Ignore Pain when low on health
if (Power.Equals(SNOPower.Barbarian_IgnorePain))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 0, true),
Cost=0,
UseAvoiding=true,
UseOOCBuff=false,
IsSpecialAbility=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckRecastTimer|AbilityConditions.CheckCanCast),
Fcriteria=new Func<bool>(() => { return Bot.Character.dCurrentHealthPct<=0.45; }),
};
}
#endregion
#region Earthquake
// Earthquake, elites close-range only
if (Power.Equals(SNOPower.Barbarian_Earthquake))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(4, 4, true),
Cost=0,
UseAvoiding=false,
UseOOCBuff=false,
IsSpecialAbility=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckRecastTimer|AbilityConditions.CheckEnergy|AbilityConditions.CheckExisitingBuff|AbilityConditions.CheckCanCast|AbilityConditions.CheckPlayerIncapacitated),
ElitesWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_15, 1),
TargetUnitConditionFlags=new UnitTargetConditions(TargetProperties.IsSpecial, 13),
};
}
#endregion
#region Wrath of the berserker
// Wrath of the berserker, elites only (wrath of berserker)
if (Power.Equals(SNOPower.Barbarian_WrathOfTheBerserker))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(4, 4, true),
Cost=50,
UseAvoiding=true,
UseOOCBuff=false,
IsSpecialAbility=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckEnergy|AbilityConditions.CheckExisitingBuff|AbilityConditions.CheckCanCast),
Fcriteria=new Func<bool>(() =>
{
return Bot.Combat.bAnyChampionsPresent
|| (Bot.SettingsFunky.Class.bBarbUseWOTBAlways && Bot.Combat.bAnyMobsInCloseRange)
|| (Bot.SettingsFunky.Class.bGoblinWrath && Bot.Target.CurrentTarget.IsTreasureGoblin);
}),
};
}
#endregion
#region Call of the ancients
// Call of the ancients, elites only
if (Power.Equals(SNOPower.Barbarian_CallOfTheAncients))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(4, 4, true),
Cost=50,
UseAvoiding=false,
UseOOCBuff=false,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckRecastTimer|AbilityConditions.CheckEnergy|AbilityConditions.CheckCanCast|AbilityConditions.CheckPlayerIncapacitated),
ElitesWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_25, 1),
TargetUnitConditionFlags=new UnitTargetConditions(TargetProperties.IsSpecial, 25),
};
}
#endregion
#region BattleRage
if (Power.Equals(SNOPower.Barbarian_BattleRage))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
//.........这里部分代码省略.........
示例4: CreateAbility
public override Ability CreateAbility(SNOPower Power)
{
Ability returnAbility=null;
#region Teleport
// Teleport in combat for critical-mass wizards
if (Power.Equals(SNOPower.Wizard_Teleport))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.ClusterLocation|AbilityUseType.ZigZagPathing,
WaitVars=new WaitLoops(0,1,true),
Cost=15,
Range=35,
UseAvoiding=false,
UseOOCBuff=false,
IsNavigationSpecial=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckCanCast|AbilityConditions.CheckEnergy),
ClusterConditions=new ClusterConditions(5d, 48f, 2, false),
//TestCustomCombatConditionAlways=true,
Fcriteria=new Func<bool>(() =>
{
return ((Bot.SettingsFunky.Class.bTeleportFleeWhenLowHP&&Bot.Character.dCurrentHealthPct<0.5d)
||(Bot.SettingsFunky.Class.bTeleportIntoGrouping&&Bot.Combat.Clusters(new ClusterConditions(5d, 48f, 2, false)).Count>0&&Bot.Combat.Clusters(new ClusterConditions(5d, 48f, 2, false))[0].Midpoint.Distance(Bot.Character.PointPosition)>15f)
||(!Bot.SettingsFunky.Class.bTeleportFleeWhenLowHP&&!Bot.SettingsFunky.Class.bTeleportIntoGrouping));
}),
};
}
#endregion
#region Archon
// Archon
if (Power.Equals(SNOPower.Wizard_Archon))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(4, 5, true),
Cost=25,
UseAvoiding=false,
UseOOCBuff=false,
IsSpecialAbility=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckCanCast|AbilityConditions.CheckEnergy),
UnitsWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_25, 1),
ElitesWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_30, 1),
TargetUnitConditionFlags=new UnitTargetConditions(TargetProperties.IsSpecial, 30),
Fcriteria=new Func<bool>(()=>
{
bool missingBuffs=this.MissingBuffs();
if (missingBuffs)
base.bWaitingForSpecial=true;
return !missingBuffs;
}),
};
}
#endregion
#region Explosive Blast
// Explosive Blast SPAM when enough AP, blow erry thing up, nah mean
if (Power.Equals(SNOPower.Wizard_ExplosiveBlast))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 0, true),
Cost=20,
Range=10,
UseAvoiding=false,
UseOOCBuff=false,
Priority=AbilityPriority.Low,
PreCastConditions=(AbilityConditions.CheckPlayerIncapacitated|AbilityConditions.CheckCanCast|AbilityConditions.CheckEnergy),
UnitsWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_25, 1),
ElitesWithinRangeConditions=new Tuple<RangeIntervals, int>(RangeIntervals.Range_25, 1),
TargetUnitConditionFlags=new UnitTargetConditions(TargetProperties.IsSpecial, 12),
};
}
#endregion
#region Energy Twister
// Energy Twister SPAMS whenever 35 or more ap to generate Arcane Power
if (Power.Equals(SNOPower.Wizard_EnergyTwister))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Location,
WaitVars=new WaitLoops(0, 0, true),
Cost=35,
Range=this.bUsingCriticalMassPassive?9:28,
IsRanged=true,
UseAvoiding=false,
UseOOCBuff=false,
Priority=AbilityPriority.Low,
//.........这里部分代码省略.........
示例5: CreateAbility
public override Ability CreateAbility(SNOPower Power)
{
Ability returnAbility=null;
#region Mantras
if (Power.Equals(SNOPower.Monk_MantraOfEvasion)||Power.Equals(SNOPower.Monk_MantraOfConviction)||Power.Equals(SNOPower.Monk_MantraOfHealing)||Power.Equals(SNOPower.Monk_MantraOfRetribution))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(0, 1, true),
Cost=50,
UseAvoiding=true,
UseOOCBuff=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckEnergy),
IsSpecialAbility=true,
Fbuff=new Func<bool>(() =>
{
return !HasBuff(Power);
}),
Fcriteria=new Func<bool>(() =>
{
return
!HasBuff(Power)
||Bot.SettingsFunky.Class.bMonkSpamMantra&&Bot.Target.CurrentTarget!=null&&(Bot.Combat.iElitesWithinRange[(int)RangeIntervals.Range_25]>0||Bot.Combat.iAnythingWithinRange[(int)RangeIntervals.Range_20]>=2||(Bot.Combat.iAnythingWithinRange[(int)RangeIntervals.Range_20]>=1&&Bot.SettingsFunky.Class.bMonkInnaSet)||(Bot.Target.CurrentUnitTarget.IsEliteRareUnique||Bot.Target.CurrentTarget.IsBoss)&&Bot.Target.CurrentTarget.RadiusDistance<=25f)&&
// Check if either we don't have blinding flash, or we do and it's been cast in the last 6000ms
//DateTime.Now.Subtract(dictAbilityLastUse[SNOPower.Monk_BlindingFlash]).TotalMilliseconds <= 6000)) &&
(!Bot.Class.HotbarPowers.Contains(SNOPower.Monk_BlindingFlash)||
(Bot.Class.HotbarPowers.Contains(SNOPower.Monk_BlindingFlash)&&(HasBuff(SNOPower.Monk_BlindingFlash)))&&
// Check our mantras, if we have them, are up first
this.HasMantraBuff());
}),
};
}
#endregion
#region Mystic ally
// Mystic ally
if (Power.Equals(SNOPower.Monk_MysticAlly))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(2, 2, true),
Cost=25,
UseAvoiding=true,
UseOOCBuff=true,
Priority=AbilityPriority.High,
IsSpecialAbility=true,
Counter=1,
PreCastConditions=(AbilityConditions.CheckEnergy|AbilityConditions.CheckCanCast|AbilityConditions.CheckPetCount),
Fcriteria=new Func<bool>(() => { return true; }),
};
}
#endregion
#region InnerSanctuary
// InnerSanctuary
if (Power.Equals(SNOPower.Monk_InnerSanctuary))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(1, 1, true),
Cost=30,
UseAvoiding=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckEnergy|AbilityConditions.CheckCanCast|AbilityConditions.CheckRecastTimer),
Fcriteria=new Func<bool>(() => { return Bot.Character.dCurrentHealthPct<=0.45; }),
};
}
#endregion
#region Serenity
// Serenity if health is low
if (Power.Equals(SNOPower.Monk_Serenity))
{
return new Ability
{
Power=Power,
UsageType=AbilityUseType.Buff,
WaitVars=new WaitLoops(1, 1, true),
Cost=10,
UseAvoiding=true,
UseOOCBuff=true,
Priority=AbilityPriority.High,
PreCastConditions=(AbilityConditions.CheckEnergy|AbilityConditions.CheckCanCast|AbilityConditions.CheckRecastTimer),
Fcriteria=new Func<bool>(() => { return Bot.Character.dCurrentHealthPct<=0.50; }),
};
}
#endregion
#region Breath of heaven
// Breath of heaven when needing healing or the buff
if (Power.Equals(SNOPower.Monk_BreathOfHeaven))
//.........这里部分代码省略.........