public void UnusualLifeEvent(Character character, Dice dice) { switch (dice.D(6)) { case 1: character.AddHistory("Encounter a Psionic institute."); TestPsionic(character, dice); return; case 2: character.AddHistory("Spend time with an alien race. Gain a contact."); var skillList = new SkillTemplateCollection(SpecialtiesFor("Science")); skillList.RemoveOverlap(character.Skills, 1); if (skillList.Count > 0) { character.Skills.Add(dice.Choose(skillList), 1); } return; case 3: character.AddHistory("Find an Alien Artifact."); return; case 4: character.AddHistory("Amnesia."); return; case 5: character.AddHistory("Contact with Government."); return; case 6: character.AddHistory("Find Ancient Technology."); return; } }
public void PreCareerEvents(Character character, Dice dice, Careers.CareerBase career, params string[] skills) { switch (dice.D(2, 6)) { case 2: character.AddHistory("Contacted by an underground psionic group"); character.LongTermBenefits.MayTestPsi = true; return; case 3: character.AddHistory("Suffered a deep tragedy."); character.CurrentTermBenefits.GraduationDM = -100; return; case 4: character.AddHistory("A prank goes horribly wrong."); var roll = dice.D(2, 6) + character.SocialStandingDM; if (roll >= 8) { character.AddHistory("Gain a Rival."); } else if (roll > 2) { character.AddHistory("Gain an Enemy."); } else { character.NextTermBenefits.MustEnroll = "Prisoner"; } return; case 5: character.AddHistory("Spent the college years partying."); character.Skills.Add("Carouse", 1); return; case 6: character.AddHistory($"Made lifelong friends. Gain {dice.D(3)} Allies."); return; case 7: LifeEvent(character, dice, career); return; case 8: if (dice.RollHigh(character.SocialStandingDM, 8)) { character.AddHistory("Become leader in social movement."); character.AddHistory("Gain an Ally and an Enemy."); } else { character.AddHistory("Join a social movement."); } return; case 9: { var skillList = new SkillTemplateCollection(RandomSkills); skillList.RemoveOverlap(character.Skills, 0); if (skillList.Count > 0) { var skill = dice.Choose(skillList); character.Skills.Add(skill); character.AddHistory($"Study {skill} as a hobby."); } } return; case 10: if (dice.RollHigh(9)) { var skill = dice.Choose(skills); character.Skills.Increase(skill, 1); character.AddHistory($"Expand the field of {skill}, but gain a Rival in your former tutor."); } return; case 11: character.AddHistory("War breaks out, triggering a mandatory draft."); if (dice.RollHigh(character.SocialStandingDM, 9)) { character.AddHistory("Used social standing to avoid the draft."); } else { character.CurrentTermBenefits.GraduationDM -= 100; if (dice.D(2) == 1) { character.AddHistory("Fled from the draft."); character.NextTermBenefits.MustEnroll = "Drifter"; } else { var roll2 = dice.D(6); if (roll2 <= 3) { character.NextTermBenefits.MustEnroll = "Army"; } else if (roll2 <= 5) { character.NextTermBenefits.MustEnroll = "Marine"; } else { character.NextTermBenefits.MustEnroll = "Navy"; } } } return; case 12: character.AddHistory("Widely recognized."); character.SocialStanding += 1; return; } }