mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
* Deathless Knight - Fixed triggered ability.
This commit is contained in:
parent
6470fc85ef
commit
1c2ac9a90d
1 changed files with 3 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
||||||
package mage.cards.d;
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.TriggeredAbilityImpl;
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
|
||||||
|
@ -12,8 +13,6 @@ import mage.constants.Zone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.events.GameEvent;
|
import mage.game.events.GameEvent;
|
||||||
|
|
||||||
import java.util.UUID;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
|
@ -49,7 +48,7 @@ class DeathlessKnightTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
private boolean triggeredOnce = false;
|
private boolean triggeredOnce = false;
|
||||||
|
|
||||||
DeathlessKnightTriggeredAbility() {
|
DeathlessKnightTriggeredAbility() {
|
||||||
super(Zone.ALL, new ReturnSourceFromGraveyardToHandEffect(), false);
|
super(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToHandEffect(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private DeathlessKnightTriggeredAbility(final DeathlessKnightTriggeredAbility ability) {
|
private DeathlessKnightTriggeredAbility(final DeathlessKnightTriggeredAbility ability) {
|
||||||
|
@ -70,8 +69,7 @@ class DeathlessKnightTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (event.getType() != GameEvent.EventType.GAINED_LIFE
|
if (event.getType() != GameEvent.EventType.GAINED_LIFE
|
||||||
|| !event.getPlayerId().equals(controllerId)
|
|| !event.getPlayerId().equals(getControllerId())) {
|
||||||
|| game.getState().getZone(this.getSourceId()) == Zone.GRAVEYARD) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (triggeredOnce) {
|
if (triggeredOnce) {
|
||||||
|
|
Loading…
Reference in a new issue