• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How do I detect when an attack LANDS?

Status
Not open for further replies.
Well i basically need it to apply some things, cause im going to set the damage of all units to 0 via Defend item ability and im goign to make all the damage to be triggered, of course theyll deal damage from the same amount of AD they show.

Basically the attack will deal 0 damage, the armors will reduce 0 damage and they all will be calculated and applied via trigger, even the criticals and all that stuff.
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Thats right but then you would have to trigger everything, not only all spells that do damage but really every spell.

For example slow causes a zero damage event - you would have to trigger your own slow. As attack speed can't be modified dynamically with native methods you would likely have to use a bonus mod system... and thats only one spell, I guess it would be a nightmare to get that working without bugs. Many buffs cause zero damage events, thats the main problem.

But if all spells are triggered its trivial to detect the damage type anyway, so luckily no need for classifying zero damage events. But then again, physical damage has to get modified by a DDS.
 
Last edited:
Well, for another subject, i needed to detect the armor to do an armor penetration system, but it seems i dont need to detect the armor to do so. The only problem is, actually, that i need to solve an issue with the armor penetration system im doing, ive been doing it from the physical detection system that was posted before.

Problem: The system works perfectly in this case: the unit has 10 armor, ok the armor penetration value is equal to 10, this means damage is dealt, is saved, is increased by 10% and then armor is reduced and damage is dealt again. If the unit with 10 armor only received 90 damage from 100 it recieves 100 damage. But if the unit has more than 10 armor it deals less than if the armor penetration was implemented. I need to find a correct formula modifier. How do i make so?

See this map anyways:

http://www.hiveworkshop.com/forums/pastebin.php?id=a2c8v9
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Well, for another subject, i needed to detect the armor to do an armor penetration system, but it seems i dont need to detect the armor to do so. The only problem is, actually, that i need to solve an issue with the armor penetration system im doing, ive been doing it from the physical detection system that was posted before.

Problem: The system works perfectly in this case: the unit has 10 armor, ok the armor penetration value is equal to 10, this means damage is dealt, is saved, is increased by 10% and then armor is reduced and damage is dealt again. If the unit with 10 armor only received 90 damage from 100 it recieves 100 damage. But if the unit has more than 10 armor it deals less than if the armor penetration was implemented. I need to find a correct formula modifier. How do i make so?

See this map anyways:

http://www.hiveworkshop.com/forums/pastebin.php?id=a2c8v9

I have the armor calculation in here.
 
I have the armor calculation in here.

Ive changed the amount of %armor damage reduction to 1, check the map so u can see what i mean.

Check the part where the sorceress is.
1 footman will deal full damage to the Mortar Team (it has the armor pen) and the other will deal less damage. When attacking the sorceress the one that has the armor pen should deal the same damage that the nonpen footman is doing when attacking the mortar team (cause if the sorceress has 20 armor -10 armor pen she should have the same amount that the mortar has)
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Ive changed the amount of %armor damage reduction to 1, check the map so u can see what i mean.

Check the part where the sorceress is.
1 footman will deal full damage to the Mortar Team (it has the armor pen) and the other will deal less damage. When attacking the sorceress the one that has the armor pen should deal the same damage that the nonpen footman is doing when attacking the mortar team (cause if the sorceress has 20 armor -10 armor pen she should have the same amount that the mortar has)

What do you mean by pen?
 
What do you mean by pen?

Armor Penetration, this means that the damage ignores an amount of the targets armor. By example, one footman has 10 armor pen and 100 damage, the target has 10 armor, he deals 100 damage, the other footman has no armor penetration and 100 damage, the target has 10 armor, he deals 93 damage. The problem is when i attack targets with more than 10 armor...
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Armor Penetration, this means that the damage ignores an amount of the targets armor. By example, one footman has 10 armor pen and 100 damage, the target has 10 armor, he deals 100 damage, the other footman has no armor penetration and 100 damage, the target has 10 armor, he deals 93 damage. The problem is when i attack targets with more than 10 armor...

This has to be triggered.
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
If you just want armor to reduce damage taken by 1 per armor and armor piercing to make it ignore armor, then...

You get the armor of unit(there's a function).
You reduce the amount of armor by armor piercing.
If result is less than 0, then set it to 0.
Reduce damage by armor.
If damage is below minimum allowed, then raise it to minimum.

EDIT: But I just realized you want it to have diminishing returns. I'll need some time.
 
If you just want armor to reduce damage taken by 1 per armor and armor piercing to make it ignore armor, then...

You get the armor of unit(there's a function).
You reduce the amount of armor by armor piercing.
If result is less than 0, then set it to 0.
Reduce damage by armor.
If damage is below minimum allowed, then raise it to minimum.

EDIT: But I just realized you want it to have diminishing returns. I'll need some time.

Exactly, there is a small problem, cause the damage is refracted twice in armor. I need help t.t, it is for my pvp mmorpg
 
Level 21
Joined
Mar 27, 2012
Messages
3,232
Exactly, there is a small problem, cause the damage is refracted twice in armor. I need help t.t, it is for my pvp mmorpg

In this case you should code the damage reduction yourself too.
Makes things much easier.

First you get the effective armor(armor - piercing)
Then you use my formula to calculate damage reduction and apply it using a DDS.

Basically use a loop or power
effective health = health*(1.06ˇarmor)
This one has 6% damage reduction.
So from this formula I derive that the actual damage taken is damage*(0.94ˇarmor)
 
Status
Not open for further replies.
Top