protected void CreateLimbs() { Limbs.Clear(); foreach (var element in MainElement.Elements("limb")) { Limbs.Add(new LimbParams(element, this)); } Limbs = Limbs.OrderBy(l => l.ID).ToList(); }
public Dwarf() : base() { CharRepresentation = 'D'; DrawColor = libtcodWrapper.ColorPresets.Aqua; this.Type = CreatureTypes.Dwarf; Head MyHead = new Head(this, "Head", 40); Foot LeftFoot = new Foot(this, "Left Foot", 20); Foot RightFoot = new Foot(this, "Right Foot", 25); Leg LeftLeg = new Leg(this, "Left Leg", 75); Leg RightLeg = new Leg(this, "Right Leg", 75); Torso MyTorso = new Torso(this, "Torso", 70); Arm LeftArm = new Arm(this, "Left Arm", 75); Arm RightArm = new Arm(this, "Right Arm", 75); Hand LeftHand = new Hand(this, "Left Hand", 20); Hand RightHand = new Hand(this, "Right Hand", 25); LimbDependencies.Add(new LimbDependency(LeftHand, LeftArm)); LimbDependencies.Add(new LimbDependency(RightHand, RightArm)); LimbDependencies.Add(new LimbDependency(LeftFoot, LeftLeg)); LimbDependencies.Add(new LimbDependency(RightFoot, RightLeg)); LimbDependencies.Add(new LimbDependency(MyHead, MyTorso)); LimbDependencies.Add(new LimbDependency(LeftLeg, MyTorso)); LimbDependencies.Add(new LimbDependency(RightLeg, MyTorso)); LimbDependencies.Add(new LimbDependency(LeftArm, MyTorso)); LimbDependencies.Add(new LimbDependency(RightArm, MyTorso)); LimbDependencies.Add(new LimbDependency(MyTorso, MyHead)); //TODO: Enforce dependencies! Limbs.Add(MyTorso); Limbs.Add(MyHead); Limbs.Add(LeftArm); Limbs.Add(RightArm); Limbs.Add(LeftHand); Limbs.Add(RightHand); Limbs.Add(LeftLeg); Limbs.Add(RightLeg); Limbs.Add(LeftFoot); Limbs.Add(RightFoot); PreferredLimbAttackOrder.Add(RightHand); PreferredLimbAttackOrder.Add(LeftHand); PreferredLimbAttackOrder.Add(MyHead); PreferredLimbAttackOrder.Add(RightArm); PreferredLimbAttackOrder.Add(LeftArm); PreferredLimbAttackOrder.Add(RightFoot); PreferredLimbAttackOrder.Add(LeftFoot); PreferredLimbAttackOrder.Add(RightLeg); PreferredLimbAttackOrder.Add(LeftLeg); PreferredLimbAttackOrder.Add(MyTorso); }
public GiantRat() : base() { CharRepresentation = 'r'; DrawColor = libtcodWrapper.ColorPresets.Brown; Type = CreatureTypes.Giant_Rat; Head MyHead = new Head(this, "Head", 60); Torso MyTorso = new Torso(this, "Torso", 70); Foot FrontLeftPaw = new Foot(this, "Front Left Paw", 50); Foot FrontRightPaw = new Foot(this, "Front Right Paw", 50); Foot RearLeftPaw = new Foot(this, "Rear Left Paw", 35); Foot RearRightPaw = new Foot(this, "Rear Right Paw", 35); Tail MyTail = new Tail(this, "Tail", 20); LimbDependencies.Add(new LimbDependency(MyHead, MyTorso)); LimbDependencies.Add(new LimbDependency(MyTorso, MyHead)); LimbDependencies.Add(new LimbDependency(FrontLeftPaw, MyTorso)); LimbDependencies.Add(new LimbDependency(FrontRightPaw, MyTorso)); LimbDependencies.Add(new LimbDependency(RearLeftPaw, MyTorso)); LimbDependencies.Add(new LimbDependency(RearRightPaw, MyTorso)); LimbDependencies.Add(new LimbDependency(MyTail, MyTorso)); PreferredLimbAttackOrder.Add(MyHead); PreferredLimbAttackOrder.Add(FrontRightPaw); PreferredLimbAttackOrder.Add(FrontLeftPaw); PreferredLimbAttackOrder.Add(MyTail); Limbs.Add(MyTorso); Limbs.Add(MyHead); Limbs.Add(FrontLeftPaw); Limbs.Add(FrontRightPaw); Limbs.Add(RearLeftPaw); Limbs.Add(RearRightPaw); Limbs.Add(MyTail); }