package com.hearthsim.card.goblinsvsgnomes.spell.common; import com.hearthsim.card.minion.Minion; import com.hearthsim.card.spellcard.SpellTargetableCard; import com.hearthsim.event.effect.EffectCharacter; import com.hearthsim.event.filter.FilterCharacter; import com.hearthsim.event.filter.FilterCharacterTargetedSpell; /** * Created by oyachai on 7/31/15. */ public class VelensChosen extends SpellTargetableCard { /** * Constructor * * @param hasBeenUsed Whether the card has already been used or not */ @Deprecated public VelensChosen(boolean hasBeenUsed) { this(); this.hasBeenUsed = hasBeenUsed; } /** * Constructor * * Defaults to hasBeenUsed = false */ public VelensChosen() { super(); } @Override public FilterCharacter getTargetableFilter() { return FilterCharacterTargetedSpell.ALL_MINIONS; } /** * * Use the card on the given target * * Give a minion +2/+4 and spell damage +1 * * @return The boardState is manipulated and returned */ @Override public EffectCharacter getTargetableEffect() { if (this.effect == null) { this.effect = (targetSide, targetCharacterIndex, boardState) -> { Minion targetCharacter = boardState.data_.getCharacter(targetSide, targetCharacterIndex); targetCharacter.addAttack((byte)2); targetCharacter.addHealth((byte)4); targetCharacter.addMaxHealth((byte)4); targetCharacter.addSpellDamage((byte)1); return boardState; }; } return this.effect; } }