* Added card hints to Avatar of Might, Avatar of Will, Avatar of Woe, Dusk Feaster, Rekindled Flame;

* Refactor: removed custom spell cost reduction effects;
This commit is contained in:
Oleg Agafonov 2020-06-27 05:36:04 +04:00
parent c46e5d2399
commit 2252648f01
13 changed files with 167 additions and 411 deletions

View file

@ -0,0 +1,36 @@
package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author JayDi85
*/
public enum OpponentHasNoCardsInHandCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
for (UUID playerId : game.getOpponents(source.getControllerId())) {
Player opponent = game.getPlayer(playerId);
if (opponent != null && opponent.getHand().isEmpty()) {
return true;
}
}
}
return false;
}
@Override
public String toString() {
return "an opponent has no cards in hand";
}
}