forked from External/mage
add isOwned and isControlled methods. remove some null-checks, remove some unnecessary casts
This commit is contained in:
parent
e46ad02918
commit
9f06046f22
464 changed files with 567 additions and 562 deletions
|
|
@ -27,8 +27,8 @@ public class MeldCondition implements Condition {
|
|||
MageObject sourceMageObject = source.getSourceObjectIfItStillExists(game);
|
||||
if (sourceMageObject != null && sourceMageObject instanceof Permanent) {
|
||||
Permanent sourcePermanent = (Permanent) sourceMageObject;
|
||||
if (sourcePermanent.getControllerId().equals(source.getControllerId())
|
||||
&& sourcePermanent.getOwnerId().equals(source.getControllerId())) {
|
||||
if (sourcePermanent.isControlledBy(source.getControllerId())
|
||||
&& sourcePermanent.isOwnedBy(source.getControllerId())) {
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.add(new NamePredicate(this.meldWithName));
|
||||
filter.add(new OwnerIdPredicate(source.getControllerId()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue