namespace FishDice.LuckyDice
{
    public abstract class RollEffect
    {
        protected RollEffect(string effectType)
        {
            EffectType = effectType;
        }

        public string EffectType { get; }
    }

    public sealed class RewardEffect : RollEffect
    {
        public RewardEffect()
            : base("Reward")
        {
        }
    }

    public sealed class MultiplierEffect : RollEffect
    {
        public MultiplierEffect(string reason)
            : base("Multiplier")
        {
            Reason = reason;
        }

        public string Reason { get; }
    }

    public sealed class LuckyDiceRequestedEffect : RollEffect
    {
        public LuckyDiceRequestedEffect()
            : base("LuckyDiceRequested")
        {
        }
    }

    public sealed class EnterTargetModeEffect : RollEffect
    {
        public EnterTargetModeEffect(string targetKey, string modeKey)
            : base("EnterTargetMode")
        {
            TargetKey = targetKey;
            ModeKey = modeKey;
        }

        public string TargetKey { get; }

        public string ModeKey { get; }
    }

    public sealed class TargetModeFailedEffect : RollEffect
    {
        public TargetModeFailedEffect(string failureReason, string fallbackMode)
            : base("TargetModeFailed")
        {
            FailureReason = failureReason;
            FallbackMode = fallbackMode;
        }

        public string FailureReason { get; }

        public string FallbackMode { get; }
    }
}
