예제 #1
0
        /// <summary>
        /// Gets how much damage to be done to this creature based on
        /// the attacking creature's stats.
        /// </summary>
        /// <param name="attacker">The creature attacking.</param>
        /// <returns>The damage amount if > 0 or PUFF/SPARK constants
        /// otherwise.</returns>
        public int GetDamageAmt(Creature attacker)
        {
            int atkValue    = attacker.GetAtkValue();
            int shieldValue = this.GetShieldValue();
            int netValue    = atkValue - shieldValue;

            if (netValue > 0)
            {
                return(netValue);
            }
            else if (netValue == 0)
            {
                return(Constants.SPARK);
            }
            else
            {
                return(Constants.PUFF);
            }
        }
예제 #2
0
        /// <summary>
        /// Gets how much damage to be done to this creature based on
        /// the attacking creature's stats.
        /// </summary>
        /// <param name="attacker">The creature attacking.</param>
        /// <returns>The damage amount if > 0 or PUFF/SPARK constants 
        /// otherwise.</returns>
        public int GetDamageAmt(Creature attacker)
        {
            int atkValue = attacker.GetAtkValue();
            int shieldValue = this.GetShieldValue();
            int netValue = atkValue - shieldValue;

            if (netValue > 0) {
                return netValue;
            } else if (netValue == 0) {
                return Constants.SPARK;
            } else {
                return Constants.PUFF;
            }
        }