-
Notifications
You must be signed in to change notification settings - Fork 159
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
Nuke response #178
base: dev
Are you sure you want to change the base?
Nuke response #178
Conversation
…hen balance fortifications instead of full true up of barriers in order of priority which could be a massive jump if behind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current behavior fortifies critical structures (spawn, storage) that would be destroyed until they are protected, then worries about all the other ramparts. Is this behavior maintained?
Yes. The difference is before if the current level of fort is 2m and expected to be 20m, and a nuke lands: prior) each priority structure will be brought up to the full expected 20m + nuke hits level before moving on to the next one, even if there are multiple priority structures the main difference is this prevents only raising one structure far beyond the rest when there are still priority structures that will die to the nuke and could be saved as well. |
|
||
private lowBarriers(fortifyStructures = this.fortifyBarriers, | ||
hitsCallback: hitsCallback | ||
= function(structure: StructureWall|StructureRampart): number {return structure.hits;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is always used, so why have it be a callback?
Pull request summary
Code I'm running modified to handle nuke responses "better".
Description:
Nuke Responses already handle multiple nukes, so consolidate. Also don't just true up fortifications from highest to lowest priority as they could be woefully behind. First upgrade them to minimum survival value + critical barrier value, then fortify them as a subset using the normal proportional rules.
This was a pretty quick throw together, so I expect there will be things to clean up.
Testing checklist:
tsconfig
configuration