mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 12:22:10 -08:00
fixes
This commit is contained in:
parent
53d7e5623b
commit
3384d27ea8
13 changed files with 107 additions and 64 deletions
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.abilities.common;
|
||||
|
||||
import java.io.ObjectStreamException;
|
||||
import mage.Constants.Zone;
|
||||
import mage.abilities.StaticAbility;
|
||||
import mage.abilities.effects.EntersBattlefieldEffect;
|
||||
|
|
|
|||
|
|
@ -78,17 +78,17 @@ public class EntersBattlefieldEffect extends ReplacementEffectImpl<EntersBattlef
|
|||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Spell spell = game.getStack().getSpell(event.getSourceId());
|
||||
for (Effect effect: baseEffects) {
|
||||
if (effect instanceof ContinuousEffect) {
|
||||
if (spell != null)
|
||||
game.addEffect((ContinuousEffect) effect, spell.getSpellAbility());
|
||||
else
|
||||
if (source.activate(game, false)) {
|
||||
if (effect instanceof ContinuousEffect) {
|
||||
game.addEffect((ContinuousEffect) effect, source);
|
||||
}
|
||||
else {
|
||||
if (spell != null)
|
||||
effect.apply(game, spell.getSpellAbility());
|
||||
else
|
||||
effect.apply(game, source);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (spell != null)
|
||||
effect.apply(game, spell.getSpellAbility());
|
||||
else
|
||||
effect.apply(game, source);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ import mage.Constants.Duration;
|
|||
import mage.Constants.Layer;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.SubLayer;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.cards.Card;
|
||||
|
|
|
|||
|
|
@ -257,8 +257,8 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
PermanentCard permanent = new PermanentCard(this, controllerId);
|
||||
game.getBattlefield().addPermanent(permanent);
|
||||
game.setZone(objectId, Zone.BATTLEFIELD);
|
||||
permanent.entersBattlefield(sourceId, game);
|
||||
game.applyEffects();
|
||||
permanent.entersBattlefield(sourceId, game);
|
||||
game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ public class Spell<T extends Spell<T>> implements StackObject, Card {
|
|||
return false;
|
||||
}
|
||||
else {
|
||||
result = card.putOntoBattlefield(game, Zone.HAND, ability.getId(), controllerId);
|
||||
resolveKicker(game);
|
||||
result = card.putOntoBattlefield(game, Zone.HAND, ability.getId(), controllerId);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue