mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
* Avatar of Will - Fixed a bug of the cost reduction effect.
This commit is contained in:
parent
60b7cbaad4
commit
8b880bfd47
1 changed files with 7 additions and 5 deletions
|
|
@ -48,7 +48,7 @@ import mage.players.Player;
|
|||
public class AvatarOfWill extends CardImpl {
|
||||
|
||||
public AvatarOfWill(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{6}{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{U}{U}");
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(6);
|
||||
|
|
@ -99,10 +99,12 @@ class AvatarOfWillCostReductionEffect extends CostModificationEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(Ability abilityToModify, Ability source, Game game) {
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null && opponent.getHand().isEmpty()) {
|
||||
return true;
|
||||
if (abilityToModify.getSourceId().equals(source.getSourceId())) {
|
||||
for (UUID playerId : game.getOpponents(source.getControllerId())) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null && opponent.getHand().isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue