forked from External/mage
implement [MH3] Tamiyo Inquisitive Student // Tamiyo, Seasoned Scholar
This commit is contained in:
parent
833ecff409
commit
8002cdf88f
9 changed files with 397 additions and 62 deletions
|
|
@ -0,0 +1,35 @@
|
|||
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.players.Player;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public enum CardsInControllerLibraryCount implements DynamicValue {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
Player controller = game.getPlayer(sourceAbility.getControllerId());
|
||||
return controller != null ? controller.getLibrary().size() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CardsInControllerLibraryCount copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "the number of cards in your library";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue