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

Loyal HttT character costs upkeep #4498

Closed
paperpancake opened this issue Oct 21, 2019 · 5 comments
Closed

Loyal HttT character costs upkeep #4498

paperpancake opened this issue Oct 21, 2019 · 5 comments
Labels
Bug Issues involving unexpected behavior. Campaign (any) Deprecated tag, replaced with separate tags for each mainline campaign

Comments

@paperpancake
Copy link

Game and System Information

  • v1.14.9 (9eba78f-Modified)
  • Steam download
  • Windows 10 (10.0.18362)

Describe the bug

Li'sar has the loyal trait but still costs gold upkeep in Heir to the Throne's 17_Scepter_of_Fire. If Konrad takes the scepter, Li'sar will continue to cost gold upkeep in the next scenario. On the other hand, if Li'sar takes the scepter, then she does not cost gold upkeep in the next scenario.

Note: Li'sar gains the loyal trait at the end of 16_Hasty_Alliance via [modify_unit][modifications]{TRAIT_LOYAL}.

To Reproduce

Steps to reproduce the behavior:

  1. Load saved game HttT-The Sceptre of Fire Turn 1.gz
  2. Notice that there is a cost of 2 gold, even though all units are loyal. Li'sar is the only level 2 unit present.

Or, more comprehensively:
1b. Load scenario 16's replay file and turn-skip without animations to near the end: HttT-Hasty Alliance replay.gz
2b. Switch into play mode at the end and win to trigger the [modify_unit][modifications]{TRAIT_LOYAL} event
3b. Continue to the start of the next scenario
4b. Notice that there is an upkeep cost, even though all units are loyal. (If Li'sar is still level 2, the upkeep cost will be 2.)
5b. Skip to the end with both Konrad and Li'sar in reach of the scepter by loading
HttT-The Sceptre of Fire-Auto-Save24.gz
6b. Win with Konrad, continue to the next scenario, and notice that Li'sar still costs upkeep even though she's loyal.
7b. Win with Li'sar, continue to the next scenario, and notice that in this case there is 0 upkeep (as expected).

Expected behavior

There should be 0 upkeep cost for Li'sar at the start of 17_The_Scepter_of_Fire since Li'sar has the loyal trait.

Additional context

The event in 16_Hasty_Alliance.cfg is:

    [event]
        name=victory

        [modify_unit]
            [filter]
                id="Li'sar"
            [/filter]
            side=1
            canrecruit=no
            {IS_HERO}
            [modifications]
                {TRAIT_LOYAL}
            [/modifications]
        [/modify_unit]
    [/event]
@paperpancake
Copy link
Author

This might be related to #4137, but I don't know enough to say one way or the other.

@github-actions
Copy link

Hi! Thanks for helping make Wesnoth even better!

@soliton- soliton- added Bug Issues involving unexpected behavior. Campaign (any) Deprecated tag, replaced with separate tags for each mainline campaign labels Oct 21, 2019
@AI0867
Copy link
Member

AI0867 commented Oct 21, 2019

This is exactly #4137. [modify_unit] does not rebuild the unit, so while Li'sar gets the loyal trait, the upkeep attribute is not changed as a result. When she picks up the scepter, the unit is rebuilt, so the upkeep is changed.

@AI0867 AI0867 closed this as completed Oct 21, 2019
@soliton-
Copy link
Member

Duplicate of #4137

@soliton- soliton- marked this as a duplicate of #4137 Oct 21, 2019
@gfgtdf
Copy link
Contributor

gfgtdf commented Oct 21, 2019

While this is indeed the same, cause as #4137. The "bug" (especially for 1.14 where changing the wml tag behviour is not really an option) is still in the wml code in that scenario. this cannot be closed before the [modifications] line is removed from the wml in that file.

@gfgtdf gfgtdf reopened this Oct 21, 2019
@paperpancake paperpancake changed the title (Contains spoilers) Loyal HttT character costs upkeep Loyal HttT character costs upkeep Oct 21, 2019
@gfgtdf gfgtdf closed this as completed in 996f92d Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues involving unexpected behavior. Campaign (any) Deprecated tag, replaced with separate tags for each mainline campaign
Projects
None yet
Development

No branches or pull requests

4 participants