本文整理汇总了C#中GameObjects.Troop.GetStratagemSuccessChanceCredit方法的典型用法代码示例。如果您正苦于以下问题:C# Troop.GetStratagemSuccessChanceCredit方法的具体用法?C# Troop.GetStratagemSuccessChanceCredit怎么用?C# Troop.GetStratagemSuccessChanceCredit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameObjects.Troop
的用法示例。
在下文中一共展示了Troop.GetStratagemSuccessChanceCredit方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
if (!this.IsVaild(destination))
{
return 0;
}
int num = 0;
int pureFightingForce = source.PureFightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, false))
{
int num3 = source.GetStratagemSuccessChanceCredit(troop, source.InevitableHuogongOnLowerIntelligence || source.InevitableStratagemOnLowerIntelligence, troop.InvincibleHuogong, troop.InvincibleStratagemFromLowerIntelligence);
if (num3 > 0)
{
num3 = (int)(((num3 + (((5 - troop.Army.Scales) * 5))) * (troop.FireDamageRate - 1)) * troop.PureFightingForce) / pureFightingForce;
if (troop.RateOfFireProtection > 0f)
{
num += (int) (num3 * troop.RateOfFireProtection);
}
else
{
num += num3;
}
}
}
return (int) (num * source.RateOfFireDamage);
}
示例2: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
if (!this.IsVaild(destination))
{
return 0;
}
int num = 0;
int fightingForce = source.FightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, true))
{
int num3 = troop.Army.MoraleCeiling - troop.Army.Morale;
if ((num3 >= 5) || !GameObject.Chance(0x5f))
{
int num4 = source.GetStratagemSuccessChanceCredit(troop, false, false, false);
if (num4 > 0)
{
int num5 = source.GenerateBoostIncrement(this.baseIncrement);
if (num3 < num5)
{
num4 = ((((num4 + ((100 - troop.Morale) / 2)) * troop.FightingForce) * num3) / num5) / fightingForce;
}
else
{
num4 = ((num4 + ((100 - troop.Morale) / 2)) * troop.FightingForce) / fightingForce;
}
num += num4;
}
}
}
return num;
}
示例3: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
int num = 0;
int pureFightingForce = source.PureFightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, false))
{
int num3 = source.GetStratagemSuccessChanceCredit(troop, source.InevitableRaoluanOnLowerIntelligence || source.InevitableStratagemOnLowerIntelligence, (troop.NeverBeIntoChaos || troop.OutburstNeverBeIntoChaos) || troop.InvincibleRaoluan, troop.InvincibleStratagemFromLowerIntelligence);
if (num3 > 0)
{
num3 = (((num3 + ((120 - troop.Morale) / 2)) + ((troop.Army.Scales - 5) * 5)) * troop.PureFightingForce) / pureFightingForce;
num += num3;
}
}
return ((num * (2 + (source.IncrementOfChaosDay * 3))) / 2);
}
示例4: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
int num = 0;
int pureFightingForce = source.PureFightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, false))
{
int num3 = source.GetStratagemSuccessChanceCredit(troop, source.InevitableGongxinOnLowerIntelligence || source.InevitableStratagemOnLowerIntelligence, troop.InvincibleGongxin, troop.InvincibleStratagemFromLowerIntelligence);
if (num3 > 0)
{
num3 = (((num3 + ((100 - troop.Morale) / 2)) + ((troop.Army.Scales - 5) * 5)) * troop.PureFightingForce) / pureFightingForce;
num += num3;
}
}
return (int) (num * source.RateOfGongxin);
}
示例5: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
int num = 0;
int pureFightingForce = source.PureFightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, false))
{
int num3 = source.GetStratagemSuccessChanceCredit(troop,
source.InevitableRumourOnLowerIntelligence || source.InevitableStratagemOnLowerIntelligence,
troop.InvincibleAttract, troop.InvincibleStratagemFromLowerIntelligence);
if (num3 > 0)
{
num3 = ((num3 + ((troop.Army.Scales - 5) * 10)) * troop.PureFightingForce) / pureFightingForce;
num += num3;
}
}
return ((num * (2 + (source.IncrementOfRumourDay * 3))) / 2);
}
示例6: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
if (!this.IsVaild(destination))
{
return 0;
}
int num = 0;
int pureFightingForce = source.PureFightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, true))
{
int num3 = source.GetStratagemSuccessChanceCredit(troop, false, false, false);
if (num3 > 0)
{
num3 = (num3 * troop.FightingForce) / pureFightingForce;
num += num3;
}
}
return (num * 2);
}
示例7: GetCredit
public override int GetCredit(Troop source, Troop destination)
{
if (!this.IsVaild(destination))
{
return 0;
}
int num = 0;
int fightingForce = source.FightingForce;
foreach (Troop troop in source.GetAreaStratagemTroops(destination, true))
{
float rate = ((float) troop.InjuryQuantity) / ((float) troop.Army.Kind.MinScale);
int num4 = source.GetStratagemSuccessChanceCredit(troop, false, false, false);
if (num4 > 0)
{
if (rate > this.rate)
{
rate = this.rate;
}
num += (int) ((((num4 * rate) / this.rate) * troop.FightingForce) / ((float) fightingForce));
}
}
return num;
}