本文整理汇总了C#中Ability类的典型用法代码示例。如果您正苦于以下问题:C# Ability类的具体用法?C# Ability怎么用?C# Ability使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Ability类属于命名空间,在下文中一共展示了Ability类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IcePath
public IcePath(Ability ability)
: base(ability)
{
Modifier = new EvadableModifier(HeroTeam, EvadableModifier.GetHeroType.LowestHealth);
CounterAbilities.Add(PhaseShift);
CounterAbilities.Add(BallLightning);
CounterAbilities.Add(Eul);
CounterAbilities.AddRange(VsDisable);
CounterAbilities.Add(SnowBall);
CounterAbilities.Add(Armlet);
CounterAbilities.Add(Bloodstone);
CounterAbilities.Remove("bane_nightmare");
CounterAbilities.Remove("abaddon_aphotic_shield");
Modifier.AllyCounterAbilities.AddRange(AllyShields);
Modifier.AllyCounterAbilities.AddRange(Invul);
Modifier.AllyCounterAbilities.AddRange(VsMagic);
AdditionalDelay = ability.AbilitySpecialData.First(x => x.Name == "path_delay").Value;
for (var i = 0u; i < duration.Length; i++)
{
duration[i] = ability.AbilitySpecialData.First(x => x.Name == "duration").GetValue(i);
}
talent = AbilityOwner.FindSpell("special_bonus_unique_jakiro");
if (talent != null)
{
bonusDuration = talent.AbilitySpecialData.First(x => x.Name == "value").Value;
}
ObstacleStays = true;
}
示例2: Tower
public Tower(Texture2D texture, Vector2 position, int range, Ability attack)
: base(texture, position)
{
Range = range;
TowerAbility = attack;
CanAttack = true;
}
示例3: AddActive
public void AddActive(Ability ab, int slot)
{
if(!allAbilities.Contains(ab))
allAbilities.Add(ab);
if(slot >= 0)
SetActive(allAbilities.IndexOf(ab),slot);
}
示例4: Mjollnir
public Mjollnir(Ability ability)
: base(ability)
{
Modifier = new EvadableModifier(EnemyTeam, EvadableModifier.GetHeroType.ModifierSource);
Modifier.EnemyCounterAbilities.Add(FortunesEnd);
}
示例5: DamageAmpValue
public static float DamageAmpValue(Ability ability)
{
var multi = !MultiplierDictionary.ContainsKey(ability.Name)
? 0
: Math.Abs(MultiplierDictionary[ability.Name]);
return multi;
}
示例6: Projectile
protected Projectile(Ability ability)
: base(ability)
{
IsDisjointable = true;
radius = 75;
DisablePathfinder = true;
}
示例7: Torrent
public Torrent(Ability ability)
: base(ability)
{
Modifier = new EvadableModifier(HeroTeam, EvadableModifier.GetHeroType.LowestHealth);
CounterAbilities.Add(PhaseShift);
CounterAbilities.Add(BallLightning);
CounterAbilities.Add(SleightOfFist);
CounterAbilities.Add(Manta);
CounterAbilities.Add(Eul);
CounterAbilities.AddRange(VsDisable);
CounterAbilities.AddRange(VsDamage);
CounterAbilities.AddRange(VsMagic);
CounterAbilities.AddRange(Invis);
CounterAbilities.Add(SnowBall);
CounterAbilities.Add(Armlet);
CounterAbilities.Add(Bloodstone);
Modifier.AllyCounterAbilities.AddRange(AllyShields);
Modifier.AllyCounterAbilities.AddRange(Invul);
Modifier.AllyCounterAbilities.AddRange(VsMagic);
AdditionalDelay = Ability.AbilitySpecialData.First(x => x.Name == "delay").Value;
talent = AbilityOwner.FindSpell("special_bonus_unique_kunkka");
if (talent != null)
{
bonusRadius = talent.AbilitySpecialData.First(x => x.Name == "value").Value;
}
}
示例8: Check
public static bool Check(Ability ability)
{
return MyAbilities.SoulRing.CanBeCasted() && ability.ManaCost > 0 && Utils.SleepCheck("Ability.SoulRing")
&& Heals.HealsMenuDictionary["item_soul_ring"].Item("item_soul_ringuseBeforeCast").GetValue<bool>()
&& Heals.HealsMenuDictionary["item_soul_ring"].Item("item_soul_ringminHp").GetValue<Slider>().Value
< AbilityMain.Me.Health;
}
示例9: Create
public static Menu Create(string name, Ability ability)
{
var menu = new Menu(name, name, textureName: name);
if (name == "rubick_spell_steal")
{
return menu;
}
menu.AddItem(Togglers.OnSight(name));
var data = AbilityDatabase.Find(name);
var defaultValue = ability.AbilityType != AbilityType.Ultimate;
if (data != null)
{
if (data.TrueSight)
{
menu.AddItem(Togglers.OnInvisible(name, defaultValue));
}
if (data.IsPurge)
{
menu.AddItem(Togglers.OnPurgable(name, defaultValue));
}
if (data.WeakensEnemy)
{
menu.AddItem(Togglers.OnAttack(name, defaultValue));
}
}
menu.AddItem(Sliders.MinManaCheck(name));
menu.AddItem(Sliders.MinManaCheck(name, true));
return menu;
}
示例10: AbilityDisplay
public AbilityDisplay(Ability ability, int exp)
{
_ability = ability;
_exp = exp;
InitializeComponent();
}
示例11: add
public void add(Ability ability)
{
if ( !_abilities.Contains( ability ) )
_abilities.Add( ability );
//ability.initData( caster , this );
Debug.Log( "Added " + ability.name + " to " + caster.name + "'s abilitycontainer" );
}
示例12: Execute
/// <summary>
/// Execute dirtytricks ability
/// </summary>
/// <param name="ab">The used ability</param>
/// <param name="player">The player that used the ability</param>
public void Execute(Ability ab, GamePlayer player)
{
if (player == null)
{
if (log.IsWarnEnabled)
log.Warn("Could not retrieve player in DirtyTricksAbilityHandler.");
return;
}
if (!player.IsAlive)
{
player.Out.SendMessage("You are dead and can't use that ability!", eChatType.CT_YouHit, eChatLoc.CL_SystemWindow);
return;
}
if (player.IsMezzed)
{
player.Out.SendMessage("You cannot use this while Mezzed!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
if (player.IsStunned)
{
player.Out.SendMessage("You cannot use this while Stunned!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
if (player.IsSitting)
{
player.Out.SendMessage("You must be standing to use this ability!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
player.DisableSkill(ab, REUSE_TIMER);
DirtyTricksEffect dt = new DirtyTricksEffect(DURATION * 1000);
dt.Start(player);
}
示例13: AbilityValueSetsModifier
public void AbilityValueSetsModifier(int value, int modifier)
{
var a = new Ability("TestAbility-BaDumBum");
a.Value = value;
Assert.AreEqual(modifier, a.Modifier);
}
示例14: Execute
public void Execute(Ability ab, GamePlayer player)
{
RapidFireEffect rapidFire = player.EffectList.GetOfType<RapidFireEffect>();
if (rapidFire!=null)
{
rapidFire.Cancel(false);
return;
}
if(!player.IsAlive)
{
player.Out.SendMessage("You can't switch to rapid fire when dead!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
SureShotEffect sureShot = player.EffectList.GetOfType<SureShotEffect>();
if (sureShot != null)
sureShot.Cancel(false);
TrueshotEffect trueshot = player.EffectList.GetOfType<TrueshotEffect>();
if (trueshot != null)
trueshot.Cancel(false);
new RapidFireEffect().Start(player);
}
示例15: Execute
public void Execute(Ability ab, GamePlayer player)
{
SureShotEffect sureShot = player.EffectList.GetOfType<SureShotEffect>();
if (sureShot != null)
{
sureShot.Cancel(false);
return;
}
if (!player.IsAlive)
{
player.Out.SendMessage(LanguageMgr.GetTranslation(player.Client.Account.Language, "Skill.Ability.SureShot.CannotUseDead"), eChatType.CT_System, eChatLoc.CL_SystemWindow);
return;
}
RapidFireEffect rapidFire = player.EffectList.GetOfType<RapidFireEffect>();
if (rapidFire != null)
rapidFire.Cancel(false);
TrueshotEffect trueshot = player.EffectList.GetOfType<TrueshotEffect>();
if (trueshot != null)
trueshot.Cancel(false);
new SureShotEffect().Start(player);
}