static CharmLibrary() { List <Charm> Charms = Utils.LoadCharms().Charms; foreach (Charm c in Charms) { switch (c.Ability) { case Ability.Archery: { Archery.Add(c); break; } case Ability.Athletics: { Athletics.Add(c); break; } case Ability.Awareness: { Awareness.Add(c); break; } default: { break; } } } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { Archery ___test = new Archery(); ___test.run_test(-1); } catch(Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
// END CUT HERE // BEGIN CUT HERE public static void Main() { try { Archery ___test = new Archery(); ___test.run_test(-1); } catch (Exception e) { //Console.WriteLine(e.StackTrace); Console.WriteLine(e.ToString()); } }
public SkillTree() { HeavyArmour = new HeavyArmour(); LightArmour = new SkillLightArmour(); SharpWeapons = new SharpWeapons(); BluntWeapons = new BluntWeapons(); Archery = new Archery(); OffensiveMagic = new OffensiveMagic(); DefensiveMagic = new DefensiveMagic(); PassiveMagic = new PassiveMagic(); }
private static void Main(string[] args) { var archery = new Archery("Лучник1", 10); var archery2 = archery.Clone() as Archery; archery2.Name = "Лучник2"; archery2.ArrowsCount = 15; var archery3 = archery2.DeepCopy() as Archery; archery3.Name = "Лучник3"; archery3.ArrowsCount = 20; }
private void ExecuteBuildCommand(string[] commandArgs) { switch (commandArgs[1]) { case "barracks": var barracks = new Barracks(); // factory should do this this.database.AddBuilding(barracks); this.ExecuteTurnsPassed(barracks); break; case "archery": var archery = new Archery(); this.database.AddBuilding(archery); this.ExecuteTurnsPassed(archery); break; default: throw new InvalidOperationException("There is no such building."); } }
public void Card_ArcheryAction1() { //testGame.Players[1].SelectsCards = new List<int>() { 0 }; bool result = new Archery().Actions.ToList()[0].ActionHandler(new CardActionParameters { TargetPlayer = testGame.Players[1], Game = testGame, ActivePlayer = testGame.Players[0], PlayerSymbolCounts = new Dictionary <IPlayer, Dictionary <Symbol, int> >() }); Assert.AreEqual(true, result); Assert.AreEqual(4, testGame.Players[0].Hand.Count); Assert.AreEqual(1, testGame.Players[0].Hand.Where(x => x.Age == 2).Count()); Assert.AreEqual(2, testGame.Players[1].Hand.Count); Assert.AreEqual(0, testGame.Players[1].Hand.Where(x => x.Age == 2).Count()); Assert.AreEqual(0, testGame.Players[0].Tableau.ScorePile.Count); Assert.AreEqual(0, testGame.Players[1].Tableau.ScorePile.Count); Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Blue].Cards.Count); Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Green].Cards.Count); Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Red].Cards.Count); Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Purple].Cards.Count); Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Yellow].Cards.Count); }
public void ActivateStructure() { currentModelSection = 0; // reset the model section underConstruction = false; if (completedModel != null) { completedModel.SetActive(true); } else { models [models.Length - 1].SetActive(true); } // Position all pieces of structure which haven't been placed yet for (int i = 0; i < models.Length; i++) { models [i].transform.localPosition = Vector3.zero; models [i].transform.localRotation = Quaternion.Euler(-180, 0, 0); } // NPCs upgrade when structure is repaired fully (opposite to the DamageStructure method) for (int i = 0; i < residentNPCs.Count; i++) { residentNPCs[i].UpgradeStats(); } // for (int i = 0; i < models.Length; i++) { // if (i == level) { // models [i].SetActive (true); // } else { // models [i].SetActive (false); // } // } // completed builds on platforms if (housing) { House houseScript = GetComponent <House>(); houseScript.Activate(); kingScript.housingPlatformsUnderConstruction.Remove(this); kingScript.builtHousingPlatforms.Add(this); } else if (farming) { Farm farmScript = GetComponent <Farm>(); farmScript.Activate(); kingScript.farmingPlatformsUnderConstruction.Remove(this); kingScript.builtFarmingPlatforms.Add(this); } else if (workshop) { Workshop workshopScript = GetComponent <Workshop>(); workshopScript.Activate(); kingScript.workshopPlatformsUnderConstruction.Remove(this); kingScript.builtWorkshopPlatforms.Add(this); } else if (mine) { kingScript.miningPlatformsUnderConstruction.Remove(this); kingScript.builtMiningPlatforms.Add(this); } else if (archery) { Archery archeryScript = GetComponent <Archery>(); archeryScript.Activate(); kingScript.archeryPlatformsUnderConstruction.Remove(this); kingScript.builtArcheryPlatforms.Add(this); } }