mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 14:02:05 -08:00
* Batterskull - Fixed effect handling so that the Germ token no longer dies before the equipment from living weapon is attached.
This commit is contained in:
parent
c9db56d189
commit
7af040e70b
3 changed files with 82 additions and 6 deletions
|
|
@ -10,6 +10,7 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.players.Player;
|
||||
|
||||
public class LivingWeaponAbility extends EntersBattlefieldTriggeredAbility {
|
||||
public LivingWeaponAbility() {
|
||||
|
|
@ -42,11 +43,15 @@ class LivingWeaponEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
GermToken token = new GermToken();
|
||||
token.putOntoBattlefield(1, game, source.getId(), source.getControllerId());
|
||||
Permanent p = game.getPermanent(token.getLastAddedToken());
|
||||
if (p != null) {
|
||||
p.addAttachment(source.getSourceId(), game);
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
GermToken token = new GermToken();
|
||||
token.putOntoBattlefield(1, game, source.getId(), source.getControllerId());
|
||||
Permanent p = game.getPermanent(token.getLastAddedToken());
|
||||
if (p != null) {
|
||||
p.addAttachment(source.getSourceId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1120,7 +1120,7 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
|
|||
state.getStack().remove(top);
|
||||
while (state.hasSimultaneousEvents()) {
|
||||
state.handleSimultaneousEvent(this);
|
||||
checkStateAndTriggered();
|
||||
checkTriggered();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue