HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

bonus damage based on intelligence

05-04-2006, 09:49 PM#1
moonliterhythm
i'm trying to make a "simple" ability that is targetable on self and allies. basically, once cast, it should give the target a bonus damage equal to the hero's intelligence.

any ideas on how to get this done?
05-04-2006, 11:25 PM#2
st33m
I think you could give the item damage ability, and just give it several times depending on the intelligence.
05-05-2006, 01:51 AM#3
Immoralis
Detect when its cast and use "Intelligence of triggering units (include bonuses)" or something similar to that as the intelligence and then work some math.
05-05-2006, 02:11 AM#4
st33m
Oh wait. Maybe I misunderstand.

Is the spell a hero spell based on Int, ie

level 1: 10 x int
level 2: 100 x int
level 3: 1000 x int

OR is it a unit spell that makes their damage go up based on their int?

If its a unit spell then check their intelligence and either store it in a variable and then add that much to their damage through abiltiies.

If its a hero spell you can do the same thing.

I prefer varaibles though.
05-05-2006, 05:51 PM#5
moonliterhythm
i did what you suggested at first, made a dummy item damage bonus ability that goes up to level 150. then whenever the spell is cast, i add that bonus damage ability to the unit and set its level to the intelligence of the hero.

works pretty well so far. i'll let you know if i run into problems
05-05-2006, 11:10 PM#6
st33m
Okay. Only problem would be if you have like tomes or something, then it could get complicated if int can go up to 835732657659743659876545.

But I doubt it.
05-06-2006, 02:07 AM#7
moonliterhythm
i dont think it would cause a problem; i already tested it with a hero that has more than 200 INT (for testing purposes) and it just caps his damage bonus to 150.

if it didn't however, you could run a simple check on your own to make sure that if the INT was greater than, say, 150, then to set the level to 150 automatically.
05-06-2006, 06:17 AM#8
st33m
True that. I'm not saying its a problem, just that it could be.

But as you said, its not, and cant be. Thats fine.