mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
* Phasing- Fixed that permanets with phasing did not phase out at controllers untap step and phased out permanents where count as on the battlefield.
This commit is contained in:
parent
bf3fa37e5d
commit
fb2d367992
5 changed files with 28 additions and 18 deletions
|
|
@ -124,6 +124,9 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
|
|||
|
||||
List<PermanentView> permanentsToAdd = new ArrayList<>();
|
||||
for (PermanentView permanent: battlefield.values()) {
|
||||
if (!permanent.isPhasedIn()) {
|
||||
continue;
|
||||
}
|
||||
MagePermanent oldMagePermanent = permanents.get(permanent.getId());
|
||||
if (oldMagePermanent == null) {
|
||||
permanentsToAdd.add(permanent);
|
||||
|
|
@ -193,7 +196,7 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane {
|
|||
|
||||
for (Iterator<Entry<UUID, MagePermanent>> iterator = permanents.entrySet().iterator(); iterator.hasNext();) {
|
||||
Entry<UUID, MagePermanent> entry = iterator.next();
|
||||
if (!battlefield.containsKey(entry.getKey())) {
|
||||
if (!battlefield.containsKey(entry.getKey()) || !battlefield.get(entry.getKey()).isPhasedIn()) {
|
||||
removePermanent(entry.getKey(), 1);
|
||||
iterator.remove();
|
||||
changed = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue