- Fixed the property "blockedBySource".

- Fine tuning of the mustBlock trigger AI.
This commit is contained in:
Sloth
2011-10-20 12:03:57 +00:00
parent 396b91ffec
commit a9fcc58256
2 changed files with 5 additions and 5 deletions

View File

@@ -5224,7 +5224,7 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!isBlocking(source)) return false;
} else if (Property.startsWith("notblocking")) {
if (isBlocking()) return false;
} else if (Property.startsWith("blocked")) {
} else if (Property.equals("blocked")) {
if (!AllZone.getCombat().isBlocked(this)) return false;
} else if (Property.startsWith("blockedBySource")) {
if (!isBlockedBy(source)) return false;

View File

@@ -847,8 +847,8 @@ public final class AbilityFactory_Combat {
return false;
}
//only use on creatures that attack
if (!source.isAttacking())
//only use on creatures that can attack
if (!AllZone.getPhase().isBefore(Constant.Phase.Main2))
return false;
boolean chance = false;
@@ -862,9 +862,9 @@ public final class AbilityFactory_Combat {
public boolean addCard(Card c) {
if (!CombatUtil.canBlock(source, c))
return false;
if (CombatUtil.canDestroyAttacker(source, c, AllZone.getCombat(), false))
if (CombatUtil.canDestroyAttacker(source, c, null, false))
return false;
if (!CombatUtil.canDestroyBlocker(c, source, AllZone.getCombat(), false))
if (!CombatUtil.canDestroyBlocker(c, source, null, false))
return false;
return true;
}