コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
            }
        }
コード例 #3
0
 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;
                 }
             }
         }
     }
 }
コード例 #4
0
 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));
 }
コード例 #5
0
 public void ApplyInfluence(Faction faction, Applier applier, int applierID)
 {
     foreach (Influence influence in this.Influences.Values)
     {
         influence.ApplyInfluence(faction, applier, applierID);
     }
 }
コード例 #6
0
 public override void PurifyInfluenceKind(Faction faction)
 {
     if (faction.TechniqueMilitaryKinds.MilitaryKinds.ContainsKey(this.kind))
     {
         faction.TechniqueMilitaryKinds.MilitaryKinds.Remove(this.kind);
     }
 }
コード例 #7
0
        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;
            }
        }
コード例 #8
0
 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));
 }
コード例 #9
0
        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;
            }
        }
コード例 #10
0
        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;
            }
        }
コード例 #11
0
 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));
 }
コード例 #12
0
 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);
 }
コード例 #13
0
ファイル: GameArea.cs プロジェクト: skicean/ZhongHuaSanGuoZhi
 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);
         }
     }
 }
コード例 #14
0
 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));
 }
コード例 #15
0
 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);
             }
         }
     }
 }
コード例 #16
0
        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;
            }
        }
コード例 #17
0
 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;
 }
コード例 #18
0
 private void dgvFactions_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (!this.dgvFactions.IsCurrentCellInEditMode)
     {
         this.SelectedFaction = this.dgvFactions.SelectedRows[0].DataBoundItem as Faction;
         base.Close();
     }
 }
コード例 #19
0
 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;
     }
 }
コード例 #20
0
 public override bool CheckConditionKind(Faction faction)
 {
     int result = 0;
     foreach (Person p in faction.Persons)
     {
         result += p.TreasureCount;
     }
     return result < number;
 }
コード例 #21
0
 public override bool CheckConditionKind(Faction faction)
 {
     int result = 0;
     foreach (Architecture a in faction.Architectures)
     {
         result += a.feiziliebiao.Count;
     }
     return result < val;
 }
コード例 #22
0
 public override bool CheckConditionKind(Faction faction)
 {
     int result = 0;
     foreach (Architecture a in faction.Architectures)
     {
         result += a.meinvkongjian();
     }
     return result - faction.feiziCount() < val;
 }
コード例 #23
0
 public override bool CheckConditionKind(Faction faction)
 {
     foreach (Architecture a in faction.Architectures)
     {
         if (a.ID == this.val)
         {
             return false;
         }
     }
     return true;
 }
コード例 #24
0
 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);
     }
 }
コード例 #25
0
 public override void PurifyInfluenceKind(Faction faction)
 {
     faction.IncrementOfRoutewayRadius -= this.increment;
     if (faction.Scenario.NewInfluence)
     {
         foreach (Routeway routeway in faction.Routeways)
         {
             routeway.ReGenerateRoutePointArea();
         }
     }
 }
コード例 #26
0
 public override bool CheckConditionKind(Faction faction)
 {
     foreach (Person p in faction.Persons)
     {
         if (this.CheckConditionKind(p))
         {
             return true;
         }
     }
     return false;
 }
コード例 #27
0
 public bool IsFactionInQueue(Faction faction)
 {
     foreach (Faction faction2 in this.factionQueue)
     {
         if (faction2 == faction)
         {
             return true;
         }
     }
     return false;
 }
コード例 #28
0
 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;
 }
コード例 #29
0
 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);
         }
     }
 }
コード例 #30
0
 public override bool CheckConditionKind(Faction a)
 {
     int i = 0;
     foreach (Person p in a.Persons)
     {
         if (p.Glamour < val)
         {
             i++;
         }
     }
     return i >= cnt;
 }