/// <summary>
        /// Attacks another Character
        /// </summary>
        /// <param name="enemyCS">The Character to attack</param>
        public void Attack(CharacterSheet enemyCS)
        {
            //Calculate if character hits (something like Attackchance vs agility)
            //Currently we always hit

            SingleHitZone hitBodyPart = enemyCS.Hitzone.randomizeHitzone();
            DamageItem    damage      = new DamageItem(hitBodyPart, _Weapon);

            enemyCS.ProcessHit(damage);
            characterChanged();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor of the Damageitem
        /// </summary>
        /// <param name="hitBodyPart">Bodypart that got hit</param>
        /// <param name="weaponThatHit">Weapon that hit the Target</param>
        public DamageItem(SingleHitZone hitBodyPart, Weapon weaponThatHit)
        {
            HitBodyPart = hitBodyPart;
            int pierce, bash, cut;

            weaponThatHit.InflictDamage(out pierce, out bash, out cut);
            Pierce = pierce;
            Bash   = bash;
            Cut    = cut;

            Afflictions.AddRange(weaponThatHit.Afflictions);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Randomize a hit
        /// </summary>
        public void RandomizeHitzone()
        {
            SingleHitZone zone = _hitFab.getZonesFor(_view.selectedRace).randomizeHitzone();

            _view.HitzonesIndicateHit(zone.ZoneName, zone.LastDiceThrow);
        }