mirror of
https://github.com/correl/mage.git
synced 2024-11-25 11:09:53 +00:00
fixed Vraska, Golgari Queen's emblem not triggering
This commit is contained in:
parent
01dfede9e9
commit
b2beefc680
2 changed files with 25 additions and 24 deletions
|
@ -13,7 +13,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
@ -28,7 +27,11 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp
|
|||
}
|
||||
|
||||
public DealsDamageToAPlayerAllTriggeredAbility(Effect effect, FilterPermanent filter, boolean optional, SetTargetPointer setTargetPointer, boolean onlyCombat, boolean affectsDefendingPlayer) {
|
||||
super(Zone.BATTLEFIELD, effect, optional);
|
||||
this(Zone.BATTLEFIELD, effect, filter, optional, setTargetPointer, onlyCombat, affectsDefendingPlayer);
|
||||
}
|
||||
|
||||
public DealsDamageToAPlayerAllTriggeredAbility(Zone zone, Effect effect, FilterPermanent filter, boolean optional, SetTargetPointer setTargetPointer, boolean onlyCombat, boolean affectsDefendingPlayer) {
|
||||
super(zone, effect, optional);
|
||||
this.setTargetPointer = setTargetPointer;
|
||||
this.filter = filter;
|
||||
this.onlyCombat = onlyCombat;
|
||||
|
@ -57,8 +60,7 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!onlyCombat || ((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent permanent = game.getPermanent(event.getSourceId());
|
||||
if (permanent != null) {
|
||||
if (filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
||||
if (permanent != null && filter.match(permanent, getSourceId(), getControllerId(), game)) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setValue("damage", event.getAmount());
|
||||
effect.setValue("sourceId", event.getSourceId());
|
||||
|
@ -79,7 +81,6 @@ public class DealsDamageToAPlayerAllTriggeredAbility extends TriggeredAbilityImp
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ package mage.game.command.emblems;
|
|||
import mage.abilities.common.DealsDamageToAPlayerAllTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseGameTargetPlayerEffect;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.command.Emblem;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class VraskaGolgariQueenEmblem extends Emblem {
|
||||
|
@ -17,9 +17,9 @@ public final class VraskaGolgariQueenEmblem extends Emblem {
|
|||
this.setName("Emblem Vraska");
|
||||
this.setExpansionSetCodeForImage("GRN");
|
||||
this.getAbilities().add(new DealsDamageToAPlayerAllTriggeredAbility(
|
||||
new LoseGameTargetPlayerEffect(),
|
||||
Zone.COMMAND, new LoseGameTargetPlayerEffect(),
|
||||
StaticFilters.FILTER_CONTROLLED_A_CREATURE,
|
||||
false, SetTargetPointer.PLAYER, true
|
||||
false, SetTargetPointer.NONE, true, true
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue