(SpellAbility sa)
| 1361 | } |
| 1362 | } |
| 1363 | public void clearTopLibsCast(SpellAbility sa) { |
| 1364 | // if nothing left to pay |
| 1365 | if (sa.getActivatingPlayer().getPaidForSA() == null) { |
| 1366 | topLibsCast.clear(); |
| 1367 | for (Card c : facedownWhileCasting.keySet()) { |
| 1368 | // maybe it was discarded as payment? |
| 1369 | if (c.isInZone(ZoneType.Hand)) { |
| 1370 | c.forceTurnFaceUp(); |
| 1371 | |
| 1372 | // If an effect allows or instructs a player to reveal the card as it’s being drawn, |
| 1373 | // it’s revealed after the spell becomes cast or the ability becomes activated. |
| 1374 | final Map<AbilityKey, Object> runParams = AbilityKey.mapFromCard(c); |
| 1375 | runParams.put(AbilityKey.Number, facedownWhileCasting.get(c)); |
| 1376 | runParams.put(AbilityKey.Player, c.getOwner()); |
| 1377 | runParams.put(AbilityKey.CanReveal, true); |
| 1378 | // need to hold trigger to clear list first |
| 1379 | getTriggerHandler().runTrigger(TriggerType.Drawn, runParams, true); |
| 1380 | } |
| 1381 | } |
| 1382 | facedownWhileCasting.clear(); |
| 1383 | } |
| 1384 | } |
| 1385 | public void addFacedownWhileCasting(Card c, int numDrawn) { |
| 1386 | facedownWhileCasting.put(c, numDrawn); |
| 1387 | } |
no test coverage detected