This commit is contained in:
tool4EvEr
2023-06-04 23:30:14 +02:00
parent 7b57b042b1
commit 2dde1f88a5
2 changed files with 8 additions and 8 deletions

View File

@@ -236,7 +236,7 @@ public class CombatUtil {
// attacker got goaded by defender or defender is not player
if (goadedByDefender || !(defender instanceof Player)) {
for (GameEntity ge : getAllPossibleDefenders(attacker.getController())) {
if (!defender.equals(ge) && ge instanceof Player) {
if (!ge.equals(defender) && ge instanceof Player) {
// found a player which does not goad that creature
// and creature can attack this player or planeswalker
if (!attacker.isGoadedBy((Player) ge) && !ge.hasKeyword("Creatures your opponents control attack a player other than you if able.") && canAttack(attacker, ge)) {
@@ -250,7 +250,7 @@ public class CombatUtil {
// Quasi-goad logic for "Kardur, Doomscourge" etc. that isn't goad but behaves the same
if (defender != null && defender.hasKeyword("Creatures your opponents control attack a player other than you if able.")) {
for (GameEntity ge : getAllPossibleDefenders(attacker.getController())) {
if (!defender.equals(ge) && ge instanceof Player) {
if (!ge.equals(defender) && ge instanceof Player) {
if (!ge.hasKeyword("Creatures your opponents control attack a player other than you if able.") && canAttack(attacker, ge)) {
return false;
}

View File

@@ -55,12 +55,6 @@ public class TriggerCounterAddedOnce extends Trigger {
* @param runParams*/
@Override
public final boolean performTest(final Map<AbilityKey, Object> runParams) {
if (hasParam("FirstTime")) {
if (!(boolean) runParams.get(AbilityKey.FirstTime)) {
return false;
}
}
if (hasParam("CounterType")) {
final CounterType addedType = (CounterType) runParams.get(AbilityKey.CounterType);
final String type = getParam("CounterType");
@@ -83,6 +77,12 @@ public class TriggerCounterAddedOnce extends Trigger {
return false;
}
if (hasParam("FirstTime")) {
if (!(boolean) runParams.get(AbilityKey.FirstTime)) {
return false;
}
}
return true;
}