Fix PutIntoGraveFromBattlefieldAllTriggeredAbility: the onlyToControllerGraveyard parameter was not implemented at all.

This commit is contained in:
LoneFox 2015-09-16 08:50:51 +03:00
parent d2a90e6131
commit 9abfe04054

View file

@ -75,6 +75,9 @@ public class PutIntoGraveFromBattlefieldAllTriggeredAbility extends TriggeredAbi
if (zEvent.getFromZone() == Zone.BATTLEFIELD
&& 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()));