* Oracle en-Vec - fixed error with no cards in hand;

This commit is contained in:
Oleg Agafonov 2019-03-30 09:27:25 +04:00
parent c6786d26bf
commit 5280a2ac29

View file

@ -116,7 +116,8 @@ class OracleEnVecMustAttackRequirementEffect extends RequirementEffect {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return this.getTargetPointer().getFirst(game, source).equals(permanent.getId());
return this.getTargetPointer().getFirst(game, source) != null
&& this.getTargetPointer().getFirst(game, source).equals(permanent.getId());
}
@Override
@ -159,7 +160,8 @@ class OracleEnVecCantAttackRestrictionEffect extends RestrictionEffect {
@Override
public boolean applies(Permanent permanent, Ability source, Game game) {
return this.getTargetPointer().getFirst(game, source).equals(permanent.getId());
return this.getTargetPointer().getFirst(game, source) != null
&& this.getTargetPointer().getFirst(game, source).equals(permanent.getId());
}
@Override