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