mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[UNF] Implemented Boing!
This commit is contained in:
parent
5fbd5f4fc8
commit
81c70d25a8
2 changed files with 70 additions and 0 deletions
69
Mage.Sets/src/mage/cards/b/Boing.java
Normal file
69
Mage.Sets/src/mage/cards/b/Boing.java
Normal file
|
@ -0,0 +1,69 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Boing extends CardImpl {
|
||||
|
||||
public Boing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
|
||||
|
||||
// Return target creature to its owner's hand, then roll a six-sided die. If the result is 3 or less, scry a number of cards equal to the result.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addEffect(new BoingEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private Boing(final Boing card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boing copy() {
|
||||
return new Boing(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BoingEffect extends OneShotEffect {
|
||||
|
||||
BoingEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = ", then roll a six-sided die. If the result is 3 or less, " +
|
||||
"scry a number of cards equal to the result";
|
||||
}
|
||||
|
||||
private BoingEffect(final BoingEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoingEffect copy() {
|
||||
return new BoingEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int result = player.rollDice(outcome, source, game, 6);
|
||||
if (result <= 3) {
|
||||
player.scry(result, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -22,6 +22,7 @@ public final class Unfinity extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Attempted Murder", 66, Rarity.UNCOMMON, mage.cards.a.AttemptedMurder.class));
|
||||
cards.add(new SetCardInfo("Blood Crypt", 279, Rarity.RARE, mage.cards.b.BloodCrypt.class));
|
||||
cards.add(new SetCardInfo("Boing!", 40, Rarity.COMMON, mage.cards.b.Boing.class));
|
||||
cards.add(new SetCardInfo("Breeding Pool", 286, Rarity.RARE, mage.cards.b.BreedingPool.class));
|
||||
cards.add(new SetCardInfo("Clown Car", 186, Rarity.RARE, mage.cards.c.ClownCar.class));
|
||||
cards.add(new SetCardInfo("Forest", 239, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
Loading…
Reference in a new issue