mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Updating the card cache directly is no longer needed after the fix in CardFactoryUtil is complete.
This commit is contained in:
@@ -184,9 +184,6 @@ public class Game {
|
|||||||
public void addCard(int id, Card card) {
|
public void addCard(int id, Card card) {
|
||||||
cardCache.put(Integer.valueOf(id), card);
|
cardCache.put(Integer.valueOf(id), card);
|
||||||
}
|
}
|
||||||
public void updateCachedCardZone(CardView cardView, Zone zone) {
|
|
||||||
cardCache.get(cardView).setZone(zone);
|
|
||||||
}
|
|
||||||
public CardCollection getCardList(Iterable<CardView> cardViews) {
|
public CardCollection getCardList(Iterable<CardView> cardViews) {
|
||||||
CardCollection list = new CardCollection();
|
CardCollection list = new CardCollection();
|
||||||
cardCache.addToList(cardViews, list);
|
cardCache.addToList(cardViews, list);
|
||||||
|
|||||||
@@ -357,10 +357,6 @@ public class GameAction {
|
|||||||
zoneTo.add(copied, position, c); // the modified state of the card is also reported here (e.g. for Morbid + Awaken)
|
zoneTo.add(copied, position, c); // the modified state of the card is also reported here (e.g. for Morbid + Awaken)
|
||||||
c.setZone(zoneTo);
|
c.setZone(zoneTo);
|
||||||
|
|
||||||
// TODO: The card cache in Game is never updated, and that makes Suspend cards not function correctly after
|
|
||||||
// they ETB. Probably there's a better way.
|
|
||||||
game.updateCachedCardZone(c.getView(), zoneTo);
|
|
||||||
|
|
||||||
if (fromBattlefield) {
|
if (fromBattlefield) {
|
||||||
c.setDamage(0); //clear damage after a card leaves the battlefield
|
c.setDamage(0); //clear damage after a card leaves the battlefield
|
||||||
c.setHasBeenDealtDeathtouchDamage(false);
|
c.setHasBeenDealtDeathtouchDamage(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user