forked from External/mage
Implementing Blitz mechanic (WIP) (#8835)
* added blitz mechanic (mostly copy/paste of dash) * renamed class * reworked alt cost abilities, greatly reduced redundant code * updated text generation * removed all skips * added test for blitz * changed blitz implementation * [SNC] Implemented Tenacious Underdog
This commit is contained in:
parent
76daf4bd5a
commit
0e3252d256
31 changed files with 620 additions and 722 deletions
64
Mage/src/main/java/mage/abilities/costs/AlternativeCost.java
Normal file
64
Mage/src/main/java/mage/abilities/costs/AlternativeCost.java
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
package mage.abilities.costs;
|
||||
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
* Virtual alternative cost, it must be tranformed to simple cost on activate in your
|
||||
* custom ability (see askToActivateAlternativeCosts). Example: DashAbility
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public interface AlternativeCost extends Cost {
|
||||
|
||||
String getName();
|
||||
|
||||
/**
|
||||
* Returns the complete text for the alternate cost or if onlyCost is true
|
||||
* only the pure text fore the included native cost
|
||||
*
|
||||
* @param onlyCost
|
||||
* @return
|
||||
*/
|
||||
String getText(boolean onlyCost);
|
||||
|
||||
/**
|
||||
* Returns a reminder text, if the cost has one
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getReminderText();
|
||||
|
||||
/**
|
||||
* Returns a text suffix for the game log, that can be added to
|
||||
* the cast message.
|
||||
*
|
||||
* @param position - if there are multiple costs, it's the postion the cost is set (starting with 0)
|
||||
* @return
|
||||
*/
|
||||
String getCastSuffixMessage(int position);
|
||||
|
||||
|
||||
/**
|
||||
* If the player intends to pay the alternate cost, the cost will be activated
|
||||
*/
|
||||
void activate();
|
||||
|
||||
/**
|
||||
* Reset the activate
|
||||
*/
|
||||
void reset();
|
||||
|
||||
/**
|
||||
* Returns if the cost was activated
|
||||
*
|
||||
* @param game
|
||||
* @return
|
||||
*/
|
||||
boolean isActivated(Game game);
|
||||
|
||||
Cost getCost();
|
||||
|
||||
@Override
|
||||
AlternativeCost copy();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue