MCPcopy Create free account
hub / github.com/Card-Forge/forge / updateLastStateForCard

Method updateLastStateForCard

forge-game/src/main/java/forge/game/Game.java:245–260  ·  view source on GitHub ↗
(Card c)

Source from the content-addressed store, hash-verified

243 }
244
245 public void updateLastStateForCard(Card c) {
246 if (c == null || c.getZone() == null) {
247 return;
248 }
249
250 ZoneType zone = c.getZone().getZoneType();
251 CardCollection lookup = zone.equals(ZoneType.Battlefield) ? lastStateBattlefield
252 : zone.equals(ZoneType.Graveyard) ? lastStateGraveyard
253 : null;
254
255 if (lookup != null) {
256 lastStateBattlefield.remove(c);
257 lastStateGraveyard.remove(c);
258 lookup.add(CardCopyService.getLKICopy(c));
259 }
260 }
261
262 private final GameEntityCache<Player, PlayerView> playerCache = new GameEntityCache<>();
263 public Player getPlayer(PlayerView playerView) {

Callers 14

resolveMethod · 0.95
removeAnyTypeMethod · 0.95
resolveMethod · 0.95
removeCounterMethod · 0.95
resolveMethod · 0.95
resolvePerTypeMethod · 0.95
resolveMethod · 0.95
checkStateEffectsMethod · 0.80
payAsDecidedMethod · 0.80
payAsDecidedMethod · 0.80
executePaymentMethod · 0.80
playLandMethod · 0.80

Calls 6

getLKICopyMethod · 0.95
addMethod · 0.65
getZoneMethod · 0.45
getZoneTypeMethod · 0.45
equalsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected