this.getSpellAbility().getModes().setMaxModes(2);
// Counter target spell;
this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell());
// or return target permanent to its owner's hand;
Mode mode = new Mode();
mode.getEffects().add(new ReturnToHandTargetEffect());
mode.getTargets().add(new TargetPermanent());
this.getSpellAbility().getModes().addMode(mode);
// or tap all creatures your opponents control;
mode = new Mode();
mode.getEffects().add(new CrypticCommandEffect());
this.getSpellAbility().getModes().addMode(mode);
// or draw a card.
mode = new Mode();
mode.getEffects().add(new DrawCardSourceControllerEffect(1));
this.getSpellAbility().getModes().addMode(mode);
}