mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[SPM] implement The Spot, Living Portal
This commit is contained in:
parent
d0ee2fef06
commit
8f1050a834
4 changed files with 203 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -10,6 +9,8 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
@ -27,7 +28,7 @@ public class PutSourceOnBottomOwnerLibraryCost extends CostImpl {
|
|||
@Override
|
||||
public boolean pay(Ability ability, Game game, Ability source, UUID controllerId, boolean noMana, Cost costToPay) {
|
||||
Player player = game.getPlayer(controllerId);
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (player != null && sourcePermanent != null) {
|
||||
paid = true;
|
||||
player.putCardsOnBottomOfLibrary(new CardsImpl(sourcePermanent), game, ability, false);
|
||||
|
|
@ -37,7 +38,7 @@ public class PutSourceOnBottomOwnerLibraryCost extends CostImpl {
|
|||
|
||||
@Override
|
||||
public boolean canPay(Ability ability, Ability source, UUID controllerId, Game game) {
|
||||
return game.getPermanent(source.getSourceId()) != null;
|
||||
return game.getPermanentOrLKIBattlefield(source.getSourceId()) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue