[DFT] Implement Push the Limit (#13408)

This commit is contained in:
Jmlundeen 2025-03-15 19:17:44 -05:00 committed by GitHub
parent 4d1c6def23
commit 7c55d444b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 155 additions and 74 deletions

View file

@ -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;
}
}