mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
* fix for targeting in new GUI ex. Chandra Nalaar always targeted itself
This commit is contained in:
@@ -391,22 +391,8 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
inputControl.selectCard(c, AllZone.Human_Play);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
//self play (no land) ---- Mouse
|
||||
playerPlayPanel.addMouseListener(new MouseAdapter() {
|
||||
|
||||
@Override
|
||||
public void mousePressed(MouseEvent e) {
|
||||
Card c = playerPlayPanel.getCardFromMouseOverPanel();
|
||||
if(c != null) {
|
||||
|
||||
CardList att = new CardList(AllZone.Combat.getAttackers());
|
||||
//CardList block = AllZone.Combat.getAllBlockers();
|
||||
|
||||
if((c.isTapped() ||c.hasSickness() || ((c.getKeyword().contains("Vigilance")) && att.contains(c)))
|
||||
&& (inputControl.input instanceof Input_Attack)) {
|
||||
arcane.ui.CardPanel cardPanel = playerPlayPanel.getCardPanel(c.getUniqueNumber());
|
||||
@@ -416,28 +402,17 @@ public class GuiDisplay4 extends JFrame implements CardContainer, Display, NewCo
|
||||
}
|
||||
}
|
||||
}
|
||||
//right click:
|
||||
|
||||
if(e.isMetaDown()) {
|
||||
if(att.contains(c) && (inputControl.input instanceof Input_Attack)) {
|
||||
c.untap();
|
||||
AllZone.Combat.removeFromCombat(c);
|
||||
}
|
||||
|
||||
/*
|
||||
// won't work yet:
|
||||
else if (block.contains(cardPanel.getCard()) && inputControl.input instanceof Input_Block)
|
||||
{
|
||||
Card crd = cardPanel.getCard();
|
||||
AllZone.Combat.removeFromCombat(crd);
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
else inputControl.selectCard(c, AllZone.Human_Play);
|
||||
} else inputControl.selectCard(c, AllZone.Human_Play);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//self hand ---- Mouse
|
||||
playerHandPanel.addMouseListener(new MouseAdapter() {
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package forge;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import com.esotericsoftware.minlog.Log;
|
||||
|
||||
|
||||
public class Input_Cleanup extends Input {
|
||||
private static final long serialVersionUID = -4164275418971547948L;
|
||||
@@ -116,7 +118,7 @@ public class Input_Cleanup extends Input {
|
||||
AllZone.GameAction.discard(card);
|
||||
showMessage();
|
||||
//We need a nextPhase here or else it will never get the needToNextPhase from showMessage() (because there isn't a nextPhsae() in the stack).
|
||||
System.out.println("There better not be a nextPhase() on the stack!");
|
||||
Log.debug("There better not be a nextPhase() on the stack!");
|
||||
if(AllZone.Phase != null) {
|
||||
if(AllZone.Phase.isNeedToNextPhase()) {
|
||||
AllZone.Phase.setNeedToNextPhase(false);
|
||||
|
||||
Reference in New Issue
Block a user