当前位置: 首页>>代码示例>>C#>>正文


C# Troop.GetAreaStratagemTroops方法代码示例

本文整理汇总了C#中GameObjects.Troop.GetAreaStratagemTroops方法的典型用法代码示例。如果您正苦于以下问题:C# Troop.GetAreaStratagemTroops方法的具体用法?C# Troop.GetAreaStratagemTroops怎么用?C# Troop.GetAreaStratagemTroops使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GameObjects.Troop的用法示例。


在下文中一共展示了Troop.GetAreaStratagemTroops方法的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);
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:26,代码来源:InfluenceKind394.cs

示例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;
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:31,代码来源:InfluenceKind397.cs

示例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);
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:15,代码来源:InfluenceKind391.cs

示例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);
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:15,代码来源:InfluenceKind390.cs

示例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);
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:17,代码来源:InfluenceKind720.cs

示例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);
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:19,代码来源:InfluenceKind395.cs

示例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;
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:23,代码来源:InfluenceKind399.cs


注:本文中的GameObjects.Troop.GetAreaStratagemTroops方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。