fixes for Rainbow Vale

This commit is contained in:
Andy Fries 2015-08-01 16:54:43 -07:00
parent f1fa56a4a0
commit 7b59da9194

View file

@ -54,6 +54,7 @@ public class RainbowVale extends CardImpl {
// {tap}: Add one mana of any color to your mana pool. An opponent gains control of Rainbow Vale at the beginning of the next end step.
Ability ability = new AnyColorManaAbility();
ability.addEffect(new RainbowValeEffect());
this.addAbility(ability);
}
public RainbowVale(final RainbowVale card) {
@ -69,8 +70,8 @@ public class RainbowVale extends CardImpl {
class RainbowValeEffect extends OneShotEffect {
public RainbowValeEffect() {
super(Outcome.Neutral);
staticText = "Add one mana of any color to your mana pool. An opponent gains control of Rainbow Vale at the beginning of the next end step.";
super(Outcome.PutManaInPool);
staticText = "An opponent gains control of {this} at the beginning of the next end step.";
}
public RainbowValeEffect(final RainbowValeEffect effect) {
@ -103,13 +104,22 @@ class OpponentGainControlEffect extends ContinuousEffectImpl {
public OpponentGainControlEffect() {
super(Duration.Custom, Layer.ControlChangingEffects_2, SubLayer.NA, Outcome.GainControl);
this.staticText = "An opponent gains control of {this} at the beginning of the next end step.";
this.staticText = "an opponent gains control of {this}";
}
public OpponentGainControlEffect(final OpponentGainControlEffect effect) {
super(effect);
}
@Override
public void init(Ability source, Game game){
super.init(source, game);
Permanent permanent = game.getPermanent(source.getSourceId());
Player targetOpponent = game.getPlayer(source.getFirstTarget());
game.informPlayers(permanent.getName() + " is now controlled by " + targetOpponent.getLogName());
}
@Override
public OpponentGainControlEffect copy() {
return new OpponentGainControlEffect(this);
@ -121,7 +131,6 @@ class OpponentGainControlEffect extends ContinuousEffectImpl {
Permanent permanent = game.getPermanent(source.getSourceId());
if (permanent != null && targetOpponent != null) {
permanent.changeControllerId(targetOpponent.getId(), game);
game.informPlayers(permanent.getName() + " is now controlled by " + targetOpponent.getLogName());
} else {
// no valid target exists, effect can be discarded
discard();