mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Show combat arrow for attacked player on desktop
This commit is contained in:
@@ -459,6 +459,16 @@ public class TargetingOverlay {
|
|||||||
if (defender instanceof CardView) {
|
if (defender instanceof CardView) {
|
||||||
addArc(endpoints.get(defender.getId()), endpoints.get(c.getId()), ArcConnection.FoesAttacking);
|
addArc(endpoints.get(defender.getId()), endpoints.get(c.getId()), ArcConnection.FoesAttacking);
|
||||||
}
|
}
|
||||||
|
// if c is attacking a player
|
||||||
|
if (defender instanceof PlayerView) {
|
||||||
|
final JPanel avatarArea = matchUI.getFieldViewFor((PlayerView)defender).getAvatarArea();
|
||||||
|
if(avatarArea.isShowing()) {
|
||||||
|
final Point point = new Point(avatarArea.getLocationOnScreen());
|
||||||
|
point.x += avatarArea.getWidth() / 2;
|
||||||
|
point.y += avatarArea.getHeight() / 2;
|
||||||
|
addArc(point, endpoints.get(c.getId()), ArcConnection.FoesAttacking);
|
||||||
|
}
|
||||||
|
}
|
||||||
// if c is a planeswalker that's being attacked
|
// if c is a planeswalker that's being attacked
|
||||||
for (final CardView pwAttacker : combat.getAttackersOf(c)) {
|
for (final CardView pwAttacker : combat.getAttackersOf(c)) {
|
||||||
addArc(endpoints.get(c.getId()), endpoints.get(pwAttacker.getId()), ArcConnection.FoesAttacking);
|
addArc(endpoints.get(c.getId()), endpoints.get(pwAttacker.getId()), ArcConnection.FoesAttacking);
|
||||||
|
|||||||
Reference in New Issue
Block a user