mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 21:12:04 -08:00
fixed Yidaro, Wandering Monster
This commit is contained in:
parent
74a81c6f18
commit
599c5cf742
2 changed files with 16 additions and 10 deletions
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
@ -10,7 +8,6 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.stack.StackObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
|
@ -26,7 +23,7 @@ public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
public CycleTriggeredAbility(CycleTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ACTIVATED_ABILITY;
|
||||
|
|
@ -34,10 +31,11 @@ public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if(event.getSourceId().equals(this.getSourceId())) {
|
||||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
StackObject object = game.getStack().getStackObject(event.getSourceId());
|
||||
if(object != null && object.getStackAbility() instanceof CyclingAbility){
|
||||
return true;
|
||||
if (object != null && object.getStackAbility() instanceof CyclingAbility) {
|
||||
this.getEffects().setValue("cycleCosts", object.getStackAbility().getCosts());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue