本文整理汇总了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;
}
}
}
示例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();
}
}
}
示例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));
}
}
}
示例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)));
}
}
}
示例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);
}
}
}
示例6: ApplyInfluenceKind
public override void ApplyInfluenceKind(Troop troop)
{
if (troop.GetCurrentStratagemSuccess(null, false, false, false))
{
troop.Scenario.SetPositionOnFire(troop.SelfCastPosition);
}
}
示例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));
}
}
}
示例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));
}
}
}