Skip to content

Adjustable Behaviors v0.10#100

Open
Glasislundr wants to merge 51 commits intoRetera:mainfrom
Glasislundr:main
Open

Adjustable Behaviors v0.10#100
Glasislundr wants to merge 51 commits intoRetera:mainfrom
Glasislundr:main

Conversation

@Glasislundr
Copy link
Copy Markdown
Contributor

Adjustable Behaviors v0.10

Main Features

  • Major Refactors
    • Most notable changes are:
      • Moving Damage to a single class
      • Adding the DataStore classes to wrap the Map used for storing AB data
      • Updated how CastId is tracked, and included a change to track the spell level of a cast instance rather than using the current spell level (spells will not change data values if you level the spell during an effect/buff duration)
      • Unified all uses of ABCondition and ABBooleanCallback
    • Also change the AB name to mean "Adjustable Behaviors" to support the intention of adding a "Research Builder" in the near future

Refactor Details

  • AB is now AdjustableBehaviors
    • AbilityBuilder name still used for ability sections
    • Planning to add ResearchBuilder (UpgradeBuilder?) for functional researches
  • Damage
    • Refactored damage into a single object that handles modifications and calculations
    • Removed excess classes related to damage listeners
    • Removed Final Damage Taken Modification listeners, as they no longer serve a purpose that Damage Taken Modification listeners cannot
    • Fixed Mana Shield bug that inverted the mp-to-hp data field value
    • Updated damage types for existing abilities
  • Data Stores
    • Created new LocalDataStore and GlobalDataStore classes
    • LocalDataStore wraps the previous Map to allow for easier modifications in the future
    • GlobalDataStore will be used in rare cases (Spirit Link) for commonly available values
  • CastId
    • Important: Updated how abilities track the level; cast instances will now remember the level of the ability when cast (and won't update after casting)
    • Added CastId constants for starting values and a reserved non-instance value
    • Changed non-instance calls (such as costs for the ability icon) to use the non-instance constant castId
    • Updated combination of Key+castId to consistently use the combineKey function
  • ABBooleanCallback and ABCondition Unification
    • Removed ABCondition and had ABBooleanCallback take over its place
    • Kept the Condition folders, as there's enough items to justify the separation
  • CSimulation passing
    • With the LocalStore being a proper class, it can now hold extra data - in this case, the CSimulation
    • This allows for simplification of the AB method signatures
  • Origin Info in the LocalStore
    • Store information on the effect origin in the LocalStore allowing easier access
    • Clean up some values in ABLocalStoreKeys
    • Removed a few items referencing parents that were no longer used
  • LocalStore Gets
    • Update most LocalStore get calls to use the new class syntax rather than casts
      • This is not done for parameterized classes
  • Behavior Naming
    • A number of folders in the AB behaviors were oddly or unclearly named.
    • This refactor attempts to move classes to more reasonably named folders
  • Class Prefix
    • Standardized class names to start with AB

Minor Changes

  • Moved Visitors to their own folder
  • Moved ABLocalStoreKeys to the DataStore folder

Spell Changes

  • Added proper damage types on many spells as part of the Damage Refactor
  • Make RandomItem work like War3 (added targeting restrictions and added proper limits on result items)

Ability Builder v0.9

Main Features

  • Terrain Deformations
    • Added default AB effects for bowl/hill, ripple, and wave effects
    • Notable difference from War3: the camera follows the adjusted terrain in Warsmash
  • Dispels
  • General improvement to AB Buff handling
    • Simplified the handling of state/stat mods added by buffs
  • Cast Time overhaul
    • Now more accurately matches War3
    • Cast Time/Cast Point/Backswing Point are now properly reflected
    • Spells are now uninterruptible during the cast time/cast point
  • Implementation of a large list of spells, including summons

Major Improvements to Ability Builder

  • Transformation improvements
    • Transformations now remember the previous order, and return to it after transforming
    • Transformations now honor orders given during the transformation process properly
    • Transformations with a 0 duration now properly happen instantly
    • Transformations now send the end/finish cast events at the end of the transformation
  • Rebuild of Flame Strike
    • Due to age and complication of code, Flame Strike had numerous issues
    • Updated version vastly improves readability, and removes crashes
    • Added damage limitation to prevent taking damage from multiple stacked flame strikes
  • Added functions for abilities to create UberSplats
  • Added AB actions to interact with Destructables
  • Made notable improvements to how AB loops (for/periodic) work
    • Added unique setting to For loops, allowing nesting
    • Allowed the periodic action to run multiple times if the delay is less than 1 Turn Tick
    • Periodic Action now determines the next tick after running actions rather than before. This allows the actions to modify the delay duration
    • Added an action to reset the periodic time for a given periodic loop
  • Added AB support for lists (though currently limited in types)
  • Refactor of all buffs to use the statBuffs and stateMods fields to simplify the process of tracking effects on timed buffs
    • Added lists of state and stat buffs on AB Timed Buffs, that automatically add/remove with the buff
    • Reduces the Add/Remove action calls
    • Allows the buff to track the correct references to remove without having to store them manually
    • Changes the dynamic of onLevel actions to recreate buffs rather than modify. This prevents cases of changing the effects of active buffs by leveling the spell
  • Another set of fixes to how Ability Builder abilities play cast animations (should be right this time)
    • Plays STAND CHANNEL during the cast time
    • Plays SPELL once and queues STAND for normal cast
    • Continuously plays SPELL CHANNEL while channeling

Minor Improvements to Ability Builder

  • High-level improvements and additions
    • Upgrade to Damage Area type functions to allow for more control
    • Added reusable methods for bouncing projectiles and chain effects
    • Added "Group Effects" which create many small VFX in an area (for Flame Strike/Death&Decay/+)
  • Animation Improvements
    • AB behavior now properly forces cast animation on first call
    • Updated behavior to play channel animation continuously
    • Added action for queuing animations, and added that to Avatar to prevent animation freeze after the morph animation
  • Item-related
    • AB behavior now runs actions in begin method for powerup items (as they never reach the update method)
    • Added methods to allow Items to update their model
  • Configuration Options
    • Added setting to override the AOE cursor size (rather than just turning it off)
    • Added option to ignore cast time for abilities that use the field for other purposes
    • Added some functions to help control how abilities send cast events for triggers
    • New config options allow adding or removing targets allowed
  • Internal Function Improvements
    • Updated internal calls to track whether the ability was autocast
    • Added enums for Target Types and Movement Types
    • Added check for whether buffs are positive/negative and ally/enemy
    • Added function to change unit appearance without changing abilities
    • Added flags to let units change model without changing portrait
    • Added functions to read ability data fields that hold lists of ids
    • Updated AB Buffs to have more types of buffs support Unique Values
    • Added actions to create locations from xy-offsets in addition to dist-angle offsets
    • Non-collision projectiles can now get the current location on hit
    • Abilities tagged as dispels can bypass limited magic immunity
    • Added source ability/unit to buffs, so the origin can be determined
  • Almost Bugs
    • Fixed Transforms and summons not showing a timed life bar when the buff id was missing
    • Added stacking to Dust of Appearance so multiple players can reveal a unit at the same time
    • Modified AOE damage effects to apply extra effects first. This avoids adding buffs after a unit dies
    • Fixed issue with integer equality conditions
    • Added kill method for timers that prevents further actions (even if called by another timer in the same tick)

Minor Improvements to Core

  • Unit Functionality
    • Updated stop to allow animations from other behaviors to play (may need more testing to find edge case issues)
    • Added min/max speed on units
    • Units with shared control can now be ordered with right-click
    • Enemy heroes now also show the player name
    • Critter race units owned by players will now only play voice lines for the owner
    • New state modes for Polymorph, Disable Minimap Icon, and False Ownership
    • Stat Buffs now use the largest absolute value rather than the highest value. This is good for debuffs (as now lower level debuffs won't override higher level ones) but could lead to confusing interaction if a positive and negative buff share stacking keys for some reason
    • Added limited magic immunity to prepare for AMS
    • Updated how Inventory uses powerup items, now will not consume the item if the spell cannot be cast
  • Internal changes
    • Certain functions for creating projectiles can now properly load missile speed/homing settings from abilities and buffs
    • Added spell effects that attach to destructables (for sentinel)
    • Can now spawn sound effects at X/Y rather than only on unit
    • Unit Type now loads tileset data and special flag
  • JASS Changes
    • Improvement to appearance of TextTags, putting the velocity closer to War3
    • Minor change to the StartTrigger Jass action, allowing it to restart a running Trigger
    • Added JASS functions for using items
  • Almost Bugs
    • Fixed old change that removed the Interrupted flag from being sent to behaviors
    • Fixed minor logic issue in Neutral targeting from v0.8

Major Fixes to core Features

  • Spell Effects will no longer play death animations twice
  • Newly created destructables will not appear solid black

Spell Changes

  • Flame Strike major rework (see above)
  • Carrion Beetles now properly stops autocasting at unit limit
  • All Transformation spells had improvements, particularly if duration is 0
  • No-Cast time spells fixed (most notably Parasite)

Spell Implementations

  • Attack Mods
    • Boiling Oil (as it's based on Flame Strike)
  • Dispels
    • Dispel Magic/Disenchant/Item Dispel Magic
    • Detonate
    • Purge
    • Item Lightning Purge
    • Abolish Magic
    • Devour Magic
  • Deforms
    • Shockwave
    • Thunder Clap/War Stomp/Creep Thunder Clap
    • Earthquake
    • Volcano
  • Summons
    • Water Elemental/Watery Minion/Spirit of Vengeance/Summon Eagle/Summon Quillbeast/Summon Bear
    • Mechanical Critter
    • Feral Spirit/Spirit Troll
    • Phoenix
    • Place Mine
    • Healing Ward
    • Serpent Ward
    • Sentry Ward
    • Stasis Trap
    • Inferno
    • Dark Portal
    • Rain of Chaos
    • Tornado (though several of the tornado auras are still missing)
    • Spawn Spiders/Spawn Spiderlings/Spawn Skeletons
  • Chains
    • Chain Lightning
    • Healing Wave
  • Dispels
    • Item Chain Dispel (despite the name, it's a bouncing projectile)
  • Other
    • Polymorph/Hex
    • Random Item (cannot currently target items in an inventory)
    • Frenzy

Ability Builder v0.8

Main Features

  • Added Attack Modifications
    • Modifications can change art and other projectile settings
    • Modifications can add Pre- and Post- damage listeners
    • Modifications can block each other to prevent multiples from applying
    • Attacks can be launched with a locked Modifier (Arrow abilities)
  • Compatibility for abilities can now be configured from the warsmash.ini file
    • The default file has been updated to include a setting to load Locust in comptibility mode, due to how it is used by triggers in many old systems

Minor Improvements to Ability Builder Features

  • Added defaults to some actions/callback where we can assume the caster/ability
  • Beginning to look at standardization of some older actions (such as changing 'targetUnit' to 'unit')
  • Added Inline Conditionals for simple types
  • Added actions to invoke other abilities or attacks
  • Added ability to create and use Widget Events (based on Trigger events)
  • Added iteration with sorting, so iteration can start from the closest units
  • Added a variety of AOE damage actions, with different options for different types of falloff
  • Added new actions for other new features noted here (attack modifiers, click disable, unique flags/values)
  • Properly added Item callbacks (they were present, but not registered)
  • Allow isValidTarget checks to return false on a null target (for attack ground)
  • Updated buff stacking to allow more control over what buffs stack and what don't
  • Added a projectile setting on WeaponTypes, to distinguish between those that have traveling projectiles

Minor Improvements to Core Features

  • Added new state mods for:
    • Enabling Attacks (orbs)
    • Paused (be careful using this on normal buffs, as they won't tick)
    • Unselectable (has a mask of player IDs to determine who cannot select)
    • Untargetable (has a mask of player IDs to determine who cannot target)
    • Unenumable (not included in area enums)
    • Disable All (combines attack/move/spells)
    • Disable Move
    • Block Repair (repair/Human build)
    • Block Training (unit/research)
    • Block Construction (build/upgrade)
  • Updated Stun state mod with an option to not modify animations during stun (value >1)
  • Added New Damage Flags
    • Allow Summon-only damage to damage invulnerable summons if the constant is set
    • Added Nonlethal flag for damage that cannot kill a unit
  • Allowed Invulnerable units to die from damage or setting life to 0
  • Added Neutral targeting (previously missing from canBeTargetedBy)
  • Added autocast type FARTHESTVALID for Parasite, which has different logic than others
  • Added event hooks for Construction Cancel and Upgrade Start/Cancel/Finish
  • Added Upgrades Changed to the Unit State Listener
  • Improved handling of Artillery attacks
    • No longer sets the target to a point (as attack modifications want to check the target unit)
    • The Attack Settings can now hold values needed for tracking features that previous depended on those settings
      • Specifically, the impactZ of the projectile
    • Added ALINE in a few places that were only checking for ARTILLERY
    • Updated the Accuracy Check to allow other effects on Artillery misses (same for missile splash)
  • Added "ClickDisable" for abilities, that shows a disabled icon, but doesn't disable the function of the ability (for black arrow bonus)
  • Added Unique Flags and Unique Values on Abilities/Buffs/Units, which allow external functions to set arbitrary values
  • Added Visibility Groups for buffs. Buffs in a group will only display a single icon.
  • Added vision modifier for projectiles, for specific spells (such as sentinal)
  • Added priorities to post-damage listeners

Spell Implementations

  • Attack Modifications
    • Critical Strike (rewritten to use proper functions this time)
    • Wind Walk (properly working now)
    • Autocast Arrows
      • Searing Arrows
      • Orb of Annihilation
      • Black Arrows
      • Cold Arrows
      • Incinerate (and the passive)
      • Poison Arrows
    • Items
      • Mask of Death
      • Orb of Corruption
      • Orb of Frost
      • Orb of Freezing (unused)
      • Orb of Fire
      • Orb of Lightning (Old) (not working as Purge is not implemented)
      • Orb of Venom
      • "Orb of Spell Bonus"
        • Orb of Darkness
        • Orb of Slow
        • Orb of Lightning (not working as Purge is not implemented
    • Low Priority
      • Corrosive Breath
      • Freezing Breath
      • Liquid Fire
      • Feedback
      • Envenomed Spears/Slow Poison/Poison Sting
      • Flack Cannons
      • Frag Shards
      • Barrage
      • (Still Missing - Burning Oil, due to complication of the damage AOE effect)
    • Lowest Priority
      • Lightning Attack
      • Plague Cloud (Meat Wagon) (the cloud doesn't have a damage aura yet though)
      • Frost Attack/Frost Breath
      • Spider Attack
    • Post-damage Splash
      • Pulverize
      • Cleaving Attack (currently based on post-armor damage rather than pre-armor damage)
  • Post-Death Summons
    • Black Arrow (used by Orb of Darkness)
    • Doom
    • Parasite
  • Transformations
    • Phoenix Morphing (Egg Related)
  • Passives
    • Locust
    • (updated Truesight abilities to disable while a building is being constructed)
  • Do-Nothings
    • Flying Machine Bombs
    • Storm Hammers
    • Moon Glaive
    • Vorpal Blades

Known Issues:

  • Cleaving Attack is using post-armor damage, not pre-armor damage
  • Orb of Venom behaves oddly if the orb is dropped while an attack is in flight
  • Orb of Lightning is not working, as Purge is not implemented
  • AB use of cast time is a bit off from the real game

Ability Builder v0.7

Lots of refactors, improvements, and internal features.

Features:

  • Ability Builder Inheritance Added!

    • AB: Added INHERIT type of spell that inherits from another spell, overriding parts of the parent ability.
    • AB: Set up system of internal method definitions that can be reused in the spell (that can also be individually overridden by child spells)
      • AB: Added ReuseActions and ReuseCallbacks. These can be invoked (with arguments if needed) repeatedly in a spell to simplify large spells. They are similar to subroutines, but subroutines are defined during execution, while reuse methods are defined at startup
    • AB: Reworked several spell definitions to use Reusable actions and callbacks
      • Transformations all inherit base functionality now, only making minor adjustments
      • Rejuvination (and ItemRejuv) massively simplified with reuse actions and inheritance
      • Magic Defense now inherits nearly everything from Defend
      • Spirit Touch now inherits from Essence of Blight, overriding the heal with mana restore
  • Ability and Buff flags added and modified

    • Core: Refactored abilities to split the isMagic and isPhysical values. Non-spell abilities often are neither
    • AB: By default, Physical spells are non-magic. This can be specifically overridden if needed
    • Core: Added Hero, Aura, Physical, and Magic as flags for buffs
    • Core: Updated buff tooltips to show green/red for positive/negative, and to show the spell level for leveled spells
    • AB: Updated existing spells with negative and dispellable flags
    • AB: Started setting up functions for dispelling buffs and damaging summoned units
    • AB: Set healing spells to be universal (allows casting on magic immune)
    • AB: Updated flag storage to consolidate in a single int flags field
  • Major Improvements and Fixes for Transformations!

    • AB: Updated transformation buffs to turn heroes back on death
    • AB: Updated Chaos to add health and mana rather than keeping the original ratio
    • Core: Updated transformations to properly handle upgrades
    • Core: Updated transformations to not swap hero abilities when changing between hero types
    • Core: Updated transformations to hide hero abilities when changing from hero -> non-hero and restore them when changing back
    • Core: Updated transformations to avoid messing up HP in certain scenarios
    • AB: Added checks for flying units that can't land on water/cliffs
  • Refactor of damage methods to pass in flags

    • Core: Refactored to a new method of passing in flags for damage (isAttack/isRanged)
    • Core: Refactored damage and attack types to define whether they are magic or physical to simplify Magic Immune and Ethereal checks
    • Core: Added new damage flags for ignoring invulnerable and for explodes on death
    • Core: Updated artillery attacks to cause units to explode on death
    • Core: Moved the Magic Immune and Ethereal checks earlier in the damage method, so the unit won't react to immune hits
    • Core: Updated Ethereal damage table to load all values. These are rarely relevant, but can be used in a few edge cases with triggered damage
    • Core: Remove armor calculation for buildings under construction
  • Quick refactor to combine ABCondition and ABBooleanCallback

    • AB: ABCondition is now a subclass of ABBooleanCallback and can be used in any boolean callback
  • Quick Refactor of And and Or conditions to use lists

    • AB: Refactor the And/Or calls to take a list of conditions rather than a 1/2
  • Quick Refactor to Invisibility to allow non-transparent invis

    • Core: Invis flag 1 is used for transparency, higher flags like 2 will be invisible but not transparent
    • AB: Updated Burrow to use invis flag 2
  • Quick Refactor to pass Autocast information into order and spell methods

    • Core: Pass autocast info into main spell actions. Allows detecting of when a spell was autocast vs regular cast
    • Core: Created Autocast type for spells that don't actually autocast, but just perform an action when autocast turns on and off
  • Minor Improvements

    • Core: Added upgrade tracking on units, so they can avoid applying the same upgrade twice
    • Core: Updated hero name logic, so multiple names are used and heros changing unit type also change names
    • AB: Updated disabled spells to still show cooldowns
    • AB: Added Inline Condition callbacks and missing stored callbacks
    • AB: Update If to null-check the branches
    • AB: Added pathing type-related checks
    • Core: Added StatBuff types for hero stats
    • Core: Added gameplay constants for default slows
    • Core: Added functions for modifying unit sizes, though without a transition period
    • AB: Updated AB spells to reflect unit cast points
    • AB: Added ability to override the cast time of a spell
    • AB: Updated Essence of Blight and Spirit Touch to override the cast time (as it is used for the # of targets)
    • Core: Partial work on ongoing action ability notifications (mostly on builds and harvests)
    • AB: Removed deprecated simple classes
    • AB: Add double heal prevention (though the timing needs work)

Spell Implementations:

  • Chemical Rage
  • Robo-goblin
  • Submerge
  • Berserk
  • Avatar
  • Unholy Frenzy
  • Frost Armor
  • Bloodlust
  • Divine Shield
  • Cripple
  • Howl of Terror
  • Soul Burn
  • Hero Attribute Bonus
  • Split Item Rejuvenation out from Night Elf Rejuvenation

Glasislundr and others added 30 commits December 31, 2024 03:23
…ve, Dispellable)

* Core: Updated buff tooltips to show green/red for positive/negative, and to show the spell level for leveled spells
* AB: Updated existing spells with negative and dispellable flags
* AB: Add double heal prevention (though the timing needs work)
* AB: Set healing spells to be universal (allows casting on magic immune)
* AB: Updated AB spells to reflect unit cast points
* AB: Added ability to override the cast time of a spell
* Core: Partial work on ongoing action ability notifications (mostly on builds and harvests)
* AB: Refactor the And/Or calls to take a list of conditions rather than a 1/2
* AB: ABCondition is now a subclass of ABBooleanCallback and can be used in any boolean callback
* Core: Refactored to a new method of passing in flags for damage (isAttack/isRanged)
* Core: Added new damage flags for ignoring invulnerable and for explodes on death
* Core: Updated artillery attacks to cause units to explode on death
…k/damage types to delineate magic/physical

* Core: Refactored abilities to split the isMagic and isPhysical values. Non-spell abilities often are neither
* Core: Refactored damage and attack types to define whether they are magic or physical to simplify Magic Immune and Ethereal checks
* Core: Moved the Magic Immune and Ethereal checks earlier in the damage method, so the unit won't react to immune hits
* AB: By default, Physical spells are non-magic. This can be specifically overridden if needed
…Dispel

* Core: Added Hero, Aura, Physical, and Magic as flags for buffs
* AB: Started setting up functions for dispelling buffs and damaging summoned units
* AB: Updated flag storage to consolidate in a single int flags field
…to abilitybuilder_merge

# Conflicts:
#	core/src/com/etheller/warsmash/parsers/jass/Jass2.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/CItem.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/CUnit.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/CWidget.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/ability/ABActionActivateToggledAbility.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/ability/ABActionDeactivateToggledAbility.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/ability/ABActionSetAbilityCastRange.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreatePassiveBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreateTimedArtBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreateTimedBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreateTimedTickingBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreateTimedTickingPausedBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/buff/ABActionCreateTimedTickingPostDeathBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/destructable/ABActionCreateDestructableBuff.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/destructable/ABActionDamageDestructable.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/structural/ABActionIf.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/structural/ABActionIterateUnitsInRangeOfLocationMatchingCondition.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/structural/ABActionIterateUnitsInRangeOfUnitMatchingCondition.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/structural/ABActionWhile.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/action/unit/ABActionDamageTarget.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/ability/ABConditionIsToggleAbilityActive.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/logical/ABConditionAnd.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/logical/ABConditionNot.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/numeric/ABConditionFloatEqual.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/numeric/ABConditionFloatGt.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/numeric/ABConditionIntegerLt.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/unit/ABConditionIsUnitEnemy.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/unit/ABConditionIsUnitMaxHp.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/behavior/condition/unit/ABConditionIsUnitMaxMp.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/abilitybuilder/core/ABCondition.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/behaviors/harvest/CBehaviorWispHarvest.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/combat/CAttackType.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/data/CAbilityData.java
* Core: Invis flag 1 is used for transparency, higher flags like 2 will be invisible but not transparent
* AB: Updated Burrow to use invis flag 2
* AB: Updated Essence of Blight and Spirit Touch to override the cast time
* Core: Originally only loaded magic/spell ethereal damage ratios, now loads all
Added function for abilities to inherit from each other, overriding parts of the parent ability. Also set up system of internal method definitions that can be reused in the spell (that can also be individually overridden by child spells)

* AB: Addition of INHERIT type that inherits function for the parent spell
* AB: Added ReuseActions and ReuseCallbacks. These can be invoked (with arguments if needed) repeatedly in a spell to simplify large spells. They are similar to subroutines, but subroutines are defined during execution, while reuse methods are defined at startup
* AB: Reworked several spell definitions to use Reusable actions and callbacks
** Transformations all inherit base functionality now, only making minor adjustments
** Rejuvination (and ItemRejuv) massively simplified with reuse actions and inheritance
** Magic Defense now inherits nearly everything from Defend
** Spirit Touch now inheritcs from Essence of Blight, overriding the heal with mana restore
* AB: Minor: treat all ABBooleanCallbacks as ABConditions for clarity
* AB: Added Robo-goblin and Chemical Rage
* AB: Updated Chaos to add health and mana rather than keeping the original ratio
* AB: Updated transformation buffs to turn heros back on death
* AB: Updated disabled spells to still show cooldowns
* AB: Update If to null-check the branches
* Core: Added upgrade tracking on units, so they can avoid applying the same upgrade twice
* Core: Updated hero name logic, so multiple names are used and heros changing unit type also change names
* Core: Updated transformations to properly handle upgrades
* Core: Updated transformations to not swap hero abilities when changing between hero types
* Core: Updated transformations to hide hero abilities when changing from hero -> non-hero and restore them when changing back
* Core: Updated transformations to avoid messing up HP in certain scenarios
* Core: Added StatBuff types for hero stats
* Core: Pass autocast info into main spell actions. Allows detecting of when a spell was autocast vs regular cast
* Core: Created Autocast type for spells that don't actually autocast, but just perform an action when autocast turns on and off
* AB: Added Inline Condition callbacks and missing stored callbacks
* AB: Added pathing checks
* AB: Removed deprecated simple classes
* AB: Implemented Submerge

* Core: Fixed logic issue with hero name change
* Core: Added gameplay constants for default slows
* Core: Added functions for modifying unit sizes, though without a transition period
* AB: Changed some boolean callbacks to conditions
* AB: Made updates to magic/phsyical settings on abilities and buffs
* AB: Implemented many active buff and debuff spells
** Avatar, Unholy Frenzy, Frost Armor, Bloodlust, and Divine Shield
** Cripple, Howl of Terror, and Soul Burn

* Core: Fixed issue with hero bonus stats
**Main Features**
- Added Attack Modifications
   - Modifications can change art and other projectile settings
   - Modifications can add Pre- and Post- damage listeners
   - Modifications can block each other to prevent multiples from applying
   - Attacks can be launched with a locked Modifier (Arrow abilities)
- Ability Builder core feature improvements
   - Inheritance
      - Abilities can inherit from other definitions.
      - Anything defined in the inheritor will overwrite the inherited data
   - Reuse Actions/Callbacks
      - Subfunctions that can be called repeatedly (with arguments if needed)
      - Inheriting abilities can overwrite specific Reuse actions without overwriting others
- Compatibility for abilities can now be configured from the warsmash.ini file
   - The default file has been updated to include a setting to load Locust in comptibility mode, due to how it is used by triggers in many old systems

**Minor Improvements to Ability Builder Features**
- Added defaults to some actions/callback where we can assume the caster/ability
- Beginning to look at standardization of some older actions (such as changing 'targetUnit' to 'unit')
- Added Inline Conditionals for simple types
- Added actions to invoke other abilities or attacks
- Added ability to create and use Widget Events (based on Trigger events)
- Added iteration with sorting, so iteration can start from the closest units
- Added a variety of AOE damage actions, with different options for different types of falloff
- Added new actions for other new features noted here (attack modifiers, click disable, unique flags/values)
- Properly added Item callbacks (they were present, but not registered)
- Allow isValidTarget checks to return false on a null target (for attack ground)
- Updated buff stacking to allow more control over what buffs stack and what don't
- Added a projectile setting on WeaponTypes, to distinguish between those that have traveling projectiles

**Minor Improvements to Core Features**
- Added new state mods for:
   - Enabling Attacks (orbs)
   - Paused (be careful using this on normal buffs, as they won't tick)
   - Unselectable (has a mask of player IDs to determine who cannot select)
   - Untargetable (has a mask of player IDs to determine who cannot target)
   - Unenumable (not included in area enums)
   - Disable All (combines attack/move/spells)
   - Disable Move
   - Block Repair (repair/Human build)
   - Block Training (unit/research)
   - Block Construction (build/upgrade)
- Updated Stun state mod with an option to not modify animations during stun (value >1)
- Added New Damage Flags
   - Allow Summon-only damage to damage invulnerable summons if the constant is set
   - Added Nonlethal flag for damage that cannot kill a unit
- Allowed Invulnerable units to die from damage or setting life to 0
- Added Neutral targeting (previously missing from canBeTargetedBy)
- Added autocast type FARTHESTVALID for Parasite, which has different logic than others
- Added event hooks for Construction Cancel and Upgrade Start/Cancel/Finish
- Added Upgrades Changed to the Unit State Listener
- Improved handling of Artillery attacks
   - No longer sets the target to a point (as attack modifications want to check the target unit)
   - The Attack Settings can now hold values needed for tracking features that previous depended on those settings
      - Specifically, the impactZ of the projectile
   - Added ALINE in a few places that were only checking for ARTILLERY
   - Updated the Accuracy Check to allow other effects on Artillery misses (same for missile splash)
- Added "ClickDisable" for abilities, that shows a disabled icon, but doesn't disable the function of the ability (for black arrow bonus)
- Added Unique Flags and Unique Values on Abilities/Buffs/Units, which allow external functions to set arbitrary values
- Added Visibility Groups for buffs. Buffs in a group will only display a single icon.
- Added vision modifier for projectiles, for specific spells (such as sentinal)
- Added priorities to post-damage listeners

**Spell Implementations**
- Attack Modifications
   - Critical Strike (rewritten to use proper functions this time)
   - Wind Walk (properly working now)
   - Autocast Arrows
      - Searing Arrows
      - Orb of Annihilation
      - Black Arrows
      - Cold Arrows
      - Incinerate (and the passive)
      - Poison Arrows
   - Items
      - Mask of Death
      - Orb of Corruption
      - Orb of Frost
      - Orb of Freezing (unused)
      - Orb of Fire
      - Orb of Lightning (Old) (not working as Purge is not implemented)
      - Orb of Venom
      - "Orb of Spell Bonus"
         - Orb of Darkness
         - Orb of Slow
         - Orb of Lightning (not working as Purge is not implemented
   - Low Priority
      - Corrosive Breath
      - Freezing Breath
      - Liquid Fire
      - Feedback
      - Envenomed Spears/Slow Poison/Poison Sting
      - Flack Cannons
      - Frag Shards
      - Barrage
      - (Still Missing - Burning Oil, due to complication of the damage AOE effect)
   - Lowest Priority
      - Lightning Attack
      - Plague Cloud (Meat Wagon) (the cloud doesn't have a damage aura yet though)
      - Frost Attack/Frost Breath
      - Spider Attack
   - Post-damage Splash
      - Pulverize
      - Cleaving Attack (currently based on post-armor damage rather than pre-armor damage)
- Post-Death Summons
   - Black Arrow (used by Orb of Darkness)
   - Doom
   - Parasite
- Transformations
   - Phoenix Morphing (Egg Related)
- Passives
   - Locust
   - (updated Truesight abilities to disable while a building is being constructed)
- Do-Nothings
   - Flying Machine Bombs
   - Storm Hammers
   - Moon Glaive
   - Vorpal Blades

**Known Issues:**
- Cleaving Attack is using post-armor damage, not pre-armor damage
- Orb of Lightning is not working, as Purge is not implemented
- AB use of cast time is a bit off from the real game
**Main Features**
- Major overhaul to Cast Times in Ability Builder abilities.
   - Cast Time/Cast Point/Backswing Point are now properly reflected
   - Spells are now uninterruptable during the cast time/cast point
- Transformation improvements
   - Transformations now remember the previous order, and return to it after transforming
   - Transformations now honor orders given during the transformation process properly
   - Transformations with a 0 duration now properly happen instantly
   - Transformations now send the end/finish cast events at the end of the transformation
- Rebuild of Flame Strike
   - Due to age and complication of code, Flame Strike had numerous issues
   - Updated version vastly improves readability, and removes crashes
   - Added damage limitation to prevent taking damage from multiple stacked flame strikes

**Minor Improvements to Ability Builder**
- Upgrade to Damage Area type functions to allow for more control
- Added option to ignore cast time for abilities that use the field for other purposes
- Added "Group Effects" which create many small VFX in an area (for Flame Strike/Death&Decay/+)
- Added some functions to help control how abilities send cast events for triggers
- Added source ability/unit to buffs, so the origin can be determined
- Added kill method for timers that prevents further actions (even if called by another timer in the same tick)
- Some organizational improvements
- Fixed issue with integer equality conditions

**Minor Improvements to Core**
- Updated stop to allow animations from other behaviors to play (may need more testing to find edge case issues)
- Fixed old change that removed the Interrupted flag from being sent to behaviors
- Fixed minor logic issue in Neutral targeting from v0.8
- Minor change to the StartTrigger Jass action, allowing it to restart a running Trigger

**Spell Changes**
- Flame Strike major rework (see above)
- Boiling Oil added (as it's based on Flame Strike)
- Carrion Beetles now properly stops autocasting at unit limit
- All Transformation spells had improvements, particularly if duration is 0
- No-Cast time spells fixed (most notably Parasite)
…B loops!

**Main Features**
- Added functions for abilities to modify terrain
   - Implemented the three related abilities
   - Added default AB effects for bowl/hill, ripple, and wave effects
   - Notable difference from War3: the camera follows the adjusted terrain in Warsmash
- Added functions for abilities to create UberSplats
- Added AB actions to interact with Destructables
- Made notable improvements to how AB loops (for/periodic) work
   - Added unique setting to For loops, allowing nesting
   - Allowed the periodic action to run multiple times if the delay is less than 1 Turn Tick
   - Periodic Action now determines the next tick after running actions rather than before. This allows the actions to modify the delay duration
   - Added an action to reset the periodic time for a given periodic loop
- Added AB support for lists (though currently limited in types)

**Major Fixes to core Features**
- Spell Effects will no longer play death animations twice
- Newly created destructables will not appear solid black

**Minor Improvements to Ability Builder Features**
- Added lists of state and stat buffs on AB Timed Buffs, that automatically add/remove with the buff
   - This should allow for a simplification of stat buffs, and avoid cases where leveling an ability changes current buff effects (pending)
- Updated behavior to play channel animation continuously
- Modified AOE damage effects to apply extra effects first. This avoids adding buffs after a unit dies
- Updated AB Buffs to have more types of buffs support Unique Values
- Added setting to override the AOE cursor size (rather than just turning it off)
- Added actions to create locations from xy-offsets in addition to dist-angle offsets
- Non-collision projectiles can now get the current location on hit

**Minor Improvements to Core Features**
- Certain functions for creating projectiles can now properly load missile speed/homing settings from abilities and buffs
- Added spell effects that attach to destructables (for sentinal)
… cast animations.

**Major Improvements to Ability Builder Features**
- Refactor of all buffs to use the statBuffs and stateMods fields to simplify the process of tracking effects on timed buffs
   - Reduces the Add/Remove action calls
   - Allows the buff to track the correct references to remove without having to store them manually
   - Changes the dynamic of onLevel actions to recreate buffs rather than modify. This prevents cases of changing the effects of active buffs by leveling the spell
- Another set of fixes to how Ability Builder abilities play cast animations (should be right this time)
   - Plays STAND CHANNEL during the cast time
   - Plays SPELL once and queues STAND for normal cast
   - Continuously plays SPELL CHANNEL while channeling

**Fixes to Ability Builder Features**
- Fixed an issue in the last push that broke Pseudo Projectiles (Impale)
- Fixed an issue with the stateMods feature on buffs where the unit state was not recomputed

**Minor Improvements to Ability Builder Features**
- Added action for queueing animations, and added that to Avatar to prevent animation freeze after the morph animation
- Added stacking to Dust of Appearance so multiple players can reveal a unit at the same time
**Minor Improvements to Ability Builder**
- Fixed Transforms and summons not showing a timed life bar when the buff id was missing
- Added methods to allow Items to update their model
- New state modes for Polymorph, Disable Minimap Icon, and False Ownership
- Added flags to let units change model without changing portrait
- Added function to change unit appearance without changing abilities
- Created Enum callbacks for movement types, along with some related comparisons
- Added functions to read ability data fields that hold lists of ids
- Cleaned up some extra print statements

**Minor Improvements to Core**
- Added JASS functions for using items
- Unit Type now loads tileset data and special flag
- Units with shared control can now be ordered with right-click
- Enemy heros now also show the player name
- Critter race units owned by players will now only play voice lines for the owner

**Spell Implementations**
- Summons
   - Water Elemental/Watery Minion/Spirit of Vengeance/Summon Eagle/Summon Quillbeast/Summon Bear
   - Mechanical Critter
   - Feral Spirit/Spirit Troll
   - Phoenix
   - Place Mine
   - Healing Ward
   - Serpent Ward
   - Sentry Ward
   - Stasis Trap
   - Inferno
   - Dark Portal
   - Rain of Chaos
   - Tornado (though several of the tornado auras are still missing)
   - Spawn Spiders/Spawn Spiderlings/Spawn Skeletons
- Chains
   - Chain Lightning
   - Healing Wave
- Dispels
   - Item Chain Dispel (despite the name, it's a bouncing projectile)
- Other
   - Polymorph/Hex
   - Random Item (cannot currently target items in an inventory)
   - Frenzy
Glasislundr and others added 21 commits July 8, 2025 12:24
…ictions and added proper limits on result items)
* Aims to replace damage with a single object that tracks changes and modifications to damage
* Refactored damage into a single object that handles modifications and calculations
* Removed excess classes related to damage listeners
* Removed Final Damage Taken Modification listeners, as they no longer serve a purpose that Damage Taken Modification listeners cannot
* Fixed Mana Shield bug that inverted the mp-to-hp data field value
* Updated damage types for existing abilities
* Created new LocalDataStore and GlobalDataStore classes
* LocalDataStore wraps the previous Map to allow for easier modifications in the future
* GlobalDataStore will be used in rare cases (Spirit Link) for commonly available values
* With the LocalStore being a proper class, it can now hold extra data - in this case, the CSimulation
* This allows for simplification of the AB method signatures
* A number of folders in the AB behaviors were oddly or unclearly named.
* This refactor attempts to move classes to more reasonably named folders
* Standardized class names to start with AB
…tion

* Removed ABCondition and had ABBooleanCallback take over its place
* Kept the Condition folders, as there's enough items to justify the separation
* AbilityBuilder name still used for ability sections
* Planning to add UpgradeBuilder for functional researches
* Store information on the effect origin in the LocalStore allowing easier access
* Clean up some values in ABLocalStoreKeys
* Removed a few items referencing parents that were no longer used
* Important: Updated how abilities track the level; cast instances will now remember the level of the ability when cast (and won't update after casting)
* Added CastId constants for starting values and a reserved non-instance value
* Changed non-instance calls (such as costs for the ability icon) to use the non-instance constant castId
* Updated combination of Key+castId to consistently use the combineKey function
* Update most LocalStore get calls to use the new class syntax rather than casts
  * This is not done for parameterized classes
…to abilitybuilder

# Conflicts:
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/War3MapViewer.java
#	core/src/com/etheller/warsmash/viewer5/handlers/w3x/simulation/CSimulation.java
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.

1 participant