mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Fix PutIntoGraveFromBattlefieldAllTriggeredAbility: the onlyToControllerGraveyard parameter was not implemented at all.
This commit is contained in:
parent
d2a90e6131
commit
9abfe04054
1 changed files with 5 additions and 2 deletions
|
@ -60,7 +60,7 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi
|
|||
public PutIntoGraveFromBattlefieldAllTriggeredAbility(final PutIntoGraveFromBattlefieldAllTriggeredAbility ability) {
|
||||
super(ability);
|
||||
this.filter = ability.filter;
|
||||
this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard;
|
||||
this.onlyToControllerGraveyard = ability.onlyToControllerGraveyard;
|
||||
this.setTargetPointer = ability.setTargetPointer;
|
||||
}
|
||||
|
||||
|
@ -73,8 +73,11 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
if (zEvent.getFromZone() == Zone.BATTLEFIELD
|
||||
&& zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
&& zEvent.getToZone() == Zone.GRAVEYARD) {
|
||||
if (filter.match(zEvent.getTarget(), this.getSourceId(), this.getControllerId(), game)) {
|
||||
if(onlyToControllerGraveyard && !this.getControllerId().equals(zEvent.getPlayerId())) {
|
||||
return false;
|
||||
}
|
||||
if (setTargetPointer) {
|
||||
for (Effect effect :this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
|
|
Loading…
Reference in a new issue