mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
- Little changes to 2 cards.
This commit is contained in:
parent
bb5b9587e0
commit
4b7608338f
2 changed files with 18 additions and 16 deletions
|
@ -28,6 +28,7 @@
|
|||
package mage.sets.worldwake;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.Constants.Zone;
|
||||
|
@ -120,11 +121,14 @@ class QuestForTheNihilStoneTriggeredAbility2 extends TriggeredAbilityImpl<QuestF
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent quest = game.getPermanent(super.getSourceId());
|
||||
if (quest == null) {
|
||||
Permanent questLKI = (Permanent) game.getLastKnownInformation(super.getSourceId(), Constants.Zone.BATTLEFIELD);
|
||||
quest = questLKI;
|
||||
}
|
||||
if (event.getType() == GameEvent.EventType.UPKEEP_STEP_PRE && game.getOpponents(controllerId).contains(event.getPlayerId())) {
|
||||
Player opponent = game.getPlayer(event.getPlayerId());
|
||||
if (opponent != null
|
||||
&& opponent.getHand().size() == 0
|
||||
&& quest != null
|
||||
&& quest.getCounters().getCount(CounterType.QUEST) >= 2) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(opponent.getId()));
|
||||
|
@ -135,8 +139,8 @@ class QuestForTheNihilStoneTriggeredAbility2 extends TriggeredAbilityImpl<QuestF
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "At the beginning of each opponent's upkeep, if that player has no cards in hand and {this} has two or more quest counters on it, you may have that player lose 5 life.";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,9 @@ public class ScribNibblers extends CardImpl<ScribNibblers> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}: Exile the top card of target player's library. If it's a land card, you gain 1 life.
|
||||
this.addAbility(new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ScribNibblersEffect(), new TapSourceCost()));
|
||||
Ability ability = new SimpleActivatedAbility(Constants.Zone.BATTLEFIELD, new ScribNibblersEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Landfall - Whenever a land enters the battlefield under your control, you may untap Scrib Nibblers.
|
||||
this.addAbility(new LandfallAbility(Constants.Zone.BATTLEFIELD, new UntapSourceEffect(), true));
|
||||
|
@ -95,17 +97,13 @@ class ScribNibblersEffect extends OneShotEffect<ScribNibblersEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
TargetPlayer target = new TargetPlayer();
|
||||
target.setRequired(true);
|
||||
if (you.choose(Constants.Outcome.Neutral, target, source.getId(), game)) {
|
||||
Player targetPlayer = game.getPlayer(target.getFirstTarget());
|
||||
if (targetPlayer != null && targetPlayer.getLibrary().size() > 0) {
|
||||
Card card = targetPlayer.getLibrary().getFromTop(game);
|
||||
card.moveToExile(id, "Scrib Nibblers Exile", source.getId(), game);
|
||||
if (card != null && card.getCardType().contains(CardType.LAND)) {
|
||||
you.gainLife(1, game);
|
||||
return true;
|
||||
}
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
if (targetPlayer != null && targetPlayer.getLibrary().size() > 0) {
|
||||
Card card = targetPlayer.getLibrary().getFromTop(game);
|
||||
card.moveToExile(id, "Scrib Nibblers Exile", source.getId(), game);
|
||||
if (card != null && card.getCardType().contains(CardType.LAND)) {
|
||||
you.gainLife(1, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue