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

Healing: Do heal on turn 1. #3562

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@jostephd
Member

jostephd commented Sep 16, 2018

Discussed on the forums: https://r.wesnoth.org/t48817

@CelticMinstrel

This comment has been minimized.

Show comment
Hide comment
@CelticMinstrel

CelticMinstrel Sep 22, 2018

Member

That thread sounds kinda controversial; I wonder if this should be made an option in the scenario WML?

Member

CelticMinstrel commented Sep 22, 2018

That thread sounds kinda controversial; I wonder if this should be made an option in the scenario WML?

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Sep 22, 2018

Contributor

i currently think it should not heal on the first turn of the the first player only, so that the scenario designer can place 'wounded' units at start, it also make somehow sense as there is side turn start but not really a side turn 'transition' for the first turn of the first player.

Contributor

gfgtdf commented Sep 22, 2018

i currently think it should not heal on the first turn of the the first player only, so that the scenario designer can place 'wounded' units at start, it also make somehow sense as there is side turn start but not really a side turn 'transition' for the first turn of the first player.

jostephd added a commit to jostephd/wesnoth that referenced this pull request Sep 22, 2018

@jostephd

This comment has been minimized.

Show comment
Hide comment
@jostephd

jostephd Sep 22, 2018

Member

@gfgtdf I agree. It would be cleaner not to do healing on side 1 turn 1 and let scenario authors do that by themselves if they want. I pushed the according patch. However, there is an oddity: on master current_side() returns 1 both for player turns and for AI turns. If I backport the patch to 1.14 (just for testing. I know it can't be committed to a released branch) then current_side() correctly returns 1 and 2 alternately.

Member

jostephd commented Sep 22, 2018

@gfgtdf I agree. It would be cleaner not to do healing on side 1 turn 1 and let scenario authors do that by themselves if they want. I pushed the according patch. However, there is an oddity: on master current_side() returns 1 both for player turns and for AI turns. If I backport the patch to 1.14 (just for testing. I know it can't be committed to a released branch) then current_side() correctly returns 1 and 2 alternately.

@jostephd jostephd self-assigned this Sep 26, 2018

@jostephd

This comment has been minimized.

Show comment
Hide comment
@jostephd

jostephd Oct 15, 2018

Member

Rebased to new master

Member

jostephd commented Oct 15, 2018

Rebased to new master

@GregoryLundberg

This comment has been minimized.

Show comment
Hide comment
@GregoryLundberg

GregoryLundberg Oct 15, 2018

Contributor

Check that the side number is correct, per your previous comment,
Then Squash, Rebase and Merge.

Contributor

GregoryLundberg commented Oct 15, 2018

Check that the side number is correct, per your previous comment,
Then Squash, Rebase and Merge.

@gfgtdf

This comment has been minimized.

Show comment
Hide comment
@gfgtdf

gfgtdf Oct 15, 2018

Contributor

I wonder whether these checks are sufficient, meaning if for example UMC change the initial turn number (eg change the turn numbesr in a prestart event), how should the code behave.

Contributor

gfgtdf commented Oct 15, 2018

I wonder whether these checks are sufficient, meaning if for example UMC change the initial turn number (eg change the turn numbesr in a prestart event), how should the code behave.

@GregoryLundberg

This comment has been minimized.

Show comment
Hide comment
@GregoryLundberg

GregoryLundberg Oct 15, 2018

Contributor

The old code said "if turn > 1" and we're changing it to read "if turn > 1 or side > 1".

So if they played with turn numbers, this is a non-issue.

The only issue I could see if is they (effectively) don't have a "side 1", or they depended upon no healing occurring for any side on turn 1.

If they're playing games with turn and/or side numbering, there's not a lot we can do about it.

I imagine, in the rare case where they actually depend upon no healing at all throughout all of turn 1, well, a change log entry (which this PR is missing, BTW), should warn them. But there's not a lot we can do about that.


ETA: Well there might be problems if we allow turn 0 or turn -23, but we'd have had those problems, anyway. It would be nice if "turn" were "unsigned int" with the first turn being turn "0" and displaying as "1", but that's entirely another issue.

Contributor

GregoryLundberg commented Oct 15, 2018

The old code said "if turn > 1" and we're changing it to read "if turn > 1 or side > 1".

So if they played with turn numbers, this is a non-issue.

The only issue I could see if is they (effectively) don't have a "side 1", or they depended upon no healing occurring for any side on turn 1.

If they're playing games with turn and/or side numbering, there's not a lot we can do about it.

I imagine, in the rare case where they actually depend upon no healing at all throughout all of turn 1, well, a change log entry (which this PR is missing, BTW), should warn them. But there's not a lot we can do about that.


ETA: Well there might be problems if we allow turn 0 or turn -23, but we'd have had those problems, anyway. It would be nice if "turn" were "unsigned int" with the first turn being turn "0" and displaying as "1", but that's entirely another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment