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.keyword.BeforeFightAbility;
import com.ghost.technic.server.card.keyword.BeforeFightEffect;
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;

import java.util.Optional;

@Slf4j
public class RainceFuryheartAbility implements CardAbility, BeforeFightAbility {

    @Override
    public void register(GameActionService game, Player controller, PlayableCard source) {
        // Maybe static effects or triggers — not needed here
    }

    @Override
    public Optional<BeforeFightEffect> getBeforeFightEffect(CreatureCard self, CreatureCard opponent, GameActionService service) {
        return Optional.of(new BeforeFightEffect(
            "Exalt the creature " + self.getName() + " fights",
            () -> {
                log.info("{} Exalting {}",self.getName(), opponent.getName());
                opponent.getCounters().addAmber(1); // or however you represent exalt
            }
        ));
    }
}
