Merge branch 'handcount' into 'master'

Fix full fizzling for targeted players & SA

See merge request core-developers/forge!4817
This commit is contained in:
Michael Kamensky
2021-06-04 15:39:04 +00:00
3 changed files with 2 additions and 5 deletions

View File

@@ -1163,7 +1163,6 @@ public class Player extends GameEntity implements Comparable<Player> {
return !hasProtectionFrom(sa.getHostCard());
}
public boolean hasProtectionFromDamage(final Card source) {
return hasProtectionFrom(source, false, true);
}
@@ -1243,7 +1242,6 @@ public class Player extends GameEntity implements Comparable<Player> {
}
public void surveil(int num, SpellAbility cause) {
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
repParams.put(AbilityKey.Source, cause);
repParams.put(AbilityKey.SurveilNum, num);

View File

@@ -266,7 +266,6 @@ public class PlayerProperty {
final Player controller = "Active".equals(property.split("sThan")[1]) ? game.getPhaseHandler().getPlayerTurn() : sourceController;
final CardCollectionView oppList = CardLists.filter(player.getCardsIn(ZoneType.Battlefield), CardPredicates.isType(cardType));
final CardCollectionView yourList = CardLists.filter(controller.getCardsIn(ZoneType.Battlefield), CardPredicates.isType(cardType));
System.out.println(yourList.size());
if (oppList.size() < yourList.size() + amount) {
return false;
}

View File

@@ -646,9 +646,9 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
} else {
if (o instanceof SpellAbility) {
SpellAbilityStackInstance si = getInstanceFromSpellAbility((SpellAbility)o);
invalidTarget = si == null ? true : !si.getSpellAbility(true).canBeTargetedBy(sa);
invalidTarget = si == null ? true : !sa.canTarget(si.getSpellAbility(true));
} else {
invalidTarget = !o.canBeTargetedBy(sa);
invalidTarget = !sa.canTarget(o);
}
}
// Remove targets