updated Yasova Dragonclaw and Unliving Psychopath's predicates to prevent target invalidation when they die

This commit is contained in:
Evan Kranzler 2017-09-30 23:26:19 -04:00
parent b7cf08bee4
commit d3ff8e6814
2 changed files with 4 additions and 4 deletions

View file

@ -93,7 +93,7 @@ class UnlivingPsychopathPowerLessThanSourcePredicate implements ObjectSourcePlay
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
Permanent sourcePermanent = game.getPermanent(input.getSourceId());
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(input.getSourceId());
return sourcePermanent != null && input.getObject().getPower().getValue() < sourcePermanent.getPower().getValue();
}

View file

@ -68,7 +68,7 @@ public class YasovaDragonclaw extends CardImpl {
}
public YasovaDragonclaw(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
@ -83,7 +83,7 @@ public class YasovaDragonclaw extends CardImpl {
effect2.setText(", untap that creature");
effect.addEffect(effect2);
effect.addEffect(new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn, ", and it gains haste until end of turn"));
Ability ability = new BeginningOfCombatTriggeredAbility(effect, TargetController.YOU, false);
Ability ability = new BeginningOfCombatTriggeredAbility(effect, TargetController.YOU, false);
ability.addTarget(new TargetCreaturePermanent(filter));
this.addAbility(ability);
}
@ -102,7 +102,7 @@ class YasovaDragonclawPowerLessThanSourcePredicate implements ObjectSourcePlayer
@Override
public boolean apply(ObjectSourcePlayer<Permanent> input, Game game) {
Permanent sourcePermanent = game.getPermanent(input.getSourceId());
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(input.getSourceId());
return sourcePermanent != null && input.getObject().getPower().getValue() < sourcePermanent.getPower().getValue();
}