mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Fixed bug of TargetCardInYourGraveyard that counted also cards in other graveyards (fixes Archaeomancer bug).
This commit is contained in:
parent
fdac98cdeb
commit
fafde2ef31
1 changed files with 12 additions and 4 deletions
|
@ -66,19 +66,22 @@ public class TargetCardInYourGraveyard extends TargetCard<TargetCardInYourGravey
|
||||||
@Override
|
@Override
|
||||||
public boolean canTarget(UUID id, Ability source, Game game) {
|
public boolean canTarget(UUID id, Ability source, Game game) {
|
||||||
Card card = game.getCard(id);
|
Card card = game.getCard(id);
|
||||||
if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD)
|
if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD) {
|
||||||
if (game.getPlayer(source.getControllerId()).getGraveyard().contains(id))
|
if (game.getPlayer(source.getControllerId()).getGraveyard().contains(id)) {
|
||||||
return filter.match(card, game);
|
return filter.match(card, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canTarget(UUID id, UUID playerId, Ability ability, Game game) {
|
public boolean canTarget(UUID id, UUID playerId, Ability ability, Game game) {
|
||||||
Card card = game.getCard(id);
|
Card card = game.getCard(id);
|
||||||
if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD)
|
if (card != null && game.getState().getZone(card.getId()) == Zone.GRAVEYARD) {
|
||||||
if (game.getPlayer(playerId).getGraveyard().contains(id)) {
|
if (game.getPlayer(playerId).getGraveyard().contains(id)) {
|
||||||
return filter.match(card, game);
|
return filter.match(card, game);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,10 +94,15 @@ public class TargetCardInYourGraveyard extends TargetCard<TargetCardInYourGravey
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean canChoose(UUID sourceControllerId, Game game) {
|
public boolean canChoose(UUID sourceControllerId, Game game) {
|
||||||
if (game.getPlayer(sourceControllerId).getGraveyard().count(filter, game) >= this.minNumberOfTargets)
|
if (game.getPlayer(sourceControllerId).getGraveyard().count(filter, game) >= this.minNumberOfTargets) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public boolean canChoose(UUID sourceId, UUID sourceControllerId, Game game) {
|
||||||
|
return canChoose(sourceControllerId, game);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TargetCardInYourGraveyard copy() {
|
public TargetCardInYourGraveyard copy() {
|
||||||
|
|
Loading…
Reference in a new issue