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;
}
// 701.38d
if (tgtC.isGoadedBy(player)) {
continue;
}
// if pump is a target, make sure we can still target now
if (sa.usesTargeting() && !sa.getTargetRestrictions().canTgtPlayer() && !tgtC.canBeTargetedBy(sa)) {
continue;
}
// 701.38d is handled by getGoaded
tgtC.addGoad(timestamp, player);
final GameCommand untilEOT = new GameCommand() {

View File

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

View File

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