mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
reverted change to triggered abilities (#6001)
This commit is contained in:
parent
037998a187
commit
3d224ffb61
2 changed files with 24 additions and 18 deletions
|
@ -59,25 +59,28 @@ class DeathlessKnightTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.GAINED_LIFE;
|
return event.getType() == GameEvent.EventType.GAINED_LIFE
|
||||||
|
|| event.getType() == GameEvent.EventType.END_PHASE_POST;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (!event.getPlayerId().equals(controllerId)
|
if (event.getType() == GameEvent.EventType.END_PHASE_POST) {
|
||||||
|| game.getState().getZone(this.getSourceId()) == Zone.GRAVEYARD
|
triggeredOnce = false;
|
||||||
|| triggeredOnce) {
|
return false;
|
||||||
|
}
|
||||||
|
if (event.getType() != GameEvent.EventType.GAINED_LIFE
|
||||||
|
|| !event.getPlayerId().equals(controllerId)
|
||||||
|
|| game.getState().getZone(this.getSourceId()) == Zone.GRAVEYARD) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (triggeredOnce) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
triggeredOnce = true;
|
triggeredOnce = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reset(Game game) {
|
|
||||||
triggeredOnce = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "When you gain life for the first time each turn, return {this} from your graveyard to your hand.";
|
return "When you gain life for the first time each turn, return {this} from your graveyard to your hand.";
|
||||||
|
|
|
@ -26,14 +26,22 @@ public class DrawSecondCardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkEventType(GameEvent event, Game game) {
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.DREW_CARD;
|
return event.getType() == GameEvent.EventType.DREW_CARD
|
||||||
|
|| event.getType() == GameEvent.EventType.END_PHASE_POST;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (!event.getPlayerId().equals(controllerId)
|
if (event.getType() == GameEvent.EventType.END_PHASE_POST) {
|
||||||
|| game.getPermanent(sourceId) == null
|
triggeredOnce = false;
|
||||||
|| triggeredOnce) {
|
return false;
|
||||||
|
}
|
||||||
|
if (event.getType() != GameEvent.EventType.DREW_CARD
|
||||||
|
|| !event.getPlayerId().equals(controllerId)
|
||||||
|
|| game.getPermanent(sourceId) == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (triggeredOnce) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
CardsAmountDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsAmountDrawnThisTurnWatcher.class);
|
CardsAmountDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsAmountDrawnThisTurnWatcher.class);
|
||||||
|
@ -47,11 +55,6 @@ public class DrawSecondCardTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void reset(Game game) {
|
|
||||||
triggeredOnce = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRule() {
|
public String getRule() {
|
||||||
return "Whenever you draw your second card each turn, " + super.getRule();
|
return "Whenever you draw your second card each turn, " + super.getRule();
|
||||||
|
|
Loading…
Reference in a new issue