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


C# Troop.GetCurrentStratagemSuccess方法代码示例

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


在下文中一共展示了Troop.GetCurrentStratagemSuccess方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

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

示例2: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, false, false, false))
     {
         troop.OrientationTroop.SetRecoverFromChaos();
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, false, false, false))
         {
             troop2.SetRecoverFromChaos();
         }
     }
 }
开发者ID:k45399735,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:InfluenceKind395.cs

示例3: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, troop.InevitableRaoluanOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, (troop.OrientationTroop.NeverBeIntoChaos || troop.OrientationTroop.OutburstNeverBeIntoChaos) || troop.OrientationTroop.InvincibleRaoluan, troop.OrientationTroop.InvincibleStratagemFromLowerIntelligence))
     {
         troop.OrientationTroop.SetChaos(troop.GenerateCastChaosDay(this.maxDays));
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, troop.InevitableRaoluanOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, (troop2.NeverBeIntoChaos || troop2.OutburstNeverBeIntoChaos) || troop2.InvincibleRaoluan, troop2.InvincibleStratagemFromLowerIntelligence))
         {
             troop2.SetChaos(troop.GenerateCastChaosDay(this.maxDays));
         }
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:InfluenceKind391.cs

示例4: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, troop.InevitableHuogongOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, troop.OrientationTroop.InvincibleHuogong, troop.OrientationTroop.InvincibleStratagemFromLowerIntelligence))
     {
         troop.OrientationTroop.SetOnFire(troop.GenerateFireDamageScale(this.scale, troop.Scenario.GetTerrainDetailByPositionNoCheck(troop.OrientationTroop.Position)));
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, troop.InevitableHuogongOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, troop2.InvincibleHuogong, troop2.InvincibleStratagemFromLowerIntelligence))
         {
             troop2.SetOnFire(troop.GenerateFireDamageScale(this.scale, troop.Scenario.GetTerrainDetailByPositionNoCheck(troop2.Position)));
         }
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:InfluenceKind394.cs

示例5: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, troop.InevitableGongxinOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, troop.OrientationTroop.InvincibleGongxin, troop.OrientationTroop.InvincibleStratagemFromLowerIntelligence))
     {
         troop.ApplyGongxin(troop.OrientationTroop, this.baseDecrement);
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, troop.InevitableGongxinOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, troop2.InvincibleGongxin, troop2.InvincibleStratagemFromLowerIntelligence))
         {
             troop.ApplyGongxin(troop2, this.baseDecrement);
         }
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:14,代码来源:InfluenceKind390.cs

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

示例7: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, false, false, false))
     {
         troop.OrientationTroop.PreAction = TroopPreAction.鼓舞;
         troop.OrientationTroop.IncreaseMorale(troop.GenerateBoostIncrement(this.baseIncrement));
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2, false, false, false))
         {
             troop2.PreAction = TroopPreAction.鼓舞;
             troop2.IncreaseMorale(troop.GenerateBoostIncrement(this.baseIncrement));
         }
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:16,代码来源:InfluenceKind397.cs

示例8: ApplyInfluenceKind

 public override void ApplyInfluenceKind(Troop troop)
 {
     if (troop.GetCurrentStratagemSuccess(troop.OrientationTroop, 
         troop.InevitableAttractOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence, 
         troop.OrientationTroop.InvincibleAttract, troop.OrientationTroop.InvincibleStratagemFromLowerIntelligence))
     {
         troop.OrientationTroop.SetAttract(troop, troop.GenerateCastAttractDay(this.maxDays));
     }
     foreach (Troop troop2 in troop.AreaStratagemTroops)
     {
         if (troop.GetCurrentStratagemSuccess(troop2,
             troop.InevitableAttractOnLowerIntelligence || troop.InevitableStratagemOnLowerIntelligence,
             troop2.InvincibleAttract, troop2.InvincibleStratagemFromLowerIntelligence))
         {
             troop2.SetAttract(troop, troop.GenerateCastAttractDay(this.maxDays));
         }
     }
 }
开发者ID:skicean,项目名称:ZhongHuaSanGuoZhi,代码行数:18,代码来源:InfluenceKind721.cs


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