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

Attack boosts and upgrades now support upgrading attack speed #19

Merged
merged 2 commits into from Sep 28, 2014

Conversation

Copy link

@KatrinaHoffert KatrinaHoffert commented Jul 20, 2014

The syntax is the same as for other upgrades, eg:

<upgrade>
    <!-- ... -->
    <attack-speed value="500"/>
</upgrade>

and

<attack-boost>
    <allow-multiple-boosts value="false" />
    <radius value="5" />
    <target value="all" include-self="false">
        <unit-type name="archer" />
    </target>
    <attack-speed value="150" value-percent-multipler="true" />
</attack-boost>

Note that value-percent-multiplier is broken at time of writing, but that is not the fault of this change (it's broken in the develop branch).

EDIT: Not a bug. I misunderstood how value-percent-multiplier works. It always increases by a multiple, rather than actually multiplying.

As per the other upgrade tags, the attack-speed tag is optional. The animation speed scales the same as the attack speed does.

There's quite a bit of code, but most of it is adapted from the existing upgrade code.

@titiger, there are some cases of floats being used here (since we discussed how differences in handling floats in client computers could cause out of syncs), but that is because the existing upgrade code is using doubles in that way. It seems like a bad idea to introduce inconsistency on a per line basis. Much of the code in this pull request is only minor tweaks from the very similar code for the other upgrade stats.

Mike Hoffert added 2 commits Jul 20, 2014
Syntax is the same as all other upgrade stats. This also allows attack
boosts to upgrade the attack speed (since they use the same code).
That is, the increase in attack speed is the same as the increase in
animation speed. Previously, this was only the case for absolute
increases. Now percentage increases do so, as well.
titiger added a commit that referenced this issue Sep 28, 2014
Attack boosts and upgrades now support upgrading attack speed
@titiger titiger merged commit c6993ed into MegaGlest:develop Sep 28, 2014
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants