本文整理汇总了C#中Item.IsOwned方法的典型用法代码示例。如果您正苦于以下问题:C# Item.IsOwned方法的具体用法?C# Item.IsOwned怎么用?C# Item.IsOwned使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Item
的用法示例。
在下文中一共展示了Item.IsOwned方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetEchoLudenDamage
public static float GetEchoLudenDamage(this Obj_AI_Base target)
{
var dmg = 0f;
var echo = new Item(ItemId.Ludens_Echo);
if (echo.IsOwned() && Player.GetBuff("itemmagicshankcharge").Count == 100)
{
dmg += Player.Instance.CalculateDamageOnUnit(target, DamageType.Magical, (float) (100 + 0.1*Player.Instance.FlatMagicDamageMod));
}
return dmg;
}
示例2: GetRealDamage
public static float GetRealDamage(this SpellSlot slot, Obj_AI_Base target)
{
// Helpers
var spellLevel = Player.Instance.Spellbook.GetSpell(slot).Level;
const DamageType damageType = DamageType.Magical;
float damage = 0;
// Validate spell level
if (spellLevel == 0)
{
return 0;
}
spellLevel--;
switch (slot)
{
case SpellSlot.Q:
var sheen = new Item(ItemId.Sheen);
var trinity = new Item(ItemId.Trinity_Force);
var ice = new Item(ItemId.Iceborn_Gauntlet);
if (sheen.IsOwned() && sheen.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
}
else if (sheen.IsOwned() && sheen.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
}
else if (trinity.IsOwned() && trinity.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 2f * Player.Instance.FlatPhysicalDamageMod;
}
else if (ice.IsOwned() && ice.IsReady())
{
damage += new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod + 1.25f * Player.Instance.FlatPhysicalDamageMod;
}
else
{
damage = new float[] { 35, 55, 75, 95, 115 }[spellLevel] + 0.40f * Player.Instance.FlatMagicDamageMod + 1.1f * Player.Instance.FlatPhysicalDamageMod;
}
break;
case SpellSlot.W:
damage = new float[] { 70, 115, 160, 205, 250 }[spellLevel] + 0.80f * Player.Instance.FlatMagicDamageMod;
break;
case SpellSlot.E:
damage = new float[] { 75, 125, 175, 225, 275 }[spellLevel] + 0.75f * Player.Instance.FlatMagicDamageMod + 0.5f * Player.Instance.FlatPhysicalDamageMod;
break;
case SpellSlot.R:
damage = new float[] { 350, 500, 650 }[spellLevel] + 0.9f * Player.Instance.FlatMagicDamageMod + 1f * Player.Instance.FlatPhysicalDamageMod;
break;
}
if (damage <= 0)
{
return 0;
}
return Player.Instance.CalculateDamageOnUnit(target, damageType, damage) - 20;
}