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

Method hasState

forge-game/src/main/java/forge/game/card/Card.java:519–528  ·  view source on GitHub ↗
(final CardStateName state)

Source from the content-addressed store, hash-verified

517 }
518
519 public boolean hasState(final CardStateName state) {
520 if (state == CardStateName.FaceDown || state == CardStateName.EmptyRoom) {
521 return true;
522 }
523 CardCloneStates clStates = getLastClonedState();
524 if (clStates == null) {
525 return states.containsKey(state);
526 }
527 return clStates.containsKey(state);
528 }
529
530 public CardState getOriginalState(final CardStateName state) {
531 if (state == CardStateName.FaceDown) {

Callers 15

changeToStateMethod · 0.95
isFlipCardMethod · 0.95
isSplitCardMethod · 0.95
isAdventureCardMethod · 0.95
getAbilityTextMethod · 0.95
updateSpellAbilitiesMethod · 0.95
updateKeywordsCacheMethod · 0.95
sharesNameWithMethod · 0.95
getUnlockedRoomNamesMethod · 0.95

Calls 2

getLastClonedStateMethod · 0.95
containsKeyMethod · 0.80

Tested by 1

testCloneTransformMethod · 0.76