Example #1
0
        private byte GetDamageColor(DamageAttributes attributes)
        {
            var colorResult = DamageColor.NormalRed;

            if (attributes.HasFlag(DamageAttributes.IgnoreDefense))
            {
                colorResult = DamageColor.IgnoreDefenseCyan;
            }
            else if (attributes.HasFlag(DamageAttributes.Excellent))
            {
                colorResult = DamageColor.ExcellentLightGreen;
            }
            else if (attributes.HasFlag(DamageAttributes.Critical))
            {
                colorResult = DamageColor.CriticalBlue;
            }

            byte result = (byte)colorResult;

            if (attributes.HasFlag(DamageAttributes.Double))
            {
                result |= (byte)SpecialDamage.Double;
            }

            if (attributes.HasFlag(DamageAttributes.Triple))
            {
                result |= (byte)SpecialDamage.Triple;
            }

            return(result);
        }
Example #2
0
        private ObjectHit.DamageKind GetDamageKind(DamageAttributes attributes)
        {
            if (attributes.HasFlag(DamageAttributes.IgnoreDefense))
            {
                return(ObjectHit.DamageKind.IgnoreDefenseCyan);
            }

            if (attributes.HasFlag(DamageAttributes.Excellent))
            {
                return(ObjectHit.DamageKind.ExcellentLightGreen);
            }

            if (attributes.HasFlag(DamageAttributes.Critical))
            {
                return(ObjectHit.DamageKind.CriticalBlue);
            }

            if (attributes.HasFlag(DamageAttributes.Reflected))
            {
                return(ObjectHit.DamageKind.ReflectedDarkPink);
            }

            if (attributes.HasFlag(DamageAttributes.Poison))
            {
                return(ObjectHit.DamageKind.PoisonDarkGreen);
            }

            return(ObjectHit.DamageKind.NormalRed);
        }