Exemple #1
0
        private void _ResetAnalizer(bool AllF = true)
        {
            if (OnWork > 0)
            {
                return;
            }
            AnalyzerCC = 0;

            txbStepCC.Text           = "0";
            txbStepMCC.Text          = "0";
            btnSolveUp.Content       = pRes.btnSolveUp;
            lblAnalyzerResult.Text   = "";
            lblUnderAnalysis.Content = "";
            Lbl_onAnalyzerTS.Content = "";

            Lbl_onAnalyzerM.Content   = "";
            Lbl_onAnalyzerTSM.Content = "";
            lblAnalyzerResultM.Text   = "";

            btnMultiSolve.IsEnabled = true;
            UPP.Clear();
            LstBxMltAns.ItemsSource = null;
//q            SDK_Ctrl.UGPMan.MltUProbLst=new List<UPuzzle>();
            txbEpapsedTimeTS3.Text = "";

            GNP00.GNPX_Eng.AnMan.ResetAnalysisResult(AllF);
            GNP00.GNPX_Eng.AnalyzerCounterReset();
            SDK_Ctrl.UGPMan = null;           //Initialize Step/Multiple Solution search

            displayTimer.Stop();
            _SetScreenProblem();
        }
Exemple #2
0
        private void btnAnalyzerResetAll_Click(object sender, RoutedEventArgs e)
        {
            Thickness X = PB_GBoard.Margin;   //◆

            PB_GBoard.Margin = new Thickness(X.Left + 2, X.Top + 2, X.Right, X.Bottom);
            _ResetAnalizer(true);
            bruMoveTimer.Start();
            UPP.Clear();
            GNP00.GNPX_Eng.MethodLst_Run.ForEach(P => P.UsedCC = 0);
            //q            SDK_Ctrl.UGPMan.MltUProbLst=new List<UPuzzle>();
            MAnalizeBtnSet();
        }
        private void _Display_AnalyzeProb()
        {
            //WriteLine("----------------"+__DispMode);
            if (__DispMode == "Canceled")
            {
                shortMessage("cancellation accepted", new sysWin.Point(120, 188), Colors.Red, 3000);
                lblUnderAnalysis.Foreground = Brushes.LightCoral;
                Lbl_onAnalyzerM.Foreground  = Brushes.LightCoral;
                displayTimer.Stop();
            }

            else if (__DispMode == "Complated")
            {
                lblUnderAnalysis.Content = pRes.msgAnalysisComplate;
                if ((string)SDK_Ctrl.MltAnsOption["abortResult"] != "")
                {
                    Lbl_onAnalyzerM.Content = SDK_Ctrl.MltAnsOption["abortResult"];
                }
                else
                {
                    Lbl_onAnalyzerM.Content    = pRes.msgAnalysisComplate;
                    Lbl_onAnalyzerM.Foreground = Brushes.LightBlue;

                    if ((bool)chbDifficultySetting.IsChecked)
                    {
                        string prbMessage;
                        int    DifLevel = GNP00.GNPX_Eng.GetDifficultyLevel(out prbMessage);
                        pGP.DifLevel = DifLevel;
                    }
                }
                btnSolve.Content            = pRes.btnSolve;
                btnMultiSolve.Content       = pRes.btnMultiSolve;
                btnMultiSolve.IsEnabled     = true;
                lblUnderAnalysis.Foreground = Brushes.LightBlue;

                _Set_DGViewMethodCounter();  //Aggregation of methods
                string msgST = pGP.Sol_ResultLong;
                if (!ErrorStopB)
                {
                    lblAnalyzerResult.Text = msgST;
                }
                if (msgST.LastIndexOf("anti-rule") >= 0 || msgST.LastIndexOf("Unparsable") >= 0)
                {
                }
                displayTimer.Stop();
            }
            else
            {
                if (!ErrorStopB)
                {
                    lblAnalyzerResult.Text = GNPZ_Engin.GNPX_AnalyzerMessage;
                }
                Lbl_onAnalyzerM.Content = pRes.lblUnderAnalysis + " : " + GNPZ_Engin.GNPX_AnalyzerMessage;
            }

            if (UPP != null && UPP.Count > 0)
            {
                try{
                    if (__DispMode == "Complated")
                    {
                        LstBxMltAns.ItemsSource = null;
                    }
                    LstBxMltAns.ItemsSource = UPP;

                    if (__DispMode == "Complated")
                    {
                        LstBxMltAns.ScrollIntoView(UPP.First());
                        selXUPP = 0;
                        AnalyzerLap.Stop();
                    }
                    else
                    {
                        LstBxMltAns.ScrollIntoView(UPP.Last());
                        selXUPP = UPP.Count - 1;
                    }
                    LstBxMltAns.SelectedIndex = selXUPP;

                    var Q = (UProbS)LstBxMltAns.SelectedItem;
                    if (Q == null)
                    {
                        Q = UPP[0];
                    }
                    lblAnalyzerResultM.Text = "[" + (Q.IDmp1) + "] " + Q.Sol_ResultLong;
                }
                catch (Exception e) {
                    WriteLine(e.Message);
                    WriteLine(e.StackTrace);
                }
            }

            string st = AnalyzerLapElaped;

            Lbl_onAnalyzerTS.Content  = st;
            Lbl_onAnalyzerTSM.Content = st;
            txbEpapsedTimeTS3.Text    = st;

            btnSolveUp.Content = pRes.btnSolveUp;

            if (GNPZ_Engin.GNPX_AnalyzerMessage.Contains("sys"))
            {
                lblAnalyzerResultM.Text = GNPZ_Engin.GNPX_AnalyzerMessage;
            }

            this.Cursor = Cursors.Arrow;
            if (__DispMode == "Complated")
            {
                _SetScreenProblem();
            }

            OnWork = 0;
//            __DispMode="";
        }
        private void GenerateClassic()
        {
            var dice = new Dice(6);

            if (Sex.Equals(Properties.Resources.Sex_Random))
            {
                Sex = CharacterGeneration.Species.ResolveRandom(CharacterSpecies);
            }

            switch (Culture)
            {
            case Constants.CultureType.Imperial:
                switch (CharacterSpecies)
                {
                case Species.Human_Imperial:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Bwap:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) - 4;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2) - 4;
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Aslan:
                    Profile           = new AslanUPP();
                    Profile.Str.Value = dice.roll(2) + 1;
                    Profile.Dex.Value = dice.roll(2) - 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    // Imperial Aslan get some automatic skills
                    AddSkill(SkillLibrary.Tolerance);
                    if (Sex.Equals(Properties.Resources.Sex_Male))
                    {
                        AddSkill(SkillLibrary.Independance);
                    }
                    break;

                case Species.Vargr:
                    Profile              = new VargrUPP();
                    Profile.Str.Value    = dice.roll(2) - 1;
                    Profile.Dex.Value    = dice.roll(2) + 1;
                    Profile.End.Value    = dice.roll(2) - 1;
                    Profile.Int.Value    = dice.roll(2);
                    Profile.Edu.Value    = dice.roll(2);
                    Profile.Soc.Value    = dice.roll(2);
                    Profile["CHR"].Value = dice.roll();
                    break;

                case Species.AelYael:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) - 1;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Virushi:
                    Profile           = new VirushiUPP();
                    Profile.Str.Value = dice.roll(2) + 10;
                    Profile.Dex.Value = dice.roll(2) + 2;
                    Profile.End.Value = dice.roll(2) + 10;
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2) - 2;
                    break;

                case Species.Vegan:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2) + 1;
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Dolphin:
                    Profile                = new DolphinUPP();
                    Profile.Int.Value      = dice.roll(2) - 2;
                    Profile["HitsU"].Value = dice.roll(6);
                    Profile["HitsD"].Value = dice.roll(3);
                    break;
                }
                break;

            case Constants.CultureType.Darrian:
                switch (CharacterSpecies)
                {
                case Species.Aslan:
                    Profile           = new AslanUPP();
                    Profile.Str.Value = dice.roll(2) + 1;
                    Profile.Dex.Value = dice.roll(2) - 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    break;

                case Species.Human_Solomani:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    break;

                case Species.Human_Darrian:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll() + 3;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll() + 3;
                    break;
                }
                Profile.Int.Value = dice.roll(2);
                Profile.Edu.Value = dice.roll(2);
                Profile.Soc.Value = dice.roll(2);
                break;

            case Constants.CultureType.Vargr:
                // Assume all are vargr
                Profile              = new VargrUPP();
                Profile.Str.Value    = dice.roll(2) - 1;
                Profile.Dex.Value    = dice.roll(2) + 1;
                Profile.End.Value    = dice.roll(2) - 1;
                Profile.Int.Value    = dice.roll(2);
                Profile.Edu.Value    = dice.roll(2);
                Profile["CHR"].Value = dice.roll();
                break;

            case Constants.CultureType.SwordWorlds:
                // Assume all are standard humans
                Profile           = new UPP();
                Profile.Str.Value = dice.roll(2);
                Profile.Dex.Value = dice.roll(2);
                Profile.End.Value = dice.roll(2);
                Profile.Int.Value = dice.roll(2);
                Profile.Edu.Value = dice.roll(2);
                Profile.Soc.Value = dice.roll(2);
                break;

            case Constants.CultureType.Dynchia:
                Profile = new UPP();
                switch (CharacterSpecies)
                {
                case Species.Human_Dynchia:
                    Profile.Str.Value = dice.roll() + 3;
                    Profile.Dex.Value = dice.roll(2) + 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    break;

                case Species.Human_Solomani:
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    break;
                }
                Profile.Int.Value = dice.roll(2);
                Profile.Edu.Value = dice.roll(2);
                Profile.Soc.Value = dice.roll(2);
                break;

            case Constants.CultureType.Zhodani:
                Profile              = new ZhodaniUPP();
                Profile.Str.Value    = dice.roll(2);
                Profile.Dex.Value    = dice.roll(2);
                Profile.End.Value    = dice.roll(2);
                Profile.Int.Value    = dice.roll(2);
                Profile.Edu.Value    = dice.roll(2);
                Profile.Soc.Value    = dice.roll(2);
                Profile["PSI"].Value = dice.roll(2);
                if (Profile["PSI"].Value >= 10 && Profile.Soc.Value < 10)
                {
                    Profile.Soc.Value = 10;
                }
                if (Profile.Edu.Value > Profile.Soc.Value)
                {
                    Profile.Edu.Value = Profile.Soc.Value;
                }
                if (Profile.Soc.Value >= 10 && Profile.Edu.Value < 8)
                {
                    Profile.Edu.Value = 8;
                }
                // TODO: Check this logic
                if (Profile.Str.Value + Profile.Dex.Value + Profile.End.Value + Profile.Int.Value < Profile["PSI"].Value)
                {
                    Profile["PSI"].Value = Profile.Str.Value + Profile.Dex.Value + Profile.End.Value + Profile.Int.Value;
                }
                break;

            case Constants.CultureType.Aslan:
                switch (CharacterSpecies)
                {
                case Species.Aslan:
                    Profile           = new AslanUPP();
                    Profile.Str.Value = dice.roll(2) + 1;
                    Profile.Dex.Value = dice.roll(2) - 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    break;

                case Species.Human_Solomani:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    break;
                }
                Profile.Int.Value = dice.roll(2);
                Profile.Edu.Value = dice.roll(2);
                Profile.Soc.Value = dice.roll(2);
                break;
            }
        }
        private void GenerateCepheus()
        {
            if (Sex.Equals(Properties.Resources.Sex_Random))
            {
                Sex = CharacterGeneration.Species.ResolveRandom(CharacterSpecies);
            }

            switch (Culture)
            {
            case Constants.CultureType.Cepheus_Generic:
                switch (CharacterSpecies)
                {
                case Species.Human:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Avian:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(1);
                    Profile.Dex.Value = dice.roll(3);
                    Profile.End.Value = dice.roll(1);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_Flyer);
                    Traits.Add(Resources.Trait_LowGravityAdaptation);
                    Traits.Add(Resources.Trait_NaturalPilot);
                    Traits.Add(Resources.Trait_SlowSpeed);
                    Traits.Add(Resources.Trait_Small);
                    break;

                case Species.Insectans:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) + 2;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_Armoured);
                    Traits.Add(Resources.Trait_BadFirstImpression);
                    Traits.Add(Resources.Trait_Caste);
                    Traits.Add(Resources.Trait_ColdBlooded);
                    Traits.Add(Resources.Trait_FastSpeed);
                    Traits.Add(Resources.Trait_GreatLeaper);
                    Traits.Add(Resources.Trait_HiveMentaility);
                    break;

                case Species.Merfolk:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_Amphibious);
                    Traits.Add(Resources.Trait_Aquatic);
                    Traits.Add(Resources.Trait_NaturalSwimmer);
                    Traits.Add(Resources.Trait_WaterDependant);
                    break;

                case Species.Reptilians:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) + 1;
                    Profile.Dex.Value = dice.roll(2) + 1;
                    Profile.End.Value = dice.roll(2) - 2;
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_AntiPsionic);
                    Traits.Add(Resources.Trait_FastSpeed);
                    Traits.Add(Resources.Trait_HeatEndurance);
                    Traits.Add(Resources.Trait_LowLightVision);
                    Traits.Add(Resources.Trait_NaturalWeapons);
                    Traits.Add(Resources.Trait_LowGravityAdaptation);
                    break;

                case Species.Dolphin:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) + 4;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2) + 2;
                    Profile.Int.Value = dice.roll(2) - 2;
                    Profile.Edu.Value = dice.roll(2) - 2;
                    Profile.Soc.Value = dice.roll(2) - 2;
                    Traits.Add(Resources.Trait_Aquatic);
                    Traits.Add(Resources.Trait_NoFineManipulators);
                    Traits.Add(Resources.Trait_Uplifited);
                    break;

                case Species.Uplifted_Ape:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) + 2;
                    Profile.Dex.Value = dice.roll(2) - 2;
                    Profile.End.Value = dice.roll(2) + 2;
                    Profile.Int.Value = dice.roll(2) - 2;
                    Profile.Edu.Value = dice.roll(2) - 2;
                    Profile.Soc.Value = dice.roll(2) - 2;
                    Traits.Add(Resources.Trait_Uplifited);
                    break;
                }
                ResolveRandomBackgroundSkills();
                break;

            case Constants.CultureType.Cepheus_Hostile:
                switch (CharacterSpecies)
                {
                case Species.Human:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    ResolveRandomBackgroundSkills();
                    break;

                case Species.Android:
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(1) + 5;
                    Profile.Dex.Value = dice.roll(1) + 3;
                    Profile.End.Value = dice.roll(1) + 8;
                    Profile.Int.Value = d3.roll(1) + 5;
                    Profile.Edu.Value = d3.roll(1) + 9;
                    Profile.Soc.Value = 7;
                    break;
                }
                break;

            case Constants.CultureType.Cepheus_Bughunters:
                switch (CharacterSpecies)
                {
                case Species.Human:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2);
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    break;

                case Species.Synner:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = (dice.roll(2) + 1).Clamp(9, 15);
                    Profile.Dex.Value = (dice.roll(2) + 1).Clamp(9, 15);
                    Profile.End.Value = (dice.roll(2) + 1).Clamp(9, 15);
                    Profile.Int.Value = (dice.roll(2) + 1).Clamp(7, 15);
                    Profile.Edu.Value = dice.roll(2).Clamp(7, 15);
                    Profile.Soc.Value = dice.roll(2) - 2;
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    Traits.Add(Resources.Trait_Engineered);
                    break;

                case Species.Tazzim:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) - 1;
                    Profile.Dex.Value = dice.roll(2) + 1;
                    Profile.End.Value = dice.roll(2) - 1;
                    Profile.Int.Value = dice.roll(2) + 1;
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    break;

                case Species.Quarm:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) + 1;
                    Profile.Dex.Value = dice.roll(2) - 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    Profile.Int.Value = dice.roll(2);
                    Profile.Edu.Value = dice.roll(2) - 2;
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    break;

                case Species.Wraither:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) - 1;
                    Profile.Dex.Value = dice.roll(2);
                    Profile.End.Value = dice.roll(2);
                    Profile.Int.Value = dice.roll(2) + 2;
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    Traits.Add(Resources.Trait_TotalPacifist);
                    break;

                case Species.Shaper:
                    // use the Esper UPP
                    Profile              = new EsperUPP();
                    Profile.Str.Value    = dice.roll(2) - 1;
                    Profile.Dex.Value    = dice.roll(2) + 1;
                    Profile.End.Value    = dice.roll(2);
                    Profile.Int.Value    = dice.roll(2) + 1;
                    Profile.Edu.Value    = dice.roll(2);
                    Profile.Soc.Value    = dice.roll(2);
                    Profile["PSI"].Value = dice.roll(2);
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    break;

                case Species.Articifer:
                    // use the standard UPP
                    Profile           = new UPP();
                    Profile.Str.Value = dice.roll(2) - 1;
                    Profile.Dex.Value = dice.roll(2) + 1;
                    Profile.End.Value = dice.roll(2) + 1;
                    Profile.Int.Value = dice.roll(2) + 1;
                    Profile.Edu.Value = dice.roll(2);
                    Profile.Soc.Value = dice.roll(2);
                    Traits.Add(Resources.Trait_IsslerImmunity);
                    break;
                }
                ResolveRandomBackgroundSkills();
                break;

            case Constants.CultureType.Cepheus_TerranCommonwealth:
            case Constants.CultureType.Cepheus_Covenant:
            case Constants.CultureType.Cepheus_Lucerne:
            case Constants.CultureType.Cepheus_Khiff:
            case Constants.CultureType.Cepheus_Shanthaa:
            case Constants.CultureType.Cepheus_Froog:
                switch (CharacterSpecies)
                {
                case Species.Commonwealth_Human:
                    Profile              = new EsperUPP();
                    Profile.Str.Value    = dice.roll(2);
                    Profile.Dex.Value    = dice.roll(2);
                    Profile.End.Value    = dice.roll(2);
                    Profile.Int.Value    = dice.roll(2);
                    Profile.Edu.Value    = dice.roll(2);
                    Profile.Soc.Value    = dice.roll(2);
                    Profile["PSI"].Value = dice.roll();
                    break;

                case Species.Shanthaa:
                    Profile              = new EsperUPP();
                    Profile.Str.Value    = (dice.roll(2) - 2).Clamp(1, 10);
                    Profile.Dex.Value    = dice.roll(2) + 2;
                    Profile.End.Value    = (dice.roll(2) - 2).Clamp(1, 10);
                    Profile.Int.Value    = dice.roll(2);
                    Profile.Edu.Value    = dice.roll(2);
                    Profile.Soc.Value    = dice.roll(2);
                    Profile["PSI"].Value = dice.roll();
                    Traits.Add(Resources.Trait_NaturalWeapons);
                    AddSkill(SkillLibrary.NaturalWeapons);
                    break;

                case Species.Khiff:
                    Profile              = new EsperUPP();
                    Profile.Str.Value    = dice.roll(2);
                    Profile.Dex.Value    = dice.roll(2);
                    Profile.End.Value    = dice.roll(2);
                    Profile.Int.Value    = dice.roll(2);
                    Profile.Edu.Value    = dice.roll();
                    Profile.Soc.Value    = dice.roll(2);
                    Profile["PSI"].Value = dice.roll();
                    Traits.Add(Resources.Trait_Feral);
                    Traits.Add(Resources.Trait_NaturalWeapons);
                    AddSkill(SkillLibrary.NaturalWeapons);
                    break;

                case Species.Froog:
                    Profile = new EsperUPP();
                    if (Sex.Equals(Commonwealth.Resources.Sex_Leader))
                    {
                        Profile.Str.Value = dice.roll(2) + 1;
                        Profile.Dex.Value = dice.roll(2) - 1;
                        Profile.End.Value = dice.roll(2) - 1;
                        Profile.Int.Value = dice.roll(2) + 1;
                        Profile.Edu.Value = dice.roll(2) + 1;
                        Profile.Soc.Value = dice.roll(2) + 1;
                    }
                    else if (Sex.Equals(Commonwealth.Resources.Sex_Warrior))
                    {
                        Profile.Str.Value = dice.roll(2) + 1;
                        Profile.Dex.Value = dice.roll(2) + 1;
                        Profile.End.Value = dice.roll(2) + 1;
                        Profile.Int.Value = dice.roll(2) - 1;
                        Profile.Edu.Value = dice.roll(2) - 1;
                        Profile.Soc.Value = dice.roll(2) - 1;
                    }
                    else         // Tech
                    {
                        Profile.Str.Value = dice.roll(2) - 1;
                        Profile.Dex.Value = dice.roll(2) + 1;
                        Profile.End.Value = dice.roll(2) - 1;
                        Profile.Int.Value = dice.roll(2) + 1;
                        Profile.Edu.Value = dice.roll(2) + 1;
                        Profile.Soc.Value = dice.roll(2) - 1;
                    }
                    Profile["PSI"].Value = dice.roll();
                    break;
                }
                ResolveRandomBackgroundSkills();
                break;
            }
        }