mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[UI] Putting lands with counters separately (without using land stack)
This commit is contained in:
parent
a2fe968582
commit
d516137a5b
1 changed files with 14 additions and 0 deletions
|
@ -6,6 +6,7 @@ import mage.constants.Rarity;
|
|||
import mage.interfaces.plugin.CardPlugin;
|
||||
import mage.utils.CardUtil;
|
||||
import mage.view.CardView;
|
||||
import mage.view.CounterView;
|
||||
import mage.view.PermanentView;
|
||||
import net.xeoh.plugins.base.annotations.PluginImplementation;
|
||||
import net.xeoh.plugins.base.annotations.events.Init;
|
||||
|
@ -134,11 +135,24 @@ public class CardPluginImpl implements CardPlugin {
|
|||
insertIndex = i;
|
||||
break;
|
||||
}
|
||||
List<CounterView> counters = firstPanel.getOriginalPermanent().getCounters();
|
||||
if (counters != null && counters.size() > 0) {
|
||||
// don't put to first panel if it has counters
|
||||
insertIndex = i;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!empty(permanent.getOriginalPermanent().getAttachments()) || stack.size() == landStackMax) {
|
||||
// If this land has attachments or the stack is full, put it to the right.
|
||||
insertIndex = i + 1;
|
||||
continue;
|
||||
}
|
||||
counters = permanent.getOriginalPermanent().getCounters();
|
||||
if (counters != null && counters.size() > 0) {
|
||||
// if a land has counter, put it to the right
|
||||
insertIndex = i + 1;
|
||||
continue;
|
||||
}
|
||||
// Add to stack.
|
||||
stack.add(0, permanent);
|
||||
continue outerLoop;
|
||||
|
|
Loading…
Reference in a new issue