package com.ghost.technic.server.card.effect.impl;

import com.ghost.technic.server.Player;
import com.ghost.technic.server.card.effect.CardAbility;
import com.ghost.technic.server.card.playable.PlayableCard;
import com.ghost.technic.server.card.playable.usable.impl.CreatureCard;
import com.ghost.technic.server.game.GameActionService;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class MurmookAbility implements CardAbility {

    @Override
    public void register(GameActionService game, Player controller, PlayableCard source) {
        if (!(source instanceof CreatureCard murmook)) return;

        MurmookEffect effect = new MurmookEffect(controller);
        effect.apply();
        game.getGameState().registerStaticEffect(murmook, effect);
    }
}
