Merge branch 'goadedFix' into 'master'

Goad: fixed using PlayerCollection

See merge request core-developers/forge!6077
This commit is contained in:
Bug Hunter
2022-01-24 08:54:54 +00:00
3 changed files with 4 additions and 8 deletions

View File

@@ -22,16 +22,12 @@ public class GoadEffect extends SpellAbilityEffect {
continue; continue;
} }
// 701.38d
if (tgtC.isGoadedBy(player)) {
continue;
}
// if pump is a target, make sure we can still target now // if pump is a target, make sure we can still target now
if (sa.usesTargeting() && !sa.getTargetRestrictions().canTgtPlayer() && !tgtC.canBeTargetedBy(sa)) { if (sa.usesTargeting() && !sa.getTargetRestrictions().canTgtPlayer() && !tgtC.canBeTargetedBy(sa)) {
continue; continue;
} }
// 701.38d is handled by getGoaded
tgtC.addGoad(timestamp, player); tgtC.addGoad(timestamp, player);
final GameCommand untilEOT = new GameCommand() { final GameCommand untilEOT = new GameCommand() {

View File

@@ -6593,8 +6593,8 @@ public class Card extends GameEntity implements Comparable<Card>, IHasSVars {
return goad.containsValue(p); return goad.containsValue(p);
} }
public final Collection<Player> getGoaded() { public final PlayerCollection getGoaded() {
return goad.values(); return new PlayerCollection(goad.values()); // 701.38d
} }
/** /**

View File

@@ -919,7 +919,7 @@ public final class StaticAbilityContinuous {
} }
if (layer == StaticAbilityLayer.RULES) { if (layer == StaticAbilityLayer.RULES) {
if (params.containsKey("Goad") && !affectedCard.isGoadedBy(hostCard.getController())) { if (params.containsKey("Goad")) {
affectedCard.addGoad(se.getTimestamp(), hostCard.getController()); affectedCard.addGoad(se.getTimestamp(), hostCard.getController());
} }
if (params.containsKey("CanBlockAny")) { if (params.containsKey("CanBlockAny")) {