Fixed Training Drone

This commit is contained in:
magenoxx 2011-08-31 23:45:19 +04:00
parent 01e565f1ad
commit d19c7927e4

View file

@ -82,14 +82,18 @@ class TrainingDroneEffect extends RestrictionEffect<TrainingDroneEffect> {
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
List<UUID> attachments = permanent.getAttachments(); if (permanent.getId().equals(source.getSourceId())) {
for (UUID uuid : attachments) { List<UUID> attachments = permanent.getAttachments();
Permanent attached = game.getBattlefield().getPermanent(uuid); for (UUID uuid : attachments) {
if (attached.getSubtype().contains("Equipment")) { Permanent attached = game.getBattlefield().getPermanent(uuid);
return false; if (attached.getSubtype().contains("Equipment")) {
} return false;
} }
return true; }
return true;
}
// don't apply for all other creatures!
return false;
} }
@Override @Override