Spell To deal Damage equal to number of enemies around the hero

rafaxik

New Member
Reaction score
2
Help me please!
I'm tired to try a lot of different ways and it ain't still working...
The Idea of this spell is In its highest level:
Whenever he gets surrounded by enemies, he becomes more and more dangerous, having 20 % chance to deal 16 damage per (enemy) unit all nearby enemies in 600 AoE.
See the spell definition:
Hero has chance to damage units in AoE by the amount enemy units around him.
Level 1 - 5 % chance to deal 4 AoE Damage for each unit in 150 AoE
Level 2 - 10 % chance to deal 8 AoE Damage for each unit in 300 AoE
Level 3 - 15 % chance to deal 12 AoE Damage for each unit in 450 AoE
Level 4 - 20 % chance to deal 16 AoE Damage for each unit in 600 AoE
I got a Damage Detection System and it's working fine...
GDD_Damage = Damage detected]

Here's the trigger that's not working:
Trigger:
  • Combat Mastery
    • Events
      • Game - GDD_Damage becomes Equal to 0.00
    • Conditions
      • (GDD_DamageSource has buff Combat Mastery ) Equal to True
    • Actions
      • Set CombatMasteryPoint = (Position of GDD_DamageSource)
      • Unit Group - Pick every unit in (Units within (175.00 x (Real((Level of Combat Mastery Main for GDD_DamageSource)))) of CombatMasteryPoint matching (((Matching unit) belongs to an enemy of (Owner of GDD_DamageSource)) Equal to True)) and do (Actions)
        • Loop - Actions
          • Set CombatMasteryUnits = (Last created unit group)
          • Unit - Cause GDD_DamageSource to damage (Picked unit), dealing (4.00 x ((Real((Level of Combat Mastery Main for GDD_DamageSource))) x (Real((Number of units in CombatMasteryUnits))))) damage of attack type Hero and damage type Normal
          • Custom script: call RemoveLocation(udg_CombatMasteryPoint)
          • Custom script: call DestroyGroup (udg_CombatMasteryUnits)
 

educator

New Member
Reaction score
9
events
a unit starts the effect of an ability
conditions
ability being cast equal to ur ability
actions
set cast_chance = random number between 1 and 100
set cast_damage = ((4 x (level of ability) x (number of units in(damage_aoe)
set damage_aoe = ((units in (150 x (level of ur ability) matching (matching unit) is an enemy of(owner of(casting unit) and (matching unit) is alive equal to false)
if:then:else multiple functions.
if: cast_chance less than or equal to (5 x level of(ur ability)
then:cause (casting unit) to deal cast_damage to deal (cast_damage) to target unit of ability being cast attack type... damage type...
custom script: call destroyGroup( udg_damage_aoe )
else: custom script: call destroyGroup( udg_damage_aoe )

damage_aoe-unit group- is the units around the caster 150/300/450/600
cast_chance-interger-an interger to help determine chance 5/10/15/20
cast_damage-integer- the damage that will be dealt 4/8/12/16 x units in 150/300/450/600
i hope i got it right.. i thought u wanted a single target with a chance to cast the ability... if not take out the cast_chance and if:then:else and move the rest of the trigger to below the variables and that will remove the chance
 

hgkjfhfdsj

Active Member
Reaction score
55
> Game - GDD_Damage becomes Equal to 0.00
should be GDD_Event

also turn off/on the trigger before and after you deal the damage otherwise it will cause an infinite loop
 

rafaxik

New Member
Reaction score
2
events
a unit starts the effect of an ability
conditions
ability being cast equal to ur ability

It's passive, not casted. But It's something nearly to your idea... 10x

> Game - GDD_Damage becomes Equal to 0.00
should be GDD_Event

also turn off/on the trigger before and after you deal the damage otherwise it will cause an infinite loop
Hmm... I was wondering about that, and for the event: Jeez I comitted this same mistake a few days ago :banghead:
 

Bogrim

y hello thar
Reaction score
154
Weep, not Wipe.

Yes, the attack would be detected along with every other damage source, including the trigger itself. Your current trigger will crash the game from an infinite loop.

Glenphir suggested a buff to filter out the correct damage source, like using Slow Poison with a custom buff and then removing the debuff as the first action in the trigger to make sure it's the only damage source that matches your conditions.
 

rafaxik

New Member
Reaction score
2
Weep, not Wipe.

Yes, the attack would be detected along with every other damage source, including the trigger itself. Your current trigger will crash the game from an infinite loop.

Glenphir suggested a buff to filter out the correct damage source, like using Slow Poison with a custom buff and then removing the debuff as the first action in the trigger to make sure it's the only damage source that matches your conditions.

hehe meant weep =)
Well, I tried something like that yesterday and wc3 really crashed. But I tried this trigger and didn't work at least.
How can I change the trigger to check the buff placer?
Trigger:
  • Conditions
    • GDD_Damaged_Unit has buff Mybuff equal to true
????
 

Bogrim

y hello thar
Reaction score
154
You use an ability like Slow Poison which automatically places a debuff when the damage takes place. Then you remove that debuff from the triggering unit. That way, you get a way to filter out which is the right damage source, using the buff as your ID.
 

Ayanami

칼리
Reaction score
288
Create an ability based on "Envenomed Spears". Ensure that no upgrades are required for the skill. Set the values to 0 and duration to any. Create 2 buffs based on "Poison (Stacking)" and "Poison (Non-stacking)". I'll name these A and B.

Trigger:
  • Combat Mastery
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff A) Equal to True
      • (GDD_DamagedUnit has buff B) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Set TempInt = Random integer between 1 and 100
      • If All (Conditions) are true, then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt is less than or equal to ((Level of Combat Mastery Main for GDD_DamageSource) x 5)
        • Then - Actions
          • Set TempPoint = (Position of GDD_DamageSource)
          • Set AoE = (150.00 x (Real(Level of Combat Mastery Main for GDD_DamageSource)))
          • Set TempGroup = (Units within AoE of TempPoint matching (((Matching unit) belongs to an enemy of (Owner of GDD_DamageSource)) Equal to True))
          • Set TempInt = (Number of units in TempGroup)
          • Set TempReal = (Real(TempInt)) x (4.00 x (Real(Level of Combat Mastery Main for GDD_DamageSource)))
          • Unit Group - Pick every units in TempGroup and do (Actions)
            • Loop - Actions
              • Unit - Cause GDD_DamageSource to damage (Picked unit), dealing TempReal damage of attack type Hero and damage type Normal
          • Custom script: call DestroyGroup(udg_TempGroup)
          • Custom script: call RemoveLocation(udg_TempPoint)
        • Else - Actions
      • Unit - Remove buff A from GDD_DamagedUnit
      • Unit - Remove buff B from GDD_DamagedUnit
      • Trigger - Turn on (This trigger)
 

rafaxik

New Member
Reaction score
2
Create an ability based on "Envenomed Spears". Ensure that no upgrades are required for the skill. Set the values to 0 and duration to any. Create 2 buffs based on "Poison (Stacking)" and "Poison (Non-stacking)". I'll name these A and B.
[/wc3]
Didn't work...
See:

Trigger:
  • Combat Mastery
    • Events
      • Game - GDD_Event becomes Equal to 0.00
    • Conditions
      • (GDD_DamagedUnit has buff Combat Mastery (Stacking)) Equal to True
      • (GDD_DamagedUnit has buff Combat Mastery (Non-stacking)) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Set CombatMasteryInteger = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • CombatMasteryInteger Less than or equal to ((Level of Combat Mastery buff placer for GDD_DamageSource) x 5)
        • Then - Actions
          • Set CombatMasteryPoint = (Position of GDD_DamageSource)
          • Set CombatMasteryAoE = (175.00 x (Real((Level of Combat Mastery buff placer for GDD_DamageSource))))
          • Set CombatMasteryUnits = (Units within CombatMasteryAoE of CombatMasteryPoint matching (((Matching unit) belongs to an enemy of (Owner of GDD_DamageSource)) Equal to True))
          • Set CombatMasteryInteger2 = (Number of units in CombatMasteryUnits)
          • Set CombatMasteryReal = ((Real(CombatMasteryInteger2)) x (5.50 x (Real((Level of Combat Mastery buff placer for GDD_DamageSource)))))
          • Unit Group - Pick every unit in CombatMasteryUnits and do (Actions)
            • Loop - Actions
              • Unit - Cause GDD_DamageSource to damage (Picked unit), dealing CombatMasteryReal damage of attack type Hero and damage type Normal
              • Custom script: call DestroyGroup(udg_CombatMasteryUnits)
              • Custom script: call RemoveLocation(udg_CombatMasteryPoint)
        • Else - Actions
      • Unit - Remove Combat Mastery (Non-stacking) buff from GDD_DamagedUnit
      • Unit - Remove Combat Mastery (Stacking) buff from GDD_DamagedUnit
      • Trigger - Turn on (This trigger)


Created an ability called Combat Mastery buff placer dealing 0 dps, duration 2 secs targets allowed air ground organic enemies, stacking type none, atk speed factor 0, movespeed factor 0.
Created a buff based on poison stack and non-stack to combat mastery stack and non-stack respectivally.
Just used 1 ability to check if was another buff placer, but still didn't work

Any more ideas?
 

Ayanami

칼리
Reaction score
288
Oh, forgot to add the "or" in the conditions. My bad. Just add the "Or" condition in the Condition section.
 

rafaxik

New Member
Reaction score
2
Oh, forgot to add the "or" in the conditions. My bad. Just add the "Or" condition in the Condition section.

Haha Finally working!!!!
Anyway, There were some things to fix in the spell, I'll post 'em when a get home
Thanx
+rep
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top