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; }
public void RemoveContactingTroop(Troop troop) { if (this.ContactingTroops != null) { this.ContactingTroops.Remove(troop); } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.GetCurrentStratagemSuccess(null, false, false, false)) { troop.Scenario.SetPositionOnFire(troop.SelfCastPosition); } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null && troop.RateOfMovability < this.rate) { troop.RateOfMovability = this.rate; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.ImmunityOfCaptive = false; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null) { troop.YesOrNoOfObliqueView = true; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.AreaStratagemRadius < this.radius) { troop.AreaStratagemRadius = this.radius; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.ChanceIncrementOfChaosAfterCriticalStrike -= this.increment; } }
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; }
public override void ApplyInfluenceKind(Troop troop) { if (troop.CombativityDecrementOnPower < this.decrement) { troop.CombativityDecrementOnPower = this.decrement; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.BaseDefenceConsidered = 0; } }
public void ApplyEventDialogs(Troop troop) { if (this.OnApplyTroopEvent != null) { this.OnApplyTroopEvent(this, troop); } }
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; } } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.MultipleOfDefenceOnArchitecture < this.multiple) { troop.MultipleOfDefenceOnArchitecture = this.multiple; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null) { troop.ProhibitStratagem = true; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.IncrementOfRationDays < this.increment) { troop.IncrementOfRationDays = this.increment; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.YesOrNoOfObliqueView = false; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.DecrementOfCombatMethodCombativityConsuming < this.decrement) { troop.DecrementOfCombatMethodCombativityConsuming = this.decrement; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop.MoraleDecrementOnPrestige < this.decrement) { troop.MoraleDecrementOnPrestige = this.decrement; } }
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); }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.IncrementOfMovability -= this.increment; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null) { troop.ImmunityOfDieInBattle = true; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.RateOfMovability = 1f; } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.ProhibitCombatMethod = false; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null) { troop.ImmunityOfCaptive = true; } }
public override void ApplyInfluenceKind(Troop troop) { if (troop != null) { troop.ProhibitCombatMethod = true; } }
public void RemoveOffencingTroop(Troop troop) { if (this.OffencingTroops != null) { this.OffencingTroops.Remove(troop); } }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.ProhibitStratagem = false; } }
public bool CheckCondition(Troop troop, Event e) { if (this.Kind == null) return false; this.Kind.InitializeParameter(this.Parameter); this.Kind.InitializeParameter2(this.Parameter2); return this.Kind.CheckConditionKind(troop, e) || this.Kind.CheckConditionKind(troop); }
public override void PurifyInfluenceKind(Troop troop) { if (troop != null) { troop.RateOfQibingDamage = troop.BaseRateOfQibingDamage; } }