Help me make Divine Hammer

keychup

Active Member
Reaction score
34
Divine Hammer deals damage to units in a small area in front of the caster.
Currently this ability is set to deal 20*LevelOfAbilityBeingCast.
I want to be able to deal damage based on the unit's Attack Damage

Currently I am trying to solve this by enabling Attack -2 and disabling Attack - 1 and applying splash using Orb of Fire. But that would require me to actually attack a unit. I need the effect to resolve at the moment the caster executes the spell.

Anyone have any better ideas?
 

Naga'sShadow

Ultra Cool Member
Reaction score
49
To deal damage based on your units attack you'll likely need some sort of attack detection system to to know what your units damage is. You should be able to find one on the resources page. You can also calculate the damage based on the hero's attributes but this doesn't take into account items.
 

keychup

Active Member
Reaction score
34
That was way too obvious. Are you sure about your claim that there is a system which identifies a unit's attack damage? Perhaps what you saw were mere Damage Detection systems instead of Attack Stat detectors.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Detecting a units current damage is almost impossible for any case and still very hard if we take into account a few limitations.

One solution which is "rather" easy and might work for you is to use a damage detection system and each time your hero deals damage through attacking an opponent you save how much damage he dealt into an array and you can, by this way, always retrieve the damage your hero dealt with his last hit on an enemy.
I guess you can see the problem here already, if the hero changes items, buffs, or whatnot the values will be wrong. But the chances are low for this to happen and the outcome will still be "more or less" accurate.

Another way would be to copy the hero completely, you can use game cache for this to create an exact duplicate of the hero, with the same stats, the same abilities, the same items, everything would be the same. Then you have this dummy attack another dummy target and once the damage was dealt you will know how much it was. Problem is, it will never be instant. You will always have to wait a little time until the copy hit the dummy. Another thing is that buffs will not be counted in.

Those two methods are somewhat easy and accurate in most situations in comparison to the alternatives.
 

keychup

Active Member
Reaction score
34
I was afraid of that. For a while now iv been wondering: What if i cast a spell which uses 0 seconds of animation such as Berserk or Divine Shield?

Then the actions i would take should include the following:
Add ability (Orb of X to triggering unit) - this is to enable attack 2
Issue order targeting a point (attack ground) - self explanatory
Remove Ability (Orb of X)

Attack 2 could be set to Weapon Type - Artillery so that attacking the ground would target the ground instead of nearby units. Thus damage can be splashed accordingly similar to that of a cannon tower's attack. This way it will take into account buffs and damage type can simply be set to the damage type desired.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
That might work but it wont be instant and the player will most likely notice. If you dont mind, try it out.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Why not add a buff that splashes the damage of your next attack? It actually makes sure that you hit something.
 

keychup

Active Member
Reaction score
34
Yes, i have considered a buff. but first lets see if we can do it this way.
I found out that Artillery is not compatible with orbs. How do enable/disable attack indexes now?

Morph the unit to an artillery attack then turn it back?

EDIT: What about i attack a Zone Indicator Dummy?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
There are some abilities that cause a unit's attacks to deal splash damage, like Fragmentation Shards, Burning Oil and Orb of Annihilation. OoA has a damage bonus field, which if set to 0 should do the trick.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Just tested it out. Orb of Annihilation's bonus damage (or lack thereof) works on the default Blademaster, but splash damage fails.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
The pitlords passive ability works with melee attacks and makes them deal splash damage.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Figured the problem. Melee-based units can't use Poison Arrows, so base your unit off something that's ranged by default, and change the attack range.
 

Attachments

  • Divine Hammer.w3x
    22.1 KB · Views: 210

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Somehow weapon type Normal didn't work. The Archmage in the map had weapon type Missile, but the range was at 100 and that still looks like a perfectly melee attack.
 

keychup

Active Member
Reaction score
34
Which means that a Paladin with missile attack will be affected by trueshot aura. Boolean for that unit will also be treated as a ranged attacker. And Thorns Aura, Spiked Carapace and Command Aura will have no effect on them.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
I've tested them all, and everything you said in the above post is no longer a problem.

1). Trueshot Aura fails.
2). Boolean returns Melee atttacker.
3). Thorns Aura works fine.
4). Spiked Carapace does too.
5). Same concept as Trueshot Aura.
6). *BONUS* Divine Hammer gives you the effects (or lack thereof) of a normal melee attack. Maybe that's not so good.
 

keychup

Active Member
Reaction score
34
How did you manage to do that? my paladin is at 100 range with missile attack but still receives trueshot aura and doesnt get affected by vampiric aura.
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
612
Base it off a ranged unit, then change the fields to what's in that map. It should work fine. I made the tests on it with those problem abilities, and they worked fine.
 

keychup

Active Member
Reaction score
34
According to my tests of your test map paladin was affected by vampiric aura but archmage was not. also archmage was affected by trueshot aura despite the in-game text interface display: melee. Arrows are definitely not the way to go. Additionaly Divine Hammer is supposed to deal Siege damage so using an attack would be inappropriate.
Perhaps morphing the unit would be better so that attacks deal a Siege+Splash Bonus while morphed.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top