mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
[VOW] Implemented By Invitation Only
This commit is contained in:
parent
9535629b65
commit
003eeb81b8
2 changed files with 68 additions and 0 deletions
67
Mage.Sets/src/mage/cards/b/ByInvitationOnly.java
Normal file
67
Mage.Sets/src/mage/cards/b/ByInvitationOnly.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ByInvitationOnly extends CardImpl {
|
||||
|
||||
public ByInvitationOnly(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}{W}");
|
||||
|
||||
// Choose a number between 0 and 13. Each player sacrifices that many creatures.
|
||||
this.getSpellAbility().addEffect(new ByInvitationOnlyEffect());
|
||||
}
|
||||
|
||||
private ByInvitationOnly(final ByInvitationOnly card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByInvitationOnly copy() {
|
||||
return new ByInvitationOnly(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ByInvitationOnlyEffect extends OneShotEffect {
|
||||
|
||||
ByInvitationOnlyEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "choose a number between 0 and 13. Each player sacrifices that many creatures";
|
||||
}
|
||||
|
||||
private ByInvitationOnlyEffect(final ByInvitationOnlyEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByInvitationOnlyEffect copy() {
|
||||
return new ByInvitationOnlyEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int number = player.getAmount(
|
||||
0, 13, "Choose a number between 0 and 13", game
|
||||
);
|
||||
return new SacrificeAllEffect(
|
||||
number, StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT
|
||||
).apply(game, source);
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ public final class InnistradCrimsonVow extends ExpansionSet {
|
|||
this.numBoosterDoubleFaced = 1;
|
||||
|
||||
cards.add(new SetCardInfo("Apprentice Sharpshooter", 185, Rarity.COMMON, mage.cards.a.ApprenticeSharpshooter.class));
|
||||
cards.add(new SetCardInfo("By Invitation Only", 5, Rarity.RARE, mage.cards.b.ByInvitationOnly.class));
|
||||
cards.add(new SetCardInfo("Deathcap Glade", 261, Rarity.RARE, mage.cards.d.DeathcapGlade.class));
|
||||
cards.add(new SetCardInfo("Demonic Bargain", 103, Rarity.RARE, mage.cards.d.DemonicBargain.class));
|
||||
cards.add(new SetCardInfo("Dig Up", 197, Rarity.RARE, mage.cards.d.DigUp.class));
|
||||
|
|
Loading…
Reference in a new issue