mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
[DFT] Implement Push the Limit (#13408)
This commit is contained in:
parent
4d1c6def23
commit
7c55d444b0
5 changed files with 155 additions and 74 deletions
|
|
@ -0,0 +1,42 @@
|
|||
package mage.abilities.effects.common.continuous;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
public class VehiclesBecomeArtifactCreatureEffect extends ContinuousEffectImpl {
|
||||
|
||||
public VehiclesBecomeArtifactCreatureEffect(Duration duration) {
|
||||
super(duration, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.BecomeCreature);
|
||||
staticText = "Vehicles you control become artifact creatures until end of turn";
|
||||
}
|
||||
|
||||
private VehiclesBecomeArtifactCreatureEffect(final VehiclesBecomeArtifactCreatureEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VehiclesBecomeArtifactCreatureEffect copy() {
|
||||
return new VehiclesBecomeArtifactCreatureEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(source.getControllerId())) {
|
||||
if (permanent != null && permanent.hasSubtype(SubType.VEHICLE, game)) {
|
||||
if (sublayer == SubLayer.NA) {
|
||||
permanent.addCardType(game, CardType.ARTIFACT);
|
||||
permanent.addCardType(game, CardType.CREATURE);// TODO: Check if giving CREATURE Type is correct
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue