package com.ghost.technic.server.card.keyword;

import com.ghost.technic.server.card.keyword.impl.*;

import java.util.EnumMap;
import java.util.Map;
import java.util.Optional;

public class KeywordEffectRegistry {
    private final Map<KeywordAbility, KeywordEffect> registry = new EnumMap<>(KeywordAbility.class);

    public KeywordEffectRegistry() {
        registry.put(KeywordAbility.SKIRMISH, new SkirmishEffect());
        registry.put(KeywordAbility.ELUSIVE, new ElusiveEffect());
        registry.put(KeywordAbility.POISON, new PoisonEffect());
        registry.put(KeywordAbility.ALPHA, new AlphaEffect());
//        registry.put(KeywordAbility.DESTROYED, new DestroyedEffect());
//        registry.put(KeywordAbility.SCRAP, new ScrapEffect());
//        registry.put(KeywordAbility.OMNI, new OmniEffect());
        registry.put(KeywordAbility.DEPLOY, new DeployEffect());
    }

    public Optional<KeywordEffect> getEffect(KeywordAbility keywordAbility) {
        return Optional.ofNullable(registry.get(keywordAbility));
    }
}
