mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Implemented Beacon Bolt
This commit is contained in:
parent
a4476191bb
commit
7f51656b0a
5 changed files with 86 additions and 38 deletions
|
|
@ -0,0 +1,38 @@
|
|||
package mage.abilities.dynamicvalue.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.game.Game;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum InstantSorceryExileGraveyardCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Player player = game.getPlayer(sourceAbility.getControllerId());
|
||||
if (player != null) {
|
||||
return player.getGraveyard().count(
|
||||
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game
|
||||
) + game.getExile().getExileZone(player.getId()).count(
|
||||
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game
|
||||
);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstantSorceryExileGraveyardCount copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue