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

Issue: When defender surrendered, /swa siege end makes defender win #338

Closed
DiamantesIces opened this issue Aug 2, 2021 · 5 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@DiamantesIces
Copy link

DiamantesIces commented Aug 2, 2021

Suggestion: Add /swa siege end option to choose whether the attacker or defender wins. As of the latest update, even when the defender surrendered, /swa siege end command makes the defender win instead of lose.

@DiamantesIces DiamantesIces added the enhancement New feature or request label Aug 2, 2021
@Goosius1
Copy link
Collaborator

Goosius1 commented Aug 2, 2021

Thank you!

I split off the command blacklist option to another ticket #339

@Goosius1
Copy link
Collaborator

Goosius1 commented Aug 2, 2021

As for the issue about using "swa siege end":


  • That command is not supposed to be used after a surrender. Because after a surrender, the siege is considered already ended.
  • Generally I recommend against supporting a post-siege reassignment of winner, because that is a complex change to the data, which could result in complex data integrity problems.
  • Short/Medium term, I suggest we add a validator to completely prevent (with error message) people from using /swa siege end after a siege has already ended.
  • When that is done, this ticket can be closed

  • The immediate resolution to your problem is to not use /swa siege end after a surrender. Instead, if you want to change a siege at that point, I recommend you use /swa siege remove.

@Goosius1 Goosius1 changed the title Suggestion: Issue: When defender surrendered, /swa siege end makes defender win Aug 2, 2021
@Goosius1 Goosius1 added bug Something isn't working and removed enhancement New feature or request labels Aug 2, 2021
@Goosius1 Goosius1 added this to the 0.5.0 milestone Aug 3, 2021
@Goosius1 Goosius1 added the good first issue Good for newcomers label Aug 3, 2021
@Goosius1
Copy link
Collaborator

Goosius1 commented Aug 4, 2021

  • I tested this locally
  • Findings
    • After a town surrender was confirmed, I could not use /swa siege end because it gave me the error "that town has no active sieges", as expected.
    • Thus I must assume that the replication steps you described involve a "pending-surrender".
  • Resolution
    • The /swa command can indeed override a pending surrender (but not a confirmed surrender).
    • The result of the command depends on the siege balance.
    • I wouldn't want this command to ignore the siege balance, because that could mess up the data.
    • Nor would I want the command to automatically adjust the siege balance, as that would be very unexpected for users.
    • In your exact scenario, you can change the outcome of a pending-surrender, to a simulated-timed-outcome (win or loss), but you must first ensure that the balance is what you want, and adjust it if needed ---> zero or over will cause and attacker win, less than zero will cause a defender win.

@Goosius1
Copy link
Collaborator

Goosius1 commented Aug 4, 2021

Ticket closed as resolved

@Goosius1 Goosius1 closed this as completed Aug 4, 2021
@Goosius1 Goosius1 removed this from the 0.4.6 milestone Aug 4, 2021
@DiamantesIces
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants