* Doubling Season - Fixed that tokens were not doubled because they were put onto the battlefield on Doubling Seasons controller's side but wrongly only if Doubling Seasons controller did controll the effect that put the tokens onto the battlefield.

This commit is contained in:
LevelX2 2016-10-20 22:50:29 +02:00
parent 468eb46471
commit 4d0660b19f

View file

@ -49,7 +49,7 @@ import mage.game.stack.StackObject;
public class DoublingSeason extends CardImpl {
public DoublingSeason(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{4}{G}");
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{G}");
// If an effect would put one or more tokens onto the battlefield under your control, it puts twice that many of those tokens onto the battlefield instead.
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new DoublingSeasonTokenEffect()));
@ -91,16 +91,8 @@ class DoublingSeasonTokenEffect extends ReplacementEffectImpl {
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
StackObject spell = game.getStack().getStackObject(event.getSourceId());
if (spell != null && spell.getControllerId().equals(source.getControllerId())) {
return true;
}
return false;
}
@Override
public boolean apply(Game game, Ability source) {
return true;
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
return stackObject != null && event.getPlayerId().equals(source.getControllerId());
}
@Override
@ -139,10 +131,7 @@ class DoublingSeasonCounterEffect extends ReplacementEffectImpl {
if (permanent == null) {
permanent = game.getPermanentEntering(event.getTargetId());
}
if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
return true;
}
return false;
return permanent != null && permanent.getControllerId().equals(source.getControllerId());
}
@Override