[RIX] Fixed set card [RIX] Added 5 cards.

This commit is contained in:
LevelX2 2018-01-07 13:29:40 +01:00
parent e997022de6
commit 0e119ffa01
9 changed files with 524 additions and 0 deletions

View file

@ -46,6 +46,7 @@ public enum AttackedThisStepCondition implements Condition {
&& watcher.getNumberAttackingCurrentStep(source.getControllerId()) > 0;
}
@Override
public String toString() {
return "during the declare attackers step and only if you've been attacked this step.";
}

View file

@ -0,0 +1,25 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.game.Game;
import mage.watchers.common.AttackedThisTurnWatcher;
/**
*
* @author LevelX2
*/
public enum AttackedThisTurnCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
AttackedThisTurnWatcher watcher = (AttackedThisTurnWatcher) game.getState().getWatchers().get(AttackedThisTurnWatcher.class.getSimpleName());
return !watcher.getAttackedThisTurnCreatures().isEmpty();
}
}

View file

@ -75,6 +75,9 @@ public class SacrificeSourceUnlessConditionEffect extends OneShotEffect {
@Override
public String getText(Mode mode) {
if (staticText != null && !staticText.isEmpty()) {
return staticText;
}
StringBuilder sb = new StringBuilder("sacrifice {this} unless ");
sb.append(condition.toString());
return sb.toString();