mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 11:02:00 -08:00
fix Ojer Pakpatiq, cleanup Abuelo's Awakening
This commit is contained in:
parent
2f3161e83d
commit
be485001c4
2 changed files with 4 additions and 49 deletions
|
|
@ -133,7 +133,7 @@ class AbuelosAwakeningContinuousEffect extends ContinuousEffectImpl {
|
|||
creature.addAbility(FlyingAbility.getInstance(), source.getSourceId(), game);
|
||||
break;
|
||||
case PTChangingEffects_7:
|
||||
if (sublayer == SubLayer.CharacteristicDefining_7a) {
|
||||
if (sublayer == SubLayer.SetPT_7b) {
|
||||
creature.getPower().setModifiedBaseValue(1);
|
||||
creature.getToughness().setModifiedBaseValue(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.abilities.common.DiesSourceTriggeredAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ReboundAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
|
|
@ -16,14 +15,11 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.Spell;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -155,49 +151,8 @@ class OjerPakpatiqDeepestEpochTrigger extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
|
||||
|
||||
OjerPakpatiqDeepestEpochAddCounterReplacementEffect counterEffect =
|
||||
new OjerPakpatiqDeepestEpochAddCounterReplacementEffect();
|
||||
counterEffect.setTargetPointer(new FixedTarget(sourceObject.getId(), game));
|
||||
game.addEffect(counterEffect, source);
|
||||
game.setEnterWithCounters(sourceObject.getId(), new Counters().addCounter(CounterType.TIME.createInstance(3)));
|
||||
controller.moveCards((Card) sourceObject, Zone.BATTLEFIELD, source, game, true, false, true, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class OjerPakpatiqDeepestEpochAddCounterReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
public OjerPakpatiqDeepestEpochAddCounterReplacementEffect() {
|
||||
super(Duration.EndOfStep, Outcome.BoostCreature);
|
||||
}
|
||||
|
||||
private OjerPakpatiqDeepestEpochAddCounterReplacementEffect(final OjerPakpatiqDeepestEpochAddCounterReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OjerPakpatiqDeepestEpochAddCounterReplacementEffect copy() {
|
||||
return new OjerPakpatiqDeepestEpochAddCounterReplacementEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return getTargetPointer().getTargets(game, source).contains(event.getTargetId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (permanent == null) {
|
||||
return false;
|
||||
}
|
||||
permanent.addCounters(CounterType.TIME.createInstance(3), source.getControllerId(), source, game, event.getAppliedEffects());
|
||||
discard();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue