1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. Gather 'round - the 20th Icon Contest Poll is out.
    Dismiss Notice
  5. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Unit Fusion

Submitted by loktar
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
  • Fuse a unit with another selected unit of the same type
  • Damage and death are shared among the fusing units
  • Create a new unit of any type after fusion
  • Should work on any patch
Take a look at [GUI-Friendly] Unit Fusion System for something with many more options and possibilities.

Configuration Variables:
FuseAbil Ability Code Ability that starts the fusion. Can be any non-target ability.
FuseAbilChan Ability Code Must be a Channel ability. Use the following settings:
-Disable Other Abilities: True
-Follow Through Time: how long the fusion process takes
-Options: None
-Target Type: Instant
-Order String - Use/Turn On: channel
FusedAnim String Animation for the fused unit to play after fusion. Leave empty to play no animation.
FusedSfx String Special effect created on the fused unit. Leave empty to create no effect.
FusedUnit Unit-Type Unit type of the fused unit.
FuseHashtable Hashtable
FuseImmune Boolean Whether to make the fusing units magic immune during the fusing process.
FuseRange Real Maximum range for target unit to fuse with.
FuseSfx String Special effect to create between the fusing units during the fusion process.


2020-10-24
- Fixed death/damage triggers never being destroyed

2020-10-21
- Made some improvements/fixes
Contents

Unit Fusion (Map)

  1. SinisterLuffy

    SinisterLuffy

    Joined:
    Apr 8, 2020
    Messages:
    99
    Resources:
    0
    Resources:
    0
    Not to dampen your efforts, Unit Fusion System pretty much covers all there is to unit fusion without arbitrary limits.
     
  2. loktar

    loktar

    Model Reviewer

    Joined:
    Nov 2, 2004
    Messages:
    1,549
    Resources:
    49
    Models:
    22
    Icons:
    20
    Packs:
    1
    Tools:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    49
    Didn't know about that. But made this for someone else, thought I might as well post it :p
    Guess this could still be useful for people who want something simple and don't need more than this.
     
  3. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,545
    Resources:
    9
    Models:
    1
    Icons:
    2
    Maps:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    9
    Releasing a short review:

    Spell Review:



    The mechanics of the Unit Fusion spell appear to be quite similar to [GUI-Friendly] Unit Fusion System, albeit with a lot of restrictions (unit fusion mechanic is restricted to one spell). There isn't much to say here.

    Code:


    • The filter condition may appear to be wrongfully stated; it checks if the level of the base spell is greater than 0 instead of checking if the spell is being cast.

    • The spell generates a lot of objects. This is likely prone to memory leaks as a result. Try to minimize the amount of generated objects in the pre-fusion process.

    • A timer can be used directly instead of leaving the callback to a trigger. This is prominent in (Fuse__AdjustDamage_Conditions).

    • This spell could benefit a lot more from an OOP approach. (The way instances are generated support a strong data structure).

    Rating:



    Due to the existence of a generalized Unit Fusion System, as well as the above points,
    I'll have to move this to Substandard
     
  4. loktar

    loktar

    Model Reviewer

    Joined:
    Nov 2, 2004
    Messages:
    1,549
    Resources:
    49
    Models:
    22
    Icons:
    20
    Packs:
    1
    Tools:
    3
    Spells:
    2
    Tutorials:
    1
    Resources:
    49
    Thanks for the review.

    This is as intended, it checks if the casting unit has the spell before continuing to the conditions. Maybe this is unnecessary?

    Hmm, I don't think I can eliminate any objects, but I'll review the code. I tried to be thorough in plugging any leaks though.

    Right, I'll change that.

    I wanted to keep this strictly JASS (no vJASS), so unfortunately no OOP approach available.
     
    Last edited: Nov 5, 2020