• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

increase Spell Damage With Item

Status
Not open for further replies.
Level 1
Joined
Nov 4, 2016
Messages
1
guys i rly need help here, iam trying to create an item to increase spell damage by level of hero X hero intelligence /25 i tried to use Damage Engine but i cant detect hero casting an ability... because i want to increase spell damage for basic abilities only but not Ultimates , so i tried to use Set Ability Real Level Field But the problem here is i want to set the damage of the ability And hero level x intelligence /25 for example if ability damage is 100 at lvl 3 and the hero intelligence is 50 so its gonna be, 3level x 50intelligence /25=6 +100 dmg =106 dmg, i dont know how to trigger it to be like that without using arithmetic arithmetic making it 100+3x50/25= 206 not 106, also i idk how to set the dmg like default damage(100) when hero drop the item, do i need to use variables? if someone knows how to detect a ability being cast in Damage Engine this fix everything

  • Events
    • Unit - A unit Acquires an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Empty Vial
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Sea Witch
      • Then - Actions
        • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Frost Arrows)'s Real Level Field: Extra Damage ('Hca1') of Level: ((Level of Frost Arrows for (Triggering unit)) - 1) to ((Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Frost Arrows)'s Real Level Field Extra Damage ('Hca1'), of Level: ((Level of Frost Arrows for (Triggering unit)) - 1)) + ((Real((Hero level of (Triggering unit)))) x ((Real((Intelligence of (Tri
      • Else - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of (Triggering unit)) Equal to Sea Witch
      • Then - Actions
        • Ability - Set Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Forked Lightning)'s Real Level Field: Damage per Target ('Ocl1') of Level: ((Level of Forked Lightning for (Triggering unit)) - 1) to ((Ability: (Unit: (Triggering unit)'s Ability with Ability Code: Forked Lightning)'s Real Level Field Damage per Target ('Ocl1'), of Level: ((Level of Forked Lightning for (Triggering unit)) - 1)) + ((Real((Hero level of (Triggering unit)))) x ((Real((Intelli
      • Else - Actions
  • Events
    • Game - DamageEvent becomes Equal to 1.00
  • Conditions
    • IsDamageSpell Equal to True
    • (DamageEventSource has an item of type Empty Vial) Equal to True
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Unit-type of DamageEventSource) Equal to Archmage
      • Then - Actions
        • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Level of Blizzard for DamageEventSource))) x ((Real((Intelligence of DamageEventSource (Include bonuses)))) / 35.00)) damage of attack type Spells and damage type Magic
      • Else - Actions
 
Last edited:
Level 24
Joined
Feb 9, 2009
Messages
1,787
1) Unfortunately you cannot filter "Spells", best bet would be to trigger the ultimate damage so you can filter it using damage engine.
Something I do quite regularly is to use a dummy unit that casts an ability for me that I can then filter out with it's ability.
From there you could use DamageEngine's variable "NextDamageType" to set it to a custom one. (Note this is not the Acid/Force/SlowPoison types but the 6 to -2 that are present in the config here:
1639393199398.png

So you could easily modify the dummie's damage to number 7 and use that to filter ultimate spell damage.

2)As for your arithmetic I can't see it in your triggers due to it cutting off, so I'd recommend plugging your math into your computers calculator (or your phones whatever's handy.) and using brackets to see where it's going wrong because it should be straight forward.

3)Lastly I'd opt for damagemodifer event but that's just me
  • Example
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • ((Unit-type of DamageEventSource) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DamageEventSource has an item of type Mantle of Intelligence +3) Equal to True
        • Then - Actions
          • Set VariableSet DamageEventAmount = (DamageEventAmount + (Real(Your calculation)))
        • Else - Actions
 
Level 12
Joined
May 16, 2020
Messages
660
Do you want the item to increase the damage of your spells (1 damage instance) or create additional damage on top of the base spell (2 damage instance)?

If the former, you need to change the Event to "modifier":

  • Game - DamageModifierEvent becomes Equal to 1.00

And then, instead of causing the damage yourself, you "set" the damage (= modify the damage before it hits the enemy).

  • Set VariableSet DamageEventAmount = ((Real((Level of Blizzard for DamageEventSource))) x ((Real((Intelligence of DamageEventSource (Include bonuses)))) / 35.00))

Edit: Oh, Devalut was faster. To my knowledge you can't filter for specific spells, but you can "mark" them.

When dealing damage via trigger, set for example this before it:

  • Set VariableSet NextDamageType = DamageTypeSpell

Then, add a condition to your trigger:

  • DamageEventType Not equal to DamageTypeSpell
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,667
I'd go with what Devalut said, each Hero only has 1 Ultimate (assumedly) so it wouldn't be too difficult to manage. Keep in mind, if a Dummy is dealing the damage then it'll also be considered the (Killing unit) if the target were to die. This could potentially cause issues. I personally would trigger the Ultimate abilities completely from scratch, then you can properly Filter the damage since it'd all be triggered. At that point you wouldn't even need a Damage Engine, you could just incorporate Spell Power into the math for the damage amount.

@Ugabunda
You can modify damage in DamageEvent, this change was introduced in more recent versions of Damage Engine.
 
Status
Not open for further replies.
Top