mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed Blood Tribute completely not working when kicked
This commit is contained in:
@@ -1464,6 +1464,18 @@ public class AbilityUtils {
|
|||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Count$TargetedLifeTotal (targeted player's life total)
|
||||||
|
// Not optimal but since xCount doesn't take SAs, we need to replicate while we have it
|
||||||
|
// Probably would be best if xCount took an optional SA to use in these circumstances
|
||||||
|
if (sq[0].contains("TargetedLifeTotal")) {
|
||||||
|
final SpellAbility saTargeting = sa.getSATargetingPlayer();
|
||||||
|
if (saTargeting != null) {
|
||||||
|
for (final Player tgtP : saTargeting.getTargets().getTargetPlayers()) {
|
||||||
|
return CardFactoryUtil.doXMath(tgtP.getLife(), expr, c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return CardFactoryUtil.xCount(c, s2);
|
return CardFactoryUtil.xCount(c, s2);
|
||||||
@@ -1514,7 +1526,7 @@ public class AbilityUtils {
|
|||||||
return sas;
|
return sas;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
public static final String applyAbilityTextChangeEffects(final String def, final CardTraitBase ability) {
|
||||||
if (ability == null || !ability.isIntrinsic() || ability.getMapParams().containsKey("LockInText")) {
|
if (ability == null || !ability.isIntrinsic() || ability.getMapParams().containsKey("LockInText")) {
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1126,6 +1126,7 @@ public class CardFactoryUtil {
|
|||||||
|
|
||||||
// Count$TargetedLifeTotal (targeted player's life total)
|
// Count$TargetedLifeTotal (targeted player's life total)
|
||||||
if (sq[0].contains("TargetedLifeTotal")) {
|
if (sq[0].contains("TargetedLifeTotal")) {
|
||||||
|
// This doesn't work in some circumstances, since the active SA isn't passed through
|
||||||
for (final SpellAbility sa : c.getCurrentState().getNonManaAbilities()) {
|
for (final SpellAbility sa : c.getCurrentState().getNonManaAbilities()) {
|
||||||
final SpellAbility saTargeting = sa.getSATargetingPlayer();
|
final SpellAbility saTargeting = sa.getSATargetingPlayer();
|
||||||
if (saTargeting != null) {
|
if (saTargeting != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user