mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Fixed attacking\blocking filter. Fixed Issue 202.
This commit is contained in:
parent
6c144b5fc2
commit
e90d3737e8
1 changed files with 11 additions and 2 deletions
|
|
@ -74,8 +74,17 @@ public class FilterCreaturePermanent<T extends FilterCreaturePermanent<T>> exten
|
||||||
return notFilter;
|
return notFilter;
|
||||||
|
|
||||||
if (useAttacking) {
|
if (useAttacking) {
|
||||||
if (permanent.isAttacking() == attacking) {
|
if (permanent.isAttacking() != attacking) { // failed checking
|
||||||
return !notFilter;
|
// for "target attacking OR blocking" filters
|
||||||
|
// we have to make sure it is not blocking before returning false
|
||||||
|
if (useBlocking) {
|
||||||
|
if ((permanent.getBlocking() > 0) != blocking) {
|
||||||
|
return notFilter;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// filter doesn't use 'blocking', so as checking for attacking failed return false
|
||||||
|
return notFilter;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue