public Chapel(Village ownerVillage) : base(ownerVillage) { AddFaith = 5; AddHapiness = 0; EnterPrice = 0; }
public Meeting(Family f) : base(f.Game) { _family = f; _village = f.OwnerVillage; Convocate(); }
internal UpgradesModel(Game g, Village v) : base(g) { _isActivated = new HistorizedValue<bool, UpgradesModel>(this, "IsActivated", 5); _owner = v; IsActivated = false; }
public Fertilizer(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 1000; IsActivated = false; _selected = _jobs.Farmer; _owner = v; }
public Level3(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g,v) { CostPrice = 800; IsActivated = false; _selected = _jobs.Cooker; _owner = v; }
public Scarecrow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 500; IsActivated = false; _selected = _jobs.Farmer; _owner = v; }
internal Saw(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 600; IsActivated = false; _selected = _jobs.Blacksmith; _owner = v; }
internal SamhainFest(Village v) : base(v.Game) { _duration = 15; _timer = _duration; _village = v; ActOnvillagers(v); }
internal Whitewash(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 100; IsActivated = false; _selected = _jobs.Cooker; _owner = v; }
internal Pulley(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g, v) { CostPrice = 200; IsActivated = false; _selected = _jobs.Construction_Worker; _owner = v; }
public Plow(Game g, Village v, UpgradesList _listOfUpgrades, JobList _jobs) : base(g,v) { CostPrice = 1000; IsActivated = false; _selected = _jobs.Blacksmith; _owner = v; _jobsList = _jobs; }
public ApothecaryOffice(Village v, JobsModel job) : base(v) { Name = "Pharmacie"; _name = Name; Hp = MaxHp = 50; _job = job; this.CostPrice = 200; }
public void ActOnvillagers(Village village) { foreach (Family family in village.FamiliesList) foreach (Villager villager in family.FamilyMembers) { //if (!villager.IsHeretic()) villager.FestStarted(); villager.AddOrRemoveHappiness(3); villager.AddOrRemoveFaith(2); } }
internal BuildingsModel(Village ownerVillage) : base(ownerVillage.Game) { _horizontalPos = 0; _verticalPos = 0; _addedHappiness = 0; _addedFaith = 0; _enterPrice = 0; //_robustness = 0; _isBought = false; _ownerVillage = ownerVillage; ownerVillage.AddBuildingIntheList(this); //needs to be in village ! }
//public void AffectMissionToVillager(Villager villager, Missions expectedMission) //{ // if (expectedMission != villager.Mission) // { // villager.Mission = expectedMission; // } //} internal override void OnDestroy() { _village.MeetingEnded(); _village = null; _family = null; }
// Village Methods /// <summary> /// Create new village "Name" /// </summary> /// <param name="name"></param> /// <returns></returns> public Village CreateVillage(string name) { if (String.IsNullOrWhiteSpace(name)) throw new ArgumentNullException(@"(game, CreateVillage) Invalid name"); var v = new Village(this, name); _villagesList.Add(v); return v; }
public ApothecaryOffice(Village ownerVillage) : base(ownerVillage) { }
public static Boolean HasStructureSurroundingStructure(Structure NewStructure, Village Village, int Radius) { for (int i = 0; i < Village.StructureList.Count; i++) { //check if intersecting for (int nx = 0; nx < NewStructure.WX; nx++) { for (int nz = 0; nz < NewStructure.WZ; nz++) { Point NRotPoint = MathUtil.MathUtil.RotatePoint(nx, nz, NewStructure.Angle); NRotPoint.X += NewStructure.Position.X; NRotPoint.Y += NewStructure.Position.Z; for (int tx = 0; tx < Village.StructureList[i].WX; tx++) { for (int tz = 0; tz < Village.StructureList[i].WZ; tz++) { Point TRotPoint = MathUtil.MathUtil.RotatePoint(tx, tz, Village.StructureList[i].Angle); TRotPoint.X += Village.StructureList[i].Position.X; TRotPoint.Y += Village.StructureList[i].Position.Z; if (MathUtil.MathUtil.distance(NRotPoint, TRotPoint) < Radius) { return(true); } } } } } } return(false); }