本文整理汇总了C#中ActorController.GetAtt方法的典型用法代码示例。如果您正苦于以下问题:C# ActorController.GetAtt方法的具体用法?C# ActorController.GetAtt怎么用?C# ActorController.GetAtt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActorController
的用法示例。
在下文中一共展示了ActorController.GetAtt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CanHit
private bool CanHit(ActorController target)
{
if (target == null)
{
return false;
}
if (this.IsFriendlyTo(target))
{
return true;
}
int num = 90 + this.GetAtt(EAttID.EAID_Hit) / 100 + (int)((this.Level - target.Level) * 20u / target.Level) - target.GetAtt(EAttID.EAID_Dodge) / 100;
return num > 0 && UtilFunc.RangeRandom(0, 100) <= num;
}
示例2: CalculateDamage
public int CalculateDamage(int value1, int value2, ActorController target)
{
int attackType = this.GetAttackType();
long num = 0L;
if (this.ignoreDefense != null && Time.time >= this.ignoreDefense.Cooldown && UtilFunc.RangeRandom(0, 10000) < this.ignoreDefense.Value1)
{
this.ignoreDefense.Cooldown = Time.time + (float)this.ignoreDefense.Value3;
num = (long)this.GetAtt(EAttID.EAID_Attack);
}
else if (attackType == 1)
{
num = (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_PhysicDefense));
}
else if (attackType == 3)
{
num = (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_MagicDefense));
}
else
{
num += (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_MagicDefense));
num += (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_PhysicDefense));
num /= 2L;
}
int num2 = this.GetAtt(EAttID.EAID_DamagePlus) - target.GetAtt(EAttID.EAID_DamageMinus);
if (num2 < -8000)
{
num2 = -8000;
}
num = num * (long)(10000 + num2) / 10000L;
num = num * (long)value1 / 10000L;
num += (long)value2;
if (num < 1L)
{
num = 1L;
}
return (int)num;
}
示例3: CanCrit
public bool CanCrit(ActorController target)
{
if (target == null)
{
return false;
}
int num = this.GetAtt(EAttID.EAID_Crit) / 100 + (int)((this.Level - target.Level) * 10u / this.Level) - target.GetAtt(EAttID.EAID_CritResis) / 100;
return num > 0 && UtilFunc.RangeRandom(0, 100) <= num;
}