Ejemplo n.º 1
0
        private void attack_Click(object sender, EventArgs e)
        {
            try
            {
                var damageText = FightDamage.fightSkillDamage[attackSkill] + damageBonusTextBox.Text;

                MessageBox.Show("攻撃値:" + Proccess.TotalDice(damageText).Sum(), "攻撃値",
                                MessageBoxButtons.OK);
            }
            catch (Exception exc)
            {
                Console.WriteLine(exc.Message);
            }
        }
Ejemplo n.º 2
0
        //能力値を決めるダイスロール
        private void diceButton_Click(object sender, EventArgs e)
        {
            //ダイスロール
            textSTR.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.STR = Proccess.DDice("3d6").Sum());
            textAPP.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.APP = Proccess.DDice("3d6").Sum());
            textCON.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.CON = Proccess.DDice("3d6").Sum());
            textDEX.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.DEX = Proccess.DDice("3d6").Sum());
            textEDU.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.EDU = Proccess.TotalDice("3d6+3").Sum());
            textINT.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.INT = Proccess.TotalDice("2d6+6").Sum());
            textPOW.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.POW = Proccess.DDice("3d6").Sum());
            textSIZ.Text = ConvertStringFromInt(newCharacter.Searcher.abilityValues.SIZ = Proccess.TotalDice("2d6+6").Sum());

            //検索して能力値に基づいた値に更新
            newCharacter.Searcher.skills.Where(item => item.name == "回避").ToList().ForEach(item => item.value  = int.Parse(textDEX.Text) * 2);
            newCharacter.Searcher.skills.Where(item => item.name == "言語").ToList().ForEach(item => item.value  = int.Parse(textEDU.Text) * 1);
            newCharacter.Searcher.skills.Where(item => item.name == "母国語").ToList().ForEach(item => item.value = int.Parse(textEDU.Text) * 5);

            //能力値によって決まる各値を代入
            workMaxPoint.Text     = (int.Parse(textEDU.Text) * 20).ToString(); //職業ポイントの割り当て最大値
            interestMaxPoint.Text = (int.Parse(textINT.Text) * 10).ToString(); //興味ポイントの割り当て最大値

            labelHP.Text = ((int.Parse(textCON.Text) + int.Parse(textSIZ.Text)) / 2).ToString();
            labelMP.Text = textPOW.Text;

            newCharacter.Searcher = PalletMaster.AbilityDataSet(newCharacter.Searcher);

            refreshSkillListView();
        }