fix object reference

This commit is contained in:
igoudt 2017-09-25 22:53:26 +02:00
parent b12b0e29b8
commit 58ea795e3c

View file

@ -53,7 +53,6 @@ import java.util.Set;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public class TheUrDragon extends CardImpl {
@ -161,7 +160,10 @@ class TheUrDragonTriggeredAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) {
for (UUID attacker : game.getCombat().getAttackers()) {
Permanent creature = game.getPermanent(attacker);
if (creature != null && creature.getControllerId() == this.getControllerId() && creature.hasSubtype(SubType.DRAGON, game)) {
if (creature != null
&& creature.getControllerId() != null
&& creature.getControllerId().equals(this.getControllerId())
&& creature.hasSubtype(SubType.DRAGON, game)) {
return true;
}
}