small change

This commit is contained in:
Evan Kranzler 2017-09-12 15:42:34 -04:00
parent a26c5a509f
commit 155329ad0f

View file

@ -82,8 +82,6 @@ public class MairsilThePretender extends CardImpl {
// Mairsil, the Pretender has all activated abilities of all cards you own in exile with cage counters on them. You may activate each of those abilities only once each turn.
Ability ability = new SimpleStaticAbility(Zone.BATTLEFIELD, new MairsilThePretenderGainAbilitiesEffect());
this.addAbility(ability);
// ability.addEffect(new MairsilThePretenderRuleModifyingEffect());
// this.addAbility(ability, new MairsilThePretenderWatcher());
}
public MairsilThePretender(final MairsilThePretender card) {
@ -188,135 +186,3 @@ class MairsilThePretenderGainAbilitiesEffect extends ContinuousEffectImpl {
return new MairsilThePretenderGainAbilitiesEffect(this);
}
}
//class MairsilThePretenderWatcher extends Watcher {
//
// public final Map<UUID, Set<UUID>> activatedThisTurnAbilities = new HashMap<>();
//
// public MairsilThePretenderWatcher() {
// super(MairsilThePretenderWatcher.class.getSimpleName(), WatcherScope.GAME);
// }
//
// public MairsilThePretenderWatcher(final MairsilThePretenderWatcher watcher) {
// super(watcher);
// for (Entry<UUID, Set<UUID>> entry : watcher.activatedThisTurnAbilities.entrySet()) {
// activatedThisTurnAbilities.put(entry.getKey(), entry.getValue());
// }
// }
//
// @Override
// public void watch(GameEvent event, Game game) {
// if (event.getType() == GameEvent.EventType.ZONE_CHANGE && event instanceof ZoneChangeEvent) {
// ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
// if (zEvent.getFromZone() == Zone.BATTLEFIELD) {
// Permanent permanent = zEvent.getTarget();
// if (permanent != null) {
// this.activatedThisTurnAbilities.remove(permanent.getId());
// }
// }
// }
// if (event.getType() == GameEvent.EventType.ACTIVATED_ABILITY) {
// Set<UUID> permAbilities;
// if (activatedThisTurnAbilities.keySet().contains(event.getSourceId())) {
// permAbilities = activatedThisTurnAbilities.get(event.getSourceId());
// } else {
// permAbilities = new HashSet<>();
// }
// StackAbility ability = (StackAbility) game.getStack().getStackObject(event.getSourceId());
// if (ability != null && ability.getStackAbility().isActivated()) {
// for (Effect effect : ability.getAllEffects()) {
// if (effect instanceof DoNothingEffect) {
// permAbilities.add((UUID) effect.getValue("key"));
// this.activatedThisTurnAbilities.put(event.getSourceId(), permAbilities);
// }
// }
// }
// }
// }
//
// @Override
// public void reset() {
// activatedThisTurnAbilities.clear();
// }
//
// public Map<UUID, Set<UUID>> getActivatedThisTurnAbilities() {
// return this.activatedThisTurnAbilities;
// }
//
// @Override
// public MairsilThePretenderWatcher copy() {
// return new MairsilThePretenderWatcher(this);
// }
//
//}
//
//class MairsilThePretenderRuleModifyingEffect extends ContinuousRuleModifyingEffectImpl {
//
// public MairsilThePretenderRuleModifyingEffect() {
// super(Duration.WhileOnBattlefield, Outcome.Detriment);
// }
//
// public MairsilThePretenderRuleModifyingEffect(final MairsilThePretenderRuleModifyingEffect effect) {
// super(effect);
// }
//
// @Override
// public MairsilThePretenderRuleModifyingEffect copy() {
// return new MairsilThePretenderRuleModifyingEffect(this);
// }
//
// @Override
// public boolean apply(Game game, Ability source) {
// return true;
// }
//
// @Override
// public boolean checksEventType(GameEvent event, Game game) {
// return event.getType() == GameEvent.EventType.ACTIVATE_ABILITY;
// }
//
// @Override
// public boolean applies(GameEvent event, Ability source, Game game) {
// Optional<Ability> ability = game.getAbility(event.getTargetId(), event.getSourceId());
// MairsilThePretenderWatcher watcher = (MairsilThePretenderWatcher) game.getState().getWatchers().get(MairsilThePretenderWatcher.class.getSimpleName());
// if (watcher != null && ability != null && ability.isPresent()) {
// for (Effect effect : ability.get().getAllEffects()) {
// if (effect instanceof DoNothingEffect) {
// UUID originalID = (UUID) effect.getValue("key");
// if (watcher.getActivatedThisTurnAbilities().keySet().contains(event.getSourceId())) {
// if (watcher.getActivatedThisTurnAbilities().get(event.getSourceId()).contains(originalID)) {
// return true;
// }
// }
// }
// }
// }
// return false;
// }
//
// @Override
// public String getInfoMessage(Ability source, GameEvent event, Game game) {
// return "This ability can only be activated once each turn.";
// }
//}
//
//class DoNothingEffect extends OneShotEffect {
//
// DoNothingEffect() {
// super(Outcome.Neutral);
// }
//
// DoNothingEffect(final DoNothingEffect effect) {
// super(effect);
// }
//
// @Override
// public DoNothingEffect copy() {
// return new DoNothingEffect(this);
// }
//
// @Override
// public boolean apply(Game game, Ability source) {
// return true;
// }
//}