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

Open
paperpancake opened this issue Oct 21, 2019 · 5 comments
Labels

Comments

@paperpancake
Copy link

@paperpancake paperpancake commented Oct 21, 2019

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

This comment has been minimized.

Copy link
Author

@paperpancake paperpancake commented Oct 21, 2019

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

@github-actions

This comment has been minimized.

Copy link

@github-actions github-actions bot commented Oct 21, 2019

Hi! Thanks for helping make Wesnoth even better!

@AI0867

This comment has been minimized.

Copy link
Member

@AI0867 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 Oct 21, 2019
@soliton-

This comment has been minimized.

Copy link
Member

@soliton- soliton- commented Oct 21, 2019

Duplicate of #4137

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

This comment has been minimized.

Copy link
Contributor

@gfgtdf 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.