• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Spell] Diminishing Cleave

Status
Not open for further replies.
Level 3
Joined
Jul 21, 2010
Messages
31
Hello there,

I am a learning user of WE and in need of help.

I am attempting to create a cleave/splash passive with a diminishing AOE.

For example this is the character stat sheet from my design:

upload_2018-9-4_14-43-52.png


As far as I know there is no Hero Spell or Item that does this that can be turned as a passive. I have looked through this website and through google to see if I can find any help, but unsuccessful.

Any starting point or help is appreciated, thanks!
 
Level 39
Joined
Feb 27, 2007
Messages
5,037
Are you using Rain of Chaos without TFT? Pit Lord has a cleave passive just like this. In order to get the two ranges proper you will need two custom Cleaves: a 350 aoe and a 200 AoE. For each level of the skill the smaller will have to consider the damage of the larger one and have a reduced damage factor; at level one the big aoe will deal 35-20 = 15%. The smaller AoE will have a damage factor as you listed in your post. Similarly for all 3 level.

One of them should be a unit ability with the button position 0,-11 to hide it on the command card. Enter negative values there by holding shift and double clicking. When the hero levels up the hero cleave you'll need a trigger to add the unit ability cleave to it and make the new ability permanent (if level 1) or increase the level of the unit ability to match the hero ability.

Permanent-ness uses a JASS native not available using GUI: UnitMakeAbilityPermanent. Search for that on these forums and you will see how it's used. You can skip this if the hero has no morphing skill it could ever cast.
 
Level 3
Joined
Jul 21, 2010
Messages
31
Are you using Rain of Chaos without TFT? Pit Lord has a cleave passive just like this. In order to get the two ranges proper you will need two custom Cleaves: a 350 aoe and a 200 AoE. For each level of the skill the smaller will have to consider the damage of the larger one and have a reduced damage factor; at level one the big aoe will deal 35-20 = 15%. The smaller AoE will have a damage factor as you listed in your post. Similarly for all 3 level.

One of them should be a unit ability with the button position 0,-11 to hide it on the command card. Enter negative values there by holding shift and double clicking. When the hero levels up the hero cleave you'll need a trigger to add the unit ability cleave to it and make the new ability permanent (if level 1) or increase the level of the unit ability to match the hero ability.

Permanent-ness uses a JASS native not available using GUI: UnitMakeAbilityPermanent. Search for that on these forums and you will see how it's used. You can skip this if the hero has no morphing skill it could ever cast.

Thanks for that. I am using TFT WE but I was wondering if having two cleaves would have one overwrite the other and cause one to be ignored...

So am do I rightly understand that cleave damage from the passive stacks for the AOE shared?

The unit will not be using any morphing abilities so the skill will remain.

Just a final clarification I assume for levelling up the ability the trigger should remove the original and place in the new level?
 
Level 39
Joined
Feb 27, 2007
Messages
5,037
Thanks for that. I am using TFT WE but I was wondering if having two cleaves would have one overwrite the other and cause one to be ignored...
Normally this is a limitation with on-attack abilities ("orb effects") like Dark Arrow/Searing Arrows/Orb of Fire and I actually forgot about that when I posted (don't problem solve when you wake up in the morning, folks). But I just tested this and you can have two cleaves working simultaneously with different areas and different damage factors! Best guess is this is because it doesn't use a buff of any kind, but IDK; I didn't test Orb of Fire's AoE stacking. Attached is a map if you want to see. The paladin has a 100% cleave in 150 AoE and an additional 50% cleave in a 400 AoE. There are trolls to the south to attack.

As for the trigger, you only need to add it if it's the first time the skill has been leveled up; all other times you'll simply set the level of the hidden cleave to the level of the visible cleave:

  • Events
    • Unit - A unit learns a skill
  • Conditions
    • (Learned hero skill) equal to VISIBLE_CLEAVE
  • Actions
    • Set Caster = (Triggering Unit) //these variables aren't required, I just wanted to avoid some function calls
    • Set Level = (Level of VISIBLE_CLEAVE for Caster)
    • If (All conditions are true) then do (Then actions) else do (Else actions
      • If - Conditions
        • Level equal to 1
      • Then - Actions
        • Unit - Add INVISIBLE_CLEAVE to Caster
        • -------- Permanant-ifying line would go here if you need to add it in the future --------
      • Else - Actions
    • Unit - Set level of INVISIBLE_CLEAVE for Caster to Level
 

Attachments

  • teeest.w3x
    21.8 KB · Views: 87
Level 15
Joined
Aug 14, 2007
Messages
936
An added information, cleave damage is pure damage, it goes through armor even though it is a physical damage, it's damage type is not usual. Normally damage type will be something like Normal, Shadow Strike, etc... Normal applies armor but Shadow Strike does not apply armor reductions.
 
Level 3
Joined
Jul 21, 2010
Messages
31
Normally this is a limitation with on-attack abilities ("orb effects") like Dark Arrow/Searing Arrows/Orb of Fire and I actually forgot about that when I posted (don't problem solve when you wake up in the morning, folks). But I just tested this and you can have two cleaves working simultaneously with different areas and different damage factors! Best guess is this is because it doesn't use a buff of any kind, but IDK; I didn't test Orb of Fire's AoE stacking. Attached is a map if you want to see. The paladin has a 100% cleave in 150 AoE and an additional 50% cleave in a 400 AoE. There are trolls to the south to attack.

Thanks very much for this. I have not had the chance to start working it last night, but I will do today.

An added information, cleave damage is pure damage, it goes through armor even though it is a physical damage, it's damage type is not usual. Normally damage type will be something like Normal, Shadow Strike, etc... Normal applies armor but Shadow Strike does not apply armor reductions.

Thanks, I am aware that it does represent it at as pure damage which will impact me balancing this unit for my own play.

Is Shadow strike a pure physical ability? I thought it does spell damage, thought I have not spent time checking.
 
Level 12
Joined
Nov 3, 2013
Messages
989
One question, is the damage supposed to scale depending on how far away the target being hit is?

I.e. within 200 AoE it would deal 35% damage at level 1, and 20% damage in 350 aoe, but what about say 300 aoe?
I'm wondering whether or not it's supposed to be more like this:

200 aoe (or lower) -> 35%
250 aoe -> 30%
300 aoe -> 25%
350 aoe -> 20%

And of course that's just some convenient numbers, in essence every 10 units of aoe range would lower the damage with 1%, so for just a random number e.g. 234 aoe -> 35% - 3% - 0.4% = 31.6% damage splash.

In that case what you should be looking at is getting a Damage Detection System (DDS) and make this with triggers. (Though honestly you should probably still get a DDS either way.)



Otherwise the solution to simply use two (or more) cleaves is simple and effective.



Also, while Cleave does ignores armor, it doesn't ignore damage/armor types. So if your unit with cleave has say Chaos attack type it will still deal several times more damage against a unit with Divine armor than if it had another attack type than Chaos. (At least if we're going by the normal wc3 settings.)
 
Level 3
Joined
Jul 21, 2010
Messages
31
One question, is the damage supposed to scale depending on how far away the target being hit is?

I.e. within 200 AoE it would deal 35% damage at level 1, and 20% damage in 350 aoe, but what about say 300 aoe?
I'm wondering whether or not it's supposed to be more like this:

200 aoe (or lower) -> 35%
250 aoe -> 30%
300 aoe -> 25%
350 aoe -> 20%

And of course that's just some convenient numbers, in essence every 10 units of aoe range would lower the damage with 1%, so for just a random number e.g. 234 aoe -> 35% - 3% - 0.4% = 31.6% damage splash.

In that case what you should be looking at is getting a Damage Detection System (DDS) and make this with triggers. (Though honestly you should probably still get a DDS either way.)



Otherwise the solution to simply use two (or more) cleaves is simple and effective.



Also, while Cleave does ignores armor, it doesn't ignore damage/armor types. So if your unit with cleave has say Chaos attack type it will still deal several times more damage against a unit with Divine armor than if it had another attack type than Chaos. (At least if we're going by the normal wc3 settings.)


Honestly, it would be ideal if I could scale the damage as originally intended, but as essentially a noob in development it was a bit of an overreach in planning. I will look into the DDS, but do you have any basic tips in starting?
 
Level 12
Joined
Nov 3, 2013
Messages
989
I've made a new more proper post with attached map (I just downloaded the latest Damage Engine test map and made it right on that)


I realised afterwards that maybe Looking For Help's DDS won't work with the newer versions (24 players and all that), so you might have to use Bribe's Damage Engine


This one is the simplest to use imo Physical Damage Detection for GUI v1.3.0.0 but there's also Damage Engine 3.8.0.0 that's fancier and has a lot of stuff. Also it's frequently being updated. Both have a test/demo map so you can see some examples of what you can do with them.

There's some other ones as well, but besides GDD? (which you shouldn't use), I'm not sure the others have GUI versions. I admittedly haven't used any besides these 3 so I might be wrong but w/e.


Anyway, exactly how you want to go about making the cleave ability depends a bit on how you want it to work. For example, will it be a cone-type of damage area in front of the attacking unit? Or is it a circle centered around the target you attacked? (I think that's how the passive cleave works, or at least splash does, but tbh I don't remember)


But anyway, it would be something like this...


  • Events
    • Game - PDD_damageEventTrigger becomes Equal to 1.00
  • Conditions
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • PDD_damageType Equal to PDD_PHYSICAL
      • Then - Actions
        • Set cleaveLevelVar = Level of ability (Custom Cleave) for PDD_source
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • cleaveLevelVar is Greater than 0
          • Then - Actions
            • DO some shit
            • set tempGroup = units within 350 of tempPoint1
            • Unit Group - Pick every unit in tempGroup and do (Actions)
              • Loop - Actions
                • Unit - Cause PDD_source to damage tempUnit, dealing PDD_amount * damageModifier of attack type Spells and damage type Normal
                • call RemoveLocation(udg_tempPoint)
                • Else - Actions
      • Else - Actions

I was going crazy trying to write the formula for the damage with the frigging arithmetics and getting lost in GUI... (Plus fuck having no local variables)

JASS:
    local unit u = GetTriggerUnit()
    local location uPos = GetUnitLoc(u)
    local integer abilLevel = GetUnitAbilityLevel(u, 'A000' )
    local real a = I2S(abilLevel)
    local unit target
    local location targetPos
    local real distance
    local real minDist = 200.00
    local real maxDist = 350.00
    local real modifier
  
    if ( abilLevel > 0 ) then
        set target = GetEnumUnit()
        set targetPos = GetUnitLoc(target)
        set distance = DistanceBetweenPoints(uPos, targetPos)    
        if distance <= minDist then
            //within the minimum range -> cleave/splash damage = max
            set modifier = 0.25 + 0.10 * a
        else
            //From Max to Min
            //set modifier = a * 0.1 + 0.25 - ( (maxDist-distance) * (0.05 * a) + 0.1) ) / 150
            //======================================
            //From Min to Max
            set modifier = ( (distance - minDist) / 150 ) * ( 0.15 + a ) + 0.1 + a
        endif
        call UnitDamageTarget(u, target, /*udg_PDD_amount * */ modifier, true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
        call RemoveLocation(targetPos)
    endif
    call RemoveLocation(uPos)
endfunction

It's still a bit fucked cause I didn't actually have any DDS on the test map I ended up making (cause writing it directly in the forum was just impossible), and also I realised afterwards that maybe Looking For Help's DDS won't work with the newer versions (24 players and all that), so you might have to use Bribe's Damage Engine


And I kinda gave up before making any cone or anything as well so LuLz. If you can't figure out the rest I could make something more proper. (I'd probably download the latest version of Bribe's DDS)


p.s. speaking of DDS, don't forget to copy over those passive abilities and naming them properly (Or well just read the instructions)
 
Last edited:
Level 3
Joined
Jul 21, 2010
Messages
31
Thanks for that. For now I will stick to using the basic 2 levels of cleave without scaling, because I am actually collaborating on a map with a friend of mine. We both suck so we are sticking to basic, but while I am learning these I will be learning JASS as it seems to be much more useful easier to do things in WE. So I will keep these in mind for the future. It seems from a bit of reading that using a damage engine gives much more control over the way that the game is played that way.
 
Level 15
Joined
Aug 14, 2007
Messages
936
Thanks, I am aware that it does represent it at as pure damage which will impact me balancing this unit for my own play.

Is Shadow strike a pure physical ability? I thought it does spell damage, thought I have not spent time checking.

Shadow Strike does Spell attack type but has damage type of Shadow Strike, which is technically magical but not sure how it works with Runed Bracers. (Requires testing)

What I originally meant for Cleave was what Death Adder had told you again, being having Hero attack type and Sonic (Requires testing) damage type, which also represents pure damage, sadly I don't know the exact damage type for pure that cleave uses, so someone might be able to expand on this...
 
Level 3
Joined
Jul 21, 2010
Messages
31
Shadow Strike does Spell attack type but has damage type of Shadow Strike, which is technically magical but not sure how it works with Runed Bracers. (Requires testing)

What I originally meant for Cleave was what Death Adder had told you again, being having Hero attack type and Sonic (Requires testing) damage type, which also represents pure damage, sadly I don't know the exact damage type for pure that cleave uses, so someone might be able to expand on this...

I see, makes more sense now.
 
Level 12
Joined
Nov 3, 2013
Messages
989
Ok, so I know you said you didn't really need/want it atm, but I thought I should really make it properly instead of doing it so half-assedly as I did before I went to sleep. (And this time I started with actually doing the maths BEFORE I tried to make it in GUI, so it became way easier when I had it figured out before going through those obnoxious menus...)

Type in "f\left(x\right)=\left(1-\frac{x-200}{150}\right)\left(0.05a\ +\ 0.10\right)+0.15+0.05a" on desmos , add an "a" slider that go from 1 to 3—or however many levels you want—(representing ability level), and then add f(your desired X value) to see what the output of the chosen value of x is (X = distance).

You might want to multiply everything by 100 if you want to actually look at the graph, since you can't scale the x or y axis independently (basically you can't see shit otherwise), but tbh you just need to see the output imo.

22dbecb283.png

Anyway, so it goes from 20, 25, 30 % at 350 (x) to 35, 45, 55 % at 200. Graph might look a bit weird at first, but you just have to remember that you want the damage to be reduced the further away it gets, so higher X = lower Y. (I'm saying this cause I forgot that myself...)

Also, I didn't make constants for everything in the graph, but I did make it for the map. So you can change the numbers on the cleave fairly easily.

Constants:
  • custom cleave constants
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- full damage range --------
      • Set CLEAVE_DISTANCE_MIN = 200.00
      • -------- ================================ --------
      • -------- max range --------
      • Set CLEAVE_DISTANCE_MAX = 350.00
      • -------- ================================ --------
      • -------- min % damage (not including per level increase) --------
      • Set CLEAVE_DAMAGE_MIN = 0.15
      • -------- ================================ --------
      • -------- % damage increase per level of ability --------
      • Set CLEAVE_DAMAGE_MIN_INC = 0.05
      • -------- ================================ --------
      • -------- max % damage (not including per level increase & not including min % damage) --------
      • Set CLEAVE_DAMAGE_MAX = 0.10
      • -------- ================================ --------
      • -------- max % damage increase per level of ability (doesn't take into account the min % increase per level) --------
      • Set CLEAVE_DAMAGE_MAX_INC = 0.05
      • -------- ================================ --------
Trigger:
  • custom cleave
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
    • Actions
      • Set cleave_abilLevel = (Level of Cleaving Attack (Custom) for DamageEventSource)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • cleave_abilLevel Greater than or equal to 1
        • Then - Actions
          • Set cleave_pointVar1 = (Position of DamageEventSource)
          • Set cleave_pointVar2 = (Position of DamageEventTarget)
          • Set cleave_angle = (Angle from cleave_pointVar1 to cleave_pointVar2)
          • Custom script: call RemoveLocation(udg_cleave_pointVar2)
          • Set cleave_pointVar2 = (cleave_pointVar1 offset by CLEAVE_DISTANCE_MAX towards cleave_angle degrees)
          • -------- =========================================== --------
          • -------- =========================================== --------
          • -------- targets --------
          • Set cleave_unitGroup = (Units within CLEAVE_DISTANCE_MAX of cleave_pointVar1)
          • Unit Group - Pick every unit in cleave_unitGroup and do (Actions)
            • Loop - Actions
              • Set cleave_splashTarget = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • cleave_splashTarget Not equal to DamageEventTarget
                  • cleave_splashTarget Not equal to DamageEventSource
                  • (cleave_splashTarget is alive) Equal to True
                  • (cleave_splashTarget is A structure) Equal to False
                  • (cleave_splashTarget belongs to an enemy of (Owner of DamageEventSource)) Equal to True
                • Then - Actions
                  • Set cleave_pointVar3 = (Position of cleave_splashTarget)
                  • Set cleave_distance = (Distance between cleave_pointVar1 and cleave_pointVar3)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between cleave_pointVar2 and cleave_pointVar3) Less than CLEAVE_DISTANCE_MAX
                    • Then - Actions
                      • Game - Display to (All players) the text: (Cleave Distance = + (String(cleave_distance)))
                      • -------- cleave damage min multiplier --------
                      • Set cleave_damageMultiplier = (CLEAVE_DAMAGE_MIN + (CLEAVE_DAMAGE_MIN_INC x (Real(cleave_abilLevel))))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • cleave_distance Less than CLEAVE_DISTANCE_MIN
                        • Then - Actions
                          • -------- cleave damage max multiplier (min + "max") --------
                          • Set cleave_damageMultiplier = (cleave_damageMultiplier + (CLEAVE_DAMAGE_MAX + (CLEAVE_DAMAGE_MAX_INC x (Real(cleave_abilLevel)))))
                        • Else - Actions
                          • -------- cleave damage between min & max distance multiplier --------
                          • Set cleave_damageMultiplier = (cleave_damageMultiplier + ((1.00 - ((cleave_distance - CLEAVE_DISTANCE_MIN) / (CLEAVE_DISTANCE_MAX - CLEAVE_DISTANCE_MIN))) x (CLEAVE_DAMAGE_MAX + (CLEAVE_DAMAGE_MAX_INC x (Real(cleave_abilLevel))))))
                      • Game - Display to (All players) the text: (Cleave Damage Multiplier = + (String(cleave_damageMultiplier)))
                      • Trigger - Turn off (This trigger)
                      • Unit - Cause DamageEventSource to damage cleave_splashTarget, dealing (DamageEventAmount x cleave_damageMultiplier) damage of attack type Hero and damage type Normal
                      • Trigger - Turn on (This trigger)
                      • Special Effect - Create a special effect attached to the chest of cleave_splashTarget using Abilities\Spells\Other\Cleave\CleaveDamageTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_cleave_pointVar3)
                • Else - Actions
          • Custom script: call DestroyGroup(udg_cleave_unitGroup)
          • -------- =========================================== --------
          • -------- =========================================== --------
          • Custom script: call RemoveLocation(udg_cleave_pointVar1)
          • Custom script: call RemoveLocation(udg_cleave_pointVar2)
        • Else - Actions
Just keep in mind that if you want to change the damage values, the 'max' damage doesn't include the "min" damage, so really it's taking the min damage and then the difference between min + max, so you should always count the final max as "min" + "max". And the ability level is always going to be at least level 1, so subtract one level's worth from the base value (or multiply the 'per level' increases by ability level - 1 instead)

p.s. and in the end I guess I was still a bit lazy since I didn't make an actual cone, the Area of Effect is just two overlapping circles instead. :p
 

Attachments

  • (Cleave) Damage Engine v3.8.w3x
    58.3 KB · Views: 85
Level 3
Joined
Jul 21, 2010
Messages
31
Ok, so I know you said you didn't really need/want it atm, but I thought I should really make it properly instead of doing it so half-assedly as I did before I went to sleep. (And this time I started with actually doing the maths BEFORE I tried to make it in GUI, so it became way easier when I had it figured out before going through those obnoxious menus...)

Type in "f\left(x\right)=\left(1-\frac{x-200}{150}\right)\left(0.05a\ +\ 0.10\right)+0.15+0.05a" on desmos , add an "a" slider that go from 1 to 3—or however many levels you want—(representing ability level), and then add f(your desired X value) to see what the output of the chosen value of x is (X = distance).

You might want to multiply everything by 100 if you want to actually look at the graph, since you can't scale the x or y axis independently (basically you can't see shit otherwise), but tbh you just need to see the output imo.

22dbecb283.png

Anyway, so it goes from 20, 25, 30 % at 350 (x) to 35, 45, 55 % at 200. Graph might look a bit weird at first, but you just have to remember that you want the damage to be reduced the further away it gets, so higher X = lower Y. (I'm saying this cause I forgot that myself...)

Also, I didn't make constants for everything in the graph, but I did make it for the map. So you can change the numbers on the cleave fairly easily.

Constants:
  • custom cleave constants
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- full damage range --------
      • Set CLEAVE_DISTANCE_MIN = 200.00
      • -------- ================================ --------
      • -------- max range --------
      • Set CLEAVE_DISTANCE_MAX = 350.00
      • -------- ================================ --------
      • -------- min % damage (not including per level increase) --------
      • Set CLEAVE_DAMAGE_MIN = 0.15
      • -------- ================================ --------
      • -------- % damage increase per level of ability --------
      • Set CLEAVE_DAMAGE_MIN_INC = 0.05
      • -------- ================================ --------
      • -------- max % damage (not including per level increase & not including min % damage) --------
      • Set CLEAVE_DAMAGE_MAX = 0.10
      • -------- ================================ --------
      • -------- max % damage increase per level of ability (doesn't take into account the min % increase per level) --------
      • Set CLEAVE_DAMAGE_MAX_INC = 0.05
      • -------- ================================ --------
Trigger:
  • custom cleave
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to False
    • Actions
      • Set cleave_abilLevel = (Level of Cleaving Attack (Custom) for DamageEventSource)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • cleave_abilLevel Greater than or equal to 1
        • Then - Actions
          • Set cleave_pointVar1 = (Position of DamageEventSource)
          • Set cleave_pointVar2 = (Position of DamageEventTarget)
          • Set cleave_angle = (Angle from cleave_pointVar1 to cleave_pointVar2)
          • Custom script: call RemoveLocation(udg_cleave_pointVar2)
          • Set cleave_pointVar2 = (cleave_pointVar1 offset by CLEAVE_DISTANCE_MAX towards cleave_angle degrees)
          • -------- =========================================== --------
          • -------- =========================================== --------
          • -------- targets --------
          • Set cleave_unitGroup = (Units within CLEAVE_DISTANCE_MAX of cleave_pointVar1)
          • Unit Group - Pick every unit in cleave_unitGroup and do (Actions)
            • Loop - Actions
              • Set cleave_splashTarget = (Picked unit)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • cleave_splashTarget Not equal to DamageEventTarget
                  • cleave_splashTarget Not equal to DamageEventSource
                  • (cleave_splashTarget is alive) Equal to True
                  • (cleave_splashTarget is A structure) Equal to False
                  • (cleave_splashTarget belongs to an enemy of (Owner of DamageEventSource)) Equal to True
                • Then - Actions
                  • Set cleave_pointVar3 = (Position of cleave_splashTarget)
                  • Set cleave_distance = (Distance between cleave_pointVar1 and cleave_pointVar3)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Distance between cleave_pointVar2 and cleave_pointVar3) Less than CLEAVE_DISTANCE_MAX
                    • Then - Actions
                      • Game - Display to (All players) the text: (Cleave Distance = + (String(cleave_distance)))
                      • -------- cleave damage min multiplier --------
                      • Set cleave_damageMultiplier = (CLEAVE_DAMAGE_MIN + (CLEAVE_DAMAGE_MIN_INC x (Real(cleave_abilLevel))))
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • cleave_distance Less than CLEAVE_DISTANCE_MIN
                        • Then - Actions
                          • -------- cleave damage max multiplier (min + "max") --------
                          • Set cleave_damageMultiplier = (cleave_damageMultiplier + (CLEAVE_DAMAGE_MAX + (CLEAVE_DAMAGE_MAX_INC x (Real(cleave_abilLevel)))))
                        • Else - Actions
                          • -------- cleave damage between min & max distance multiplier --------
                          • Set cleave_damageMultiplier = (cleave_damageMultiplier + ((1.00 - ((cleave_distance - CLEAVE_DISTANCE_MIN) / (CLEAVE_DISTANCE_MAX - CLEAVE_DISTANCE_MIN))) x (CLEAVE_DAMAGE_MAX + (CLEAVE_DAMAGE_MAX_INC x (Real(cleave_abilLevel))))))
                      • Game - Display to (All players) the text: (Cleave Damage Multiplier = + (String(cleave_damageMultiplier)))
                      • Trigger - Turn off (This trigger)
                      • Unit - Cause DamageEventSource to damage cleave_splashTarget, dealing (DamageEventAmount x cleave_damageMultiplier) damage of attack type Hero and damage type Normal
                      • Trigger - Turn on (This trigger)
                      • Special Effect - Create a special effect attached to the chest of cleave_splashTarget using Abilities\Spells\Other\Cleave\CleaveDamageTarget.mdl
                      • Special Effect - Destroy (Last created special effect)
                    • Else - Actions
                  • Custom script: call RemoveLocation(udg_cleave_pointVar3)
                • Else - Actions
          • Custom script: call DestroyGroup(udg_cleave_unitGroup)
          • -------- =========================================== --------
          • -------- =========================================== --------
          • Custom script: call RemoveLocation(udg_cleave_pointVar1)
          • Custom script: call RemoveLocation(udg_cleave_pointVar2)
        • Else - Actions
Just keep in mind that if you want to change the damage values, the 'max' damage doesn't include the "min" damage, so really it's taking the min damage and then the difference between min + max, so you should always count the final max as "min" + "max". And the ability level is always going to be at least level 1, so subtract one level's worth from the base value (or multiply the 'per level' increases by ability level - 1 instead)

p.s. and in the end I guess I was still a bit lazy since I didn't make an actual cone, the Area of Effect is just two overlapping circles instead. :p

Flipping hell dude that's amazing, thanks! I am actually okay with it being a "splash" aoe rather than cone, just getting this far would make it much better than what I was prepared it to be.

In any case this will be a good learning point for me! Thanks.
 
Status
Not open for further replies.
Top