(CardEdition edition, String name, CardEdition.EditionEntry t)
| 93 | } |
| 94 | |
| 95 | protected PaperToken addTokenInSet(CardEdition edition, String name, CardEdition.EditionEntry t) { |
| 96 | CardRules rules; |
| 97 | if (rulesByName.containsKey(name)) { |
| 98 | rules = rulesByName.get(name); |
| 99 | } else if ("w_2_2_spirit".equals(name) || "w_3_3_spirit".equals(name)) { // Hotfix for Endure Token |
| 100 | rules = rulesByName.get("w_x_x_spirit"); |
| 101 | } else { |
| 102 | throw new RuntimeException("wrong token name:" + name); |
| 103 | } |
| 104 | return new PaperToken(rules, edition, name, t.collectorNumber(), t.artistName()); |
| 105 | } |
| 106 | |
| 107 | // Null filter: historical first-alphabetical match. Non-null: random among |
| 108 | // editions that register the token and pass the filter, or null if none. |
no test coverage detected