mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Minor formatting.
This commit is contained in:
parent
47df4ad205
commit
e62e2e605e
1 changed files with 25 additions and 29 deletions
|
@ -663,18 +663,16 @@ public abstract class AbilityImpl implements Ability {
|
|||
|
||||
@Override
|
||||
public List<Watcher> getWatchers() {
|
||||
if (watchers != null) {
|
||||
if (watchers != null)
|
||||
return watchers;
|
||||
} else {
|
||||
else
|
||||
return emptyWatchers;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWatcher(Watcher watcher) {
|
||||
if (watchers == null) {
|
||||
if (watchers == null)
|
||||
watchers = new ArrayList<>();
|
||||
}
|
||||
watcher.setSourceId(this.sourceId);
|
||||
watcher.setControllerId(this.controllerId);
|
||||
watchers.add(watcher);
|
||||
|
@ -682,18 +680,16 @@ public abstract class AbilityImpl implements Ability {
|
|||
|
||||
@Override
|
||||
public List<Ability> getSubAbilities() {
|
||||
if (subAbilities != null) {
|
||||
if (subAbilities != null)
|
||||
return subAbilities;
|
||||
} else {
|
||||
else
|
||||
return emptyAbilities;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSubAbility(Ability ability) {
|
||||
if (subAbilities == null) {
|
||||
if (subAbilities == null)
|
||||
subAbilities = new ArrayList<>();
|
||||
}
|
||||
ability.setSourceId(this.sourceId);
|
||||
ability.setControllerId(this.controllerId);
|
||||
subAbilities.add(ability);
|
||||
|
@ -886,10 +882,10 @@ public abstract class AbilityImpl implements Ability {
|
|||
boolean found = false;
|
||||
// unfortunately we need to handle double faced cards separately and only this way
|
||||
if (object instanceof PermanentCard) {
|
||||
if (((PermanentCard)object).canTransform()) {
|
||||
PermanentCard permanent = (PermanentCard)object;
|
||||
found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this);
|
||||
}
|
||||
// if (((PermanentCard)object).canTransform()) {
|
||||
// PermanentCard permanent = (PermanentCard)object;
|
||||
// found = permanent.getSecondCardFace().getAbilities().contains(this) || permanent.getCard().getAbilities().contains(this);
|
||||
// }
|
||||
} else {
|
||||
// check if it's an ability that is temporary gained to a card
|
||||
Abilities<Ability> otherAbilities = game.getState().getAllOtherAbilities(this.getSourceId());
|
||||
|
|
Loading…
Reference in a new issue