forked from External/mage
Ability refactor: source improves, deprecated code removed;
This commit is contained in:
parent
8af43dc13a
commit
eea808d2d6
27 changed files with 37 additions and 39 deletions
|
|
@ -327,16 +327,16 @@ public class Battlefield implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
public List<Permanent> getPhasedIn(UUID controllerId) {
|
||||
public List<Permanent> getPhasedIn(Game game, UUID controllerId) {
|
||||
return field.values()
|
||||
.stream()
|
||||
.filter(perm -> perm.getAbilities().containsKey(PhasingAbility.getInstance().getId())
|
||||
.filter(perm -> perm.hasAbility(PhasingAbility.getInstance(), game)
|
||||
&& perm.isPhasedIn()
|
||||
&& perm.isControlledBy(controllerId))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<Permanent> getPhasedOut(UUID controllerId) {
|
||||
public List<Permanent> getPhasedOut(Game game, UUID controllerId) {
|
||||
return field.values()
|
||||
.stream()
|
||||
.filter(perm -> !perm.isPhasedIn() && perm.isControlledBy(controllerId))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue