mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
fix object reference
This commit is contained in:
parent
b12b0e29b8
commit
58ea795e3c
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue