forked from External/mage
[CHK] Befoul / Bushi Tenderfoot / Crushing Pain / Feast of Worms / Field of Reality / Forbidden Orchad / Initiate of Blood / Teller of Tales [FUT] Witch's Mist [TMP] Opportunist Fixed cards Akki Lavarunner - Rarity, removed land untap effect LaternLit Graveyard - changed blue to black mana Sphere of the Suns - fixed enters the battlefield tapped effect Skinrender - changed outcome Framework changes TriggeredAbility - enhanced getRule() method CreateTokenTargetEffect - enhanced getText() method FilterCreaturePermanent - added DamageDealt filter Some minor text/comment changes
38 lines
872 B
Java
38 lines
872 B
Java
package mage.abilities.effects.common;
|
|
|
|
import mage.Constants;
|
|
import mage.abilities.Ability;
|
|
import mage.abilities.effects.OneShotEffect;
|
|
import mage.game.Game;
|
|
import mage.game.permanent.Permanent;
|
|
|
|
|
|
/**
|
|
* @author Loki
|
|
*/
|
|
public class FlipSourceEffect extends OneShotEffect<FlipSourceEffect> {
|
|
|
|
public FlipSourceEffect() {
|
|
super(Constants.Outcome.BecomeCreature);
|
|
staticText = "flip it";
|
|
}
|
|
|
|
public FlipSourceEffect(final FlipSourceEffect effect) {
|
|
super(effect);
|
|
}
|
|
|
|
@Override
|
|
public boolean apply(Game game, Ability source) {
|
|
Permanent p = game.getPermanent(source.getSourceId());
|
|
if (p != null) {
|
|
p.flip(game);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override
|
|
public FlipSourceEffect copy() {
|
|
return new FlipSourceEffect(this);
|
|
}
|
|
|
|
}
|