mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
fixed graveyard count not correctly using filters
This commit is contained in:
parent
90d0c989b1
commit
a239fd0dda
1 changed files with 5 additions and 4 deletions
|
@ -9,13 +9,12 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public class CardsInControllerGraveyardCount implements DynamicValue {
|
||||
|
||||
private FilterCard filter;
|
||||
private Integer amount;
|
||||
private final FilterCard filter;
|
||||
private final Integer amount;
|
||||
|
||||
public CardsInControllerGraveyardCount() {
|
||||
this(StaticFilters.FILTER_CARD, 1);
|
||||
|
@ -39,7 +38,9 @@ public class CardsInControllerGraveyardCount implements DynamicValue {
|
|||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Player player = game.getPlayer(sourceAbility.getControllerId());
|
||||
if (player != null) {
|
||||
return amount * player.getGraveyard().count(filter, game);
|
||||
return amount * player.getGraveyard().count(
|
||||
filter, sourceAbility.getSourceId(), sourceAbility.getControllerId(), game
|
||||
);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue