I'm trying to make a spell deal damage based on the casting units damage dealt, plus a hero stat I've made up for him.
Example: Unit damage = 10, hero stat = 5, and i want the spell to deal unit's damage + hero stat for 15 damage
Now mind you, the unit damage and hero stat will be changing fairly constantly throughout the game, so the spell NEEDS to scale with the damage. My main problem is that I cant find a function, variable, or anything else in triggers that refers to a units damage. So its not as simple as making the spell deal X damage.
I think that this is something for the data editor: For example, when your hero uses a weapon, then you can link the ability to the weapon damage and the additional damage that should be dealt.
It sounds like you are saying to make my spell based off the damage the unit has last dealt, thus meaning armor would then reduce the spells damage when i don't want it to, or would be unaffected when i did want it to be. More so, I'm not sure how to go about referring a spell to a weapon, but even if i did, bonus damage on the unit would not be counted in the spells damage either.
I found the environment damage done function but even that is not working as its not adding any damage changes, only the base weapon effect damage.
Behaviors can give bonuses to damage classes, ie ranged, melee, spell, etc. Couldn't you just have all the sources that modify the heroes melee/ranged damage also modify the spell damage? This seems like it would be the simplest method.
i guess youre changing your units base damage through catalogs or upgrades? Or are you using a behavior? If its not any of those three, my suggestion will not work entirely
I guess youre also using an actual spell made in the data editor as no one really makes them in the trigger editor anymore (at least no one i know of)
Create a set effect and add your units weapons damage effect and the damage effect from the spell into it, and make your ability use that effect. Make one of the damage effects have the damage type "Spell" and the attack have any other damage type
The hero stat should increase the spell damage by how much ever you want spell damage increased.
This way your spell deals "Weapon damage" + "Spell damage" (Which automatically gets enhanced by the hero stat)
Having trouble doing this.
I'm trying to make a spell deal damage based on the casting units damage dealt, plus a hero stat I've made up for him.
Example: Unit damage = 10, hero stat = 5, and i want the spell to deal unit's damage + hero stat for 15 damage
Now mind you, the unit damage and hero stat will be changing fairly constantly throughout the game, so the spell NEEDS to scale with the damage. My main problem is that I cant find a function, variable, or anything else in triggers that refers to a units damage. So its not as simple as making the spell deal X damage.
@Bebopjelli: Go
I think that this is something for the data editor: For example, when your hero uses a weapon, then you can link the ability to the weapon damage and the additional damage that should be dealt.
It sounds like you are saying to make my spell based off the damage the unit has last dealt, thus meaning armor would then reduce the spells damage when i don't want it to, or would be unaffected when i did want it to be. More so, I'm not sure how to go about referring a spell to a weapon, but even if i did, bonus damage on the unit would not be counted in the spells damage either.
I found the environment damage done function but even that is not working as its not adding any damage changes, only the base weapon effect damage.
Behaviors can give bonuses to damage classes, ie ranged, melee, spell, etc. Couldn't you just have all the sources that modify the heroes melee/ranged damage also modify the spell damage? This seems like it would be the simplest method.
i guess youre changing your units base damage through catalogs or upgrades? Or are you using a behavior? If its not any of those three, my suggestion will not work entirely
I guess youre also using an actual spell made in the data editor as no one really makes them in the trigger editor anymore (at least no one i know of)
Create a set effect and add your units weapons damage effect and the damage effect from the spell into it, and make your ability use that effect. Make one of the damage effects have the damage type "Spell" and the attack have any other damage type
The hero stat should increase the spell damage by how much ever you want spell damage increased.
This way your spell deals "Weapon damage" + "Spell damage" (Which automatically gets enhanced by the hero stat)
sounds like it'll work, i'll try it, thanks almaity and dragoon!