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

import com.ghost.technic.server.card.effect.ConstantAbility;
import com.ghost.technic.server.card.keyword.Keyword;
import com.ghost.technic.server.card.keyword.KeywordAbility;
import com.ghost.technic.server.card.playable.usable.impl.CreatureCard;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RequiredArgsConstructor
public class WayOfTheBearEffect implements ConstantAbility {

    private final CreatureCard target;

    @Override
    public void apply() {
        target.getKeywords().add(new Keyword(KeywordAbility.ASSAULT, 2));
        log.info("[Way of the Bear] {} gains Assault 2", target.getName());
    }

    @Override
    public void remove() {
        target.getKeywords().removeIf(k -> k.getKeywordAbility() == KeywordAbility.ASSAULT && k.getValue() == 2);
    }
}
