mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Fixed NPE error
This commit is contained in:
parent
6c3d813b57
commit
1d8fbb3304
2 changed files with 2 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import mage.MageObject;
|
||||
|
@ -92,8 +91,7 @@ class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
}
|
||||
if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) {
|
||||
Optional<Ability> ability = game.getAbility(event.getTargetId(), event.getSourceId());
|
||||
return ability != null && ability.isPresent()
|
||||
&& !(ability.get() instanceof ActivatedManaAbilityImpl);
|
||||
return ability.isPresent() && !(ability.get() instanceof ActivatedManaAbilityImpl);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ class KayasWrathEffect extends OneShotEffect {
|
|||
source.getControllerId(), source.getSourceId(), game
|
||||
)) {
|
||||
boolean isMine = permanent != null && permanent.getControllerId().equals(source.getControllerId());
|
||||
if (permanent.destroy(source.getSourceId(), game, false) && isMine) {
|
||||
if (isMine && permanent.destroy(source.getSourceId(), game, false)) {
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue