* Fixed the trace for Intimidate.

This commit is contained in:
LevelX2 2014-02-19 08:18:48 +01:00
parent 91d50d8d7b
commit c12fb572f7

View file

@ -61,7 +61,7 @@ public class TraceUtil {
for (UUID blockerId : group.getBlockers()) { for (UUID blockerId : group.getBlockers()) {
Permanent blocker = game.getPermanent(blockerId); Permanent blocker = game.getPermanent(blockerId);
if (blocker != null && !blocker.getCardType().contains(CardType.ARTIFACT) if (blocker != null && !blocker.getCardType().contains(CardType.ARTIFACT)
&& attacker.getColor().shares(blocker.getColor())) { && !attacker.getColor().shares(blocker.getColor())) {
log.warn("Found creature with intimidate blocked by non artifact not sharing color creature"); log.warn("Found creature with intimidate blocked by non artifact not sharing color creature");
traceCombat(game, attacker, blocker); traceCombat(game, attacker, blocker);
} }
@ -169,6 +169,7 @@ public class TraceUtil {
private static void traceForPermanent(Game game, Permanent permanent, String uuid, ContinuousEffectsList<RestrictionEffect> restrictionEffects) { private static void traceForPermanent(Game game, Permanent permanent, String uuid, ContinuousEffectsList<RestrictionEffect> restrictionEffects) {
for (RestrictionEffect effect: restrictionEffects) { for (RestrictionEffect effect: restrictionEffects) {
log.error(uuid+" effect=" + effect.toString() + " id=" + effect.getId());
for (Ability ability : restrictionEffects.getAbility(effect.getId())) { for (Ability ability : restrictionEffects.getAbility(effect.getId())) {
if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, permanent, false)) { if (!(ability instanceof StaticAbility) || ability.isInUseableZone(game, permanent, false)) {
log.error(uuid+" ability=" + ability + ", applies_to_attacker=" + effect.applies(permanent, ability, game)); log.error(uuid+" ability=" + ability + ", applies_to_attacker=" + effect.applies(permanent, ability, game));