mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
r484 broke arrows for Abilities in the stack. Fixed.
This commit is contained in:
parent
168c8dc294
commit
55eba04697
2 changed files with 12 additions and 1 deletions
|
|
@ -102,7 +102,7 @@ public class MageActionCallback implements ActionCallback {
|
||||||
Point parent = SwingUtilities.getRoot(data.component).getLocationOnScreen();
|
Point parent = SwingUtilities.getRoot(data.component).getLocationOnScreen();
|
||||||
Point me = new Point(data.locationOnScreen);
|
Point me = new Point(data.locationOnScreen);
|
||||||
me.translate(-parent.x, -parent.y);
|
me.translate(-parent.x, -parent.y);
|
||||||
UUID uuid = data.card.getId();
|
UUID uuid = data.card.getParentId();
|
||||||
for (PlayAreaPanel pa : session.getGame().getPlayers().values()) {
|
for (PlayAreaPanel pa : session.getGame().getPlayers().values()) {
|
||||||
MagePermanent permanent = pa.getBattlefieldPanel().getPermanents().get(uuid);
|
MagePermanent permanent = pa.getBattlefieldPanel().getPermanents().get(uuid);
|
||||||
if (permanent != null) {
|
if (permanent != null) {
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ import mage.target.Targets;
|
||||||
public class CardView implements Serializable {
|
public class CardView implements Serializable {
|
||||||
|
|
||||||
protected UUID id;
|
protected UUID id;
|
||||||
|
protected UUID parentId;
|
||||||
protected String name;
|
protected String name;
|
||||||
protected List<String> rules;
|
protected List<String> rules;
|
||||||
protected String power;
|
protected String power;
|
||||||
|
|
@ -242,9 +243,19 @@ public class CardView implements Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void overrideId(UUID id) {
|
public void overrideId(UUID id) {
|
||||||
|
if (parentId == null) {
|
||||||
|
parentId = this.id;
|
||||||
|
}
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public UUID getParentId() {
|
||||||
|
if (parentId != null) {
|
||||||
|
return parentId;
|
||||||
|
}
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
public void setAbility(CardView ability) {
|
public void setAbility(CardView ability) {
|
||||||
this.ability = ability;
|
this.ability = ability;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue