mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
* GUI: fixed that abilities and triggers on the stack were not highlighted as valid target;
This commit is contained in:
parent
6f34d514f9
commit
b8b2dd2c9b
3 changed files with 12 additions and 0 deletions
|
|
@ -168,8 +168,13 @@
|
|||
}
|
||||
}
|
||||
if (card instanceof StackAbilityView) {
|
||||
// replace ability by original card
|
||||
CardView tmp = ((StackAbilityView) card).getSourceCard();
|
||||
tmp.overrideRules(card.getRules());
|
||||
tmp.setChoosable(card.isChoosable());
|
||||
tmp.setPlayable(card.isPlayable());
|
||||
tmp.setPlayableAmount(card.getPlayableAmount());
|
||||
tmp.setSelected(card.isSelected());
|
||||
tmp.setIsAbility(true);
|
||||
tmp.overrideTargets(card.getTargets());
|
||||
tmp.overrideId(card.getId());
|
||||
|
|
|
|||
|
|
@ -112,8 +112,13 @@ public class StackDialog extends IDialogPanel {
|
|||
for (CardView card : cards.values()) {
|
||||
|
||||
if (card instanceof StackAbilityView) {
|
||||
// replace ability by original card
|
||||
CardView tmp = ((StackAbilityView) card).getSourceCard();
|
||||
tmp.overrideRules(card.getRules());
|
||||
tmp.setChoosable(card.isChoosable());
|
||||
tmp.setPlayable(card.isPlayable());
|
||||
tmp.setPlayableAmount(card.getPlayableAmount());
|
||||
tmp.setSelected(card.isSelected());
|
||||
tmp.setIsAbility(true);
|
||||
tmp.overrideTargets(card.getTargets());
|
||||
tmp.overrideId(card.getId());
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ public class StackAbilityView extends CardView {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// in GUI: that's view will be replaced by sourceCard, so don't forget to sync settings like
|
||||
// selectable, chooseable, etc. Search by getSourceCard
|
||||
private final CardView sourceCard;
|
||||
|
||||
public StackAbilityView(Game game, StackAbility ability, String sourceName, CardView sourceCard) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue