mirror of
https://github.com/magefree/mage.git
synced 2026-01-09 04:12:14 -08:00
* Turntimber Basilisk - Fix a bug when a creature that must be blocked is not attacking
This commit is contained in:
parent
d94a2712ba
commit
b9add2e041
2 changed files with 34 additions and 0 deletions
|
|
@ -538,6 +538,11 @@ public class Combat implements Serializable, Copyable<Combat> {
|
|||
UUID attackingCreatureId = requirementEntry.getKey().mustBlockAttacker(ability, game);
|
||||
Player defender = game.getPlayer(possibleBlocker.getControllerId());
|
||||
if (attackingCreatureId != null && defender != null && possibleBlocker.canBlock(attackingCreatureId, game)) {
|
||||
Permanent attackingCreature = game.getPermanent(attackingCreatureId);
|
||||
if (attackingCreature == null || !attackingCreature.isAttacking()) {
|
||||
// creature that must be blocked is not attacking
|
||||
continue;
|
||||
}
|
||||
// check if the possible blocker has to pay cost to block, if so don't force
|
||||
if (game.getContinuousEffects().checkIfThereArePayCostToAttackBlockEffects(
|
||||
GameEvent.getEvent(GameEvent.EventType.DECLARE_BLOCKER, attackingCreatureId, possibleBlocker.getId(), possibleBlocker.getControllerId()), game)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue