mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08: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;
|
package mage.cards.a;
|
||||||
|
|
||||||
import mage.MageObject;
|
import mage.MageObject;
|
||||||
|
|
@ -92,8 +91,7 @@ class AbeyanceEffect extends ContinuousRuleModifyingEffectImpl {
|
||||||
}
|
}
|
||||||
if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) {
|
if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) {
|
||||||
Optional<Ability> ability = game.getAbility(event.getTargetId(), event.getSourceId());
|
Optional<Ability> ability = game.getAbility(event.getTargetId(), event.getSourceId());
|
||||||
return ability != null && ability.isPresent()
|
return ability.isPresent() && !(ability.get() instanceof ActivatedManaAbilityImpl);
|
||||||
&& !(ability.get() instanceof ActivatedManaAbilityImpl);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class KayasWrathEffect extends OneShotEffect {
|
||||||
source.getControllerId(), source.getSourceId(), game
|
source.getControllerId(), source.getSourceId(), game
|
||||||
)) {
|
)) {
|
||||||
boolean isMine = permanent != null && permanent.getControllerId().equals(source.getControllerId());
|
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++;
|
counter++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue