Pony Card Powers

This is a list of all legal pony card powers.

Whenever a card's activation event is triggered, that card's power is evaluated for all legal moves. Only the first power needs to be evaluated for legality, and all others will be evaluated upon reaching that point in the power-chain.

Combining Powers
In order to meet the demand of having many (but often similar) powers, it is possible to define a cards power as being a combination of powers.

The syntax for combining powers is as described:
 * Grouped powers are executed in order from left to right.
 * Powers are grouped when there's a keyword between them:
 * and
 * Requires the first power to execute successfully before the next power can execute, otherwise skips executing the second power and returns the first power's results.
 * andthen
 * Executes the second power only if the first didn't fail, otherwise skips executing the second power and returns the first power's results.
 * then
 * Executes the second power after the first, irregardless of if the first power ran successfully, then returns the most successful result of the two powers.

Example 1
The card Pinkamena has a power that allows the player to discard a pony on the grid and replace it with that card. Once that has been done, it is required that the player pick an additional pony card on the grid to be murdered (discarded). This is really just a combination of the 'replace' and 'murder' powers.

Instead of creating a whole new power for this card, we can combine the two existing ones. power = replace and murder The keyword ' and'  tells the parser that this card's power is two powers combined, and that they have to be done together in that order. This also means that if the first power fails to execute, then the second one will not execute at all and will return a failure.

changlingalicorn

 * This power forces the player to select a single alicorn pony out of all alicorn ponies for this card to pretend to be. This card will inherit the other card's name, keywords, gender, and race.
 * When activated, the player will be prompted with a list of cards. They will be required to select one and hit a 'submit' before the effect is applied.
 * If the player runs out of time to select which card should be emulated, the game will automatically pick a random card for them.
 * All previous attributes are lost when this power activates.

changlingearth

 * This power forces the player to select a single earth pony out of all earth ponies for this card to pretend to be. This card will inherit the other card's name, keywords, gender, and race.
 * When activated, the player will be prompted with a list of cards. They will be required to select one and hit a 'submit' before the effect is applied.
 * If the player runs out of time to select which card should be emulated, the game will automatically pick a random card for them.
 * All previous attributes are lost when this power activates.

changlingpegasus

 * This power forces the player to select a single pegasus pony out of all pegasus ponies for this card to pretend to be. This card will inherit the other card's name, keywords, gender, and race.
 * When activated, the player will be prompted with a list of cards. They will be required to select one and hit a 'submit' before the effect is applied.
 * If the player runs out of time to select which card should be emulated, the game will automatically pick a random card for them.
 * All previous attributes are lost when this power activates.

changlingunicorn

 * This power forces the player to select a single unicorn pony out of all unicorn ponies for this card to pretend to be. This card will inherit the other card's name, keywords, gender, and race.
 * When activated, the player will be prompted with a list of cards. They will be required to select one and hit a 'submit' before the effect is applied.
 * If the player runs out of time to select which card should be emulated, the game will automatically pick a random card for them.
 * All previous attributes are lost when this power activates.

copy

 * This power allows a player to pick a pony on the grid and use it's power.
 * When activated, the player will be prompted to select any of the legal cards on the playing grid.
 * Only cards with the ' power_is_copyable = True ' attribute can be copied.
 * It is assumed that any changeling power can't be copied.
 * If the player runs out of time to select which pony's powers they'd like to copy, the game will automatically cancel this power.
 * This power fails to activate if there aren't any ponies on the grid whose power can be copied.

deckswap

 * This power takes the active Pony and Ship decks and swaps them with their respective discard piles after they've been shuffled.

discardX

 * This power requires the player to pick X cards from their hand to be discarded.
 * X must be an integer and must be bigger than or equal to 1.
 * When activated, the player will be prompted to select X number of cards to be discarded from their hand, and will only discard those cards upon the user hitting a "submit" button. This can not be cancelled.
 * If the player runs out of time to select which cards they will discard, the game will automatically pick X random cards from their hand and discard them.
 * If the player doesn't have at least X number of cards to discard, then they will be forced to discard their entire hand.

discardme

 * This power forces this card to be discarded.

drawX

 * This power allows the player to draw up to X (+ draw) cards from either the Pony deck or the Ship deck.
 * X must be an integer and must be bigger than or equal to 1.
 * When activated, the player is prompted to pick from either of the two decks (or just one if only one has cards to draw). This event can't be cancelled, but they can decide when they want to stop drawing. An additional prompt is shown after all drawing is finished if the player has a draw_and_discard modifier for drawing and discarding.
 * If the player runs out of time to select which deck they'd like to draw from, the game automatically selects the "stop" button.
 * The player gets to keep these cards after their turn is over.
 * This power fails to activate if both the Pony deck and the Ship deck are empty. This is unlikely to happen, since both the 'empty deck rule' and the 'tearing up twilight's notes rule' should prevent this from happening.
 * After 1 card is drawn, this event can not be undone.

forceplay

 * This power forces the player to play the last card they recently drew. This is intended for when a player draws from the discard pile.
 * TODO: Finish this power.

newgoal

 * This power allows a player to swap out a specified goal card, which is placed at the bottom of the goal deck. After that, another goal card is drawn to replace the discarded goal card.
 * When activated, the player is prompted to pick one of the active goal cards. This event can be cancelled.
 * If the player runs out of time for selecting a goal card to discard, the game will simply cancel for them.
 * This power fails to activate if there aren't any cards in the goal deck or there aren't any active goal cards.
 * This power follows the 'goal redraw rule'.
 * When successful, this event can not be undone.

redrawgoals

 * This power puts the active goal cards back into the goal deck and shuffles the goal deck before redrawing new goals.
 * This power follows the 'goal redraw rule'.

replace

 * This power allows a player to swap this card with another pony card already on the grid. That pony that's replaced is then put into the discard pile.
 * This power can't be used if there aren't any ponies on the grid that can be replaced.

murder

 * This power forces the player to pick a pony card on the grid to be discarded.
 * When activated, the player will be prompted to select any of the legal Pony cards on the playing grid to be discarded. This can not be cancelled.
 * If the player runs out of time to select a card to murder, the game will automatically select a random card to murder.
 * This power fails to activate if there aren't any ponies on the grid who can be murdered.
 * It is possible to murder the activator.

searchdiscardX

 * This power allows a player to search both the Pony discard pile and the Ship discard pile. They may then decide to either draw up to X (+ draw) cards or simply decide not to draw.
 * X must be an integer and must be bigger than or equal to 1.
 * When activated, the player is prompted with a list of the combined discard piles with the cards facing towards the player. The player then selects up to X of those cards to be drawn and then hits a 'submit' button before receiving those cards. An additional prompt is shown after all drawing is finished if the player has a draw_and_discard modifier for drawing and discarding.
 * If the player runs out of time for selecting which cards to draw, then the game automatically cancels for them. This can't be undone.
 * X must be an integer and must be bigger than or equal to 1.
 * All cards drawn with this power are flagged as ' discard_on_end_of_turn_if_still_in_hand = True ' and will be discarded if they're still in the player's hand when their turn ends.
 * Once started, this event can not be undone.

startcard

 * This card is placed in the middle of the table at the beginning of the game, and will never be moved (unless another card specifically allows it, such as Derpy Hooves).
 * Cards with this power don't need to specify ' power_is_mandatory ', ' power_is_copyable ', nor ' power_activates_on '.

swapX

 * This power allows a player to swap X ponies on the shipping grid. It will not activate any of the swapped cards powers unless the pony card requires it, in which case it's power will activate only after the cards have been swapped.
 * X must be an integer and must be bigger than or equal to 2.
 * When activated, the player will be prompted with the cards that can be legally moved on the grid. The player then selects a card and picks where it will be moved to. The prompt will automatically create the last move, if it's obvious enough. After that, they hit a submit button to tell the game to make the moves asked for in the prompt.
 * If the player runs out of time to select which swaps they'd like to make, the game automatically cancels.
 * The player can't swap a card with itself.
 * This power fails to activate if there doesn't exist at least 2 ponies on the grid that can be swapped.

swapstartcard

 * This power forces the player to select a pony card on the grid to swap with the start card Fanfic Author Twilight.
 * When activated, the player is prompted to select a legal card on the grid to swap with the start card. This can not be cancelled.
 * If the player runs out of time to select a card to swap, the game will automatically pick a random card for them.
 * It is possible to swap the start card with the activator card.
 * This power fails to activate if there aren't any swappable cards on the grid (which shouldn't happen).