- Fixed Blood Tribute completely not working when kicked

This commit is contained in:
Sol
2015-04-17 13:48:02 +00:00
parent ca84d46eec
commit 8d251f15f3
2 changed files with 14 additions and 1 deletions

View File

@@ -1464,6 +1464,18 @@ public class AbilityUtils {
}
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);
@@ -1514,7 +1526,7 @@ public class AbilityUtils {
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")) {
return def;
}

View File

@@ -1126,6 +1126,7 @@ public class CardFactoryUtil {
// Count$TargetedLifeTotal (targeted player's life total)
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()) {
final SpellAbility saTargeting = sa.getSATargetingPlayer();
if (saTargeting != null) {