Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source));
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && spell != null) {
game.getStack().counter(spell.getId(), source.getSourceId(), game);
if (ClashEffect.getInstance().apply(game, source)) {
Effect effect = new AddManaToManaPoolEffect(new Mana(0,0,0,0,0,spell.getConvertedManaCost(),0), "your");
effect.setTargetPointer(new FixedTarget(source.getControllerId()));
AtTheBeginOMainPhaseDelayedTriggeredAbility delayedAbility =
new AtTheBeginOMainPhaseDelayedTriggeredAbility(effect, true, TargetController.YOU, AtTheBeginOMainPhaseDelayedTriggeredAbility.PhaseSelection.NEXT_MAIN);
delayedAbility.setSourceId(source.getSourceId());
delayedAbility.setControllerId(source.getControllerId());
game.addDelayedTriggeredAbility(delayedAbility);