public static void ApplyEffect(Actor target, WeaponSkills weaponSkill, bool verbose, EffectSnapshot effectSnapshot = null)
 {
     switch (weaponSkill)
     {
         case WeaponSkills.ArmorCrush:
             if (target.StatusEffects.ContainsKey(StatusEffects.Huton))
             {
                 var newHutonDuration = Math.Min(target.StatusEffects[StatusEffects.Huton] + (long)TimeSpan.FromSeconds(30).TotalMilliseconds, 70000);
                 ApplyEffect(target, StatusEffects.Huton, newHutonDuration, verbose);
             }
             break;
         case WeaponSkills.DancingEdge:
             ApplyEffect(target, StatusEffects.DancingEdge, 20000, verbose);
             break;
         case WeaponSkills.Mutilate:
             Debug.Assert(effectSnapshot != null, "effectSnapshot != null");
             effectSnapshot.Duration = (long)TimeSpan.FromSeconds(30).TotalMilliseconds;
             ApplyDamageOverTime(target, StatusEffects.Mutilate, effectSnapshot, verbose);
             break;
         case WeaponSkills.ShadowFang:
             Debug.Assert(effectSnapshot != null, "effectSnapshot != null");
             effectSnapshot.Duration = (long)TimeSpan.FromSeconds(18).TotalMilliseconds;
             ApplyDamageOverTime(target, StatusEffects.ShadowFang, effectSnapshot, verbose);
             break;
     }
 }
 public static void ApplyEffect(Actor target, Spells spell)
 {
     switch (spell)
     {
         case Spells.InternalRelease:
             ApplyEffect(target, StatusEffects.InternalRelease, 15);
             break;
         case Spells.BloodForBlood:
             ApplyEffect(target, StatusEffects.BloodForBlood, 20);
             break;
         case Spells.Duality:
             ApplyEffect(target, StatusEffects.Duality, 10);
             break;
         case Spells.DexterityPotion:
             ApplyEffect(target, StatusEffects.DexterityPotion, 15);
             break;
         case Spells.TrickAttack:
             ApplyEffect(target, StatusEffects.TrickAttack, 10);
             break;
         case Spells.Suiton:
             ApplyEffect(target, StatusEffects.Suiton, 10);
             break;
         case Spells.Kassatsu:
             target.Cooldowns.Remove(Spells.FumaShuriken);
             target.Cooldowns.Remove(Spells.Raiton);
             target.Cooldowns.Remove(Spells.Suiton);
             ApplyEffect(target, StatusEffects.Kassatsu, 15);
             break;
     }
 }
        private static void ApplyEffect(Actor actor, StatusEffects statusEffect, long durationMs, bool verbose)
        {
            if (!(actor.StatusEffects.ContainsKey(statusEffect)))
            {
                if (verbose)
                {
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    Console.WriteLine($"{statusEffect} applied!");
                }

                actor.StatusEffects.Add(statusEffect, durationMs);
            }
            else
            {
                if (verbose)
                {
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    Console.WriteLine($"{statusEffect} refreshed!");
                    if (statusEffect == StatusEffects.Huton)
                    {
                        Console.WriteLine($"Current Huton Duration: { durationMs } milliseconds.");
                    }
                }

                actor.StatusEffects[statusEffect] = durationMs;
            }
        }
        private static void ApplyDamageOverTime(Actor target, StatusEffects statusEffect, EffectSnapshot effectSnapshot, bool verbose)
        {
            if (!(target.DamageOverTimeEffects.ContainsKey(statusEffect)))
            {
                if (verbose)
                {
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    Console.WriteLine($"{statusEffect} applied!");
                }

                target.DamageOverTimeEffects.Add(statusEffect, effectSnapshot);
            }
            else
            {
                if (verbose)
                {
                    Console.ForegroundColor = ConsoleColor.Cyan;
                    Console.WriteLine($"{statusEffect} refreshed!");
                }

                target.DamageOverTimeEffects[statusEffect] = effectSnapshot;
            }
        }
 private static void ApplyEffect(Actor actor, StatusEffects statusEffect, long durationSeconds)
 {
     if (!(actor.StatusEffects.ContainsKey(statusEffect)))
     {
         actor.StatusEffects.Add(statusEffect, (long)TimeSpan.FromSeconds(durationSeconds).TotalMilliseconds);
     }
     else
     {
         actor.StatusEffects[statusEffect] = (long)TimeSpan.FromSeconds(durationSeconds).TotalMilliseconds;
     }
 }