コード例 #1
0
ファイル: Weapon.cs プロジェクト: Selinux24/DiceTools
        public override int CalcDamage(Wound wound, Model target, ShootingParams shootingParams)
        {
            if (Range / 2 >= shootingParams.Distance)
            {
                return(CalcDamage(shootingParams, Damage * 2, DamageDice, DiceModes.Max));
            }

            return(base.CalcDamage(wound, target, shootingParams));
        }
コード例 #2
0
ファイル: Weapon.cs プロジェクト: Selinux24/DiceTools
        public virtual List <Wound> WoundTest(int t, ShootingParams shootingParams)
        {
            List <Wound> wounds = new List <Wound>();

            int s = CalcStrength();

            bool wounded = CalcWounds(s, t, shootingParams, out int roll, out int rollModified);

            if (wounded)
            {
                Wound w = new Wound(this, rollModified, false);
                wounds.Add(w);
            }

            return(wounds);
        }
コード例 #3
0
        public virtual bool SaveTest(Wound wound)
        {
            if (wound.Mortal)
            {
                return(false);
            }

            var ap = wound.Weapon.CalcAP();

            int toSaveRoll = Sv - ap;

            if (ISv != 0)
            {
                toSaveRoll = Math.Min(toSaveRoll, ISv);
            }

            //Save roll
            var saveRoll = Dice.D6();

            return(saveRoll >= toSaveRoll);
        }
コード例 #4
0
ファイル: Weapon.cs プロジェクト: Selinux24/DiceTools
 public virtual int CalcDamage(Wound wound, Model target, ShootingParams shootingParams)
 {
     return(CalcDamage(shootingParams, Damage, DamageDice, DiceModes.Sum));
 }