Closed Glasislundr closed 6 months ago
Updated pull request with v0.3
Updated pull request with v0.4
Updated pull request with v0.5
Updated pull request with v0.6
I've had fun playing with this pull request in locally merged clients, and I think that it adds a significant gain of functionality in terms of cool new abilities, so I will merge it. If we encounter future issues with bugs in some of these abilities, we can create GitHub issues for them.
Original v0.1 description: The AbilityBuilder seeks to create a method of building spells out of configuration files rather than hard-coded classes. The final goal here would be to add a new feature in the Object Editor that would allow users to modify the full function of an ability.
Currently there are only a few example spells implemented, but as the framework is largely functional, it should be relatively easy to add more going forward.
For some changes outside of these additions, I'll copy from the commit messages:
Updates from v0.1 to v0.2: Added Flex spells, Channel spells, lightning hooks, state modifiers, and sound Major bug fixes with the order of on-cast actions
Updates from v0.2 to v0.3: Ability Builder Projectiles implemented! Added spells that automatically select a target, for Cannibalize/Raise Dead Several refactors: adding code/alias to all abilities, cleaning up Ability Builder type names for floats, broke getCastingUnit into sub types getBuffedUnit and getListenerUnit for specific cases
Features:
AB/Core: Refactored all abilities to store both code and alias
AB: Implemented ability projectiles
AB: Added Auto target spells, largely used for auto-targeting a nearby corpse
AB: Added sound hooks to allow creation of sound effects
AB: Added Integer math callbacks
AB: Added unit queues to allow tracking of add order
AB: Added hooks for create/kill/remove unit
AB: Added floating text hooks
AB: Added destructable interaction functions
AB: Refactored use of getCastingUnit to have clearer getBuffedUnit and getListenerUnit for specific cases
AB: Refactored names of float math callbacks to standardize
AB: Updated Timed Buffs to allow different art types
AB: Added specific buff that ticks during pause (for regeneration, maybe others)
AB: Changed timed buffs to maintain remaining duration after pausing
AB: Added cleanup action to prevent memory leaks in abilities
AB: Implemented example spells Cannibalize and the Raise Dead types
AB: Added Shadow Strike, Carrion Swarm, and Impale as demo abilities
Core: Added methods to load lightning effects based on ability data rather than raw codes
Core: Added Destructable buffs in preparation for Sentry
Core: Updated the order IDs list with WaterKnight's list from the Hive. This mostly added Item ability IDs
Core: Changed command card rendering to hide icons during pause
Core: Changed life/mana regen during pause to match WC3 (uses base+ability+buff values, but not str/int)
Core: Updated regen to apply negative values at full hp/mp
Core: Updated the generic stun buff to work with state mods
Fixes
AB: Added try/catch to ability loading so one bad file won't always cause others to fail
AB: Fixed stun to remember the previous action
AB: Updated Point Target Simple to properly perform onAdd actions
AB: Changed targeting checks to not fail when channeling. May need future revision
AB: Updated base abilities to properly load animation tags
AB: Added a cast sound to Mana Shield
AB: Updated Flamestrike to properly damage trees/debris
Core: Fixed crit text not appearing on misses for splash attacks
Core: Fixed AOE size for splash attacks that don't have a small damage area
Core: Fixed attack sounds for melee misses
Core: Fixed miss text appearing for splash missiles
Core: Hacked the miss text to appear by using the crit formatting
Core: Prevent dead units from taking damage
Updates from v0.3 to v0.4: Major ability refactor Support for Item abilities with separate cooldowns Transformations Added! Pairing Abilities!
Features:
AB: Refactored core abilities to majorly reduce duplicated code.
AB: Refactored several abilities off of Simple types to standardize abilities
AB: Added new spell type for Pairing spells (such as mount hippogryph) where two+ units have paired spells that they use on each other
AB: Implemented Mount Hippogryph/Pick Up Archer and Sacrifice using the Pairing type
AB: Added functions allowing for unit transformations
AB: Implemented Bear Form, Storm Crow Form, Burrow, Corporeal Form, Ethereal Form, Destroyer Form, and Metamorphosis as examples of transformation spells
AB: Implemented Militia/Call to Arms as an example of combining Pairing and Transformation functions
AB/Core: Added methods to link abilities back to the items that added them
AB: Abilites now respect item cooldown groups, ignore cooldown flags, and faster casting for item abilities
AB: Updated spells to show cast AOE indicators. Added flag to override this indicator for AOE spells that don't show it, like Impale
AB: Added stat buffs for max HP/max MP increases
AB: Updated base spells with onOrderIssued actions, allowing to run functions before the behavior begins
AB: Updated timers to have an onBuffExpire method that only runs when the buff times out
AB: Added config flag for spells that require a cast time to deactivate a toggle
AB: Added config flags to override area, range, cooldown, mana cost, and tooltip text
AB: Deprecated some of the unused base spells
Core: Updated ability icons to show Gold/Lumber/Food costs and remaining charges
Core: Implemented cannot drop/cannot pick up flags on inventory, though with differences from War3 error timings
Core: Added minimap icons for gold mines, neutral buildings, and heros
Core: Updated minimap unit display to allow distinguishing between units and buildings (plus adjusted icon sizes)
Core: Implemented special training type for Sacrifice
Core: Implemented Ethereal functionality (still need to disable physical spells)
Core: Added methods to modify unit tinting/alpha values
Core: Modified the methods that change unit types to avoid issues with Hero stats
Core: Added flag on behaviors to indicate that the behavior cannot be interrupted
Core: Updated inventory to drop items when removed (to match Druid of the Talon dropping items on transform)
Fixes
Updates from v0.4 to v0.5: Implemented Ability Requirements! Refactored Passive abilities!
Fixes
Updates from v0.5 to v0.6: Implemented Autocasting! Major Fog of War Improvements! Overhauls for Ethereal and Magic Immunity.
Features:
Core: Added autocasting of abilities Updated Repair, Moon Well, and Kaboom! with autocasting Added support for default-autocast abilities ** Implemented multiple types of autocast targeting
AB: Added features required for abilities to autocast Implemented Curse, Faerie Fire, Inner Fire, Essence of Blight, Spirit Touch, and Heal to demonstrate Autocasting Updated Slow and Raise Dead type abilities with Autocasting
Core: Massive revamp to Fog of War. Added Fog of War to the minimap, and hid units in fog of war Updated shape to closely match War3. Added respect for terrain height. Added handling of corners to match war3 Destructables with an occlusion height now block LOS Added reveal of attacking/casting enemies Added reveal of dying units to owner/killer Increased fog of war resolution to bring it closer to War3
AB: Added functions to give vision with abilities ** Implemented Faerie Fire to demonstrate
AB: Implemented Silence, Banish, Ethereal, Magic Immune, and Resistant Skin
AB: Added override flags to set physical or universal spells, and updated old abilities with Physical setting
Core: Updated all abilities with Physical and Ultimate flags. Added a type to distinguish different types of abilities apart
Core: Added state mods for disabling spells or specific types of attacks
Core: Updated attack settings for magic immunity
Core: Improved Patrol to allow multiple patrol points, but still needs another refactor to properly consider other actions in queue
Core: Added missing based on height
Core: Disable non-universal passives during upgrades
Core: Added fading to the hero icons on the minimap, and enemy color for enemy heros
Fixes: