mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
* Athreos, God of Passage - Fixed that the triggered ability did not work.
This commit is contained in:
parent
b602be2b53
commit
25b96900c5
1 changed files with 4 additions and 8 deletions
|
@ -87,7 +87,7 @@ public class AthreosGodOfPassage extends CardImpl {
|
||||||
effect.setText("As long as your devotion to white and black is less than seven, Athreos isn't a creature");
|
effect.setText("As long as your devotion to white and black is less than seven, Athreos isn't a creature");
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, effect));
|
||||||
// Whenever another creature you own dies, return it to your hand unless target opponent pays 3 life.
|
// Whenever another creature you own dies, return it to your hand unless target opponent pays 3 life.
|
||||||
Ability ability = new AthreosDiesCreatureTriggeredAbility(new AthreosGodOfPassageReturnEffect(), false, filter, true);
|
Ability ability = new AthreosDiesCreatureTriggeredAbility(new AthreosGodOfPassageReturnEffect(), false, filter);
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
|
@ -152,12 +152,10 @@ class AthreosGodOfPassageReturnEffect extends OneShotEffect {
|
||||||
class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
protected FilterCreaturePermanent filter;
|
protected FilterCreaturePermanent filter;
|
||||||
private boolean setTargetPointer;
|
|
||||||
|
|
||||||
public AthreosDiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter, boolean setTargetPointer) {
|
public AthreosDiesCreatureTriggeredAbility(Effect effect, boolean optional, FilterCreaturePermanent filter) {
|
||||||
super(Zone.BATTLEFIELD, effect, optional);
|
super(Zone.BATTLEFIELD, effect, optional);
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.setTargetPointer = setTargetPointer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AthreosDiesCreatureTriggeredAbility(AthreosDiesCreatureTriggeredAbility ability) {
|
public AthreosDiesCreatureTriggeredAbility(AthreosDiesCreatureTriggeredAbility ability) {
|
||||||
|
@ -177,11 +175,9 @@ class AthreosDiesCreatureTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
if (zEvent.getFromZone().equals(Zone.BATTLEFIELD) && zEvent.getToZone().equals(Zone.GRAVEYARD)) {
|
if (zEvent.getFromZone().equals(Zone.BATTLEFIELD) && zEvent.getToZone().equals(Zone.GRAVEYARD)) {
|
||||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||||
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
|
||||||
if (setTargetPointer) {
|
|
||||||
for (Effect effect : this.getEffects()) {
|
for (Effect effect : this.getEffects()) {
|
||||||
effect.setValue("creatureId", event.getTargetId());
|
effect.setValue("creatureId", event.getTargetId());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue