* Kira, Great Glass-Spinner - Some fixes to the triggered ability that controlled creatures gain.

This commit is contained in:
LevelX2 2015-08-24 08:31:06 +02:00
parent c024318489
commit 1868631a96

View file

@ -112,7 +112,7 @@ class KiraGreatGlassSpinnerAbility extends TriggeredAbilityImpl {
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getTargetId().equals(this.getSourceId())) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent.getCardType().contains(CardType.CREATURE)) {
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
CreatureWasTargetedThisTurnWatcher watcher = (CreatureWasTargetedThisTurnWatcher) game.getState().getWatchers().get("CreatureWasTargetedThisTurn");
if (watcher != null && watcher.notMoreThanOnceTargetedThisTurn(permanent, game)) {
for (Effect effect : getEffects()) {
@ -149,7 +149,7 @@ class CreatureWasTargetedThisTurnWatcher extends Watcher {
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.TARGETED) {
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent.getCardType().contains(CardType.CREATURE)) {
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
MageObjectReference mor = new MageObjectReference(permanent, game);
int amount = 0;
if (creaturesTargeted.containsKey(mor)) {