Jump to content

Adding Abilities? We can proposal?


Lion.Kanzen
 Share

Recommended Posts

Spoiler

This patch changes the Upgrade.js component into an "Abilities.js" component, that can do a lot more. In fact, perhaps a little too much, but I don't really see how this could be updated to support an arbitrary number of different and custom abilities in another, saner way.

To show the flexibility of this new component, I have removed Upgrade entirely, and I have also removed the Gate panel in the Gui, replaced by abilities (no difference from the user POV).
In principle, this can be used to create mostly any stateless ability (key being stateless), though this can have a temporary state while active (e.g. for a timer). Exemples would include self-destruct, damage around yourself, all the current cheats, transforming entities into other entities, activating spells, locking/unlocking gates, choosing seeds for farms, mounting/dismounting units and really whatever.

Current features include:
-a charging time (taken from upgrade.js)
-a cool down time
-incompatible abilities (in two shapes)
-supports arbitrary code and is extensible (might be dangerous, need 2nd opinion)
-GUI support

Ultimately, it should be easy-ish to extend this to allow God Powers like in AoM, since an ability can remain "ready" eternally once charged, and we could add GUI elements to click an ability, then click an entity and trigger it there or whatever really.
It should also be reasonably easy to extend this to have a limited number of uses per ability, and to have more advanced conditions to trigger abilities.

https://code.wildfiregames.com/D281

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...