package net.demilich.metastone.game.spells.custom;
import net.demilich.metastone.game.GameContext;
import net.demilich.metastone.game.Player;
import net.demilich.metastone.game.cards.Card;
import net.demilich.metastone.game.entities.Actor;
import net.demilich.metastone.game.entities.Entity;
import net.demilich.metastone.game.spells.Spell;
import net.demilich.metastone.game.spells.desc.SpellDesc;
public class HolyWrathSpell extends Spell {
@Override
protected void onCast(GameContext context, Player player, SpellDesc desc, Entity source, Entity target) {
Card drawnCard = context.getLogic().drawCard(player.getId(), source);
if (drawnCard == null) {
return;
}
context.getLogic().damage(player, (Actor) target, drawnCard.getBaseManaCost(), source);
}
}