コード例 #1
0
 internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
 {
     switch (careerHistory.Rank)
     {
         case 0:
             return;
         case 1:
             character.Skills.Add("Persuade", 1);
             return;
         case 2:
             return;
         case 3:
             var skillList = new SkillTemplateCollection();
             skillList.AddRange(SpecialtiesFor("Gun Combat"));
             skillList.AddRange(SpecialtiesFor("Melee"));
             skillList.RemoveOverlap(character.Skills, 1);
             if (skillList.Count > 0)
                 character.Skills.Add(dice.Choose(skillList), 1);
             return;
         case 4:
             return;
         case 5:
             character.Skills.Add("Streetwise", 1);
             return;
         case 6:
             return;
     }
 }
コード例 #2
0
        internal override void AssignmentSkills(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                IncreaseTalent(character, dice, "Telepathy");
                return;

            case 2:
                IncreaseTalent(character, dice, "Telekinesis");
                return;

            case 3:
                character.Skills.Increase("Deception");
                return;

            case 4:
                character.Skills.Increase("Stealth");
                return;

            case 5:
                character.Skills.Increase("Streetwise");
                return;

            case 6:
            {
                var skills = new SkillTemplateCollection();
                skills.AddRange(SpecialtiesFor("Gun Combat"));
                skills.AddRange(SpecialtiesFor("Melee"));
                character.Skills.Increase(dice.Choose(skills));
            }
                return;
            }
        }
コード例 #3
0
 internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
 {
     switch (careerHistory.Rank)
     {
         case 0:
             return;
         case 1:
             character.Skills.Add("Persuade", 1);
             return;
         case 2:
             return;
         case 3:
             var skillList = new SkillTemplateCollection();
             skillList.AddRange(SpecialtiesFor("Gun Combat"));
             skillList.AddRange(SpecialtiesFor("Melee"));
             skillList.RemoveOverlap(character.Skills, 1);
             if (skillList.Count > 0)
                 character.Skills.Add(dice.Choose(skillList), 1);
             return;
         case 4:
             return;
         case 5:
             character.Skills.Add("Streetwise", 1);
             return;
         case 6:
             return;
     }
 }
コード例 #4
0
        internal override void AssignmentSkills(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Electronics")));
                return;

            case 2:
                character.Skills.Increase("Mechanic");
                return;

            case 3:
            {
                var skillList = new SkillTemplateCollection();
                skillList.AddRange(SpecialtiesFor("Drive"));
                skillList.AddRange(SpecialtiesFor("Flyer"));
                character.Skills.Increase(dice.Choose(skillList));
            }
                return;

            case 4:
                character.Skills.Increase("Medic");
                return;

            case 5:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Heavy Weapons")));
                return;

            case 6:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Gun Combat")));
                return;
            }
        }
コード例 #5
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
                case 0:
                    careerHistory.Title = "Lackey";
                    return;
                case 1:
                    careerHistory.Title = "Henchman";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Pilot"));
                        skillList.AddRange(SpecialtiesFor("Gunner"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 2:
                    careerHistory.Title = "Corporal";
                    return;
                case 3:
                    careerHistory.Title = "Sergeant";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.AddRange(SpecialtiesFor("Melee"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 4:
                    careerHistory.Title = "Lieutenant";
                    return;
                case 5:
                    careerHistory.Title = "Leader";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Engineer"));
                        skillList.Add("Navigation");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 6:
                    careerHistory.Title = "Captain";
                    return;
            }
        }
コード例 #6
0
        internal override void AssignmentSkills(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                IncreaseTalent(character, dice, "Telepathy");
                return;

            case 2:
                IncreaseTalent(character, dice, "Clairvoyance");
                return;

            case 3:
                IncreaseTalent(character, dice, "Awareness");
                return;

            case 4:
                character.Skills.Increase("Medic");
                return;

            case 5:
                character.Skills.Increase("Persuade");
                return;

            case 6:
            {
                var skills = new SkillTemplateCollection();
                skills.AddRange(SpecialtiesFor("Science"));
                character.Skills.Increase(dice.Choose(skills));
            }
                return;
            }
        }
コード例 #7
0
        internal override void AssignmentSkills(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                IncreaseTalent(character, dice, "Telepathy");
                return;

            case 2:
                IncreaseTalent(character, dice, "Awareness");
                return;

            case 3:
                IncreaseTalent(character, dice, "Teleportation");
                return;

            case 4:
            {
                var skills = new SkillTemplateCollection();
                skills.AddRange(SpecialtiesFor("Gun Combat"));
                character.Skills.Increase(dice.Choose(skills));
            }
                return;

            case 5:
                character.Skills.Increase("Vacc Suit");
                return;

            case 6:
                character.Skills.Increase("Recon");
                return;
            }
        }
コード例 #8
0
ファイル: Army.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void BasicTrainingSkills(Character character, Dice dice, bool all)
        {
            var roll = dice.D(6);

            if (all || roll == 1)
            {
                if (all)
                {
                    character.Skills.AddRange(SpecialtiesFor("Drive"));
                    character.Skills.Add("Vacc Suit");
                }
                else
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Drive"));
                    skillList.Add("Vacc Suit");
                    skillList.RemoveOverlap(character.Skills, 0);
                    if (skillList.Count > 0)
                        character.Skills.Add(dice.Choose(skillList));
                }
            }

            if (all || roll == 2)
                character.Skills.AddRange(SpecialtiesFor("Athletics"));
            if (all || roll == 3)
                character.Skills.AddRange(SpecialtiesFor("Gun Combat"));
            if (all || roll == 4)
                character.Skills.Add("Recon");
            if (all || roll == 5)
                character.Skills.AddRange(SpecialtiesFor("Melee"));
            if (all || roll == 6)
                character.Skills.AddRange(SpecialtiesFor("Heavy Weapons"));
        }
コード例 #9
0
ファイル: Army.cs プロジェクト: johny5w/TravellerTools
        internal override void ServiceSkill(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
            {
                var skillList = new SkillTemplateCollection();
                skillList.AddRange(SpecialtiesFor("Drive"));
                skillList.Add("Vacc Suit");
                character.Skills.Increase(dice.Choose(skillList));
            }
                return;

            case 2:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Athletics")));
                return;

            case 3:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Gun Combat")));
                return;

            case 4:
                character.Skills.Increase("Recon");
                return;

            case 5:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Melee")));
                return;

            case 6:
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Heavy Weapons")));
                return;
            }
        }
コード例 #10
0
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                Injury(character, dice, true);
                return;

            case 2:
                character.AddHistory("A family scandal forces you out of your position.");
                character.SocialStanding += -1;
                return;

            case 3:
                character.AddHistory("A disaster or war strikes.");
                if (!dice.RollHigh(character.Skills.BestSkillLevel("Stealth", "Deception"), 8))
                {
                    Injury(character, dice);
                }
                return;

            case 4:
                character.AddHistory("Political manoeuvrings usurp your position. Gain a Rival.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Diplomat"));
                    skillList.AddRange(SpecialtiesFor("Advocate"));
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 5:
                character.AddHistory("An assassin attempts to end your life.");
                if (!dice.RollHigh(character.EnduranceDM, 8))
                {
                    Injury(character, dice);
                }
                return;

            case 6:
                Injury(character, dice, false);
                return;
            }
        }
コード例 #11
0
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                Injury(character, dice, true);
                return;

            case 2:
                character.AddHistory("Bankrupted by a rival. Gain the other trader as a Rival.");
                character.BenefitRolls = 0;
                return;

            case 3:
                character.AddHistory("A sudden war destroys your trade routes and contacts, forcing you to flee that region of space.");
                character.AddHistory("Gain rebels as Enemy");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Gun Combat"));
                    skillList.AddRange(SpecialtiesFor("Pilot"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 4:
                character.AddHistory("Your ship or starport is destroyed by criminals. Gain them as an Enemy.");
                return;

            case 5:
                character.AddHistory("Imperial trade restrictions force you out of business.");
                character.NextTermBenefits.EnlistmentDM.Add("Rogue", 100);
                return;

            case 6:
                character.AddHistory("A series of bad deals and decisions force you into bankruptcy. You salvage what you can.");
                character.BenefitRolls += 1;
                return;
            }
        }
コード例 #12
0
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                Injury(character, dice, true);
                return;

            case 2:
                character.AddHistory("Arrested");
                character.NextTermBenefits.MustEnroll = "Prisoner";
                return;

            case 3:
                character.AddHistory("Betrayed by a friend. One of your Contacts or Allies betrays you, ending your career. That Contact or Ally becomes a Rival or Enemy.");
                if (dice.D(2, 6) == 2)
                {
                    character.NextTermBenefits.MustEnroll = "Prisoner";
                }
                return;

            case 4:
                character.AddHistory("A job goes wrong, forcing you to flee off-planet. ");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Deception");
                    skillList.Add("Pilot", "Small Craft");
                    skillList.Add("Pilot", "Spacecraft");
                    skillList.Add("Athletics", "Dexterity");
                    skillList.AddRange(SpecialtiesFor("Gunner"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 5:
                character.AddHistory("A police detective or rival criminal forces you to flee and vows to hunt you down. Gain an Enemy.");
                return;

            case 6:
                Injury(character, dice, false);
                return;
            }
        }
コード例 #13
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
            case 0:
                careerHistory.Title = "Marine";
                return;

            case 1:
            {
                var skills = new SkillTemplateCollection();
                skills.AddRange(SpecialtiesFor("Gun Combat"));
                skills.RemoveOverlap(character.Skills, 1);
                if (skills.Count > 0)
                {
                    character.Skills.Add(dice.Choose(skills), 1);
                }
            }
                return;

            case 2:
                careerHistory.Title = "Captain";
                character.Skills.Add("Leadership", 1);
                return;

            case 3:
                return;

            case 4:
                return;

            case 5:
                careerHistory.Title = "Force Commander";
                {
                    var skills = new SkillTemplateCollection();
                    skills.AddRange(SpecialtiesFor("Tatics"));
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                return;

            case 6:
                return;
            }
        }
コード例 #14
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
            case 1:
                careerHistory.Title = "Initiate";
                character.Skills.Add("Science", "Psionicology");
                return;

            case 2:
                return;

            case 3:
                careerHistory.Title = "Acolyte";
                {
                    var skills = new SkillTemplateCollection();
                    skills.AddRange(Book.PsionicTalents);
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                return;

            case 4:
                return;

            case 5:
                return;

            case 6:
                careerHistory.Title = "Master";
                {
                    var skills = new SkillTemplateCollection();
                    skills.AddRange(Book.PsionicTalents);
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                return;
            }
        }
コード例 #15
0
ファイル: Army.cs プロジェクト: johny5w/TravellerTools
        internal override void BasicTrainingSkills(Character character, Dice dice, bool all)
        {
            var roll = dice.D(6);

            if (all || roll == 1)
            {
                if (all)
                {
                    character.Skills.AddRange(SpecialtiesFor("Drive"));
                    character.Skills.Add("Vacc Suit");
                }
                else
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Drive"));
                    skillList.Add("Vacc Suit");
                    skillList.RemoveOverlap(character.Skills, 0);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList));
                    }
                }
            }

            if (all || roll == 2)
            {
                character.Skills.AddRange(SpecialtiesFor("Athletics"));
            }
            if (all || roll == 3)
            {
                character.Skills.AddRange(SpecialtiesFor("Gun Combat"));
            }
            if (all || roll == 4)
            {
                character.Skills.Add("Recon");
            }
            if (all || roll == 5)
            {
                character.Skills.AddRange(SpecialtiesFor("Melee"));
            }
            if (all || roll == 6)
            {
                character.Skills.AddRange(SpecialtiesFor("Heavy Weapons"));
            }
        }
コード例 #16
0
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
            case 1:
                Injury(character, dice, true);
                return;

            case 2:
                character.AddHistory("Expose or are involved in a scandal of some sort.");
                return;

            case 3:
                character.AddHistory("Public opinion turns on you.");
                character.SocialStanding += -1;
                return;

            case 4:
                character.AddHistory("You are betrayed by a peer. One Ally or Contact becomes a Rival or Enemy");
                return;

            case 5:
                character.AddHistory("An investigation, tour, project or expedition goes wrong, stranding you far from home.");
                var skillList = new SkillTemplateCollection();
                skillList.Add("Survival");
                skillList.AddRange(SpecialtiesFor("Pilot"));
                skillList.Add("Persuade");
                skillList.Add("Streetwise");
                skillList.RemoveOverlap(character.Skills, 1);
                if (skillList.Count > 0)
                {
                    character.Skills.Add(dice.Choose(skillList), 1);
                }

                return;

            case 6:
                character.AddHistory("You are forced out because of censorship or controversy. What truth did you get too close to?");
                character.NextTermBenefits.QualificationDM += 2;
                return;
            }
        }
コード例 #17
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
            case 0:
                return;

            case 1:
            {
                var skillList = new SkillTemplateCollection();
                skillList.AddRange(SpecialtiesFor("Art"));
                skillList.RemoveOverlap(character.Skills, 1);
                if (skillList.Count > 0)
                {
                    character.Skills.Add(dice.Choose(skillList), 1);
                }
            }
                return;

            case 2:
                return;

            case 3:
                character.Skills.Add("Investigate", 1);
                return;

            case 4:
                return;

            case 5:
                careerHistory.Title       = "Famous Artist";
                character.SocialStanding += 1;
                return;

            case 6:
                return;
            }
        }
コード例 #18
0
ファイル: Navy.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    character.AddHistory("You join a gambling circle on board.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Gambler");
                        skillList.Add("Deception");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);

                        if (dice.RollHigh(character.Skills.GetLevel("Gambler"), 8))
                            character.BenefitRolls += 1;
                        else
                            character.BenefitRolls += -1;
                    }

                    return;
                case 4:
                    character.AddHistory("Special assignment or duty on board ship.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 5:
                    character.AddHistory($"Advanced training in a specialist field");
                    if (dice.RollHigh(character.EducationDM, 8))
                        dice.Choose(character.Skills).Level += 1;
                    return;
                case 6:
                    character.AddHistory("Vessel participates in a notable military engagement.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Electronics"));
                        skillList.AddRange(SpecialtiesFor("Engineer"));
                        skillList.AddRange(SpecialtiesFor("Gunner"));
                        skillList.AddRange(SpecialtiesFor("Pilot"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    character.AddHistory("Vessel participates in a diplomatic mission.");
                    if (dice.D(2) == 1)
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Recon");
                        skillList.Add("Diplomat");
                        skillList.Add("Steward");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    else
                        character.AddHistory("Gain a contact.");

                    return;
                case 9:
                    character.AddHistory("You foil an attempted crime on board, such as mutiny, sabotage, smuggling or conspiracy. Gain an Enemy.");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                    return;
                case 10:
                    if (dice.D(2) == 1)
                    {
                        character.AddHistory("Abuse your position for profit");
                        character.BenefitRolls += 1;
                    }
                    else
                    {
                        character.AddHistory("Refuse to abuse your position for profit");
                        character.CurrentTermBenefits.AdvancementDM += 2;
                    }
                    return;
                case 11:
                    character.AddHistory("Commanding officer takes an interest in your career.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Add("Tactics", "Military", 1);
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Display heroism in battle, saving the whole ship.");

                    character.CurrentTermBenefits.AdvancementDM += 100; //also applies to commission rolls

                    if (character.LastCareer.CommissionRank == 0)
                        character.CurrentTermBenefits.FreeCommissionRoll = true;

                    return;
            }
        }
コード例 #19
0
ファイル: Army.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    character.AddHistory("Assigned to a planet with a hostile or wild environment.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Vacc Suit");
                        skillList.AddRange(SpecialtiesFor("Engineer"));
                        skillList.Add("Animals", "Handling");
                        skillList.Add("Animals", "Training");
                        skillList.Add("Recon");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 4:
                    character.AddHistory("Assigned to an urbanised planet torn by war.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Stealth");
                        skillList.Add("Streetwise");
                        skillList.Add("Persuade");
                        skillList.Add("Recon");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 5:
                    character.AddHistory($"Given a special assignment or duty in your unit.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 6:
                    character.AddHistory("Thrown into a brutal ground war");
                    if (dice.RollHigh(character.EducationDM, 8))
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.Add("Leadership");
                        character.Skills.Increase(dice.Choose(skillList));
                    }
                    else
                    {
                        Injury(character, dice);
                    }
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    character.AddHistory("Advanced training in a specialist field");
                    if (dice.RollHigh(character.EducationDM, 8))
                        dice.Choose(character.Skills).Level += 1;
                    return;
                case 9:
                    character.AddHistory("Surrounded and outnumbered by the enemy, you hold out until relief arrives. ");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                    return;
                case 10:
                    character.AddHistory("Assigned to a peacekeeping role.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Admin");
                        skillList.Add("Admin");
                        skillList.Add("Deception");
                        skillList.Add("Recon");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 11:
                    character.AddHistory("Commanding officer takes an interest in your career.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Add("Tactics", "Military", 1);
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Display heroism in battle.");

                    character.CurrentTermBenefits.AdvancementDM += 100; //also applies to commission rolls

                    if (character.LastCareer.CommissionRank == 0)
                        character.CurrentTermBenefits.FreeCommissionRoll = true;

                    return;
            }
        }
コード例 #20
0
ファイル: Scout.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    if (dice.D(2) == 1)
                    {
                        if (dice.RollHigh(character.Skills.BestSkillLevel("Pilot"), 8))
                        {
                            character.AddHistory("Your ship is ambushed by enemy vessels. You successfully ran to the jump point.");
                            character.Skills.Add("Electronics", "Sensors", 1);
                        }
                        else
                        {
                            character.AddHistory("Your ship is ambushed by enemy vessels. Attempted to run but caught and ship is destroyed.");
                            character.NextTermBenefits.MusterOut = true;
                        }
                    }
                    else
                    {
                        if (dice.RollHigh(character.Skills.BestSkillLevel("Persuade"), 10))
                        {
                            character.AddHistory("Your ship is ambushed by enemy vessels. You successfully bargain with them.");
                            character.Skills.Add("Electronics", "Sensors", 1);
                        }
                        else
                        {
                            character.AddHistory("Your ship is ambushed by enemy vessels. Attempted to bargain with them but fail and the ship is destroyed.");
                            character.NextTermBenefits.MusterOut = true;
                        }

                    }
                    return;
                case 4:
                    character.AddHistory("You survey an alien world.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Animals", "Handling");
                        skillList.Add("Animals", "Training");
                        skillList.Add("Survival");
                        skillList.Add("Recon");
                        skillList.AddRange(SpecialtiesFor("Science"));
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 5:
                    character.AddHistory("Perform an exemplary service for the scouts.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 6:
                    character.AddHistory("Spend several years jumping from world to world in your scout ship.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Astrogation");
                        skillList.AddRange(SpecialtiesFor("Electronics"));
                        skillList.Add("Navigation");
                        skillList.Add("Pilot", "Small craft");
                        skillList.Add("Mechanic");
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Electronics", "Deception"), 8))
                    {
                        character.AddHistory("When dealing with an alien race, you have an opportunity to gather extra intelligence about them. Gain an Ally in the Imperium");
                        character.BenefitRollDMs.Add(2);
                    }
                    else
                    {
                        character.AddHistory("When dealing with an alien race, you botch an opportunity to gather extra intelligence about them.");
                        Mishap(character, dice);
                        character.NextTermBenefits.MusterOut = false;
                    }
                    return;
                case 9:
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Medic", "Engineer"), 8))
                    {
                        character.AddHistory("Your scout ship is one of the first on the scene to rescue the survivors of a disaster. Gain a Contact.");
                        character.BenefitRollDMs.Add(2);
                    }
                    else
                    {
                        character.AddHistory("Your scout ship is one of the first on the scene to rescue the survivors of a disaster but you fail to help. Gain an Enemy.");
                        Mishap(character, dice);
                        character.NextTermBenefits.MusterOut = false;
                    }
                    return;
                case 10:
                    character.AddHistory("You spend a great deal of time on the fringes of Charted Space.");
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Survival", "Pilot"), 8))
                    {
                        character.AddHistory("Gain a contact in an alien race.");
                        dice.Choose(character.Skills).Level += 1;
                    }
                    else
                    {
                        Mishap(character, dice);
                        character.NextTermBenefits.MusterOut = false;
                    }
                    return;
                case 11:
                    character.AddHistory("Serve as the courier for an important message from the Imperium.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Increase("Diplomat");
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("You discover a world, item or information of worth to the Imperium.");
                    character.CurrentTermBenefits.AdvancementDM += 100;
                    return;
            }
        }
コード例 #21
0
ファイル: Navy.cs プロジェクト: xdy-forks/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("You join a gambling circle on board.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Gambler");
                    skillList.Add("Deception");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    if (dice.RollHigh(character.Skills.GetLevel("Gambler"), 8))
                    {
                        character.BenefitRolls += 1;
                    }
                    else
                    {
                        character.BenefitRolls += -1;
                    }
                }

                return;

            case 4:
                character.AddHistory("Special assignment or duty on board ship.");
                character.BenefitRollDMs.Add(1);
                return;

            case 5:
                character.AddHistory($"Advanced training in a specialist field");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    dice.Choose(character.Skills).Level += 1;
                }
                return;

            case 6:
                character.AddHistory("Vessel participates in a notable military engagement.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Electronics"));
                    skillList.AddRange(SpecialtiesFor("Engineer"));
                    skillList.AddRange(SpecialtiesFor("Gunner"));
                    skillList.AddRange(SpecialtiesFor("Pilot"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("Vessel participates in a diplomatic mission.");
                if (dice.D(2) == 1)
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Recon");
                    skillList.Add("Diplomat");
                    skillList.Add("Steward");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                else
                {
                    character.AddHistory("Gain a contact.");
                }

                return;

            case 9:
                character.AddHistory("You foil an attempted crime on board, such as mutiny, sabotage, smuggling or conspiracy. Gain an Enemy.");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Abuse your position for profit");
                    character.BenefitRolls += 1;
                }
                else
                {
                    character.AddHistory("Refuse to abuse your position for profit");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                }
                return;

            case 11:
                character.AddHistory("Commanding officer takes an interest in your career.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Tactics", "Military", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Display heroism in battle, saving the whole ship.");

                character.CurrentTermBenefits.AdvancementDM += 100;     //also applies to commission rolls

                if (character.LastCareer.CommissionRank == 0)
                {
                    character.CurrentTermBenefits.FreeCommissionRoll = true;
                }

                return;
            }
        }
コード例 #22
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            if (careerHistory.CommissionRank == 0)
            {
                switch (careerHistory.Rank)
                {
                case 0:
                    careerHistory.Title = "Marine";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.Add("Melee", "Blade");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                        {
                            character.Skills.Add(dice.Choose(skillList), 1);
                        }
                    }
                    return;

                case 1:
                    careerHistory.Title = "Lance Corporal";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                        {
                            character.Skills.Add(dice.Choose(skillList), 1);
                        }
                    }
                    return;

                case 2:
                    careerHistory.Title = "Corporal";
                    return;

                case 3:
                    careerHistory.Title = "Lance Sergeant";
                    character.Skills.Add("Leadership", 1);
                    return;

                case 4:
                    careerHistory.Title = "Sergeant";
                    return;

                case 5:
                    careerHistory.Title  = "Gunnery Sergeant";
                    character.Endurance += 1;
                    return;

                case 6:
                    careerHistory.Title = "Sergeant Major";
                    return;
                }
            }
            else
            {
                switch (careerHistory.CommissionRank)
                {
                case 1:
                    careerHistory.Title = "Lieutenant";
                    character.Skills.Add("Leadership", 1);
                    return;

                case 2:
                    careerHistory.Title = "Captain";
                    return;

                case 3:
                    careerHistory.Title = "Force Commander";
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Tatics"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                        {
                            character.Skills.Add(dice.Choose(skillList), 1);
                        }
                    }
                    return;

                case 4:
                    careerHistory.Title = "Lieutenant Colonel";
                    return;

                case 5:
                    careerHistory.Title = "Colonel";
                    if (character.SocialStanding < 10)
                    {
                        character.SocialStanding = 10;
                    }
                    else
                    {
                        character.SocialStanding += 1;
                    }
                    return;

                case 6:
                    careerHistory.Title = "Brigadier";
                    return;
                }
            }
        }
コード例 #23
0
ファイル: Merchant.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    if (dice.D(2) == 1)
                    {
                        character.AddHistory("Smuggle illegal items onto a planet.");
                        if (dice.RollHigh(character.Skills.BestSkillLevel("Deception", "Persuade"), 8))
                        {
                            character.Skills.Add("Streetwise", 1);
                            character.BenefitRolls += 1;
                        }
                    }
                    else
                        character.AddHistory("Refuse to smuggle illegal items onto a planet. Gain an Enemy.");
                    return;
                case 4:
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Profession"));
                        skillList.AddRange(SpecialtiesFor("Electronics"));
                        skillList.AddRange(SpecialtiesFor("Engineer"));
                        skillList.AddRange(SpecialtiesFor("Animals"));
                        skillList.AddRange(SpecialtiesFor("Science"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 5:
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Gambler", "Broker"), 8))
                    {
                        character.AddHistory($"Risk your fortune on a possibility lucrative deal and win.");
                        character.BenefitRolls *= 2;
                    }
                    else
                    {
                        character.BenefitRolls = 0;
                    }
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Broker");
                        skillList.Add("Gambler");
                        character.Skills.Increase(dice.Choose(skillList));
                    }
                    return;
                case 6:
                    character.AddHistory("Make an unexpected connection outside your normal circles. Gain a Contact.");
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    character.AddHistory("Embroiled in legal trouble.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Advocate");
                        skillList.Add("Admin");
                        skillList.Add("Diplomat");
                        skillList.Add("Investigate");
                    }
                    if (dice.D(2, 6) == 2)
                    {
                        character.NextTermBenefits.MusterOut = true;
                        character.NextTermBenefits.MustEnroll = "Prisoner";
                    }
                    return;
                case 9:
                    character.AddHistory("Given advanced training in a specialist field");
                    if (dice.RollHigh(character.EducationDM, 8))
                        dice.Choose(character.Skills).Level += 1;
                    return;
                case 10:
                    character.AddHistory("A good deal ensures you are living the high life for a few years.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 11:
                    character.AddHistory("Befriend a useful ally in one sphere. Gain an Ally.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Add("Carouse", 1);
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Your business or ship thrives.");
                    character.CurrentTermBenefits.AdvancementDM += 100;
                    return;
            }
        }
コード例 #24
0
ファイル: Marine.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    character.AddHistory("Trapped behind enemy lines.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Survival");
                        skillList.Add("Stealth");
                        skillList.Add("Deception");
                        skillList.Add("Streetwise");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 4:
                    character.AddHistory("Assigned to the security staff of a space station.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Vacc Suit");
                        skillList.Add("Athletics", "Dexterity");
                        character.Skills.Increase(dice.Choose(skillList));
                    }

                    return;
                case 5:
                    character.AddHistory($"Advanced training in a specialist field");
                    if (dice.RollHigh(character.EducationDM, 8))
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(RandomSkills);
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 6:
                    character.AddHistory("Assigned to an assault on an enemy fortress.");
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Gun Combat", "Melee"), 8))
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Tactics", "Military");
                        skillList.Add("Leadership");
                        character.Skills.Increase(dice.Choose(skillList));
                    }
                    else
                    {
                        character.AddHistory("Injured");
                        switch (dice.D(3))
                        {
                            case 1:
                                character.Strength -= 1;
                                return;
                            case 2:
                                character.Dexterity -= 1;
                                return;
                            case 3:
                                character.Endurance -= 1;
                                return;
                        }
                    }
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    character.AddHistory("On the front lines of a planetary assault and occupation.");
                    {

                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Recon");
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.Add("Leadership");
                        skillList.Add("Electronics", "Comms");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 9:
                    character.AddHistory("A mission goes disastrously wrong due to your commander’s error or incompetence, but you survive.");
                    if (dice.D(2) == 1)
                    {
                        character.AddHistory("Report commander and gain an Enemy.");
                        character.CurrentTermBenefits.AdvancementDM += 2;
                    }
                    else
                    {
                        character.AddHistory("Cover for the commander and gain an Ally.");
                    }
                    return;
                case 10:
                    character.AddHistory("Assigned to a black ops mission.");
                    character.CurrentTermBenefits.AdvancementDM += 2;

                    return;
                case 11:
                    character.AddHistory("Commanding officer takes an interest in your career.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Add("Tactics", "Military", 1);
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Display heroism in battle.");

                    character.CurrentTermBenefits.AdvancementDM += 100; //also applies to commission rolls

                    if (character.LastCareer.CommissionRank == 0)
                        character.CurrentTermBenefits.FreeCommissionRoll = true;

                    return;
            }
        }
コード例 #25
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                if (dice.D(2) == 1)
                {
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Pilot"), 8))
                    {
                        character.AddHistory("Your ship is ambushed by enemy vessels. You successfully ran to the jump point.");
                        character.Skills.Add("Electronics", "Sensors", 1);
                    }
                    else
                    {
                        character.AddHistory("Your ship is ambushed by enemy vessels. Attempted to run but caught and ship is destroyed.");
                        character.NextTermBenefits.MusterOut = true;
                    }
                }
                else
                {
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Persuade"), 10))
                    {
                        character.AddHistory("Your ship is ambushed by enemy vessels. You successfully bargain with them.");
                        character.Skills.Add("Electronics", "Sensors", 1);
                    }
                    else
                    {
                        character.AddHistory("Your ship is ambushed by enemy vessels. Attempted to bargain with them but fail and the ship is destroyed.");
                        character.NextTermBenefits.MusterOut = true;
                    }
                }
                return;

            case 4:
                character.AddHistory("You survey an alien world.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Animals", "Handling");
                    skillList.Add("Animals", "Training");
                    skillList.Add("Survival");
                    skillList.Add("Recon");
                    skillList.AddRange(SpecialtiesFor("Science"));
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 5:
                character.AddHistory("Perform an exemplary service for the scouts.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                character.AddHistory("Spend several years jumping from world to world in your scout ship.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Astrogation");
                    skillList.AddRange(SpecialtiesFor("Electronics"));
                    skillList.Add("Navigation");
                    skillList.Add("Pilot", "Small craft");
                    skillList.Add("Mechanic");
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                if (dice.RollHigh(character.Skills.BestSkillLevel("Electronics", "Deception"), 8))
                {
                    character.AddHistory("When dealing with an alien race, you have an opportunity to gather extra intelligence about them. Gain an Ally in the Imperium");
                    character.BenefitRollDMs.Add(2);
                }
                else
                {
                    character.AddHistory("When dealing with an alien race, you botch an opportunity to gather extra intelligence about them.");
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                }
                return;

            case 9:
                if (dice.RollHigh(character.Skills.BestSkillLevel("Medic", "Engineer"), 8))
                {
                    character.AddHistory("Your scout ship is one of the first on the scene to rescue the survivors of a disaster. Gain a Contact.");
                    character.BenefitRollDMs.Add(2);
                }
                else
                {
                    character.AddHistory("Your scout ship is one of the first on the scene to rescue the survivors of a disaster but you fail to help. Gain an Enemy.");
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                }
                return;

            case 10:
                character.AddHistory("You spend a great deal of time on the fringes of Charted Space.");
                if (dice.RollHigh(character.Skills.BestSkillLevel("Survival", "Pilot"), 8))
                {
                    character.AddHistory("Gain a contact in an alien race.");
                    dice.Choose(character.Skills).Level += 1;
                }
                else
                {
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                }
                return;

            case 11:
                character.AddHistory("Serve as the courier for an important message from the Imperium.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Increase("Diplomat");
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("You discover a world, item or information of worth to the Imperium.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #26
0
ファイル: Army.cs プロジェクト: johny5w/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Assigned to a planet with a hostile or wild environment.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Vacc Suit");
                    skillList.AddRange(SpecialtiesFor("Engineer"));
                    skillList.Add("Animals", "Handling");
                    skillList.Add("Animals", "Training");
                    skillList.Add("Recon");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 4:
                character.AddHistory("Assigned to an urbanised planet torn by war.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Stealth");
                    skillList.Add("Streetwise");
                    skillList.Add("Persuade");
                    skillList.Add("Recon");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 5:
                character.AddHistory($"Given a special assignment or duty in your unit.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                character.AddHistory("Thrown into a brutal ground war");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Gun Combat"));
                    skillList.Add("Leadership");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                else
                {
                    Injury(character, dice);
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("Advanced training in a specialist field");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    dice.Choose(character.Skills).Level += 1;
                }
                return;

            case 9:
                character.AddHistory("Surrounded and outnumbered by the enemy, you hold out until relief arrives. ");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                character.AddHistory("Assigned to a peacekeeping role.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Admin");
                    skillList.Add("Admin");
                    skillList.Add("Deception");
                    skillList.Add("Recon");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 11:
                character.AddHistory("Commanding officer takes an interest in your career.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Tactics", "Military", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Display heroism in battle.");

                character.CurrentTermBenefits.AdvancementDM += 100;     //also applies to commission rolls

                if (character.LastCareer.CommissionRank == 0)
                {
                    character.CurrentTermBenefits.FreeCommissionRoll = true;
                }

                return;
            }
        }
コード例 #27
0
        internal override void Run(Character character, Dice dice)
        {
            character.LongTermBenefits.MayEnrollInSchool = false;

            character.AddHistory($"Entered University at age {character.Age}");

            var skillChoices = new SkillTemplateCollection();
            skillChoices.Add("Admin");
            skillChoices.Add("Advocate");
            skillChoices.Add("Animals", "Training");
            skillChoices.Add("Animals", "Veterinary");
            skillChoices.AddRange(SpecialtiesFor("Art"));
            skillChoices.Add("Astrogation");
            skillChoices.AddRange(SpecialtiesFor("Electronics"));
            skillChoices.AddRange(SpecialtiesFor("Engineer"));
            skillChoices.AddRange(SpecialtiesFor("Language"));
            skillChoices.Add("Medic");
            skillChoices.Add("Navigation");
            skillChoices.AddRange(SpecialtiesFor("Profession"));
            skillChoices.AddRange(SpecialtiesFor("Science"));

            //Remove skills we already have at level 1
            skillChoices.RemoveOverlap(character.Skills, 1);

            var skillA = dice.Pick(skillChoices);
            character.Skills.Add(skillA, 1);

            //Remove skills we already have at level 0
            skillChoices.RemoveOverlap(character.Skills, 0);

            var skillB = dice.Pick(skillChoices);
            character.Skills.Add(skillB);

            character.Age += 4;
            character.Education += 1;
            character.EducationHistory = new EducationHistory();
            character.EducationHistory.Name = "University";

            Book.PreCareerEvents(character, dice, skillA.Name, skillB.Name);

            var graduation = dice.D(2, 6) + character.IntellectDM + character.CurrentTermBenefits.GraduationDM;
            if (graduation < 7)
            {
                character.AddHistory("Dropped out of university.");
                character.EducationHistory.Status = "Failed";
            }
            else
            {
                int bonus;
                if (graduation >= 11)
                {
                    character.EducationHistory.Status = "Honors";
                    character.AddHistory($"Graduated with honors at age {character.Age}.");
                    bonus = 2;
                }
                else
                {
                    character.EducationHistory.Status = "Graduated";
                    character.AddHistory($"Graduated at age {character.Age}.");
                    bonus = 1;
                }

                character.Education += 2;

                character.Skills.Increase(skillA, 1);
                character.Skills.Increase(skillB, 1);

                character.NextTermBenefits.FreeCommissionRoll = true;
                character.NextTermBenefits.CommissionDM = bonus;
                character.LongTermBenefits.EnlistmentDM.Add("Agent", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Army", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Corporate", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Journalist", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Marines", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Navy", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Scholar", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Scouts", bonus);
            }
        }
コード例 #28
0
ファイル: Citizen.cs プロジェクト: johny5w/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Political upheaval strikes your homeworld, and you are caught up in the revolution.");

                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Advocate");
                    skillList.Add("Persuade");
                    skillList.Add("Explosives");
                    skillList.Add("Streetwise");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                if (dice.RollHigh(8))
                {
                    character.CurrentTermBenefits.AdvancementDM += 2;
                }
                else
                {
                    character.NextTermBenefits.SurvivalDM += -2;
                }
                return;

            case 4:
                character.AddHistory("Spent time maintaining and using heavy vehicles.");
                var skills = new SkillTemplateCollection();
                skills.Add("Mechanic");
                skills.AddRange(SpecialtiesFor("Drive"));
                skills.AddRange(SpecialtiesFor("Electronics"));
                skills.AddRange(SpecialtiesFor("Flyer"));
                skills.AddRange(SpecialtiesFor("Engineer"));
                character.Skills.Increase(dice.Choose(skills));
                return;

            case 5:
                character.AddHistory("Your business expands, your corporation grows, or the colony thrives.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                character.AddHistory("Advanced training in a specialist field.");
                if (dice.RollHigh(character.EducationDM, 10))
                {
                    var skillList = new SkillTemplateCollection(RandomSkills);
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("You learn something you should not have – a corporate secret, a political scandal – which you can profit from illegally.");
                character.BenefitRollDMs.Add(1);
                switch (dice.D(3))
                {
                case 1:
                    character.Skills.Add("Streetwise", 1);
                    return;

                case 2:
                    character.Skills.Add("Deception", 1);
                    return;

                case 3:
                    character.AddHistory("Gain a criminal contact.");
                    return;
                }
                return;

            case 9:
                character.AddHistory("You are rewarded for your diligence or cunning.");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                character.AddHistory("You gain experience in a technical field as a computer operator or surveyor.");

                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Electronics"));
                    skillList.AddRange(SpecialtiesFor("Engineer"));
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 11:
                character.AddHistory("You befriend a superior in the corporation or the colony.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Diplomat", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("You rise to a position of power in your colony or corporation.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #29
0
ファイル: University.cs プロジェクト: johny5w/TravellerTools
        internal override void Run(Character character, Dice dice)
        {
            character.LongTermBenefits.MayEnrollInSchool = false;

            character.AddHistory($"Entered University at age {character.Age}");

            var skillChoices = new SkillTemplateCollection();

            skillChoices.Add("Admin");
            skillChoices.Add("Advocate");
            skillChoices.Add("Animals", "Training");
            skillChoices.Add("Animals", "Veterinary");
            skillChoices.AddRange(SpecialtiesFor("Art"));
            skillChoices.Add("Astrogation");
            skillChoices.AddRange(SpecialtiesFor("Electronics"));
            skillChoices.AddRange(SpecialtiesFor("Engineer"));
            skillChoices.AddRange(SpecialtiesFor("Language"));
            skillChoices.Add("Medic");
            skillChoices.Add("Navigation");
            skillChoices.AddRange(SpecialtiesFor("Profession"));
            skillChoices.AddRange(SpecialtiesFor("Science"));


            //Remove skills we already have at level 1
            skillChoices.RemoveOverlap(character.Skills, 1);

            var skillA = dice.Pick(skillChoices);

            character.Skills.Add(skillA, 1);


            //Remove skills we already have at level 0
            skillChoices.RemoveOverlap(character.Skills, 0);

            var skillB = dice.Pick(skillChoices);

            character.Skills.Add(skillB);


            character.Age                  += 4;
            character.Education            += 1;
            character.EducationHistory      = new EducationHistory();
            character.EducationHistory.Name = "University";


            Book.PreCareerEvents(character, dice, skillA.Name, skillB.Name);

            var graduation = dice.D(2, 6) + character.IntellectDM + character.CurrentTermBenefits.GraduationDM;

            if (graduation < 7)
            {
                character.AddHistory("Dropped out of university.");
                character.EducationHistory.Status = "Failed";
            }
            else
            {
                int bonus;
                if (graduation >= 11)
                {
                    character.EducationHistory.Status = "Honors";
                    character.AddHistory($"Graduated with honors at age {character.Age}.");
                    bonus = 2;
                }
                else
                {
                    character.EducationHistory.Status = "Graduated";
                    character.AddHistory($"Graduated at age {character.Age}.");
                    bonus = 1;
                }

                character.Education += 2;

                character.Skills.Increase(skillA, 1);
                character.Skills.Increase(skillB, 1);

                character.NextTermBenefits.FreeCommissionRoll = true;
                character.NextTermBenefits.CommissionDM       = bonus;
                character.LongTermBenefits.EnlistmentDM.Add("Agent", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Army", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Corporate", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Journalist", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Marines", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Navy", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Scholar", bonus);
                character.LongTermBenefits.EnlistmentDM.Add("Scouts", bonus);
            }
        }
コード例 #30
0
ファイル: Marine.cs プロジェクト: Grauenwolf/TravellerTools
 internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
 {
     if (careerHistory.CommissionRank == 0)
     {
         switch (careerHistory.Rank)
         {
             case 0:
                 careerHistory.Title = "Marine";
                 {
                     var skillList = new SkillTemplateCollection();
                     skillList.AddRange(SpecialtiesFor("Gun Combat"));
                     skillList.Add("Melee", "Blade");
                     skillList.RemoveOverlap(character.Skills, 1);
                     if (skillList.Count > 0)
                         character.Skills.Add(dice.Choose(skillList), 1);
                 }
                 return;
             case 1:
                 careerHistory.Title = "Lance Corporal";
                 {
                     var skillList = new SkillTemplateCollection();
                     skillList.AddRange(SpecialtiesFor("Gun Combat"));
                     skillList.RemoveOverlap(character.Skills, 1);
                     if (skillList.Count > 0)
                         character.Skills.Add(dice.Choose(skillList), 1);
                 }
                 return;
             case 2:
                 careerHistory.Title = "Corporal";
                 return;
             case 3:
                 careerHistory.Title = "Lance Sergeant";
                 character.Skills.Add("Leadership", 1);
                 return;
             case 4:
                 careerHistory.Title = "Sergeant";
                 return;
             case 5:
                 careerHistory.Title = "Gunnery Sergeant";
                 character.Endurance += 1;
                 return;
             case 6:
                 careerHistory.Title = "Sergeant Major";
                 return;
         }
     }
     else
     {
         switch (careerHistory.CommissionRank)
         {
             case 1:
                 careerHistory.Title = "Lieutenant";
                 character.Skills.Add("Leadership", 1);
                 return;
             case 2:
                 careerHistory.Title = "Captain";
                 return;
             case 3:
                 careerHistory.Title = "Force Commander";
                 {
                     var skillList = new SkillTemplateCollection();
                     skillList.AddRange(SpecialtiesFor("Tatics"));
                     skillList.RemoveOverlap(character.Skills, 1);
                     if (skillList.Count > 0)
                         character.Skills.Add(dice.Choose(skillList), 1);
                 }
                 return;
             case 4:
                 careerHistory.Title = "Lieutenant Colonel";
                 return;
             case 5:
                 careerHistory.Title = "Colonel";
                 if (character.SocialStanding < 10)
                     character.SocialStanding = 10;
                 else
                     character.SocialStanding += 1;
                 return;
             case 6:
                 careerHistory.Title = "Brigadier";
                 return;
         }
     }
 }
コード例 #31
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Arrested and charged.");
                switch (dice.D(2))
                {
                case 1:
                    if (dice.RollHigh(character.Skills.GetLevel("Advocate"), 8))
                    {
                        character.AddHistory("Successfully defended self.");
                    }
                    else
                    {
                        character.AddHistory("Failed to defend self. Gain an Enemy and go to prison.");
                        character.NextTermBenefits.MustEnroll = "Prisoner";
                    }
                    return;

                case 2:
                    character.AddHistory("Hired a lawyer to beat the charges.");
                    character.BenefitRolls += -1;
                    return;
                }
                return;

            case 4:
                character.AddHistory("Involved in the planning of an impressive heist.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Electronics"));
                    skillList.Add("Mechanic");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 5:
                character.AddHistory("Crime pays off. Gain victim as Enemy.");
                character.BenefitRollDMs.Add(2);
                return;

            case 6:
                switch (dice.D(2))
                {
                case 1:
                    character.AddHistory("Backstab a fellow rogue for personal gain.");
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;

                case 2:
                    character.AddHistory("Refuse to backstab a fellow rogue for personal gain. Gain an Ally");
                    return;
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("You spend months in the dangerous criminal underworld.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Streetwise");
                    skillList.Add("Stealth");
                    skillList.AddRange(SpecialtiesFor("Melee"));
                    skillList.AddRange(SpecialtiesFor("Gun Combat"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 9:
                character.AddHistory("Involved in a feud with a rival criminal organization.");
                if (dice.RollHigh(character.Skills.BestSkillLevel("Stealth", "Gun Combat"), 8))
                {
                    character.BenefitRolls += 1;
                }
                else
                {
                    Injury(character, dice);
                }
                return;

            case 10:
                character.AddHistory("Involved in a gambling ring. ");
                character.Skills.Add("Gambler", 1);
                if (character.BenefitRolls > 0)
                {
                    if (dice.RollHigh(character.Skills.GetLevel("Gambler"), 8))
                    {
                        character.BenefitRolls = (int)Math.Ceiling(1.5 * character.BenefitRolls);
                    }
                    else
                    {
                        character.BenefitRolls = 0;
                    }
                }
                return;

            case 11:
                character.AddHistory("A crime lord considers you his protégé.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Tactics", "Military", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("You commit a legendary crime.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #32
0
ファイル: Psion.cs プロジェクト: Brennall/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Psionic abilities make you uncomfortable to be around. One contact or ally becomes a rival.");
                return;

            case 4:
                character.AddHistory("Spent time mastering mind and body.");
                {
                    var skills = new SkillTemplateCollection();
                    skills.Add("Stealth");
                    skills.Add("Survival");
                    skills.AddRange(SpecialtiesFor("Athletics"));
                    skills.AddRange(SpecialtiesFor("Art"));
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                return;

            case 5:
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Refuse to misuse powers for personal gain.");
                    return;
                }
                else
                {
                    if (dice.RollHigh(character.PsiDM, 8))
                    {
                        character.AddHistory("Use powers for personal gain.");
                        if (dice.D(2) == 1)
                        {
                            character.BenefitRolls += 1;
                        }
                        else
                        {
                            character.SocialStanding += 1;
                        }
                    }
                    else
                    {
                        character.AddHistory("Attempt to use powers for personal gain, but it backfires.");
                        character.SocialStanding -= 1;
                    }
                    return;
                }

            case 6:
                character.AddHistory("Gain a contact outside of normal circles.");
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("Psionic strength increases.");
                character.Psi += 1;
                return;

            case 9:
                character.AddHistory("Advanced training in a specialist field.");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    var skills = new SkillTemplateCollection(Book.RandomSkills);
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                return;

            case 10:
                character.AddHistory("Pick up potentially useful information using your psychic powers");
                character.BenefitRollDMs.Add(1);
                return;

            case 11:
                character.AddHistory("Gain a mentor");
                character.CurrentTermBenefits.AdvancementDM += 4;
                return;

            case 12:
                character.AddHistory("Achieve a new level of discipline in your powers");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #33
0
ファイル: Prisoner.cs プロジェクト: johny5w/TravellerTools
        internal void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                return;

            case 3:
                if (dice.RollHigh(character.Skills.BestSkillLevel("Stealth", "Deception"), 10))
                {
                    character.AddHistory("Escaped from prison.");
                    character.NextTermBenefits.MusterOut = true;
                }
                else
                {
                    character.AddHistory("Failed to escaped from prison.");
                    character.Parole += 2;
                }
                return;

            case 4:
                character.AddHistory("Assigned to difficult or backbreaking labour.");
                if (dice.RollHigh(character.EnduranceDM, 8))
                {
                    character.Parole += -1;
                    var skills = new SkillTemplateCollection();
                    skills.AddRange(SpecialtiesFor("Athletics"));
                    skills.Add("Mechanic");
                    skills.Add("Melee", "Unarmed");
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                else
                {
                    character.Parole += 1;
                }
                return;

            case 5:
                if (dice.RollHigh(character.Skills.BestSkillLevel("Persuade", "Melee"), 8))
                {
                    character.AddHistory("Joined a prison gang");
                    character.LongTermBenefits.PrisonSurvivalDM += 1;
                    character.Parole += 1;

                    var skills = new SkillTemplateCollection();
                    skills.Add("Deception");
                    skills.Add("Persuade");
                    skills.Add("Stealth");
                    skills.Add("Melee", "Unarmed");
                    skills.RemoveOverlap(character.Skills, 1);
                    if (skills.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skills), 1);
                    }
                }
                else
                {
                    character.AddHistory("Offended a prison gang you tried to join. Gain an Enemy.");
                }
                return;

            case 6:
                character.AddHistory("Vocational Training.");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    character.Skills.Increase(dice.Choose(RandomSkills), 1);
                }
                return;

            case 7:
                switch (dice.D(6))
                {
                case 1:
                    character.AddHistory("A riot engulfs the prison.");
                    if (dice.D(6) <= 2)
                    {
                        Injury(character, dice);
                    }
                    else
                    {
                        character.AddHistory("Loot the guards/other prisoners.");
                        character.BenefitRolls += 1;
                    }
                    return;

                case 2:
                    character.AddHistory("Make friends with another inmate; gain them as a Contact.");
                    return;

                case 3:
                    character.AddHistory("You gain a new Rival among the inmates or guards.");
                    return;

                case 4:
                    var oldParole = character.Parole;
                    character.Parole = dice.D(6) + 4;

                    if (oldParole > character.Parole)
                    {
                        character.AddHistory("You are moved to a lower security prison.");
                    }
                    else if (oldParole == character.Parole)
                    {
                        character.AddHistory("You are moved to a different prison.");
                    }
                    else
                    {
                        character.AddHistory("You are moved to a higher security prison.");
                    }
                    return;

                case 5:
                    character.AddHistory("Good Behaviour.");
                    character.Parole += -2;
                    return;

                case 6:
                    character.AddHistory("Attacked by another prisoner.");
                    if (!dice.RollHigh(character.Skills.GetLevel("Melee", "Unarmed"), 8))
                    {
                        Injury(character, dice);
                    }
                    return;
                }
                return;

            case 8:
                character.AddHistory("Parole hearing.");
                character.Parole += -1;
                return;

            case 9:
                character.AddHistory("Hire a new lawyer.");
                var advocate = dice.D(6) - 2;
                if (dice.RollHigh(advocate, 8))
                {
                    character.Parole -= dice.D(6);
                }
                return;

            case 10:
                character.AddHistory("Special Duty.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Admin");
                    skillList.Add("Advocate");
                    skillList.Add("Electronics", "Computers");
                    skillList.Add("Steward");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 11:
                character.AddHistory("The warden takes an interest in your case.");
                character.Parole += -2;
                return;

            case 12:
                if (dice.RollHigh(8))
                {
                    character.AddHistory("Saved a guard or prison officer. Gain an Ally.");
                    character.Parole += -2;
                }
                else
                {
                    character.AddHistory("Attmped but failed to save a guard or prison officer.");
                    Injury(character, dice, false);
                }
                return;
            }
        }
コード例 #34
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Smuggle illegal items onto a planet.");
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Deception", "Persuade"), 8))
                    {
                        character.Skills.Add("Streetwise", 1);
                        character.BenefitRolls += 1;
                    }
                }
                else
                {
                    character.AddHistory("Refuse to smuggle illegal items onto a planet. Gain an Enemy.");
                }
                return;

            case 4:
            {
                var skillList = new SkillTemplateCollection();
                skillList.AddRange(SpecialtiesFor("Profession"));
                skillList.AddRange(SpecialtiesFor("Electronics"));
                skillList.AddRange(SpecialtiesFor("Engineer"));
                skillList.AddRange(SpecialtiesFor("Animals"));
                skillList.AddRange(SpecialtiesFor("Science"));
                skillList.RemoveOverlap(character.Skills, 1);
                if (skillList.Count > 0)
                {
                    character.Skills.Add(dice.Choose(skillList), 1);
                }
            }

                return;

            case 5:
                if (dice.RollHigh(character.Skills.BestSkillLevel("Gambler", "Broker"), 8))
                {
                    character.AddHistory($"Risk your fortune on a possibility lucrative deal and win.");
                    character.BenefitRolls *= 2;
                }
                else
                {
                    character.BenefitRolls = 0;
                }
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Broker");
                    skillList.Add("Gambler");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 6:
                character.AddHistory("Make an unexpected connection outside your normal circles. Gain a Contact.");
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("Embroiled in legal trouble.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Advocate");
                    skillList.Add("Admin");
                    skillList.Add("Diplomat");
                    skillList.Add("Investigate");
                }
                if (dice.D(2, 6) == 2)
                {
                    character.NextTermBenefits.MusterOut  = true;
                    character.NextTermBenefits.MustEnroll = "Prisoner";
                }
                return;

            case 9:
                character.AddHistory("Given advanced training in a specialist field");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    dice.Choose(character.Skills).Level += 1;
                }
                return;

            case 10:
                character.AddHistory("A good deal ensures you are living the high life for a few years.");
                character.BenefitRollDMs.Add(1);
                return;

            case 11:
                character.AddHistory("Befriend a useful ally in one sphere. Gain an Ally.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Carouse", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Your business or ship thrives.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #35
0
ファイル: Rogue.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    character.AddHistory("Arrested and charged.");
                    switch (dice.D(2))
                    {
                        case 1:
                            if (dice.RollHigh(character.Skills.GetLevel("Advocate"), 8))
                            {
                                character.AddHistory("Successfully defended self.");
                            }
                            else
                            {
                                character.AddHistory("Failed to defend self. Gain an Enemy and go to prison.");
                                character.NextTermBenefits.MustEnroll = "Prisoner";
                            }
                            return;
                        case 2:
                            character.AddHistory("Hired a lawyer to beat the charges.");
                            character.BenefitRolls += -1;
                            return;
                    }
                    return;
                case 4:
                    character.AddHistory("Involved in the planning of an impressive heist.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Electronics"));
                        skillList.Add("Mechanic");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 5:
                    character.AddHistory("Crime pays off. Gain victim as Enemy.");
                    character.BenefitRollDMs.Add(2);
                    return;
                case 6:
                    switch (dice.D(2))
                    {
                        case 1:
                            character.AddHistory("Backstab a fellow rogue for personal gain.");
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                        case 2:
                            character.AddHistory("Refuse to backstab a fellow rogue for personal gain. Gain an Ally");
                            return;
                    }
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    character.AddHistory("You spend months in the dangerous criminal underworld.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Streetwise");
                        skillList.Add("Stealth");
                        skillList.AddRange(SpecialtiesFor("Melee"));
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 9:
                    character.AddHistory("Involved in a feud with a rival criminal organization.");
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Stealth", "Gun Combat"), 8))
                        character.BenefitRolls += 1;
                    else
                        Injury(character, dice);
                    return;
                case 10:
                    character.AddHistory("Involved in a gambling ring. ");
                    character.Skills.Add("Gambler", 1);
                    if (character.BenefitRolls > 0)
                    {
                        if (dice.RollHigh(character.Skills.GetLevel("Gambler"), 8))
                            character.BenefitRolls = (int)Math.Ceiling(1.5 * character.BenefitRolls);
                        else
                            character.BenefitRolls = 0;
                    }
                    return;
                case 11:
                    character.AddHistory("A crime lord considers you his protégé.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Add("Tactics", "Military", 1);
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("You commit a legendary crime.");
                    character.CurrentTermBenefits.AdvancementDM += 100;
                    return;
            }
        }
コード例 #36
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Trapped behind enemy lines.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Survival");
                    skillList.Add("Stealth");
                    skillList.Add("Deception");
                    skillList.Add("Streetwise");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 4:
                character.AddHistory("Assigned to the security staff of a space station.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Vacc Suit");
                    skillList.Add("Athletics", "Dexterity");
                    character.Skills.Increase(dice.Choose(skillList));
                }

                return;

            case 5:
                character.AddHistory($"Advanced training in a specialist field");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(RandomSkills);
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 6:
                character.AddHistory("Assigned to an assault on an enemy fortress.");
                if (dice.RollHigh(character.Skills.BestSkillLevel("Gun Combat", "Melee"), 8))
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Tactics", "Military");
                    skillList.Add("Leadership");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                else
                {
                    character.AddHistory("Injured");
                    switch (dice.D(3))
                    {
                    case 1:
                        character.Strength -= 1;
                        return;

                    case 2:
                        character.Dexterity -= 1;
                        return;

                    case 3:
                        character.Endurance -= 1;
                        return;
                    }
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                character.AddHistory("On the front lines of a planetary assault and occupation.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Recon");
                    skillList.AddRange(SpecialtiesFor("Gun Combat"));
                    skillList.Add("Leadership");
                    skillList.Add("Electronics", "Comms");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 9:
                character.AddHistory("A mission goes disastrously wrong due to your commander’s error or incompetence, but you survive.");
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Report commander and gain an Enemy.");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                }
                else
                {
                    character.AddHistory("Cover for the commander and gain an Ally.");
                }
                return;

            case 10:
                character.AddHistory("Assigned to a black ops mission.");
                character.CurrentTermBenefits.AdvancementDM += 2;

                return;

            case 11:
                character.AddHistory("Commanding officer takes an interest in your career.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Add("Tactics", "Military", 1);
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Display heroism in battle.");

                character.CurrentTermBenefits.AdvancementDM += 100;                         //also applies to commission rolls

                if (character.LastCareer.CommissionRank == 0)
                {
                    character.CurrentTermBenefits.FreeCommissionRoll = true;
                }

                return;
            }
        }
コード例 #37
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Refused to perform research that goes against your conscience.");
                }
                else
                {
                    character.AddHistory($"Agreed to perform research that goes against your conscience. Gain {dice.D(3)} Enemies.");
                    character.BenefitRolls += 1;

                    var skillList = new SkillTemplateCollection(SpecialtiesFor("Science"));
                    character.Skills.Increase(dice.Pick(skillList));
                    character.Skills.Increase(dice.Pick(skillList));     //pick 2
                }
                return;

            case 4:
                character.AddHistory("Assigned to work on a secret project for a patron or organisation.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Medic");
                    skillList.AddRange(SpecialtiesFor("Science"));
                    skillList.AddRange(SpecialtiesFor("Engineer"));
                    skillList.AddRange(SpecialtiesFor("Electronics"));
                    skillList.Add("Investigate");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 5:
                character.AddHistory($"Win a prestigious prize for your work.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                character.AddHistory("Advanced training in a specialist field.");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    var skillList = new SkillTemplateCollection(RandomSkills);
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
            {
                if (dice.D(2) == 1)
                {
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Deception", "Admin"), 8))
                    {
                        character.AddHistory("Cheated in some fashion, advancing your career and research by stealing another’s work, using an alien device, taking a shortcut and so forth.");
                        character.BenefitRollDMs.Add(2);
                        dice.Choose(character.Skills).Level += 1;
                    }
                    else
                    {
                        character.AddHistory("Caught cheating in some fashion, advancing your career and research by stealing another’s work, using an alien device, taking a shortcut and so forth.");
                        character.BenefitRolls += -1;
                        Mishap(character, dice);
                    }
                    character.AddHistory("Gain an Enemy");
                }
                else
                {
                    character.AddHistory("Refuse to join a cheat in some fashion.");
                }
            }
                return;

            case 9:
                character.AddHistory("Make a breakthrough in your field.");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                character.AddHistory("Entangled in a bureaucratic or legal morass that distracts you from your work.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Admin");
                    skillList.Add("Advocate");
                    skillList.Add("Persuade");
                    skillList.Add("Diplomat");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 11:
                character.AddHistory("Work for an eccentric but brilliant mentor, who becomes an Ally.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Increase(dice.Choose(SpecialtiesFor("Science")));
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Work leads to a considerable breakthrough.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #38
0
ファイル: Merchant.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
                case 1:
                    Injury(character, dice, true);
                    return;
                case 2:
                    character.AddHistory("Bankrupted by a rival. Gain the other trader as a Rival.");
                    character.BenefitRolls = 0;
                    return;
                case 3:
                    character.AddHistory("A sudden war destroys your trade routes and contacts, forcing you to flee that region of space.");
                    character.AddHistory("Gain rebels as Enemy");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Gun Combat"));
                        skillList.AddRange(SpecialtiesFor("Pilot"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;

                case 4:
                    character.AddHistory("Your ship or starport is destroyed by criminals. Gain them as an Enemy.");
                    return;
                case 5:
                    character.AddHistory("Imperial trade restrictions force you out of business.");
                    character.NextTermBenefits.EnlistmentDM.Add("Rogue", 100);
                    return;
                case 6:
                    character.AddHistory("A series of bad deals and decisions force you into bankruptcy. You salvage what you can.");
                    character.BenefitRolls += 1;
                    return;
            }
        }
コード例 #39
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                if (dice.D(2) == 1)
                {
                    character.AddHistory("Refused a challenge to a duel for your honour and standing.");
                    character.SocialStanding += -1;
                }
                else
                {
                    if (dice.RollHigh(character.Skills.GetLevel("Melee", "Blade"), 8))
                    {
                        character.SocialStanding += 1;
                    }
                    else
                    {
                        character.SocialStanding += -1;
                        Injury(character, dice);
                    }

                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Melee", "Blade)");
                    skillList.Add("Leadership");
                    skillList.AddRange(SpecialtiesFor("Tactics"));
                    skillList.Add("Deception");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 4:
                character.AddHistory("time as a ruler or playboy gives you a wide range of experiences.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Animals", "Handling");
                    skillList.AddRange(SpecialtiesFor("Art"));
                    skillList.Add("Carouse");
                    skillList.Add("Streetwise");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 5:
                character.AddHistory($"Inherit a gift from a rich relative.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                character.AddHistory("Become deeply involved in politics on your world of residence, becoming a player in the political intrigues of government. Gain a Rival.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Advocate");
                    skillList.Add("Admin");
                    skillList.Add("Diplomacy");
                    skillList.Add("Persuade");
                    character.Skills.Increase(dice.Choose(skillList));
                }

                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
            {
                if (dice.D(2) == 1)
                {
                    if (dice.RollHigh(character.Skills.BestSkillLevel("Deception", "Persuade"), 8))
                    {
                        character.AddHistory("Join a successful conspiracy of nobles.");
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Deception");
                        skillList.Add("Persuade");
                        skillList.AddRange(SpecialtiesFor("Tactics"));
                        skillList.Add("Carouse");
                        character.Skills.Increase(dice.Choose(skillList));
                    }
                    else
                    {
                        character.AddHistory("Join a conspiracy of nobles that were caught.");
                        Mishap(character, dice);
                    }
                }
                else
                {
                    character.AddHistory("Refuse to join a conspiracy of nobles. Gain an Enemy.");
                }
            }
                return;

            case 9:
                character.AddHistory("Your reign is acclaimed by all as being fair and wise – or in the case of a dilettante, you sponge off your family’s wealth a while longer. Gain either a jealous relative or an unhappy subject as an Enemy.");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                character.AddHistory("You manipulate and charm your way through high society. Gain a Rival and an Ally.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Carouse");
                    skillList.Add("Diplomat");
                    skillList.Add("Persuade");
                    skillList.Add("Steward");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                return;

            case 11:
                character.AddHistory("You make an alliance with a powerful and charismatic noble, who becomes an Ally.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Increase("Leadership");
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Your efforts do not go unnoticed by the Imperium.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #40
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("Offered job by a patron. Now owe him a favor.");
                character.NextTermBenefits.MusterOut        = true;
                character.NextTermBenefits.QualificationDM += 4;
                return;

            case 4:
                var skills = new SkillTemplateCollection();
                skills.Add("Jack-of-All-Trades");
                skills.Add("Survival");
                skills.Add("Streetwise");
                skills.AddRange(SpecialtiesFor("Melee"));
                character.Skills.Increase(dice.Choose(skills));
                return;

            case 5:
                character.AddHistory("Find valuable salvage.");
                character.BenefitRollDMs.Add(1);
                return;

            case 6:
                UnusualLifeEvent(character, dice);
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
                var bestSkill = character.Skills.BestSkillLevel("Melee", "Gun Combat", "Stealth");
                if (dice.RollHigh(bestSkill, 8))
                {
                    character.AddHistory("Attacked by enemies that you easily defeat.");
                }
                else
                {
                    character.AddHistory("Attacked by enemies and injured.");
                    Injury(character, dice);
                }
                character.AddHistory("Gain Enemy if you don't already have one.");
                return;

            case 9:
            {
                var roll = dice.D(6);
                if (roll == 1)
                {
                    character.AddHistory("Attempted a risky adventure and was injured.");
                    Injury(character, dice);
                }
                else if (roll == 2)
                {
                    character.AddHistory("Attempted a risky adventure and was sent to prison.");
                    character.NextTermBenefits.MustEnroll = "Prisoner";
                }
                else if (roll < 5)
                {
                    character.AddHistory("Survived a risky adventure but gained nothing.");
                }
                else
                {
                    character.AddHistory("Attempted a risky adventure and was wildly successful.");
                    character.BenefitRollDMs.Add(4);
                }
            }
                return;

            case 10:
                dice.Choose(character.Skills).Level += 1;
                return;

            case 11:
                character.NextTermBenefits.MusterOut  = true;
                character.NextTermBenefits.MustEnroll = Book.RollDraft(dice);
                character.AddHistory("Drafted into " + character.NextTermBenefits.MustEnroll);
                return;

            case 12:
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #41
0
ファイル: Army.cs プロジェクト: Grauenwolf/TravellerTools
 internal override void ServiceSkill(Character character, Dice dice)
 {
     switch (dice.D(6))
     {
         case 1:
             {
                 var skillList = new SkillTemplateCollection();
                 skillList.AddRange(SpecialtiesFor("Drive"));
                 skillList.Add("Vacc Suit");
                 character.Skills.Increase(dice.Choose(skillList));
             }
             return;
         case 2:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Athletics")));
             return;
         case 3:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Gun Combat")));
             return;
         case 4:
             character.Skills.Increase("Recon");
             return;
         case 5:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Melee")));
             return;
         case 6:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Heavy Weapons")));
             return;
     }
 }
コード例 #42
0
        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
            case 0:
                careerHistory.Title = "Lackey";
                return;

            case 1:
                careerHistory.Title = "Henchman";
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Pilot"));
                    skillList.AddRange(SpecialtiesFor("Gunner"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 2:
                careerHistory.Title = "Corporal";
                return;

            case 3:
                careerHistory.Title = "Sergeant";
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Gun Combat"));
                    skillList.AddRange(SpecialtiesFor("Melee"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }

                return;

            case 4:
                careerHistory.Title = "Lieutenant";
                return;

            case 5:
                careerHistory.Title = "Leader";
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Engineer"));
                    skillList.Add("Navigation");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 6:
                careerHistory.Title = "Captain";
                return;
            }
        }
コード例 #43
0
ファイル: Scholar.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    if (dice.D(2) == 1)
                    {
                        character.AddHistory("Refused to perform research that goes against your conscience.");
                    }
                    else
                    {
                        character.AddHistory($"Agreed to perform research that goes against your conscience. Gain {dice.D(3)} Enemies.");
                        character.BenefitRolls += 1;

                        var skillList = new SkillTemplateCollection(SpecialtiesFor("Science"));
                        character.Skills.Increase(dice.Pick(skillList));
                        character.Skills.Increase(dice.Pick(skillList)); //pick 2

                    }
                    return;
                case 4:
                    character.AddHistory("Assigned to work on a secret project for a patron or organisation.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Medic");
                        skillList.AddRange(SpecialtiesFor("Science"));
                        skillList.AddRange(SpecialtiesFor("Engineer"));
                        skillList.AddRange(SpecialtiesFor("Electronics"));
                        skillList.Add("Investigate");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 5:
                    character.AddHistory($"Win a prestigious prize for your work.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 6:
                    character.AddHistory("Advanced training in a specialist field.");
                    if (dice.RollHigh(character.EducationDM, 8))
                    {
                        var skillList = new SkillTemplateCollection(RandomSkills);
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    {
                        if (dice.D(2) == 1)
                        {
                            if (dice.RollHigh(character.Skills.BestSkillLevel("Deception", "Admin"), 8))
                            {
                                character.AddHistory("Cheated in some fashion, advancing your career and research by stealing another’s work, using an alien device, taking a shortcut and so forth.");
                                character.BenefitRollDMs.Add(2);
                                dice.Choose(character.Skills).Level += 1;
                            }
                            else
                            {
                                character.AddHistory("Caught cheating in some fashion, advancing your career and research by stealing another’s work, using an alien device, taking a shortcut and so forth.");
                                character.BenefitRolls += -1;
                                Mishap(character, dice);
                            }
                            character.AddHistory("Gain an Enemy");
                        }
                        else
                        {
                            character.AddHistory("Refuse to join a cheat in some fashion.");
                        }

                    }
                    return;
                case 9:
                    character.AddHistory("Make a breakthrough in your field.");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                    return;
                case 10:
                    character.AddHistory("Entangled in a bureaucratic or legal morass that distracts you from your work.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Admin");
                        skillList.Add("Advocate");
                        skillList.Add("Persuade");
                        skillList.Add("Diplomat");
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 11:
                    character.AddHistory("Work for an eccentric but brilliant mentor, who becomes an Ally.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Increase(dice.Choose(SpecialtiesFor("Science")));
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Work leads to a considerable breakthrough.");
                    character.CurrentTermBenefits.AdvancementDM += 100;
                    return;
            }
        }
コード例 #44
0
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
            case 2:
                Mishap(character, dice);
                character.NextTermBenefits.MusterOut = false;
                return;

            case 3:
                character.AddHistory("An investigation takes on a dangerous turn.");

                if (dice.RollHigh(character.Skills.BestSkillLevel("Investigate", "Streetwise"), 8))
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Deception");
                    skillList.Add("Jack-of-All-Trades");
                    skillList.Add("Persuade");
                    skillList.Add("Tactics");
                    character.Skills.Increase(dice.Choose(skillList));
                }
                else
                {
                    Mishap(character, dice);
                }
                return;

            case 4:
                character.AddHistory("Rewarded for a successful mission.");
                character.BenefitRollDMs.Add(1);
                return;

            case 5:
                character.AddHistory($"Established a network of contacts. Gain {dice.D(3)} contacts.");
                return;

            case 6:
                character.AddHistory("Advanced training in a specialist field.");
                if (dice.RollHigh(character.EducationDM, 8))
                {
                    dice.Choose(character.Skills).Level += 1;
                }
                return;

            case 7:
                LifeEvent(character, dice);
                return;

            case 8:
            {
                character.AddHistory("Go undercover to investigate an enemy.");

                var career = dice.Choose(m_Careers);

                if (dice.RollHigh(character.Skills.GetLevel("Deception"), 8))
                {
                    career.Event(character, dice);
                    career.AssignmentSkills(character, dice);
                }
                else
                {
                    career.Mishap(character, dice);
                }
            }
                return;

            case 9:
                character.AddHistory("You go above and beyond the call of duty.");
                character.CurrentTermBenefits.AdvancementDM += 2;
                return;

            case 10:
                character.AddHistory("Given specialist training in vehicles.");
                {
                    var skillList = new SkillTemplateCollection();
                    skillList.AddRange(SpecialtiesFor("Drive"));
                    skillList.AddRange(SpecialtiesFor("Flyer"));
                    skillList.AddRange(SpecialtiesFor("Pilot"));
                    skillList.AddRange(SpecialtiesFor("Gunner"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                    {
                        character.Skills.Add(dice.Choose(skillList), 1);
                    }
                }
                return;

            case 11:
                character.AddHistory("Befriended by a senior agent.");
                switch (dice.D(2))
                {
                case 1:
                    character.Skills.Increase("Investigate");
                    return;

                case 2:
                    character.CurrentTermBenefits.AdvancementDM += 4;
                    return;
                }
                return;

            case 12:
                character.AddHistory("Uncover a major conspiracy against your employers.");
                character.CurrentTermBenefits.AdvancementDM += 100;
                return;
            }
        }
コード例 #45
0
ファイル: Agent.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Event(Character character, Dice dice)
        {
            switch (dice.D(2, 6))
            {
                case 2:
                    Mishap(character, dice);
                    character.NextTermBenefits.MusterOut = false;
                    return;
                case 3:
                    character.AddHistory("An investigation takes on a dangerous turn.");

                    if (dice.RollHigh(character.Skills.BestSkillLevel("Investigate", "Streetwise"), 8))
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Deception");
                        skillList.Add("Jack-of-All-Trades");
                        skillList.Add("Persuade");
                        skillList.Add("Tactics");
                        character.Skills.Increase(dice.Choose(skillList));
                    }
                    else
                    {
                        Mishap(character, dice);
                    }
                    return;
                case 4:
                    character.AddHistory("Rewarded for a successful mission.");
                    character.BenefitRollDMs.Add(1);
                    return;
                case 5:
                    character.AddHistory($"Established a network of contacts. Gain {dice.D(3)} contacts.");
                    return;
                case 6:
                    character.AddHistory("Advanced training in a specialist field.");
                    if (dice.RollHigh(character.EducationDM, 8))
                    {
                        dice.Choose(character.Skills).Level += 1;
                    }
                    return;
                case 7:
                    LifeEvent(character, dice);
                    return;
                case 8:
                    {
                        character.AddHistory("Go undercover to investigate an enemy.");

                        var career = dice.Choose(m_Careers);

                        if (dice.RollHigh(character.Skills.GetLevel("Deception"), 8))
                        {
                            career.Event(character, dice);
                            career.AssignmentSkills(character, dice);
                        }
                        else
                        {
                            career.Mishap(character, dice);
                        }
                    }
                    return;
                case 9:
                    character.AddHistory("You go above and beyond the call of duty.");
                    character.CurrentTermBenefits.AdvancementDM += 2;
                    return;
                case 10:
                    character.AddHistory("Given specialist training in vehicles.");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.AddRange(SpecialtiesFor("Drive"));
                        skillList.AddRange(SpecialtiesFor("Flyer"));
                        skillList.AddRange(SpecialtiesFor("Pilot"));
                        skillList.AddRange(SpecialtiesFor("Gunner"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }
                    return;
                case 11:
                    character.AddHistory("Befriended by a senior agent.");
                    switch (dice.D(2))
                    {
                        case 1:
                            character.Skills.Increase("Investigate");
                            return;
                        case 2:
                            character.CurrentTermBenefits.AdvancementDM += 4;
                            return;
                    }
                    return;
                case 12:
                    character.AddHistory("Uncover a major conspiracy against your employers.");
                    character.CurrentTermBenefits.AdvancementDM += 100;
                    return;
            }
        }
コード例 #46
0
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
                case 1:
                    Injury(character, dice, true);
                    return;
                case 2:
                    character.AddHistory("Expose or are involved in a scandal of some sort.");
                    return;
                case 3:
                    character.AddHistory("Public opinion turns on you.");
                    character.SocialStanding += -1;
                    return;

                case 4:
                    character.AddHistory("You are betrayed by a peer. One Ally or Contact becomes a Rival or Enemy");
                    return;
                case 5:
                    character.AddHistory("An investigation, tour, project or expedition goes wrong, stranding you far from home.");
                    var skillList = new SkillTemplateCollection();
                    skillList.Add("Survival");
                    skillList.AddRange(SpecialtiesFor("Pilot"));
                    skillList.Add("Persuade");
                    skillList.Add("Streetwise");
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                        character.Skills.Add(dice.Choose(skillList), 1);

                    return;
                case 6:
                    character.AddHistory("You are forced out because of censorship or controversy. What truth did you get too close to?");
                    character.NextTermBenefits.QualificationDM += 2;
                    return;
            }
        }
コード例 #47
0
ファイル: Rogue.cs プロジェクト: Grauenwolf/TravellerTools
        internal override void Mishap(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
                case 1:
                    Injury(character, dice, true);
                    return;
                case 2:
                    character.AddHistory("Arrested");
                    character.NextTermBenefits.MustEnroll = "Prisoner";
                    return;
                case 3:
                    character.AddHistory("Betrayed by a friend. One of your Contacts or Allies betrays you, ending your career. That Contact or Ally becomes a Rival or Enemy.");
                    if (dice.D(2, 6) == 2)
                    {
                        character.NextTermBenefits.MustEnroll = "Prisoner";
                    }
                    return;

                case 4:
                    character.AddHistory("A job goes wrong, forcing you to flee off-planet. ");
                    {
                        var skillList = new SkillTemplateCollection();
                        skillList.Add("Deception");
                        skillList.Add("Pilot", "Small Craft");
                        skillList.Add("Pilot", "Spacecraft");
                        skillList.Add("Athletics", "Dexterity");
                        skillList.AddRange(SpecialtiesFor("Gunner"));
                        skillList.RemoveOverlap(character.Skills, 1);
                        if (skillList.Count > 0)
                            character.Skills.Add(dice.Choose(skillList), 1);
                    }

                    return;
                case 5:
                    character.AddHistory("A police detective or rival criminal forces you to flee and vows to hunt you down. Gain an Enemy.");
                    return;
                case 6:
                    Injury(character, dice, false);
                    return;
            }
        }