mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Implemented Yidaro, Wandering Monster
This commit is contained in:
parent
7e86626f1d
commit
297710c7fa
3 changed files with 154 additions and 9 deletions
|
|
@ -1,13 +1,6 @@
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
|
||||
package mage.abilities.costs.common;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.CostImpl;
|
||||
|
|
@ -16,12 +9,19 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public class CyclingDiscardCost extends CostImpl {
|
||||
|
||||
private MageObjectReference cycledCard = null;
|
||||
|
||||
public CyclingDiscardCost() {
|
||||
}
|
||||
|
||||
public CyclingDiscardCost(CyclingDiscardCost cost) {
|
||||
private CyclingDiscardCost(CyclingDiscardCost cost) {
|
||||
super(cost);
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +39,7 @@ public class CyclingDiscardCost extends CostImpl {
|
|||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CYCLE_CARD, card.getId(), card.getId(), card.getOwnerId()));
|
||||
paid = player.discard(card, null, game);
|
||||
if (paid) {
|
||||
cycledCard = new MageObjectReference(card, game);
|
||||
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CYCLED_CARD, card.getId(), card.getId(), card.getOwnerId()));
|
||||
}
|
||||
}
|
||||
|
|
@ -55,4 +56,8 @@ public class CyclingDiscardCost extends CostImpl {
|
|||
public CyclingDiscardCost copy() {
|
||||
return new CyclingDiscardCost(this);
|
||||
}
|
||||
|
||||
public MageObjectReference getCycledCard() {
|
||||
return cycledCard;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue