forked from External/mage
prevent direct access of Player->counters ; some cleanup on counter removal effects ; implement [MH3] Izzet Generatorium (#12314)
This commit is contained in:
parent
8d02ff14ff
commit
20b7a115da
110 changed files with 895 additions and 646 deletions
|
|
@ -15,6 +15,7 @@ import mage.cards.decks.Deck;
|
|||
import mage.choices.Choice;
|
||||
import mage.constants.*;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.counters.Counters;
|
||||
import mage.designations.Designation;
|
||||
import mage.designations.DesignationType;
|
||||
|
|
@ -105,7 +106,11 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
|
||||
void addAbility(Ability ability);
|
||||
|
||||
Counters getCounters();
|
||||
/**
|
||||
* The counters should be manipulated (adding or removing counters) with the appropriate addCounters/removeCounters/getCounterCount methods.
|
||||
* This returns a copy for specific usage, to make sure the Player's counters are not altered from there.
|
||||
*/
|
||||
Counters getCountersAsCopy();
|
||||
|
||||
int getLife();
|
||||
|
||||
|
|
@ -832,9 +837,44 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
|
||||
Map<UUID, ActivatedAbility> getPlayableActivatedAbilities(MageObject object, Zone zone, Game originalGame);
|
||||
|
||||
/**
|
||||
* add counter to the player (action verb is `get`, but not using that one to avoid ambiguity with getters)
|
||||
*/
|
||||
boolean addCounters(Counter counter, UUID playerAddingCounters, Ability source, Game game);
|
||||
|
||||
void removeCounters(String name, int amount, Ability source, Game game);
|
||||
/**
|
||||
* lose {@param amount} counters of the specified kind.
|
||||
*/
|
||||
void loseCounters(String counterName, int amount, Ability source, Game game);
|
||||
|
||||
/**
|
||||
* lose all counters of any kind.
|
||||
*
|
||||
* @return the amount of counters removed this way.
|
||||
*/
|
||||
int loseAllCounters(Ability source, Game game);
|
||||
|
||||
/**
|
||||
* lose all counters of a specific kind.
|
||||
*
|
||||
* @return the amount of counters removed this way.
|
||||
*/
|
||||
int loseAllCounters(String counterName, Ability source, Game game);
|
||||
|
||||
/**
|
||||
* @return the amount of counters of the specified kind the player has
|
||||
*/
|
||||
int getCountersCount(CounterType counterType);
|
||||
|
||||
/**
|
||||
* @return the amount of counters of the specified kind the player has
|
||||
*/
|
||||
int getCountersCount(String counterName);
|
||||
|
||||
/**
|
||||
* @return the amount of counters in total of any kind the player has
|
||||
*/
|
||||
int getCountersTotalCount();
|
||||
|
||||
List<UUID> getAttachments();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue