1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-13 17:00:09 -09:00

Small change to Uphill Battle.

This commit is contained in:
LevelX2 2018-03-08 23:27:19 +01:00
parent 82e8606b40
commit 15602cdfb3
2 changed files with 6 additions and 6 deletions
Mage.Sets/src/mage/cards/u
Mage/src/main/java/mage/game/permanent

View file

@ -49,9 +49,11 @@ import mage.watchers.common.CreatureWasCastWatcher;
* @author chrvanorle * @author chrvanorle
*/ */
public class UphillBattle extends CardImpl { public class UphillBattle extends CardImpl {
public UphillBattle(UUID ownerId, CardSetInfo setInfo) { public UphillBattle(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{R}"); super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
// Creatures played by your opponents enter the battlefield tapped.
Ability tapAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new UphillBattleTapEffect()); Ability tapAbility = new SimpleStaticAbility(Zone.BATTLEFIELD, new UphillBattleTapEffect());
tapAbility.addWatcher(new CreatureWasCastWatcher()); tapAbility.addWatcher(new CreatureWasCastWatcher());
tapAbility.addWatcher(new PlayCreatureLandWatcher()); tapAbility.addWatcher(new PlayCreatureLandWatcher());
@ -118,7 +120,6 @@ class PlayCreatureLandWatcher extends Watcher {
} }
} }
class UphillBattleTapEffect extends ReplacementEffectImpl { class UphillBattleTapEffect extends ReplacementEffectImpl {
UphillBattleTapEffect() { UphillBattleTapEffect() {
@ -129,13 +130,13 @@ class UphillBattleTapEffect extends ReplacementEffectImpl {
UphillBattleTapEffect(final UphillBattleTapEffect effect) { UphillBattleTapEffect(final UphillBattleTapEffect effect) {
super(effect); super(effect);
} }
@Override @Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) { public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent target = ((EntersTheBattlefieldEvent) event).getTarget(); Permanent target = ((EntersTheBattlefieldEvent) event).getTarget();
CreatureWasCastWatcher creatureSpellWatcher = (CreatureWasCastWatcher) game.getState().getWatchers().get(CreatureWasCastWatcher.class.getSimpleName()); CreatureWasCastWatcher creatureSpellWatcher = (CreatureWasCastWatcher) game.getState().getWatchers().get(CreatureWasCastWatcher.class.getSimpleName());
PlayCreatureLandWatcher landWatcher = (PlayCreatureLandWatcher) game.getState().getWatchers().get(PlayCreatureLandWatcher.class.getSimpleName()); PlayCreatureLandWatcher landWatcher = (PlayCreatureLandWatcher) game.getState().getWatchers().get(PlayCreatureLandWatcher.class.getSimpleName());
if (target != null if (target != null
&& ((creatureSpellWatcher != null && creatureSpellWatcher.wasCreatureCastThisTurn(target.getId())) && ((creatureSpellWatcher != null && creatureSpellWatcher.wasCreatureCastThisTurn(target.getId()))
|| (landWatcher != null && landWatcher.wasLandPlayed(target.getId())))) { || (landWatcher != null && landWatcher.wasLandPlayed(target.getId())))) {

View file

@ -59,7 +59,6 @@ public interface Permanent extends Card, Controllable {
* @param tapped * @param tapped
* @deprecated * @deprecated
*/ */
@Deprecated
void setTapped(boolean tapped); void setTapped(boolean tapped);
boolean canTap(); boolean canTap();