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

Closed
Kwandulin opened this issue Mar 16, 2018 · 12 comments
Closed

Display max_attacks in the unit sidebar #2667

Kwandulin opened this issue Mar 16, 2018 · 12 comments
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Good first issue Issues deemed adequate for contributors without prior experience to work on. Ready for testing Issues for which a potential fix is available but untested. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.

Comments

@Kwandulin
Copy link

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

@jyrkive jyrkive added Enhancement Issues that are requests for new features or changes to existing ones. UI User interface issues, including both back-end and front-end issues. labels Mar 16, 2018
@CelticMinstrel
Copy link
Member

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

@gfgtdf
Copy link
Contributor

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
Copy link
Member

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.

@Wedge009 Wedge009 added the Units Issues that involve unit definitions or their implementation in the engine. label Oct 15, 2019
@jostephd jostephd added the Good first issue Issues deemed adequate for contributors without prior experience to work on. label Oct 18, 2019
@jostephd jostephd self-assigned this Oct 18, 2019
@jostephd
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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

@jostephd jostephd added the Ready for testing Issues for which a potential fix is available but untested. label Oct 19, 2019
@jostephd jostephd added this to the pre-1.16.0 string freeze milestone Oct 20, 2019
@CelticMinstrel
Copy link
Member

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

@jostephd
Copy link
Member

Need to backport ad0867f too for the #include.

@jostephd jostephd removed their assignment Nov 4, 2019
@Pentarctagon Pentarctagon removed this from the pre-1.16.0 string freeze milestone Aug 10, 2020
@stevecotton
Copy link
Contributor

Will probably need work for the sidebar changes being discussed in https://www.wesnoth.org/irclogs/2021/03/%23wesnoth-dev.2021-03-18.log

@Wedge009
Copy link
Member

Where does this stand? Probably too late for 1.16.0, but I understand there are no further planned releases for 1.14 so back-porting isn't a concern there.

None of the standard campaigns have units with more than one attack per turn, do they? This is mainly for UMC, right?

@CelticMinstrel
Copy link
Member

What? Isn't it already done? The commit jostephd linked appears to be on master, at least.

@Wedge009
Copy link
Member

Sorry, yeah, it does seem to be - I was just focused on all the discussion about back-porting to 1.14 which is no longer relevant. In that case, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Issues that are requests for new features or changes to existing ones. Good first issue Issues deemed adequate for contributors without prior experience to work on. Ready for testing Issues for which a potential fix is available but untested. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.
Projects
None yet
Development

No branches or pull requests

8 participants