use of mage.abilities.keyword.CrewAbility in project mage by magefree.
the class SwiftReconfigurationEffect method apply.
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {
Permanent aura = source.getSourcePermanentIfItStillExists(game);
if (aura == null) {
return false;
}
Permanent permanent = game.getPermanent(aura.getAttachedTo());
if (permanent == null) {
return false;
}
switch(layer) {
case TypeChangingEffects_4:
permanent.removeAllCardTypes(game);
permanent.addCardType(game, CardType.ARTIFACT);
permanent.addSubType(game, SubType.VEHICLE);
return true;
case AbilityAddingRemovingEffects_6:
permanent.addAbility(new CrewAbility(5));
return true;
}
return false;
}
Aggregations