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
|
|
@ -66,7 +66,7 @@ enum RadiationCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
return player != null && player.getCounters().getCount(CounterType.RAD) > 0;
|
||||
return player != null && player.getCountersCount(CounterType.RAD) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,13 +102,13 @@ class RadiationEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int amount = player.getCounters().getCount(CounterType.RAD);
|
||||
int amount = player.getCountersCount(CounterType.RAD);
|
||||
Cards milled = player.millCards(amount, source, game);
|
||||
int countNonLand = milled.count(StaticFilters.FILTER_CARD_NON_LAND, player.getId(), source, game);
|
||||
if (countNonLand > 0) {
|
||||
// TODO: support gaining life instead with [[Strong, the Brutish Thespian]]
|
||||
player.loseLife(countNonLand, game, source, false);
|
||||
player.removeCounters(CounterType.RAD.getName(), countNonLand, source, game);
|
||||
player.loseCounters(CounterType.RAD.getName(), countNonLand, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue