mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-14 09:48:02 +00:00
Merge branch 'handcount' into 'master'
Fix full fizzling for targeted players & SA See merge request core-developers/forge!4817
This commit is contained in:
@@ -1163,7 +1163,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
return !hasProtectionFrom(sa.getHostCard());
|
return !hasProtectionFrom(sa.getHostCard());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean hasProtectionFromDamage(final Card source) {
|
public boolean hasProtectionFromDamage(final Card source) {
|
||||||
return hasProtectionFrom(source, false, true);
|
return hasProtectionFrom(source, false, true);
|
||||||
}
|
}
|
||||||
@@ -1243,7 +1242,6 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void surveil(int num, SpellAbility cause) {
|
public void surveil(int num, SpellAbility cause) {
|
||||||
|
|
||||||
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
final Map<AbilityKey, Object> repParams = AbilityKey.mapFromAffected(this);
|
||||||
repParams.put(AbilityKey.Source, cause);
|
repParams.put(AbilityKey.Source, cause);
|
||||||
repParams.put(AbilityKey.SurveilNum, num);
|
repParams.put(AbilityKey.SurveilNum, num);
|
||||||
|
|||||||
@@ -266,7 +266,6 @@ public class PlayerProperty {
|
|||||||
final Player controller = "Active".equals(property.split("sThan")[1]) ? game.getPhaseHandler().getPlayerTurn() : sourceController;
|
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 oppList = CardLists.filter(player.getCardsIn(ZoneType.Battlefield), CardPredicates.isType(cardType));
|
||||||
final CardCollectionView yourList = CardLists.filter(controller.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) {
|
if (oppList.size() < yourList.size() + amount) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -646,9 +646,9 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
|||||||
} else {
|
} else {
|
||||||
if (o instanceof SpellAbility) {
|
if (o instanceof SpellAbility) {
|
||||||
SpellAbilityStackInstance si = getInstanceFromSpellAbility((SpellAbility)o);
|
SpellAbilityStackInstance si = getInstanceFromSpellAbility((SpellAbility)o);
|
||||||
invalidTarget = si == null ? true : !si.getSpellAbility(true).canBeTargetedBy(sa);
|
invalidTarget = si == null ? true : !sa.canTarget(si.getSpellAbility(true));
|
||||||
} else {
|
} else {
|
||||||
invalidTarget = !o.canBeTargetedBy(sa);
|
invalidTarget = !sa.canTarget(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove targets
|
// Remove targets
|
||||||
|
|||||||
Reference in New Issue
Block a user