HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

About Damage/Attack Types

02-04-2007, 09:34 PM#1
StockBreak
Well, my question is: when you trigger a spell, what KIND of damage/attack do you use to emulate a default game spell (for example Storm Bolt)?
I normally use a function like this:
Collapse JASS:
UnitDamageTarget( source, target, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS )
I use the UNIVERSAL type because I noticed that using ATTACK_TYPE_NORMAL and DAMAGE_TYPE_NORMAL doesn't work as default spells, infact the damage dealt is lowered by the armor (even if the "boolean attack" is set to false, it doesn't matter).
I'll explain better: if you use lv. 1 Storm Bolt on a footman, it will deal exactly 100 damage (~70 on a hero), but if you use the previous function the damage dealt will be ~90 (cause a footman has 2 armor).
Anyone noticed this? Thanks.
02-04-2007, 11:12 PM#2
Av3n
its magic or spell for spell damage or use choase damage type for the full effect

-Av3n
02-05-2007, 01:49 AM#3
moyack
Yes, this function does damage taking in account the target armor type.

In order to emulate a damage dealt by a magic attack, the code should be in this way:
Collapse JASS:
call UnitDamageTarget(u, t, 100, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
02-05-2007, 12:35 PM#4
StockBreak
Quote:
Originally Posted by moyack
Yes, this function does damage taking in account the target armor type.

In order to emulate a damage dealt by a magic attack, the code should be in this way:
Collapse JASS:
call UnitDamageTarget(u, t, 100, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
If I use this, a footman will receive more damage than normal from a spell (about ~120 instead of 100, because he has heavy armor).
In my opinion, the only way to emulate a default spell damage (not necessary a ultimate) the damage function should be like this:
Collapse JASS:
call UnitDamageTarget(u, t, 100, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
Using this the unit will receive full damage (not taking care of the armor) from the spell, while heroes will receive only ~70% (as it should be). Anyone knows why?
02-05-2007, 07:28 PM#5
Av3n
Hero armor by default takesd less damage from spells you can change that in gamplaye comstantsd

-Av3n
02-05-2007, 09:01 PM#6
StockBreak
My question was not: "why do heroes receive less damage from spell"...
But, why does my function only works with "UNIVERSAL"?
02-06-2007, 05:48 AM#7
Av3n
Quote:
Using this the unit will receive full damage (not taking care of the armor) from the spell, while heroes will receive only ~70% (as it should be). Anyone knows why?
Well you didn't say why it only works with universal so I don't know y u didn't type that in the post that i quoted. Neither yr other post eiher????

-Av3n
02-10-2007, 03:28 PM#8
StockBreak
Quote:
Originally Posted by Av3n
Well you didn't say why it only works with universal so I don't know y u didn't type that in the post that i quoted. Neither yr other post eiher????

-Av3n
Sorry, my error! I didn't mean to write that the function doesn't work! Simply it is the only method to cause damage exactly like default spells (not depending on armor), because using NORMAL and NORMAL won't work. Why???
02-10-2007, 08:37 PM#9
zeroXD
Well, I use NORMAL and NORMAL because I want damage to be reduced by armor. That would simulate the damage dealt same way as with a footman attacking.
02-10-2007, 08:50 PM#10
Vexorian
Afaik blizzard once said that NORMAL is the one used by spells...