Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display max_attacks in the unit sidebar #2667

Open
Kwandulin opened this issue Mar 16, 2018 · 8 comments

Comments

@Kwandulin
Copy link

@Kwandulin Kwandulin commented Mar 16, 2018

Since 1.13 we have the option to set max_attacks via [effect]. Unfortunately, it is not displayed, if the unit has more than one attack per turn. It might be reasonable to display the number of attacks per turn in the unit sidebar.

Maybe we can get something like "Attacks (2)"
attacks

@CelticMinstrel

This comment has been minimized.

Copy link
Member

@CelticMinstrel CelticMinstrel commented Mar 16, 2018

Also, the movement_used for an attack might be good to show (if different from the default).

@gfgtdf

This comment has been minimized.

Copy link
Contributor

@gfgtdf gfgtdf commented Mar 20, 2018

if this doesn'go into 1.14 coud can also do this in an addon by using luas theme_items hook.

@CelticMinstrel

This comment has been minimized.

Copy link
Member

@CelticMinstrel CelticMinstrel commented Mar 21, 2018

I think this actually can't go into 1.14 solely because of the theme_items hook; there might be a way around that, but it's probably easier to just save it for 1.15.

@jostephd

This comment has been minimized.

Copy link
Member

@jostephd jostephd commented Oct 18, 2019

Added:

2019-10-18-020135_173x132_scrot

test case
diff --git a/data/scenario-test.cfg b/data/scenario-test.cfg
index 69185e223c9..7531835e766 100644
--- a/data/scenario-test.cfg
+++ b/data/scenario-test.cfg
@@ -253,27 +253,16 @@ Xu, Xu, Qxu, Qxu, Ql, Ql, Ql, Xu, Xu, Xu, Xu, Xu, Xu, Xu, Xu, Gg, Gg, Gg, Gg, Gg
             generate_name=yes
             [modifications]
                 [trait]
-                    id=feral
-                    availability="musthave"
-                    male_name="feral"
-                    female_name="female^feral"
-                    description="Receive at most 40% defense in villages"
-                    [effect]
-                        apply_to=defense
-                        replace=yes
-                        [defense]
-                            village=-60
-                        [/defense]
-                    [/effect]
-                [/trait]
-                [trait]
                     id=overpowered
                     name="overpowered"
                     availability=musthave
                     [effect]
                         apply_to=attack
-                        increase_attacks=1
-                        increase_damage=1
+                        set_movement_used=2
+                    [/effect]
+                    [effect]
+                        apply_to=max_attacks
+                        increase=1
                     [/effect]
                 [/trait]
             [/modifications]
@@ -1565,6 +1554,7 @@ My best advancement costs $next_cost gold and I’m $experience|% there."
     [event]
         name=start
 
+        {UNIT 2 (Orcish Grunt) 14 7 ()}
         [gold]
             side=1
             amount=1000

@CelticMinstrel Could you explain why you think this isn't backportable? If someone replaces or wraps wesnoth.theme_items.unit_weapons, then...what?

@CelticMinstrel

This comment has been minimized.

Copy link
Member

@CelticMinstrel CelticMinstrel commented Oct 19, 2019

I think it's not backportable because I expected it would be adding a new element to wesnoth.theme_items... if that's somehow not the case, then maybe it can be backported?

@jostephd

This comment has been minimized.

Copy link
Member

@jostephd jostephd commented Oct 19, 2019

It just adds another line to the existing unit_weapons report: f973919

@CelticMinstrel

This comment has been minimized.

Copy link
Member

@CelticMinstrel CelticMinstrel commented Oct 20, 2019

Yeah okay... in that case, I'd say it's backportable.

@jostephd

This comment has been minimized.

Copy link
Member

@jostephd jostephd commented Oct 20, 2019

Need to backport ad0867f too for the #include.

@jostephd jostephd removed their assignment Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.