mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
check for valid targets in resolve for The Abyss.
This commit is contained in:
@@ -3609,21 +3609,23 @@ public class GameActionUtil {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
if(player.equals(AllZone.HumanPlayer)) {
|
if(player.equals(AllZone.HumanPlayer)) {
|
||||||
AllZone.InputControl.setInput( new Input() {
|
if(abyss_getTargets(player, abyss).size() > 0) {
|
||||||
private static final long serialVersionUID = 4820011040853968644L;
|
AllZone.InputControl.setInput( new Input() {
|
||||||
public void showMessage() {
|
private static final long serialVersionUID = 4820011040853968644L;
|
||||||
AllZone.Display.showMessage(abyss.getName()+" - Select one nonartifact creature to destroy");
|
public void showMessage() {
|
||||||
ButtonUtil.disableAll();
|
AllZone.Display.showMessage(abyss.getName()+" - Select one nonartifact creature to destroy");
|
||||||
}
|
ButtonUtil.disableAll();
|
||||||
public void selectCard(Card selected, PlayerZone zone) {
|
|
||||||
//probably need to restrict by controller also
|
|
||||||
if(selected.isCreature() && !selected.isArtifact() && CardFactoryUtil.canTarget(abyss, selected)
|
|
||||||
&& zone.is(Constant.Zone.Play) && zone.getPlayer().equals(AllZone.HumanPlayer)) {
|
|
||||||
AllZone.GameAction.destroyNoRegeneration(selected);
|
|
||||||
stop();
|
|
||||||
}
|
}
|
||||||
}//selectCard()
|
public void selectCard(Card selected, PlayerZone zone) {
|
||||||
});//Input
|
//probably need to restrict by controller also
|
||||||
|
if(selected.isCreature() && !selected.isArtifact() && CardFactoryUtil.canTarget(abyss, selected)
|
||||||
|
&& zone.is(Constant.Zone.Play) && zone.getPlayer().equals(AllZone.HumanPlayer)) {
|
||||||
|
AllZone.GameAction.destroyNoRegeneration(selected);
|
||||||
|
stop();
|
||||||
|
}
|
||||||
|
}//selectCard()
|
||||||
|
});//Input
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else { //computer
|
else { //computer
|
||||||
CardList targets = abyss_getTargets(player,abyss);
|
CardList targets = abyss_getTargets(player,abyss);
|
||||||
|
|||||||
Reference in New Issue
Block a user