当前位置: 首页>>代码示例>>C#>>正文


C# Dice.Choose方法代码示例

本文整理汇总了C#中Dice.Choose方法的典型用法代码示例。如果您正苦于以下问题:C# Dice.Choose方法的具体用法?C# Dice.Choose怎么用?C# Dice.Choose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dice的用法示例。


在下文中一共展示了Dice.Choose方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AssignmentSkills

 internal override void AssignmentSkills(Character character, Dice dice)
 {
     switch (dice.D(6))
     {
         case 1:
             {
                 var skillList = new SkillTemplateCollection();
                 skillList.Add("Art", "Holography");
                 skillList.Add("Art", "Write");
                 character.Skills.Increase(dice.Choose(skillList));
             }
             return;
         case 2:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Electronics")));
             return;
         case 3:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Drive")));
             return;
         case 4:
             character.Skills.Increase("Investigate");
             return;
         case 5:
             character.Skills.Increase("Recon");
             return;
         case 6:
             character.Skills.Increase("Streetwise");
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:29,代码来源:Entertainer.Journalist.cs

示例2: AssignmentSkills

        internal override void AssignmentSkills(Character character, Dice dice)
        {
            switch (dice.D(6))
            {
                case 1:
                    character.Skills.Increase("Mechanic");
                    return;
                case 2:
                    character.Skills.Increase(dice.Choose(SpecialtiesFor("Drive")));
                    return;
                case 3:
                    character.Skills.Increase(dice.Choose(SpecialtiesFor("Flyer")));
                    return;
                case 4:
                    character.Skills.Increase("Recon");
                    return;
                case 5:
                    character.Skills.Increase("Heavy Weapons", "Vehicle");

                    return;
                case 6:
                    character.Skills.Increase("Electronics", "Sensors");
                    return;
            }
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:25,代码来源:Army.Cavalry.cs

示例3: TitleTable

        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;
            }
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:52,代码来源:Rogue.Pirate.cs

示例4: TitleTable

        internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
        {
            switch (careerHistory.Rank)
            {
                case 0:
                    return;
                case 1:
                    careerHistory.Title = "Agent";
                    character.Skills.Add("Deception", 1);
                    return;
                case 2:
                    careerHistory.Title = "Field Agent";
                    character.Skills.Add("Investigate", 1);
                    return;
                case 3:
                    return;
                case 4:
                    careerHistory.Title = "Special Agent";
                    var skillList = new SkillTemplateCollection(SpecialtiesFor("Gun Combat"));
                    skillList.RemoveOverlap(character.Skills, 1);
                    if (skillList.Count > 0)
                        character.Skills.Add(dice.Choose(skillList), 1);

                    return;
                case 5:
                    careerHistory.Title = "Assistant Director";
                    return;
                case 6:
                    careerHistory.Title = "Director";
                    return;
            }
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:32,代码来源:Agent.Intelligence.cs

示例5: TitleTable

 internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
 {
     switch (careerHistory.Rank)
     {
         case 1:
             return;
         case 2:
             careerHistory.Title = "Technician";
             {
                 var skillList = new SkillTemplateCollection(SpecialtiesFor("Profession"));
                 skillList.RemoveOverlap(character.Skills, 1);
                 if (skillList.Count > 0)
                     character.Skills.Add(dice.Choose(skillList), 1);
             }
             return;
         case 3:
             return;
         case 4:
             careerHistory.Title = "Craftsman";
             character.Skills.Add("Mechanic", 1);
             return;
         case 5:
             return;
         case 6:
             careerHistory.Title = "Master Technician";
             {
                 var skillList = new SkillTemplateCollection(SpecialtiesFor("Engineer"));
                 skillList.RemoveOverlap(character.Skills, 1);
                 if (skillList.Count > 0)
                     character.Skills.Add(dice.Choose(skillList), 1);
             }
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:34,代码来源:Citizen.Worker.cs

示例6: TitleTable

 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;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:28,代码来源:Rogue.Enforcer.cs

示例7: BasicTrainingSkills

        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"));
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:33,代码来源:Army.cs

示例8: BasicTrainingSkills

        internal override void BasicTrainingSkills(Character character, Dice dice, bool all)
        {
            var roll = dice.D(6);

            if (all || roll == 1)
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Pilot")));
            if (all || roll == 2)
                character.Skills.Increase("Vacc Suit");
            if (all || roll == 3)
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Athletics")));
            if (all || roll == 4)
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Gunner")));
            if (all || roll == 5)
                character.Skills.Increase("Mechanic");
            if (all || roll == 6)
                character.Skills.Increase(dice.Choose(SpecialtiesFor("Gun Combat ")));
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:17,代码来源:Navy.cs

示例9: BasicTrainingSkills

        internal override void BasicTrainingSkills(Character character, Dice dice, bool all)
        {
            var roll = dice.D(6);

            if (all || roll == 1)
                character.Skills.Add(dice.Choose(SpecialtiesFor("Athletics")));
            if (all || roll == 2)
                character.Skills.Add("Vacc Suit");
            if (all || roll == 3)
                character.Skills.Add(dice.Choose(SpecialtiesFor("Tactics")));
            if (all || roll == 4)
                character.Skills.Add(dice.Choose(SpecialtiesFor("Heavy Weapons")));
            if (all || roll == 5)
                character.Skills.Add(dice.Choose(SpecialtiesFor("Gun Combat")));
            if (all || roll == 6)
                character.Skills.Add("Stealth");
        }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:17,代码来源:Marine.cs

示例10: TitleTable

 internal override void TitleTable(Character character, CareerHistory careerHistory, Dice dice)
 {
     switch (careerHistory.Rank)
     {
         case 0:
             return;
         case 1:
             {
                 var skillList = new SkillTemplateCollection(SpecialtiesFor("Science"));
                 skillList.RemoveOverlap(character.Skills, 1);
                 if (skillList.Count > 0)
                     character.Skills.Add(dice.Choose(skillList), 1);
             }
             return;
         case 2:
             character.Skills.Add("Electronics", "Computers", 1);
             return;
         case 3:
             character.Skills.Add("Investigate", 1);
             return;
         case 4:
             return;
         case 5:
             {
                 var skillList = new SkillTemplateCollection(SpecialtiesFor("Science"));
                 //look for a level 0 to increase
                 skillList.RemoveOverlap(character.Skills, 1);
                 if (skillList.Count > 0)
                     character.Skills.Add(dice.Choose(skillList), 2);
                 else
                 {
                     //look for a level 1 to increase
                     skillList = new SkillTemplateCollection(SpecialtiesFor("Science"));
                     skillList.RemoveOverlap(character.Skills, 2);
                     if (skillList.Count > 0)
                         character.Skills.Add(dice.Choose(skillList), 2);
                 }
             }
             return;
         case 6:
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:43,代码来源:Scholar.FieldResearcher.cs

示例11: AssignmentSkills

 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("Vacc Suit");
             return;
         case 3:
             character.Skills.Increase("Navigation");
             return;
         case 4:
             character.Skills.Increase("Survival");
             return;
         case 5:
             character.Skills.Increase("Investigate");
             return;
         case 6:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Science")));
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:24,代码来源:Scholar.FieldResearcher.cs

示例12: AssignmentSkills

 internal override void AssignmentSkills(Character character, Dice dice)
 {
     switch (dice.D(6))
     {
         case 1:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Gun Combat")));
             return;
         case 2:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Melee")));
             return;
         case 3:
             character.Skills.Increase("Streetwise");
             return;
         case 4:
             character.Skills.Increase("Persuade");
             return;
         case 5:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Athletics")));
             return;
         case 6:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Drive")));
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:24,代码来源:Rogue.Enforcer.cs

示例13: AssignmentSkills

 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(dice.Choose(SpecialtiesFor("Pilot")));
             return;
         case 3:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Engineer")));
             return;
         case 4:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Science")));
             return;
         case 5:
             character.Skills.Increase("Stealth");
             return;
         case 6:
             character.Skills.Increase("Recon");
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:24,代码来源:Scout.Explorer.cs

示例14: AssignmentSkills

 internal override void AssignmentSkills(Character character, Dice dice)
 {
     switch (dice.D(6))
     {
         case 1:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Pilot")));
             return;
         case 2:
             character.Skills.Increase("Astrogation");
             return;
         case 3:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Gunner")));
             return;
         case 4:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Engineer")));
             return;
         case 5:
             character.Skills.Increase("Vacc Suit");
             return;
         case 6:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Melee")));
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:24,代码来源:Rogue.Pirate.cs

示例15: AssignmentSkills

 internal override void AssignmentSkills(Character character, Dice dice)
 {
     switch (dice.D(6))
     {
         case 1:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Pilot")));
             return;
         case 2:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Flyer")));
             return;
         case 3:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Gunner")));
             return;
         case 4:
             character.Skills.Increase("Pilot", "Small craft");
             return;
         case 5:
             character.Skills.Increase("Astrogation");
             return;
         case 6:
             character.Skills.Increase(dice.Choose(SpecialtiesFor("Electronics")));
             return;
     }
 }
开发者ID:Grauenwolf,项目名称:TravellerTools,代码行数:24,代码来源:Navy.Flight.cs


注:本文中的Dice.Choose方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。