forked from External/mage
Fixed tests with multiple X values
This commit is contained in:
parent
b64a75aa4b
commit
0e2cfb7def
11 changed files with 102 additions and 48 deletions
|
|
@ -1,27 +1,26 @@
|
|||
|
||||
|
||||
package mage.abilities.costs;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public interface VariableCost {
|
||||
/**
|
||||
* Returns the variable amount if already set
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
int getAmount();
|
||||
|
||||
/**
|
||||
* Sets the variable amount
|
||||
*
|
||||
* @param amount
|
||||
* @param xValue - value of X
|
||||
* @param xPay - total value of pays for X (X * xMultiplier * xInstancesCount)
|
||||
*/
|
||||
void setAmount(int amount);
|
||||
void setAmount(int xValue, int xPay);
|
||||
|
||||
/**
|
||||
* returns the action text (e.g. "creature cards to exile from your hand", "life to pay")
|
||||
|
|
@ -29,6 +28,7 @@ public interface VariableCost {
|
|||
* @return
|
||||
*/
|
||||
String getActionText();
|
||||
|
||||
/**
|
||||
* Return a min value to announce
|
||||
*
|
||||
|
|
@ -37,6 +37,7 @@ public interface VariableCost {
|
|||
* @return
|
||||
*/
|
||||
int getMinValue(Ability source, Game game);
|
||||
|
||||
/**
|
||||
* Returns a max value to announce
|
||||
*
|
||||
|
|
@ -45,13 +46,16 @@ public interface VariableCost {
|
|||
* @return
|
||||
*/
|
||||
int getMaxValue(Ability source, Game game);
|
||||
|
||||
/**
|
||||
* Asks the controller to announce the variable value
|
||||
*
|
||||
* @param source
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
int announceXValue(Ability source, Game game);
|
||||
|
||||
/**
|
||||
* Returns a fixed cost with the announced variable value
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue