本文整理匯總了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;
}