[ONE] Implement Ezuri, Stalker of Spheres

This commit is contained in:
theelk801 2023-01-14 20:49:32 -05:00
parent 10d999a3c9
commit 4079b8772a
5 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,45 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.Effect;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
/**
* @author TheElk801
*/
public class ProliferatedControllerTriggeredAbility extends TriggeredAbilityImpl {
public ProliferatedControllerTriggeredAbility(Effect effect) {
this(effect, false);
}
public ProliferatedControllerTriggeredAbility(Effect effect, boolean optional) {
this(Zone.BATTLEFIELD, effect, optional);
}
public ProliferatedControllerTriggeredAbility(Zone zone, Effect effect, boolean optional) {
super(zone, effect, optional);
setTriggerPhrase("Whenever you proliferate, ");
}
private ProliferatedControllerTriggeredAbility(final ProliferatedControllerTriggeredAbility ability) {
super(ability);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.PROLIFERATED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
return isControlledBy(event.getPlayerId());
}
@Override
public ProliferatedControllerTriggeredAbility copy() {
return new ProliferatedControllerTriggeredAbility(this);
}
}

View file

@ -6,6 +6,7 @@ import mage.constants.Outcome;
import mage.counters.Counter;
import mage.filter.common.FilterPermanentOrPlayerWithCounter;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
import mage.target.Target;
@ -86,6 +87,10 @@ public class ProliferateEffect extends OneShotEffect {
}
}
}
game.fireEvent(GameEvent.getEvent(
GameEvent.EventType.PROLIFERATED,
controller.getId(), source, controller.getId()
));
return true;
}

View file

@ -307,6 +307,7 @@ public class GameEvent implements Serializable {
CAN_TAKE_MULLIGAN,
SCRY, SCRIED, SCRY_TO_BOTTOM,
SURVEIL, SURVEILED,
PROLIFERATED,
FATESEALED,
FLIP_COIN, COIN_FLIPPED,
REPLACE_ROLLED_DIE, // for Clam-I-Am workaround only