mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* [C19] Rayami, First of the Fallen - fixed game error on usage with tokens
This commit is contained in:
parent
a648268c4c
commit
2355dfead4
2 changed files with 6 additions and 5 deletions
|
@ -77,6 +77,7 @@ class DraugrNecromancerReplacementEffect extends ReplacementEffectImpl {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null
|
||||
|| permanent == null
|
||||
|| (permanent instanceof PermanentToken)
|
||||
|| !controller.hasOpponent(permanent.getControllerId(), game)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.UUID;
|
||||
|
@ -125,13 +126,12 @@ class RayamiFirstOfTheFallenReplacementEffect extends ReplacementEffectImpl {
|
|||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null || permanent == null) {
|
||||
if (controller == null
|
||||
|| permanent == null
|
||||
|| (permanent instanceof PermanentToken)) {
|
||||
return false;
|
||||
}
|
||||
controller.moveCards(permanent, Zone.EXILED, source, game);
|
||||
Card card = game.getCard(permanent.getId());
|
||||
card.addCounters(CounterType.BLOOD.createInstance(), source.getControllerId(), source, game);
|
||||
return true;
|
||||
return CardUtil.moveCardWithCounter(game, source, controller, permanent, Zone.EXILED, CounterType.BLOOD.createInstance());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue