Esempio n. 1
0
        //  Fast Dirty Expandable Pickup Skills (for advanced NPC only)
        public void FDE_DistributePickupSkills()
        {
            //If advanced NPC, roll an additional 2D10 and distribute these points among 5 pickup skills.

            Int16 myPickupskillsPoints = 0;

            if (bAdvancedNPCYN)
            {
                DiceBag hand = new DiceBag();
                hand.RollDice(2, 10);

                myPickupskillsPoints     = hand.handresult[0];
                PickupSkillPointsInitial = myPickupskillsPoints;

                Int16 PickupSkillsBalancePoints = myPickupskillsPoints;

                Int16[] mypickupkills = new Int16[6];
                mypickupkills[0] = 0;
                Int16 skillincrement = 1;

                //distribute this total of pickup skill points into 5 skills at random (like other methods).
                do
                {
                    Int16 statposition;

                    //we randomly select a position 1 to 5 to determine which pickup skill will get the increment.
                    statposition = hand.ThrowDice(1, 5);
                    if (mypickupkills[statposition] + skillincrement <= 10)
                    {
                        mypickupkills[statposition] += skillincrement;
                    }

                    //the space [0] contains the total points assigned this loop.
                    mypickupkills[0] += skillincrement;

                    //we reduce the number of points to assign by the increment;
                    PickupSkillsBalancePoints -= skillincrement;
                }while (PickupSkillsBalancePoints > 0);

                //cleanup the array by removing the skills that have zero level.
                Int16[] mypickupkillsCleared = new Int16[6];

                mypickupkillsCleared[0] = mypickupkills[0];
                Int16 nClearedPosCtr = 0;

                for (Int16 i = 1; i <= 5; i++)
                {
                    if (mypickupkills[i] > 0)
                    {
                        nClearedPosCtr += 1;
                        mypickupkillsCleared[nClearedPosCtr] = mypickupkills[i];
                    }
                }

                PickupSkills = mypickupkillsCleared;
            }
            else
            {
                // No pickup skills because this NPC is not "Advanced".
            }
        }
Esempio n. 2
0
        public void FDE3_Cyberwear()
        {
            DiceBag mydicebag = new DiceBag();

            //not done yet.
            string[] cyberoptics = new string[] { "IR", "LL", "DC", "DE", "AD", "TA" };
            string[] cyberarm    = new string[] { "Med. Pistol", "Light Pistol", "Med. Pistol", "Light Submachinegun", "Very Heavy Pistol", "Heavy Pistol" };
            string[] cyberaudio  = new string[] { "Wearman", "Radio Splice", "Phone Link", "Amplified Hearing", "Sound Editing", "Digital Recording Link" };

            string[] cyberwear = new string[] {};

            Int16 nbrdice = 3;

            if (CharacterRole == "Solo")
            {
                nbrdice = 6;
            }

            Int16[] handresultcyberwear = new Int16[nbrdice];

            mydicebag.RollDice(nbrdice, 6, true);
            handresultcyberwear = mydicebag.handresult;

            DiceBag myseconddicebag = new DiceBag();


            for (Int16 i = 0; i <= nbrdice; i++)
            {
                myseconddicebag.RollDice(1, 6);

                switch (handresultcyberwear[i])
                {
                case 1:     //Cyberoptic
                    //cyberwear[i] = cyberoptics[myseconddicebag.handresult];
                    break;

                case 2:     //Cyberarm
                    break;

                case 3:     //Cyberaudio
                    break;

                case 4:      //Big Knucks
                    break;

                case 5:     //Rippers
                    break;

                case 6:     //Vampires
                    break;

                case 7:     //Slice n dice
                    break;

                case 8:     //Reflex Boost (Kerenzikov)
                    break;

                case 9:     //Reflex Boost (Sandevistan)
                    break;

                case 10:        //Nothing
                    break;

                default:
                    break;
                }
            }
        }