mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Refactoring changes and other updates:
- Completely refactor continuous static effects. Layers are now implemented properly in the sense that every effect applies the relevant parts in the relevant layer, while locking in the set of cards to which it applies. - Refactor the (un)freezing of Trackable objects to a per-game Tracker object rather than static methods, to allow multiple games hosted on the same machine. - Refactor the changing of card colours to match other parts of the code (like type and P/T changing) more closely. Also get rid of some static parameters in that code. - Some changes in how split cards on the stack are handled to make them more robust. - Some more minor changes/cleanup.
This commit is contained in:
@@ -229,7 +229,7 @@ public class FControlGameEventHandler extends IGameEventVisitor.Base<Void> {
|
||||
final List<CardView> options = Lists.newArrayList();
|
||||
for (final Entry<Player, Card> kv : ev.cards.entries()) {
|
||||
//use fake card so real cards appear with proper formatting
|
||||
final CardView fakeCard = new CardView(-1, " -- From " + Lang.getPossesive(kv.getKey().getName()) + " deck --");
|
||||
final CardView fakeCard = new CardView(-1, null, " -- From " + Lang.getPossesive(kv.getKey().getName()) + " deck --");
|
||||
options.add(fakeCard);
|
||||
options.add(kv.getValue().getView());
|
||||
}
|
||||
|
||||
@@ -1205,11 +1205,11 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
tempShowCards(pile2);
|
||||
|
||||
final List<CardView> cards = Lists.newArrayListWithCapacity(pile1.size() + pile2.size() + 2);
|
||||
final CardView pileView1 = new CardView(Integer.MIN_VALUE, "--- Pile 1 ---");
|
||||
final CardView pileView1 = new CardView(Integer.MIN_VALUE, null, "--- Pile 1 ---");
|
||||
cards.add(pileView1);
|
||||
cards.addAll(CardView.getCollection(pile1));
|
||||
|
||||
final CardView pileView2 = new CardView(Integer.MIN_VALUE + 1, "--- Pile 2 ---");
|
||||
final CardView pileView2 = new CardView(Integer.MIN_VALUE + 1, null, "--- Pile 2 ---");
|
||||
cards.add(pileView2);
|
||||
cards.addAll(CardView.getCollection(pile2));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user