[M14] Fixes to Colossal Whale and Jace's Mindseelker.

This commit is contained in:
LevelX2 2013-07-09 14:28:12 +02:00
parent 3e8765e157
commit e907414647
2 changed files with 14 additions and 9 deletions

View file

@ -54,6 +54,8 @@ import mage.watchers.WatcherImpl;
*/
public class ColossalWhale extends CardImpl<ColossalWhale> {
private UUID exileId = UUID.randomUUID();
public ColossalWhale(UUID ownerId) {
super(ownerId, 48, "Colossal Whale", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.expansionSetCode = "M14";
@ -66,8 +68,8 @@ public class ColossalWhale extends CardImpl<ColossalWhale> {
// Islandwalk
this.addAbility(new IslandwalkAbility());
// Whenever Colossal Whale attacks, you may exile target creature defending player controls until Colossal Whale leaves the battlefield.
this.addAbility(new ColossalWhaleAbility());
this.addWatcher(new ColossalWhaleWatcher());
this.addAbility(new ColossalWhaleAbility(exileId));
this.addWatcher(new ColossalWhaleWatcher(exileId));
}
@ -84,9 +86,9 @@ public class ColossalWhale extends CardImpl<ColossalWhale> {
class ColossalWhaleAbility extends TriggeredAbilityImpl<ColossalWhaleAbility> {
public ColossalWhaleAbility() {
public ColossalWhaleAbility(UUID exileId) {
super(Zone.BATTLEFIELD, null);
this.addEffect(new ExileTargetEffect(this.getSourceId(),"Colossal Whale"));
this.addEffect(new ExileTargetEffect(exileId,"Colossal Whale"));
}
public ColossalWhaleAbility(final ColossalWhaleAbility ability) {
@ -122,12 +124,16 @@ class ColossalWhaleAbility extends TriggeredAbilityImpl<ColossalWhaleAbility> {
class ColossalWhaleWatcher extends WatcherImpl<ColossalWhaleWatcher> {
ColossalWhaleWatcher () {
UUID exileId;
ColossalWhaleWatcher (UUID exileId) {
super("BattlefieldLeft", WatcherScope.CARD);
this.exileId = exileId;
}
ColossalWhaleWatcher(ColossalWhaleWatcher watcher) {
ColossalWhaleWatcher(final ColossalWhaleWatcher watcher) {
super(watcher);
this.exileId = watcher.exileId;
}
@Override
@ -135,7 +141,6 @@ class ColossalWhaleWatcher extends WatcherImpl<ColossalWhaleWatcher> {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event.getTargetId().equals(sourceId)) {
ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
UUID exileId = this.getSourceId();
ExileZone exile = game.getExile().getExileZone(exileId);
if (exile != null) {
LinkedList<UUID> cards = new LinkedList<UUID>(exile);
@ -158,4 +163,4 @@ class ColossalWhaleWatcher extends WatcherImpl<ColossalWhaleWatcher> {
public ColossalWhaleWatcher copy() {
return new ColossalWhaleWatcher(this);
}
}
}

View file

@ -69,7 +69,7 @@ public class JacesMindseeker extends CardImpl<JacesMindseeker> {
// When Jace's Mindseeker enters the battlefield, target opponent puts the top five cards of his or her library into his or her graveyard.
// You may cast an instant or sorcery card from among them without paying its mana cost.
Ability ability = new EntersBattlefieldTriggeredAbility(new JaceMindseekerEffect());
ability.addTarget(new TargetOpponent());
ability.addTarget(new TargetOpponent(true));
this.addAbility(ability);
}