mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
[NEO] Implemented Sokenzan, Crucible of Defiance
This commit is contained in:
parent
14c8ead72f
commit
6a6b591549
3 changed files with 109 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
package mage.abilities.costs.costadjusters;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.CostAdjuster;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum LegendaryCreatureCostAdjuster implements CostAdjuster {
|
||||
instance;
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustCosts(Ability ability, Game game) {
|
||||
int count = game.getBattlefield().count(
|
||||
filter, ability.getSourceId(), ability.getControllerId(), game
|
||||
);
|
||||
if (count > 0) {
|
||||
CardUtil.reduceCost(ability, count);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue