Sword of War and Peace

This commit is contained in:
Loki 2011-05-24 23:06:08 +03:00
parent fb80e6df45
commit 94b3802c0a
2 changed files with 179 additions and 0 deletions

View file

@ -0,0 +1,22 @@
package mage.abilities.dynamicvalue.common;
import mage.abilities.Ability;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.game.Game;
import mage.players.Player;
public class CardsInControlledPlayerHandCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility) {
Player controller = game.getPlayer(sourceAbility.getControllerId());
if (controller != null) {
return controller.getHand().size();
}
return 0;
}
@Override
public DynamicValue clone() {
return new CardsInControlledPlayerHandCount();
}
}