• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GameObjects.Troop类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Troop类属于GameObjects命名空间,在下文中一共展示了Troop类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: 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


示例2: RemoveContactingTroop

 public void RemoveContactingTroop(Troop troop)
 {
     if (this.ContactingTroops != null)
     {
         this.ContactingTroops.Remove(troop);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:TileData.cs


示例3: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(null, false, false, false))
     {
         troop.Scenario.SetPositionOnFire(troop.SelfCastPosition);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind398.cs


示例4: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop != null && troop.RateOfMovability < this.rate)
     {
         troop.RateOfMovability = this.rate;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind250.cs


示例5: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.ImmunityOfCaptive = false;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind261.cs


示例6: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.YesOrNoOfObliqueView = true;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind270.cs


示例7: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.AreaStratagemRadius < this.radius)
     {
         troop.AreaStratagemRadius = this.radius;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind572.cs


示例8: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.ChanceIncrementOfChaosAfterCriticalStrike -= this.increment;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind550.cs


示例9: GetCreditWithPosition

        public override int GetCreditWithPosition(Troop source, out Point? position)
        {
            //position = 0;
            position = new Point(0, 0);

            if (source == null || source.BelongedLegion == null || source.BelongedLegion.Troops == null
                || source.BelongedLegion.WillArchitecture == null || source.BaseViewArea == null) return 0;
            
            if (((source.BelongedLegion != null) && (GameObject.Random(source.BelongedLegion.Troops.Count) == 0)) && ((source.BelongedLegion.WillArchitecture.BelongedFaction != null) && !source.BelongedFaction.IsArchitectureKnown(source.BelongedLegion.WillArchitecture)))
            {
                bool flag = false;
                foreach (Point point in source.BaseViewArea.Area)
                {
                    Architecture architectureByPosition = source.Scenario.GetArchitectureByPosition(point);
                    if (source.BelongedLegion.WillArchitecture == architectureByPosition)
                    {
                        flag = true;
                        break;
                    }
                }
                if (!(!flag || source.BelongedLegion.InformationDestination.HasValue))
                {
                    position = new Point?(source.Position);
                    return 150;
                }
            }
            return 0;
        }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:28,代码来源:InfluenceKind392.cs


示例10: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.CombativityDecrementOnPower < this.decrement)
     {
         troop.CombativityDecrementOnPower = this.decrement;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind603.cs


示例11: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.BaseDefenceConsidered = 0;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind381.cs


示例12: ApplyEventDialogs

 public void ApplyEventDialogs(Troop troop)
 {
     if (this.OnApplyTroopEvent != null)
     {
         this.OnApplyTroopEvent(this, troop);
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:TroopEvent.cs


示例13: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     int recoverQuantity;
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, false, false, false))
     {
         troop.OrientationTroop.PreAction = TroopPreAction.恢复;
         recoverQuantity = (int)(this.rate * troop.OrientationTroop.Army.Kind.MinScale);
         if (recoverQuantity > troop.OrientationTroop.InjuryQuantity)
         {
             recoverQuantity = troop.OrientationTroop.InjuryQuantity;
         }
         troop.OrientationTroop.IncreaseQuantity(recoverQuantity);
         troop.OrientationTroop.InjuryQuantity -= recoverQuantity;
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, false, false, false))
         {
             troop2.PreAction = TroopPreAction.恢复;
             recoverQuantity = (int)(this.rate * troop2.Army.Kind.MinScale);
             if (recoverQuantity > troop2.InjuryQuantity)
             {
                 recoverQuantity = troop2.InjuryQuantity;
             }
             troop2.IncreaseQuantity(recoverQuantity);
             troop2.OrientationTroop.InjuryQuantity -= recoverQuantity;
         }
     }
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:29,代码来源:InfluenceKind399.cs


示例14: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.MultipleOfDefenceOnArchitecture < this.multiple)
     {
         troop.MultipleOfDefenceOnArchitecture = this.multiple;
     }
 }
开发者ID:simon217,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind607.cs


示例15: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.ProhibitStratagem = true;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind851.cs


示例16: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.IncrementOfRationDays < this.increment)
     {
         troop.IncrementOfRationDays = this.increment;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind615.cs


示例17: PurifyInfluenceKind

 public override void PurifyInfluenceKind(Troop troop)
 {
     if (troop != null)
     {
         troop.YesOrNoOfObliqueView = false;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind270.cs


示例18: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.DecrementOfCombatMethodCombativityConsuming < this.decrement)
     {
         troop.DecrementOfCombatMethodCombativityConsuming = this.decrement;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind604.cs


示例19: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.MoraleDecrementOnPrestige < this.decrement)
     {
         troop.MoraleDecrementOnPrestige = this.decrement;
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:7,代码来源:InfluenceKind602.cs


示例20: 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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GameObjects.TroopList类代码示例发布时间:2022-05-26
下一篇:
C# GameObjects.PersonList类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap