mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Rings of Brighthearth - Fixed possible NPE error.
This commit is contained in:
parent
a2b8891188
commit
f675575119
1 changed files with 4 additions and 4 deletions
|
@ -133,10 +133,10 @@ class RingsOfBrighthearthEffect extends OneShotEffect {
|
|||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), false, null)) {
|
||||
StackAbility ability = (StackAbility) getValue("stackAbility");
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (ability != null && controller != null) {
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (ability != null && controller != null && sourcePermanent != null) {
|
||||
ability.createCopyOnStack(game, source, source.getControllerId(), true);
|
||||
game.informPlayers(new StringBuilder(sourcePermanent.getName()).append(": ").append(controller.getLogName()).append(" copied activated ability").toString());
|
||||
game.informPlayers(sourcePermanent.getIdName() + ": " + controller.getLogName() + " copied activated ability");
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue