forked from External/mage
Fix Zenos yae Galvus and Shinryu, Transcendent Rival triggers.
This commit is contained in:
commit
e07a69710b
2 changed files with 6 additions and 4 deletions
|
|
@ -120,13 +120,14 @@ class ShinryuTranscendentRivalTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.LOSES;
|
||||
return event.getType() == GameEvent.EventType.LOST;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
int zcc = game.getState().getZoneChangeCounter(this.getSourceId());
|
||||
return Optional
|
||||
.ofNullable(this.getId() + "_" + this.getSourceObjectZoneChangeCounter() + "_opponent")
|
||||
.of(this.getSourceId() + "_" + zcc + "_opponent")
|
||||
.map(game.getState()::getValue)
|
||||
.map(event.getPlayerId()::equals)
|
||||
.orElse(false);
|
||||
|
|
|
|||
|
|
@ -88,10 +88,11 @@ enum ZenosYaeGalvusPredicate implements ObjectSourcePlayerPredicate<Permanent> {
|
|||
|
||||
@Override
|
||||
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
|
||||
int zcc = game.getState().getZoneChangeCounter(input.getSource().getSourceId());
|
||||
return flag == Optional
|
||||
.ofNullable(CardUtil.getObjectZoneString(
|
||||
.of(CardUtil.getObjectZoneString(
|
||||
"chosenCreature", input.getSource().getSourceId(), game,
|
||||
input.getSource().getSourceObjectZoneChangeCounter(), false
|
||||
zcc, false
|
||||
))
|
||||
.map(game.getState()::getValue)
|
||||
.filter(MageObjectReference.class::isInstance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue