mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +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;
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author TheElk801
|
* @author TheElk801
|
||||||
*/
|
*/
|
||||||
public class TheUrDragon extends CardImpl {
|
public class TheUrDragon extends CardImpl {
|
||||||
|
@ -161,7 +160,10 @@ class TheUrDragonTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||||
Permanent creature = game.getPermanent(attacker);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue