-
Notifications
You must be signed in to change notification settings - Fork 89
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
Looting implementation #17
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Only absolute values are obtained for now, no loss.
After all, how does one loot what the other faction does not have? Still, could be useful for some places, by forcing the opponent to go into "debt".
Failed to override ==
It appears that the issue is a Windows problem, with Windows providing macros for min and max that interfere with using the proper ones defined in the algorithm header file.
As discussed with Titi, this may prevent some issues with multiplayer getting out of sync due to different floating point calculations.
Also renamed loss-value accordingly. As discussed with Titi in IRC.
ckorn
pushed a commit
to ckorn/PlayDeb
that referenced
this pull request
Jan 25, 2015
* New upstream version - healthbars with a lot of options - multi shot / multi-projectiles with different timings,sounds and particle systems - several camera shake effects - new tileset "pine rock" - some new maps - improve switching settings when connected to a headless server - support for team unit sharing - team resource sharing - tags feature - Attack boosts fixed in many ways - Attack boosts and upgrades now support upgrading attack speed - timed particles and mesh bound particles really work now. - unit height independend particle positioning ( flat-particle-positions ) - CPU players multiplier are displayed in debug view - You can have non commandable units - Units spawned by an attack skill can get an attack command - Unit and Splash particles can be speeded up ( accelerated ) - Looting MegaGlest/megaglest-source#17 - HP and EP starting values - <target-height> <burn-height> can be given https://docs.megaglest.org/XML/Unit#target-height - +several bugfixes
ckorn
pushed a commit
to ckorn/PlayDeb
that referenced
this pull request
Jan 25, 2015
* New upstream version - healthbars with a lot of options - multi shot / multi-projectiles with different timings,sounds and particle systems - several camera shake effects - new tileset "pine rock" - some new maps - improve switching settings when connected to a headless server - support for team unit sharing - team resource sharing - tags feature - Attack boosts fixed in many ways - Attack boosts and upgrades now support upgrading attack speed - timed particles and mesh bound particles really work now. - unit height independend particle positioning ( flat-particle-positions ) - CPU players multiplier are displayed in debug view - You can have non commandable units - Units spawned by an attack skill can get an attack command - Unit and Splash particles can be speeded up ( accelerated ) - Looting MegaGlest/megaglest-source#17 - HP and EP starting values - <target-height> <burn-height> can be given https://docs.megaglest.org/XML/Unit#target-height - +several bugfixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As described in this forum post. Looting gives and takes resources on death of a unit. This particular implementation allows units to specify what happens when they die: how many resources do they give and how many do they lose. These numbers can be specified as either absolute values or as percentages of their existing resources.
Example:
As the example shows, we specify a list of resources in a manner akin to the resource cost. The attributes are:
amount-value
: An absolute amount to give to the killing unit.amount-percentage
: Percentage of the killed unit to give to the faction that killed it.loss-value
: An absolute amount of resources that are removed from the faction of the killed unit.loss-percentage
: Percentage of the resource that are removed from the faction of the killed unit.allow-negative
: If true, the faction can go into the negatives if they lose more resources than they have. If false, the resource count won't go below 0.All combinations of attributes are valid. All default to 0 (except
allow-negative
, which defaults to false). Values can be negative to inverse their intent (eg, a negative value forloss-value
means that the faction of the killed unit gets some resources back).Possibilities:
Notes: