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.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top