public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); if (RangeTool.WithinRange(1, 90, dieValue)) { int siblingCount = RandomDieGenerator.D2; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Halfling; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(31, 90, dieValue)) { int siblingCount = RandomDieGenerator.D4 + 1; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Human; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } if (siblings.Siblings.Count() >= 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }
public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); Sibling sibling; int siblingCount; if (RangeTool.WithinRange(1, 20, dieValue)) { siblingCount = RandomDieGenerator.D2; BackgroundEnums.RaceTypes siblingRace; if (RandomDieGenerator.D2 == 1) { siblingRace = BackgroundEnums.RaceTypes.Elf; } else { siblingRace = BackgroundEnums.RaceTypes.Human; } for (int i = 0; i < siblingCount; i++) { sibling = new Sibling(); sibling.Race = siblingRace; siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(21, 30, dieValue)) { sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.HalfElf; siblings.Traits.Add(new KinBondTrait()); siblings.Siblings.Add(sibling); } if (siblings.Siblings.Count() >= 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }
public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); if (RangeTool.WithinRange(1, 40, dieValue)) { int siblingCount = RandomDieGenerator.D2; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Human; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(41, 70, dieValue)) { int siblingCount = RandomDieGenerator.D2; int halfSiblingCount = RandomDieGenerator.D2; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Human; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } for (int i = 0; i < halfSiblingCount; i++) { Sibling sibling = new Sibling(); int raceRoll = RandomDieGenerator.D100; if (RangeTool.WithinRange(01, 50, raceRoll)) { sibling.Race = BackgroundEnums.RaceTypes.HalfElf; } else { sibling.Race = BackgroundEnums.RaceTypes.HalfOrc; } sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(71, 90, dieValue)) { int biologicalSiblings = (RandomDieGenerator.D4 + RandomDieGenerator.D4); for (int i = 0; i < biologicalSiblings; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Human; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } if (siblings.Siblings.Count() >= 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }
public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); if (RangeTool.WithinRange(1, 80, dieValue)) { int siblingCount = RandomDieGenerator.D4; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Dwarf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(81, 90, dieValue)) { int siblingCount = RandomDieGenerator.D4 + 1; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Dwarf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(91, 95, dieValue)) { int biologicalSiblings = RandomDieGenerator.D3 - 1; int adoptedSiblings = RandomDieGenerator.D3 - 1; for (int i = 0; i < biologicalSiblings; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Dwarf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } for (int i = 0; i < adoptedSiblings; i++) { Sibling sibling = new Sibling(); sibling.Race = AdoptedSiblingRaceTable.GenerateRace(); sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); sibling.Adopted = true; siblings.Siblings.Add(sibling); } } if (siblings.Siblings.Count() > 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }
public static Sibling GenerateSibling(bool isAdopted) { sibling = new Sibling(); if (isAdopted) { GenerateSiblingRace(RandomDieGenerator.D100); } do { GenerateSiblingAge(RandomDieGenerator.D100); } while (isAdopted && sibling.RelativeAge == BackgroundEnums.RelativeSiblingAge.Twin); return sibling; }
public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); Sibling sibling; int siblingCount; if (RangeTool.WithinRange(1, 50, dieValue)) { siblingCount = RandomDieGenerator.D4; for (int i = 0; i < siblingCount; i++) { sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Gnome; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(51, 60, dieValue)) { siblingCount = RandomDieGenerator.D4 - 1; for (int i = 0; i < siblingCount; i++) { sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Gnome; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } sibling = new Sibling(); sibling.Adopted = true; sibling.Race = AdoptedSiblingRaceTable.GenerateRace(); sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); } if (siblings.Siblings.Count() >= 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }
public SiblingsList GenerateSiblings(int dieValue) { SiblingsList siblings = new SiblingsList(); if (RangeTool.WithinRange(1, 80, dieValue)) { int siblingCount = RandomDieGenerator.D2; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Elf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(81, 90, dieValue)) { int siblingCount = RandomDieGenerator.D4 + 1; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Elf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } } else if (RangeTool.WithinRange(91, 95, dieValue)) { int siblingCount = RandomDieGenerator.D4 + 1; int otherSiblingcount = RandomDieGenerator.D3 - 1; siblingCount = siblingCount - otherSiblingcount; for (int i = 0; i < siblingCount; i++) { Sibling sibling = new Sibling(); sibling.Race = BackgroundEnums.RaceTypes.Elf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); siblings.Siblings.Add(sibling); } for (int i = 0; i < otherSiblingcount; i++) { Sibling sibling = new Sibling(); if (RandomDieGenerator.D2 == 1) { sibling.Race = BackgroundEnums.RaceTypes.HalfElf; sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); } else { sibling.Race = AdoptedSiblingRaceTable.GenerateRace(); sibling.RelativeAge = RelativeSiblingAgeTable.GenerateAge(); sibling.Adopted = true; } siblings.Siblings.Add(sibling); } } if (siblings.Siblings.Count() >= 1) { siblings.Traits.Add(new KinGuardianTrait()); } return siblings; }