Overwrote checkEventType for Death Pits of Rath.

This commit is contained in:
LevelX2 2015-06-10 08:09:45 +02:00
parent c27ef5ee97
commit 4543aac30e

View file

@ -50,7 +50,6 @@ public class DeathPitsOfRath extends CardImpl {
super(ownerId, 21, "Death Pits of Rath", Rarity.RARE, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}{B}");
this.expansionSetCode = "TMP";
// Whenever a creature is dealt damage, destroy it. It can't be regenerated.
this.addAbility(new DeathPitsOfRathTriggeredAbility());
}
@ -80,16 +79,17 @@ class DeathPitsOfRathTriggeredAbility extends TriggeredAbilityImpl {
return new DeathPitsOfRathTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.DAMAGED_CREATURE;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.DAMAGED_CREATURE) {
for(Effect effect : this.getEffects())
{
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
}
return true;
for(Effect effect : this.getEffects()) {
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
}
return false;
return true;
}
@Override