(Player p, SpellAbility sa, Map<AbilityKey, Object> params)
| 792 | } |
| 793 | |
| 794 | public Card cloak(Player p, SpellAbility sa, Map<AbilityKey, Object> params) { |
| 795 | // Turn Face Down (even if it's DFC). |
| 796 | // Sometimes cards are manifested while already being face down |
| 797 | if (!turnFaceDown(true) && !isFaceDown()) { |
| 798 | return null; |
| 799 | } |
| 800 | |
| 801 | // Just in case you aren't the controller, now you are! |
| 802 | setController(p, game.getNextTimestamp()); |
| 803 | |
| 804 | // Mark this card as "cloaked" |
| 805 | setCloaked(sa); |
| 806 | // give it Ward:2 |
| 807 | getFaceDownState().addIntrinsicKeyword("Ward:2", true); |
| 808 | |
| 809 | // Move to p's battlefield |
| 810 | Card c = game.getAction().moveToPlay(this, p, sa, params); |
| 811 | if (c.isInPlay()) { |
| 812 | c.setCloaked(sa); |
| 813 | c.turnFaceDown(true); |
| 814 | c.updateStateForView(); |
| 815 | } |
| 816 | |
| 817 | return c; |
| 818 | } |
| 819 | |
| 820 | public boolean turnFaceDown() { |
| 821 | return turnFaceDown(false); |
no test coverage detected