public override void ApplyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.AntiArrowChanceIncrementOfBubing += this.increment; break; case 1: faction.AntiArrowChanceIncrementOfNubing += this.increment; break; case 2: faction.AntiArrowChanceIncrementOfQibing += this.increment; break; case 3: faction.AntiArrowChanceIncrementOfShuijun += this.increment; break; case 4: faction.AntiArrowChanceIncrementOfQixie += this.increment; break; } }
public override void ApplyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.OffenceRateOfBubing += this.rate; break; case 1: faction.OffenceRateOfNubing += this.rate; break; case 2: faction.OffenceRateOfQibing += this.rate; break; case 3: faction.OffenceRateOfShuijun += this.rate; break; case 4: faction.OffenceRateOfQixie += this.rate; break; } }
public void RunQueue() { if (this.RunningFaction != null) { if (this.RunningFaction.Run()) { this.RunningFaction = null; } } else if (!this.QueueEmpty) { this.RunningFaction = this.factionQueue.Dequeue(); if (this.RunningFaction != null) { if (this.RunningFaction.Leader.BelongedFaction == null) { this.RunningFaction = null; } else { this.RunningFaction.Scenario.CurrentFaction = this.RunningFaction; if (this.RunningFaction.Run()) { this.RunningFaction = null; } } } } }
public void addKingDeathEntry(GameDate date, Person p, Faction oldFaction) { this.addTableEntry(date, composeFactionList(oldFaction), String.Format(yearTableStrings["kingDeath"], oldFaction.Name, p.Name, p.Age), true); this.addPersonInGameBiography(oldFaction.Leader, date, String.Format(yearTableStrings["kingDeath_p"], oldFaction.Name, p.Name, p.Age)); }
public void ApplyInfluence(Faction faction, Applier applier, int applierID) { foreach (Influence influence in this.Influences.Values) { influence.ApplyInfluence(faction, applier, applierID); } }
public override void PurifyInfluenceKind(Faction faction) { if (faction.TechniqueMilitaryKinds.MilitaryKinds.ContainsKey(this.kind)) { faction.TechniqueMilitaryKinds.MilitaryKinds.Remove(this.kind); } }
public override void PurifyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.DefenceRateWhileCombatMethodOfBubing -= this.rate; break; case 1: faction.DefenceRateWhileCombatMethodOfNubing -= this.rate; break; case 2: faction.DefenceRateWhileCombatMethodOfQibing -= this.rate; break; case 3: faction.DefenceRateWhileCombatMethodOfShuijun -= this.rate; break; case 4: faction.DefenceRateWhileCombatMethodOfQixie -= this.rate; break; } }
public void addBecomeEmperorLegallyEntry(GameDate date, Person oldEmperor, Faction f) { this.addTableEntry(date, composeFactionList(f), String.Format(yearTableStrings["becomeEmperorLegally"], oldEmperor.Name, f.Name, f.Leader.Name), true); this.addPersonInGameBiography(f.Leader, date, String.Format(yearTableStrings["becomeEmperorLegally_p"], oldEmperor.Name, f.Name, f.Leader.Name)); }
public override void PurifyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.NoCounterChanceIncrementOfBubing -= this.increment; break; case 1: faction.NoCounterChanceIncrementOfNubing -= this.increment; break; case 2: faction.NoCounterChanceIncrementOfQibing -= this.increment; break; case 3: faction.NoCounterChanceIncrementOfShuijun -= this.increment; break; case 4: faction.NoCounterChanceIncrementOfQixie -= this.increment; break; } }
public override void PurifyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.AllowAttackAfterMoveOfBubing = false; break; case 1: faction.AllowAttackAfterMoveOfNubing = false; break; case 2: faction.AllowAttackAfterMoveOfQibing = false; break; case 3: faction.AllowAttackAfterMoveOfShuijun = false; break; case 4: faction.AllowAttackAfterMoveOfQixie = false; break; } }
public void addAdvanceGuanjueEntry(GameDate date, Faction f, guanjuezhongleilei guanjue) { this.addTableEntry(date, composeFactionList(f), String.Format(yearTableStrings["advanceGuanjue"], f.Name, guanjue.Name), true); this.addPersonInGameBiography(f.Leader, date, String.Format(yearTableStrings["advanceGuanjue_p"], f.Name, guanjue.Name)); }
public bool CheckCondition(Faction faction, Event e) { if (this.Kind == null) return false; this.Kind.InitializeParameter(this.Parameter); this.Kind.InitializeParameter2(this.Parameter2); return this.Kind.CheckConditionKind(faction, e) || this.Kind.CheckConditionKind(faction); }
private static void CheckPoint(GameArea Area, List<Point> BlackAngles, Point point, GameScenario Scenario, Faction faction) { TerrainDetail terrainDetailByPosition = Scenario.GetTerrainDetailByPosition(point); if (terrainDetailByPosition != null) { if (terrainDetailByPosition.ViewThrough) { if (faction != null) { Architecture architectureByPosition = Scenario.GetArchitectureByPosition(point); if (!(architectureByPosition == null || architectureByPosition.Endurance <= 0 || faction.IsFriendlyWithoutTruce(architectureByPosition.BelongedFaction))) { BlackAngles.Add(point); return; } } if (!IsInBlackAngle(Area.Centre, BlackAngles, point)) { Area.AddPoint(point); } } else { BlackAngles.Add(point); } } }
public void addChangeKingEntry(GameDate date, Person p, Faction oldFaction, Person oldLeader) { this.addTableEntry(date, composeFactionList(oldFaction), String.Format(yearTableStrings["changeKing"], oldFaction.Name, p.Name, oldLeader.Name), true); this.addPersonInGameBiography(p, date, String.Format(yearTableStrings["changeKing_p"], oldFaction.Name, p.Name, oldLeader.Name)); }
public void ApplyInfluenceKind(Faction faction, Influence i, Applier applier, int applierID) { if (this.Type == InfluenceType.势力) { ApplyInfluenceKind(faction); foreach (Architecture a in faction.Architectures) { ApplyingArchitecture z = new ApplyingArchitecture(a, applier, applierID); if (!i.appliedArch.Contains(z)) { i.appliedArch.Add(z); ApplyInfluenceKind(a, i, applier, applierID); } } foreach (Troop t in faction.Troops) { ApplyingTroop a = new ApplyingTroop(t, applier, applierID); if (!i.appliedTroop.Contains(a)) { i.appliedTroop.Add(a); ApplyInfluenceKind(t, i, applier, applierID); } } } }
public override void PurifyInfluenceKind(Faction faction) { switch (this.type) { case 0: faction.AntiCriticalStrikeChanceIncrementWhileCombatMethodOfBubing -= this.increment; break; case 1: faction.AntiCriticalStrikeChanceIncrementWhileCombatMethodOfNubing -= this.increment; break; case 2: faction.AntiCriticalStrikeChanceIncrementWhileCombatMethodOfQibing -= this.increment; break; case 3: faction.AntiCriticalStrikeChanceIncrementWhileCombatMethodOfShuijun -= this.increment; break; case 4: faction.AntiCriticalStrikeChanceIncrementWhileCombatMethodOfQixie -= this.increment; break; } }
public override void ApplyEffectKind(Faction f, Event e) { GameObjects.FactionDetail.Technique technique = f.Scenario.GameCommonData.AllTechniques.GetTechnique(increment); f.AvailableTechniques.AddTechnique(technique); f.Scenario.NewInfluence = true; technique.Influences.ApplyInfluence(f, GameObjects.Influences.Applier.Technique, increment); f.Scenario.NewInfluence = false; }
private void dgvFactions_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { if (!this.dgvFactions.IsCurrentCellInEditMode) { this.SelectedFaction = this.dgvFactions.SelectedRows[0].DataBoundItem as Faction; base.Close(); } }
public override void ApplyEffectKind(Faction f, Event e) { GameObjectList d = base.Scenario.DiplomaticRelations.GetDiplomaticRelationListByFactionID(f.ID); foreach (GameObjects.FactionDetail.DiplomaticRelation i in d) { i.Relation += increment; } }
public override bool CheckConditionKind(Faction faction) { int result = 0; foreach (Person p in faction.Persons) { result += p.TreasureCount; } return result < number; }
public override bool CheckConditionKind(Faction faction) { int result = 0; foreach (Architecture a in faction.Architectures) { result += a.feiziliebiao.Count; } return result < val; }
public override bool CheckConditionKind(Faction faction) { int result = 0; foreach (Architecture a in faction.Architectures) { result += a.meinvkongjian(); } return result - faction.feiziCount() < val; }
public override bool CheckConditionKind(Faction faction) { foreach (Architecture a in faction.Architectures) { if (a.ID == this.val) { return false; } } return true; }
public virtual void ApplyEffectKind(Faction faction, Event e) { foreach (Person p in faction.Persons) { this.ApplyEffectKind(p, e); } foreach (Architecture a in faction.Architectures) { this.ApplyEffectKind(a, e); } }
public override void PurifyInfluenceKind(Faction faction) { faction.IncrementOfRoutewayRadius -= this.increment; if (faction.Scenario.NewInfluence) { foreach (Routeway routeway in faction.Routeways) { routeway.ReGenerateRoutePointArea(); } } }
public override bool CheckConditionKind(Faction faction) { foreach (Person p in faction.Persons) { if (this.CheckConditionKind(p)) { return true; } } return false; }
public bool IsFactionInQueue(Faction faction) { foreach (Faction faction2 in this.factionQueue) { if (faction2 == faction) { return true; } } return false; }
public override bool CheckConditionKind(Faction faction) { int c = 0; foreach (Architecture a in faction.Architectures) { if (a.LocationState.ID == this.val) { c++; } } return c >= val; }
public override void PurifyInfluenceKind(Faction faction) { faction.RateOfRoutewayConsumption -= 1 - this.rate; if (faction.Scenario.NewInfluence) { faction.ClosedRouteways.Clear(); foreach (Routeway routeway in faction.Routeways) { routeway.ResetRoutePointConsumptionRate(this.rate); } } }
public override bool CheckConditionKind(Faction a) { int i = 0; foreach (Person p in a.Persons) { if (p.Glamour < val) { i++; } } return i >= cnt; }