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)
 
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
 
> 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
 
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:
 
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.
 
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
????
 
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.
 
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)
 
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?
 
Oh, forgot to add the "or" in the conditions. My bad. Just add the "Or" condition in the Condition section.
 
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.
  • tom_mai78101 tom_mai78101:
    Currently in the middle of getting the probate process going. We're doing the informal probate process.
    +3
  • Varine Varine:
    A probate is usually done with a will, yes? If so I am sorry for your loss
    +1
  • The Helper The Helper:
    Yeah Tom, me too sorry for your loss buddy my mom told me she finds out her olds friend died from Google searching them. She had not talked to one of her old friends in a year and found out she died from Google. Also another one in the same session. RIP all of them my sincere condolences Tom
    +1
  • Varine Varine:
    We have some elderly guests that regularly come hang out at the bar at the end of the night, and every once in a while we don't see someone for a few weeks and then someone shows up with their obituary.
  • Varine Varine:
    We usually let them do their memorials there in the morning if they want to and I'll make them some snacks and drinks. There was one guy named Tom that came in like every night and would sit by himself and get a bunch of soup and a glass of wine. idk why but he LOVED our fucking soup, like he would order a fucking quart of it at a time and would always get so sad when we stop doing it for the summer.
    +1
  • Varine Varine:
    But he also loved our calamari, which is another thing I hate but it sells super well so I can't change it. There was one day he came in and was asking me how to make it, because he tried to at home once in the off season when we stop running it and he really wanted it lol
  • Varine Varine:
    I think he's one of the only people I've made recipes for for free because he really wanted a broccoli cheddar, and it was like dude I don't have a recipe, it's just whatever I have, but here, this is how you do it
  • Varine Varine:
    I don't think he ever figured out how to do the calamari in a pan though, like idk how to do that either. He was afraid of the at home deep fryers though and it's like yeah, that's fair, I am too
  • Varine Varine:
    He was just such a sweet old man, we had two servers pregnant and they held a baby shower together, he was soooooo fucking excited to get to see a baby. Unfortunately he died a month or so before they were born
  • The Helper The Helper:
    So I decided to Google some people that I had not seen or heard from in a while and sure enough one of my old best friends, we had a falling out years ago but whatever, find out he died of Pancreatic Cancer in January. I have also lost a few of my closer acquaintances from growing up the last year. Getting old - people die - I kinda thought it was going to be this way a few years ago....
    +2
  • The Helper The Helper:
    Forum running super slow again
  • Ghan Ghan:
    Not really clear from the stats as to what is causing the slowness.
  • Ghan Ghan:
    We get a lot of guest traffic so it may just be the load is getting too high and not from any particular source.
  • Ghan Ghan:
    Looks like the server is maxed out on CPU.
  • Ghan Ghan:
    Oh it looks like a lot of the traffic is Silkroad Forums. That domain isn't protected by Cloudflare.
  • Ghan Ghan:
    But the old Silkroad site is still on its own server. I just had a test site set up on this server for it.
  • Ghan Ghan:
    I just disabled that test site. Let's see if that helps the load.
  • Ghan Ghan:
    Looks much better already.
  • The Helper The Helper:
    I had actually forgot about the Silkroad site. I had asked
  • The Helper The Helper:
    SD Ryoko about it and he said the couple of people left on there really like it, that was a few years ago, maybe I should check back
  • jonas jonas:
    I guess when you're getting old, and the last day of soup season draws near, you start wondering
  • jonas jonas:
    will I make it to the start of the next season? or was this the last time I'll ever have my favorite dish?
  • The Helper The Helper:
    I am doing my first Vibe Coding project. In installed the environment and tools according to instructions but it is all chat doing this for me at my direction. It is fun really and holy shit I might finish in 2 hours what it would have taken a day to in my Access and this would be an electron app complete new
  • Ghan Ghan:
    Good stuff.
  • Ghan Ghan:
    Just make sure it is secure. :)

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials
      Top