mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
updated target adjusters P through W
This commit is contained in:
parent
212d09b0a3
commit
2df976b2f0
40 changed files with 840 additions and 793 deletions
|
|
@ -1,15 +1,17 @@
|
|||
|
||||
package mage.watchers.common;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import mage.MageObjectReference;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
/**
|
||||
* @author magenoxx_at_gmail.com
|
||||
|
|
@ -47,6 +49,15 @@ public class AttackedThisTurnWatcher extends Watcher {
|
|||
return this.attackedThisTurnCreaturesCounts;
|
||||
}
|
||||
|
||||
public boolean checkIfAttacked(Permanent permanent, Game game) {
|
||||
for (MageObjectReference mor : attackedThisTurnCreatures) {
|
||||
if (mor.refersTo(permanent, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AttackedThisTurnWatcher copy() {
|
||||
return new AttackedThisTurnWatcher(this);
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
|
||||
package mage.watchers.common;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import mage.MageObjectReference;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.Watcher;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
*/
|
||||
public class BlockedThisTurnWatcher extends Watcher {
|
||||
|
|
@ -44,6 +44,15 @@ public class BlockedThisTurnWatcher extends Watcher {
|
|||
return this.blockedThisTurnCreatures;
|
||||
}
|
||||
|
||||
public boolean checkIfBlocked(Permanent permanent, Game game) {
|
||||
for (MageObjectReference mor : blockedThisTurnCreatures) {
|
||||
if (mor.refersTo(permanent, game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue