mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Fixed the property "blockedBySource".
- Fine tuning of the mustBlock trigger AI.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user