Thread: OrbStacking
View Single Post
Old 04-12-2009, 11:45 PM   #1
Deaod
User
 
Join Date: Jan 2007
Posts: 542

Submissions (11)

Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)Deaod is a jewel in the rough (192)

Default OrbStacking

A library to ease stacking orbs. And to add limitations to stacking orbs.

This uses vJass, DamageEvent, DamageModifiers, AutoIndex, Table and optionally GroupUtils.

In-Game commands

-reset: Spawns some footmen around you.
-level <level>: Sets the level of your hero to the specified level. Note that you cannot decrease your hero's level this way.
-handleid: Creates a location, displays its index - 0x1000001 and destroys it.
-commands: Shows this list.
-credits: Shows the credits.
-clear: Clears all text-messages.



Changelog

13/04/2009 - Version 1.0.0
- initial release

13/04/2009 - Version 1.0.1
- made removing the buff optional and moved it to the top to prevent recursion

16/04/2009 - Version 1.1.0
- changed internal handling of Item Orbs to Table for a performance gain
- each Orb now has a chance to be run. Refer to the manual for more information

16/04/2009 - Version 1.2.0
- added Category Types (if you have a more logical naming for those types, let me know)
- as a result of that, .AddToCategory()'s interface was changed.

23/04/2009 - Version 1.3.0
- each Category now has an execution limit, which can be adjusted
- backwards compatible

29/04/2009 - Version 1.3.1
- forgot to initialize the string table in the Category struct
- deleted irritating debug messages

29/04/2009 - Version 1.4.0
- reworked the way randomness is handled. 1.4.0 uses Ammorth's ChanceToProc library for that. Due to the severe performance impact i decided to keep 1.3.1 for those who are comfortable with the "spikes" the old way imposes on the chances

08/05/2009 - Version 1.5.0
- reworked the way randomness is handled (again). Removed the chance calculation on my side. The user decides whether the orb was applied or not with his own calculations
- as a result, the function interface was changed. You now have to return a boolean. For compatibility, use the constants provided by this library

22/05/2009 - Version 1.5.1
- deleted the superfluous H2I function
- minor other changes.

07/08/2009 - Version 1.5.2
- Compatibility with 1.24

06/11/2009 - Version 1.5.3
- fixed a few bugs by changing the ability the Generic Orb is based upon.
- Simplified implementation of the library and added a note that you have to add an ability to all units you want to have custom orbs.

06/02/2010 - Version 1.6.0
- Heavily optimized code run when a unit takes damage
- Made LightLeaklessDamageDetect exchangeable with IDDS by implementing an abstraction layer.

10/02/2010 - Version 1.6.1
- dramatically simplified importing this library. Now, you only need to copy over the code, everything else gets done automatically.
- removed the requirement of LightLeaklessDamageDetect, you can still use it, but its not required anymore.
- fixed Orbs for preplaced units.
- fixed destroying Orbs.
- clarified a few things in the documentation.

14/02/2010 - Version 1.6.2
- more bugfixes. Skilling the same ability multiple times no longer creates multiple UnitOrb instances.
- now supports adding Orbs via GUI.

15/02/2010 - Version 1.7.0
- breaks backwards compatibility in order to implement stacking priority. Orbs with higher priority get executed first. Only the interface of Orb.Create was changed.
- Allows changing the damage dealt to the damaged unit with the SetDamage(real new) function.

21/05/2010 - Version 1.8.0
- breaks backwards compatibility again. Ill get into that separately as basically the whole API changed. My aim was to reduce possibility of collision of names (eg. Category was far too general a name for a struct in a public library) (and i wanted to correct past mistakes).
- added missile modificators. Orbs can now change the missile a unit attacks with. Note that it doesnt take the target unit of an attack into account for speed reasons.

New API:
ABILITY_TYPE_SKILL --> ORB_TYPE_SKILL
ABILITY_TYPE_ITEM --> ORB_TYPE_ITEM
CATEGORY_TYPE_READ --> ORB_CATEGORY_TYPE_READ
CATEGORY_TYPE_WRITE --> ORB_CATEGORY_TYPE_WRITE
CATEGORY_TYPE_READWRITE --> ORB_CATEGORY_TYPE_READWRITE
Category --> OrbCategory
Orb_Callback --> OrbCallback
All members of publicly available structs now start with a lower-case-letter.

15/06/2010 - Version 1.8.1
- fixed OrbStacking for unit upgrading.
- did a few optimizations.
- added a few lines warning about using other orbs combined with this library (it just wont work the way you want it to).



Expand Script Code:

I additionally attached a map with two samples.
Attached Files
File Type: w3x OrbStacking_1.7.0.w3x (80.2 KB, 121 views)
File Type: w3x OrbStacking_1.8.1.w3x (80.8 KB, 130 views)
__________________
Deaod is offline   Reply With Quote
Sponsored Links - Login to hide this ad!