package com.hearthsim.card.minion.concrete;

import com.hearthsim.card.Card;
import com.hearthsim.card.minion.Minion;
import com.hearthsim.card.minion.MinionTargetableBattlecry;
import com.hearthsim.event.effect.CardEffectCharacter;
import com.hearthsim.event.MinionFilterTargetedBattlecry;
import com.hearthsim.exception.HSException;
import com.hearthsim.model.BoardModel;
import com.hearthsim.model.PlayerSide;
import com.hearthsim.util.tree.HearthTreeNode;

public class TempleEnforcer extends Minion implements MinionTargetableBattlecry {

    /**
     * Battlecry: Give a friendly minion +3 Health
     */
    private final static MinionFilterTargetedBattlecry filter = new MinionFilterTargetedBattlecry() {
        protected boolean includeOwnMinions() { return true; }
    };

    private final static CardEffectCharacter battlecryAction = new CardEffectCharacter() {
        @Override
        public HearthTreeNode applyEffect(PlayerSide originSide, Card origin, PlayerSide targetSide, int targetCharacterIndex, HearthTreeNode boardState) throws HSException {
            Minion targetMinion = boardState.data_.modelForSide(targetSide).getCharacter(targetCharacterIndex);
            HearthTreeNode toRet = boardState;
            targetMinion.setHealth((byte)(targetMinion.getHealth() + 3));
            return toRet;
        }
    };

    public TempleEnforcer() {
        super();
    }

    @Override
    public boolean canTargetWithBattlecry(PlayerSide originSide, Card origin, PlayerSide targetSide, int targetCharacterIndex, BoardModel board) {
        return TempleEnforcer.filter.targetMatches(originSide, origin, targetSide, targetCharacterIndex, board);
    }

    @Override
    public HearthTreeNode useTargetableBattlecry_core(PlayerSide originSide, Minion origin, PlayerSide targetSide, int targetCharacterIndex, HearthTreeNode boardState) throws HSException {
        return TempleEnforcer.battlecryAction.applyEffect(originSide, origin, targetSide, targetCharacterIndex, boardState);
    }
}

@@ -276,32 +276,96 @@
 getedBattlecry;%0A
+import com.hearthsim.event.effect.CardEffectCharacterBuffDelta;%0A
 import com.heart
@@ -931,480 +931,23 @@
 cter
-() %7B%0A        @Override%0A        public HearthTreeNode applyEffect(PlayerSide originSide, Card origin, PlayerSide targetSide, int targetCharacterIndex, HearthTreeNode boardState) throws HSException %7B%0A            Minion targetMinion = boardState.data_.modelForSide(targetSide).getCharacter(targetCharacterIndex);%0A            HearthTreeNode toRet = boardState;%0A            targetMinion.setHealth((byte)(targetMinion.getHealth() + 3));%0A            return toRet;%0A        %7D%0A    %7D
+BuffDelta(0, 3)
 ;%0A%0A 

Convert Temple Enforcer