コード例 #1
0
        /// <summary>
        /// 固定ダメージ加算(属性考慮)
        /// </summary>
        /// <param name="damage"></param>
        /// <param name="element"></param>
        public void SlipDamage(uint damage, MenkoElement element, Vector3 pos)
        {
            float elementMagnif = MenkoElementUtils.GetMagnification(element, this.Element);
            int   lastDamage    = Mathf.CeilToInt(damage * elementMagnif);

            Percent += lastDamage;
            DamageToaster.Instance.ShowDamage(lastDamage, pos);
        }
コード例 #2
0
        /// <summary>
        /// ダメージ加算
        /// </summary>
        public void Damage(BattleStatus opStatus, float posMagnif, Vector3 pos)
        {
            const int LV         = 100;     // 今のところ固定
            float     elementMag = MenkoElementUtils.GetMagnification(opStatus.Element, this.Element);
            float     attackBase = (LV * 0.4f + 2) * opStatus.Attack * elementMag;
            float     difensed   = attackBase / (this.Difense * 0.75f);
            int       damage     = Mathf.CeilToInt(difensed * posMagnif);

            Percent += damage;
            DamageToaster.Instance.ShowDamage(damage, pos);
        }