/// <summary> /// 歩兵用鎖かたびらの研究を行います。 /// </summary> public ResearchChainMail() : base(ri.chain_mail) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.InfantryGroup, relop.ge, 10) ); }
/// <summary> /// 騎士が指定の数いたら血統の研究を行います。 /// </summary> public ResearchBloodlines() : base(ri.bloodlines) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.CavalryGroup, relop.ge, 5) ); }
/// <summary> /// 歩兵用うろこの鎧の研究を行います。 /// </summary> public ResearchScaleMail() : base(ri.scale_mail) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.InfantryGroup, relop.ge, 5) ); }
/// <summary> /// 騎馬用甲冑を研究します。 /// </summary> public ResearchPlateBarding() : base(ri.plate_barding) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.CavalryGroup, relop.ge, 10) ); }
/// <summary> /// 斥候系列を生産します。 /// </summary> public TrainScoutCavalryLine(short count) : base(unit.scout_cavalry_line, count) { Facts.Add( new food_amount(relop.ge, 800) | !new unit_available(unit.knight_line) ); }
/// <summary> /// 小手の研究を行います。 /// </summary> public ResearchBracer() : base(ri.bracer) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.ArcherGroup, relop.ge, 10) ); }
public void SaveFacts(List <InstanceFact> factstosave) { if (factstosave == null) { factstosave = new List <InstanceFact>(); } foreach (var fact in factstosave) { fact.SetFromString(fact.FactString); InstanceFact factitem = null; var intkeys = this.GetFactIntKey(fact.FactString); if (FactDictionary.FactsByInstanceKey.ContainsKey(intkeys)) { var factsforkey = FactDictionary.FactsByInstanceKey[intkeys]; } if (factitem == null) { FactDictionary.AddFact(fact); Facts.Add(fact); factitem = fact; } else { factitem.Value = fact.Value; } } SaveToJson(); }
/// <summary> /// 騎兵の研究を行います。 /// </summary> public ResearchLightCavalry() : base(ri.light_cavalry) { Facts.Add( new food_amount(relop.ge, 500) | !new unit_available(unit.knight_line) ); }
/// <summary> /// 人力起重機の研究を行います。 /// </summary> public ResearchStonecutting() : base(ri.stonecutting) { Facts.Add( new food_amount(relop.ge, 600), new wood_amount(relop.ge, 400) ); }
/// <summary> /// 射手用胸当ての研究を行います。 /// </summary> public ResearchPaddedArcherArmor() : base(ri.padded_archer_armor) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.archer_line, relop.ge, 5) ); }
private void UpdateExistingFactByFactType(int id, string factType, string factValue, DateTime factStartDate, DateTime factEndDate) { bool foundIt = false; // locate existing fact PersonFact fact = (from temp in Facts where temp.FactType == factType select temp).FirstOrDefault(); if (fact == null) { fact = new PersonFact(); fact.Person = this; fact.Id = id; } else { foundIt = true; } fact.FactType = factType; fact.FactValue = factValue; fact.StartDate = factStartDate; fact.EndDate = factEndDate; if (foundIt == false) { Facts.Add(fact); } }
/// <summary> /// ユニークユニットを指定の数になるまで生産します。 /// </summary> /// <param name="count"></param> public TrainUniqueUnit(short count) : base(unit.my_unique_unit_line, count) { Facts.Add( new ResourceAmount(unit.villager) ); }
/// <summary> /// 指定の建物が指定の数できたら鉄工所を指定の数になるまで建設します。 /// </summary> /// <param name="count">建設する最大数</param> /// <param name="required">必要な建物</param> /// <param name="requiredCount">必要な建物の数</param> public BuildBlackSmith(short count, building required, short requiredCount) : base(building.blacksmith, count) { Facts.Add( new building_type_count_total(required, relop.ge, requiredCount) ); }
/// <summary> /// 最初の2件の採掘所は金と石それぞれ掘る人が割り当てられたら採掘所を建設します /// </summary> public BuildMiningCamp(resource_type resourceType) : base(2) { short buildingCount; sn resGathererPct; switch (resourceType) { case resource_type.gold: buildingCount = 0; Comment += string.Format($":{buildingCount + 1}軒目(金)"); resGathererPct = sn.gold_gatherer_percentage; break; case resource_type.stone: buildingCount = 1; resGathererPct = sn.stone_gatherer_percentage; Comment += string.Format($":{buildingCount + 1}軒目(石)"); break; case resource_type.food: case resource_type.wood: default: throw new ArgumentException(null, nameof(resourceType)); } Facts.Add( new strategic_number(resGathererPct, relop.ge, 1), new building_type_count_total(building.archery_range, relop.ge, buildingCount), new building_type_count_total(building.mining_camp, relop.eq, buildingCount) ); }
/// <summary> /// 金または石と採掘所の距離が指定の値まで離れると採掘所を指定の数建設します。 /// </summary> public BuildMiningCamp() { Distance = 3; Facts.Add( new ResourceAmount(building.house, building.mining_camp), new building_type_count_total(building.mining_camp, relop.ge, 3)); }
/// <summary> /// 繁殖の研究を行います。 /// </summary> public ResearchHusbandry() : base(ri.husbandry) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.CavalryGroup, relop.ge, 10) ); }
/// <summary> /// 射手用革の鎧の研究を行います。 /// </summary> public ResearchLeatherArcherArmor() : base(ri.leather_archer_armor) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.ArcherGroup, relop.ge, 10) ); }
/// <summary> /// 投石機を生産します。 /// </summary> public TrainMangonel() : base(unit.mangonel) { Facts.Add( new town_under_attack() | new players_unit_type_count(player_number.any_enemy, unit.ArcherGroup, relop.ge, 10) | !new players_unit_type_count(player_number.any_enemy, unit.knight_line, relop.ge, 5) ); }
/// <summary> /// イーグルウォーリアを生産します。 /// </summary> public TrainEagleWarrior(short count) : base(unit.eagle_warrior_line, count) { Facts.Add( new ResourceAmount(unit.eagle_warrior_line, unit.trade_cart).Gold, new ResourceAmount(unit.eagle_warrior_line, unit.villager).Food ); }
/// <summary> /// 鋳造の研究を行います。 /// </summary> public ResearchIronCasting() : base(ri.iron_casting) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.InfantryGroup, relop.ge, 10) | new unit_type_count_total(unit.CavalryGroup, relop.ge, 10) ); }
/// <summary> /// 機織りの研究を行います /// </summary> /// <param name="villagerCount"></param> public ResearchLoom(short villagerCount) : base(ri.loom) { //町の人が生産できないとき、または猪狩りに行く前に研究を行う Facts.Add( !new can_train(unit.villager) | new unit_type_count(unit.villager, relop.ge, villagerCount) ); }
/// <summary> /// 高温溶鉱炉の研究を行います。 /// </summary> public ResearchBlastFurnace() : base(ri.blast_furnace) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.InfantryGroup, relop.ge, 10) | new unit_type_count_total(unit.CavalryGroup, relop.ge, 10) ); }
/// <summary> /// 森と伐採所の距離が指定の値まで離れると伐採所を指定の数建設します。 /// </summary> public BuildLumberCamp() { Distance = 3; Facts.Add( new building_type_count_total(building.lumber_camp, relop.ge, 3) & new ResourceAmount(building.house, building.lumber_camp) ); }
/// <summary> /// 鍛造の研究を行います。 /// </summary> public ResearchForging() : base(ri.forging) { Facts.Add( new town_under_attack(), new unit_type_count_total(unit.CavalryGroup, relop.ge, 5) | new unit_type_count_total(unit.InfantryGroup, relop.ge, 5) ); }
/// <summary> /// 学問所を指定の数になるまで建設します。 /// </summary> public BuildUniversity(short count) : base(building.university, count) { Facts.Add( new ResourceAmount(building.university, building.house), new building_type_count_total( building.town_center, relop.ge, 2) ); }
/// <summary> /// 荷馬車を生産します。 /// </summary> public TrainTradeCart(short count) : base(unit.trade_cart, count) { Facts.Add( ComplexConditions.AnyAllyHasMarket(), new ResourceAmount(building.house, building.town_center).Wood, new ResourceAmount(unit.trade_cart).Gold ); }
/// <summary> /// 降参するまでのゲーム内時間を設定します /// </summary> /// <param name="second">秒単位を数値で設定します。</param> public ResignTimeout(short second) { Comment = "おつ(′・ω・`;" + second / 60 + "分以上経過"; Facts.Add( new game_time(relop.ge, second), !new player_in_game(player_number.any_ally)//同盟がいない時のみ降参する ); Actions.Add(new resign()); }
/// <summary> /// 降参するまでのゲーム内時間を設定します /// </summary> /// <param name="second">秒単位を数値で設定します。</param> /// <param name="villagerCount">降参しないための町の人の人数</param> public ResignTimeout(short second, short villagerCount) { Comment = "おつ(′・ω・`;" + second / 60 + "分以上経過" + villagerCount + "人以下"; Facts.Add( new game_time(relop.ge, second), !new player_in_game(player_number.any_ally), //同盟がいない時のみ降参する new unit_type_count(unit.villager, relop.lt, villagerCount)); Actions.Add(new resign()); }
/// <summary> /// 食料を見つけた条件によって指定の数まで粉引き所を立てます。 /// </summary> public BuildMill(short CountMax) : base(CountMax) { Comment += ":遠方の食料"; Facts.Add(new game_time(relop.ge, 150), new building_type_count_total(building.mill, relop.lt, 3) | new ResourceAmount(building.mill, building.archery_range, building.house, building.farm) ); }
/// <summary> /// 資源が余っていたら騎兵育成所を建設します。 /// </summary> public BuildStable() : base(building.stable) { Facts.Add( new building_type_count_total(building.town_center, relop.ge, 2), new building_type_count_total(building.university, relop.ge, 1), new ResourceAmount(building.house, building.stable, building.siege_workshop).Wood, new ResourceAmount(unit.villager, unit.knight, unit.knight) ); }