mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
Can block any number of creatures - fixed that it can be broken with some of "can block an additional creature" effects
This commit is contained in:
parent
db9bdc05c2
commit
49c28458ec
6 changed files with 24 additions and 24 deletions
|
|
@ -45,7 +45,9 @@ public class CanBlockAdditionalCreatureAllEffect extends ContinuousEffectImpl {
|
|||
if (permanent != null) {
|
||||
// maxBlocks = 0 equals to "can block any number of creatures"
|
||||
if (amount > 0) {
|
||||
permanent.setMaxBlocks(permanent.getMaxBlocks() + amount);
|
||||
if (permanent.getMaxBlocks() > 0) {
|
||||
permanent.setMaxBlocks(permanent.getMaxBlocks() + amount);
|
||||
}
|
||||
} else {
|
||||
permanent.setMaxBlocks(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ public class CanBlockAdditionalCreatureEffect extends ContinuousEffectImpl {
|
|||
if (permanent != null) {
|
||||
// maxBlocks = 0 equals to "can block any number of creatures"
|
||||
if (amount > 0) {
|
||||
permanent.setMaxBlocks(permanent.getMaxBlocks() + amount);
|
||||
if (permanent.getMaxBlocks() > 0) {
|
||||
permanent.setMaxBlocks(permanent.getMaxBlocks() + amount);
|
||||
}
|
||||
} else {
|
||||
permanent.setMaxBlocks(0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,9 @@ public class CanBlockAdditionalCreatureTargetEffect extends ContinuousEffectImpl
|
|||
|
||||
// maxBlocks = 0 equals to "can block any number of creatures"
|
||||
if (amount > 0) {
|
||||
target.setMaxBlocks(target.getMaxBlocks() + amount);
|
||||
if (target.getMaxBlocks() > 0) {
|
||||
target.setMaxBlocks(target.getMaxBlocks() + amount);
|
||||
}
|
||||
} else {
|
||||
target.setMaxBlocks(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue