コード例 #1
0
        public int HP()
        {
            int sum = 0;

            HitDie.ForEach(d => sum += d);

            return(sum);
        }
コード例 #2
0
 public HitDieViewModel(PlayerModel pvm, HitDie hd) : base(hd.Dice, hd.Count, hd.Used)
 {
     Reduce = new Command(() =>
     {
         if (Used < Count)
         {
             pvm.MakeHistory("");
             pvm.Context.Player.UseHitDie(Dice);
             Used++;
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Current"));
             pvm.Save();
         }
     });
 }
コード例 #3
0
ファイル: CreatureType.cs プロジェクト: realo5/RPG
 public CreatureType(StatBlock statBlock)
 {
     BaseHitDie = statBlock.HD;
 }