コード例 #1
0
ファイル: endGame.xaml.cs プロジェクト: dalelion/DNDTools
        public endGame(MainGame myParent)
        {
            InitializeComponent();

            parent = myParent;
        }
コード例 #2
0
        public CharacterInfo(MainGame myParent, Player myPlayer)
        {
            InitializeComponent();

            parent = myParent;
            player = myPlayer;

            txtClass.Text   = player.getClass();
            txtRace.Text    = player.getRace();
            txtFaction.Text = player.getFaction();

            lblStrConst.Content = parent.StrLbl.Content;
            lblDexConst.Content = parent.DexLbl.Content;
            lblConConst.Content = parent.ConLbl.Content;
            lblIntConst.Content = parent.IntLbl.Content;
            lblWisConst.Content = parent.WisLbl.Content;
            lblChaConst.Content = parent.ChaLbl.Content;

            lblStrVar.Content = parent.StrVarLbl.Content;
            lblDexVar.Content = parent.DexVarLbl.Content;
            lblConVar.Content = parent.ConVarLbl.Content;
            lblIntVar.Content = parent.IntVarLbl.Content;
            lblWisVar.Content = parent.WisVarLbl.Content;
            lblChaVar.Content = parent.ChaVarLbl.Content;

            //Numbers in parenthesis increase/decrease every 2 values, the MAIN values should be controlled by the player

            lblArmorConst.Content = parent.lblArmor.Content;
            lblSpeedConst.Content = parent.lblSpeed.Content;

            if (player.getVariableStat(0) > 0)
            {
                lblAthleticsConst.Content = "+" + player.getVariableStat(0);
            }
            else
            {
                lblAthleticsConst.Content = player.getVariableStat(0);
            }

            if (player.getVariableStat(1) > 0)
            {
                lblAcrobaticsConst.Content = "+" + player.getVariableStat(1);
                lblSleightConst.Content    = "+" + player.getVariableStat(1);
                lblStealthConst.Content    = "+" + player.getVariableStat(1);
                lblInitiativeConst.Content = "+" + player.getVariableStat(1);
            }
            else
            {
                lblAcrobaticsConst.Content = player.getVariableStat(1);
                lblSleightConst.Content    = player.getVariableStat(1);
                lblStealthConst.Content    = player.getVariableStat(1);
                lblInitiativeConst.Content = player.getVariableStat(1);
            }

            if (player.getVariableStat(3) > 0)
            {
                lblArcanaConst.Content        = "+" + player.getVariableStat(3);
                lblHistoryConst.Content       = "+" + player.getVariableStat(3);
                lblInvestigationConst.Content = "+" + player.getVariableStat(3);
                lblNatureConst.Content        = "+" + player.getVariableStat(3);
                lblReligionConst.Content      = "+" + player.getVariableStat(3);
            }
            else
            {
                lblArcanaConst.Content        = player.getVariableStat(3);
                lblHistoryConst.Content       = player.getVariableStat(3);
                lblInvestigationConst.Content = player.getVariableStat(3);
                lblNatureConst.Content        = player.getVariableStat(3);
                lblReligionConst.Content      = player.getVariableStat(3);
            }

            if (player.getVariableStat(4) > 0)
            {
                lblAnimalConst.Content     = "+" + player.getVariableStat(4);
                lblInsightConst.Content    = "+" + player.getVariableStat(4);
                lblMedicineConst.Content   = "+" + player.getVariableStat(4);
                lblPerceptionConst.Content = "+" + player.getVariableStat(4);
                lblSurvivalConst.Content   = "+" + player.getVariableStat(4);
            }
            else
            {
                lblAnimalConst.Content     = player.getVariableStat(4);
                lblInsightConst.Content    = player.getVariableStat(4);
                lblMedicineConst.Content   = player.getVariableStat(4);
                lblPerceptionConst.Content = player.getVariableStat(4);
                lblSurvivalConst.Content   = player.getVariableStat(4);
            }

            if (player.getVariableStat(5) > 0)
            {
                lblDeceptionConst.Content    = "+" + player.getVariableStat(5);
                lblIntimidationConst.Content = "+" + player.getVariableStat(5);
                lblPerformanceConst.Content  = "+" + player.getVariableStat(5);
                lblPersuasionConst.Content   = "+" + player.getVariableStat(5);
            }
            else
            {
                lblDeceptionConst.Content    = player.getVariableStat(5);
                lblIntimidationConst.Content = player.getVariableStat(5);
                lblPerformanceConst.Content  = player.getVariableStat(5);
                lblPersuasionConst.Content   = player.getVariableStat(5);
            }

            //Skills based on Base Stats
            //Skill values are based on the VAR stats of the player

            //Initiative is based on DEX

            //Speed is based on 5, start at 30
        }