Fixed Issue#63: Angel's Tomb - Doesn't lose creature status

This commit is contained in:
magenoxx 2012-09-07 22:37:21 +04:00
parent fa82f1b159
commit 99e23805c1
2 changed files with 9 additions and 1 deletions

View file

@ -43,7 +43,7 @@ import mage.game.permanent.token.Token;
*
* @author BetaSteward_at_googlemail.com
*/
public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCreatureSourceEffect> {
public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCreatureSourceEffect> implements SourceEffect {
protected Token token;
protected String type;
@ -65,6 +65,12 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl<BecomesCre
public BecomesCreatureSourceEffect copy() {
return new BecomesCreatureSourceEffect(this);
}
@Override
public void init(Ability source, Game game) {
super.init(source, game);
this.getAffectedObjects().add(source.getSourceId());
}
@Override
public boolean apply(Layer layer, SubLayer sublayer, Ability source, Game game) {

View file

@ -284,6 +284,7 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
break;
case BATTLEFIELD:
PermanentCard permanent = new PermanentCard(this, ownerId);
game.resetForSourceId(permanent.getId());
game.addPermanent(permanent);
game.setZone(objectId, Zone.BATTLEFIELD);
game.applyEffects();
@ -397,6 +398,7 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
}
updateZoneChangeCounter();
PermanentCard permanent = new PermanentCard(this, controllerId);
game.resetForSourceId(permanent.getId());
game.addPermanent(permanent);
game.setZone(objectId, Zone.BATTLEFIELD);
//game.applyEffects(); // magenoxx: this causes bugs