mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
Fixed Training Drone
This commit is contained in:
parent
01e565f1ad
commit
d19c7927e4
1 changed files with 12 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue