StatMod() public static method

public static StatMod ( int stat ) : string
stat int
return string
コード例 #1
0
 private void StrengthAttackButton_Click(object sender, EventArgs e)
 {
     Console.WriteLine(Monster.CR.AttackBonus + " " + Monster.CR.profBonus);
     HitDiceBonusDamage.Value = Convert.ToInt32(Monster.StatMod(Monster.STR));
     AttackBonusUpDown.Value  = Convert.ToInt32(Monster.StatMod(Monster.STR)) + Monster.CR.profBonus;
 }
コード例 #2
0
 private void DexterityAttackButton_Click(object sender, EventArgs e)
 {
     HitDiceBonusDamage.Value = Convert.ToInt32(Monster.StatMod(Monster.DEX));
     AttackBonusUpDown.Value  = Convert.ToInt32(Monster.StatMod(Monster.DEX)) + Monster.CR.profBonus;
 }
コード例 #3
0
        public static string sDoddlerOutput()
        {
            string align = "Unaligned";

            if (CreatureAlign.Split(' ').Length > 1)
            {
                if (CreatureAlign == "True Neutral")
                {
                    align = "N";
                }
                else
                {
                    align  = CreatureAlign[0].ToString();
                    align += (CreatureAlign.Split(' ')[1][0]).ToString();
                    align  = align.ToUpper();
                }
            }

            RedditMonster  = Monster.CreatureName + "=" + Monster.CreatureSize + @"\\";
            RedditMonster += (Monster.CreatureType.Contains('(')) ? Monster.CreatureType.Replace(" (", @"\\").Replace(")", "") + @"\\" : Monster.CreatureType + @"\\\\";
            RedditMonster += align + @"\\" + CR.CR + @"\\" + CR.XP + @"\\" + HP + @"\\" + "Custom";
            sDoddlerIndex  = RedditMonster;

            RedditMonster += Environment.NewLine;

            RedditMonster += "[" + Monster.CreatureName + "]" + Environment.NewLine;
            RedditMonster += "AC= " + Monster.AC + Environment.NewLine;
            RedditMonster += "STR=" + Monster.STR + " (" + Monster.StatMod(Monster.STR) + ")" + Environment.NewLine;
            RedditMonster += "DEX=" + Monster.DEX + " (" + Monster.StatMod(Monster.DEX) + ")" + Environment.NewLine;
            RedditMonster += "CON=" + Monster.CON + " (" + Monster.StatMod(Monster.CON) + ")" + Environment.NewLine;
            RedditMonster += "INT=" + Monster.INT + " (" + Monster.StatMod(Monster.INT) + ")" + Environment.NewLine;
            RedditMonster += "WIS=" + Monster.WIS + " (" + Monster.StatMod(Monster.WIS) + ")" + Environment.NewLine;
            RedditMonster += "CHA=" + Monster.CHA + " (" + Monster.StatMod(Monster.CHA) + ")" + Environment.NewLine;
            RedditMonster += "Speed=" + Monster.Speed.Replace(":", "") + Environment.NewLine;
            RedditMonster += "Senses=" + Monster.Senses() + Environment.NewLine;

            if (!String.IsNullOrEmpty(Monster.Skills()))
            {
                RedditMonster += "Skills=" + Monster.Skills() + Environment.NewLine;
            }

            if (!String.IsNullOrEmpty(Monster.SavingThrows()))
            {
                RedditMonster += "Saving Throws=" + Monster.SavingThrows() + Environment.NewLine;
            }

            if (Monster._Languages.Count > 0)
            {
                RedditMonster += "Languages= " + Monster.Languages() + Environment.NewLine;
            }

            if (!String.IsNullOrEmpty(Monster.D_Immunities()))
            {
                RedditMonster += "Damage Immunities=" + Monster.D_Immunities() + Environment.NewLine;
            }

            if (!String.IsNullOrEmpty(Monster.D_Resistances()))
            {
                RedditMonster += "Damage Resistances=" + Monster.D_Resistances() + Environment.NewLine;
            }

            if (!String.IsNullOrEmpty(Monster.D_Vulnerabilities()))
            {
                RedditMonster += "Damage Vulnerabilities=" + Monster.D_Vulnerabilities() + Environment.NewLine;
            }

            if (!String.IsNullOrEmpty(Monster.C_Immunities()))
            {
                RedditMonster += "Condition Immunities=" + Monster.C_Immunities() + Environment.NewLine;
            }

            sDoddlerCreature = RedditMonster.Replace(sDoddlerIndex + Environment.NewLine, "");
            return(RedditMonster);
        }