Opened 7 years ago
Last modified 7 years ago
#4382 closed enhancement
Defeat reason — at Initial Version
Reported by: | elexis | Owned by: | |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 23 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: |
Description
Often players wonder why a player is being defeated.
For example the default conquest victory condition defeats players if they don't have a set of whitelisted units remaining (ConquestCritical
class).
Since regicide is combined with conquest, players wonder why they are being defeated if they still have the hero.
Another example would be on survival of the fittest where players can become defeated by losing the civic center, or by losing the hero (if regicide is set).
A third example would be combining victory conditions #4014.
A new argument could be passed whenever SetState
of Player.js
is called (which is the function defeating players). It could be a translatable string (use markForTranslation
) so that it would appear as follows:
- Player X was defeated (lost hero) for regicide
- Player X was defeated (lost all workers) for conquest*
- Player X was defeated (lost civic center) for survival
- Player X has won (wonder victory) for wonder games
- Player X has won (allied victory) when last man standing is not enabled
- Player X has won (last player alive) when the endgamemanager marks that player as won
[*] one can still survive on conquest with a dock only, but that detail must not necessarily be reflected in the string
formatDefeatMessage
of messages.js
is the place where the GUI interface message constructed in SetState
is parsed into a chat message.