mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
* Added a test.
This commit is contained in:
parent
1904f838ca
commit
17afa3b3c1
2 changed files with 53 additions and 0 deletions
|
@ -124,4 +124,35 @@ public class CastSplitCardsFromOtherZonesTest extends CardTestPlayerBase {
|
|||
assertGraveyardCount(playerB, "Icy Manipulator", 1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Cast a split card half from exile
|
||||
*/
|
||||
@Test
|
||||
public void testCastSpliHalfFromExile() {
|
||||
// Fire Instant {1}{R}
|
||||
// Fire deals 2 damage divided as you choose among one or two target creatures and/or players.
|
||||
// Ice Instant {1}{U}
|
||||
// Tap target permanent.
|
||||
// Draw a card.
|
||||
addCard(Zone.LIBRARY, playerA, "Fire // Ice", 1);
|
||||
skipInitShuffling();
|
||||
addCard(Zone.BATTLEFIELD, playerA, "Silvercoat Lion"); // Creature 2/2
|
||||
|
||||
// Whenever Etali, Primal Storm attacks, exile the top card of each player's library, then you may
|
||||
// cast any number of nonland cards exiled this way without paying their mana costs.
|
||||
addCard(Zone.BATTLEFIELD, playerB, "Etali, Primal Storm"); // Creature {4}{R} 6/6
|
||||
|
||||
attack(2, playerB, "Etali, Primal Storm");
|
||||
setChoice(playerB, "Yes");
|
||||
setChoice(playerB, "Cast Fire");
|
||||
addTarget(playerB, "Silvercoat Lion");
|
||||
|
||||
setStopAt(2, PhaseStep.END_COMBAT);
|
||||
execute();
|
||||
|
||||
assertLife(playerA, 14);
|
||||
assertGraveyardCount(playerA, "Silvercoat Lion", 1);
|
||||
assertGraveyardCount(playerA, "Fire // Ice", 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,12 +46,34 @@ public interface Effect extends Serializable {
|
|||
|
||||
void newId();
|
||||
|
||||
/**
|
||||
* Some general behaviours for rule text handling: Rule text of effects get
|
||||
* automatically a full stop "." at the end, if not another effect e.g. with
|
||||
* a starting "and" follows. So at least for effects of the framework, that
|
||||
* are used from multiple cards, it's better to set no full stop at the end
|
||||
* of the rule text of an effect. Also the starting letter of an effect is
|
||||
* automatically converted to upper case if the rule text starts with this
|
||||
* text. So There is no need to let the effect text start with upper case,
|
||||
* even if extracted from a filter message. Also here it's important to use
|
||||
* only lower cases for effects located in the framework, so if used for a
|
||||
* triggered abilitiy, the effect text needs to start with lower case after
|
||||
* the comma.
|
||||
*
|
||||
* @param mode the selected mode of the ability (mostly there is only one)
|
||||
* @return
|
||||
*/
|
||||
String getText(Mode mode);
|
||||
|
||||
Effect setText(String staticText);
|
||||
|
||||
boolean apply(Game game, Ability source);
|
||||
|
||||
/**
|
||||
* The outcome is used for the AI to decide if an effect does bad or good to
|
||||
* the targets.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Outcome getOutcome();
|
||||
|
||||
void setOutcome(Outcome outcome);
|
||||
|
|
Loading…
Reference in a new issue