• 🏆 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!

[Trigger] Ability with unit group damage only once + spell crit with DDS

Status
Not open for further replies.
Level 12
Joined
Feb 5, 2018
Messages
521
  • Wave of Ice
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Wave Of Ice (Text not done)
    • Actions
      • Custom script: set udg_WOI_Caster = GetTriggerUnit()
      • Custom script: set udg_WOI_Player = GetOwningPlayer(udg_WOI_Caster)
      • Custom script: set udg_WOI_Level = GetUnitAbilityLevelSwapped('A01D', udg_WOI_Caster)
      • Set VariableSet WOI_Loc1 = (Position of WOI_Caster)
      • Set VariableSet WOI_Loc2 = (Target point of ability being cast)
      • Set VariableSet WOI_Damage = ((Real(WOI_Level)) x (100.00 + ((Real((Intelligence of WOI_Caster (Include bonuses)))) x 0.25)))
      • Set VariableSet WOI_Angle = (Angle from WOI_Loc1 to WOI_Loc2)
      • For each (Integer WOI_Integer) from 1 to 10, do (Actions)
        • Loop - Actions
          • Set VariableSet WOI_Offset = (WOI_Offset + 48.00)
          • Set VariableSet WOI_Loc3 = (WOI_Loc1 offset by (48.00 + WOI_Offset) towards WOI_Angle degrees.)
          • Special Effect - Create a special effect at WOI_Loc3 using Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
          • Set VariableSet WOI_SFX[WOI_Integer] = (Last created special effect)
          • Special Effect - Destroy WOI_SFX[WOI_Integer]
          • Custom script: set bj_wantDestroyGroup = true
          • Unit Group - Pick every unit in (Units within 125.00 of WOI_Loc3 matching ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WOI_Caster).) Equal to True)).) and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ((Picked unit) is Magic Immune) Equal to False
                  • ((Picked unit) is A structure) Equal to False
                  • ((Picked unit) is Mechanical) Equal to False
                • Then - Actions
                  • Unit Group - Add (Picked unit) to WOI_DamageGroup
                • Else - Actions
          • Custom script: call RemoveLocation (udg_WOI_Loc3)
      • Unit Group - Pick every unit in WOI_DamageGroup and do (Actions)
        • Loop - Actions
          • Set VariableSet WOI_Target = (Picked unit)
          • Unit - Cause WOI_Caster to damage WOI_Target, dealing WOI_Damage damage of attack type Spells and damage type Magic
      • Custom script: call RemoveLocation (udg_WOI_Loc1)
      • Custom script: call RemoveLocation (udg_WOI_Loc2)
      • Unit Group - Remove all units of WOI_DamageGroup from WOI_DamageGroup.
      • Set VariableSet WOI_Offset = 0.00

So I wanted to create a spell crit system, this in an early progress of the trigger to see if it actually worked like I intented and it did to some degree.

The problem is that in the Wave of Ice trigger, I had to damage to targets only once or the spell would not work like intented and so now if the spell critically hits, it procs for each invidual unit.

So lets say it hits 5 targets.
Target 1 gets not crit
Target 2 gets crit
Target 3 gets crit
Target 4 gets not crit
Target 5 gets crit

What I want to achieve is that if the Wave of ice spell crits, it crits all the targets. It seems a bitt off that your spell critically hits and then the critical hit is not applied to all targets hit by the spell.

  • Spell Crit
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (Unit-type of DamageEventSource) Equal to Jaina
      • DamageEventDamageT Equal to DAMAGE_TYPE_MAGIC
      • (Random integer number between 1 and 100) Less than or equal to 75
    • Actions
      • Set VariableSet DamageEventAmount = (DamageEventAmount x 2.00)
      • Game - Display to (All players) the text: (Your spell crit for + ((String(DamageEventAmount)) + damage))
 
Level 12
Joined
Feb 5, 2018
Messages
521
Actually after thinking for some time, I came to the conclusion that the inviduai crit gives more depth to the game.

So I am going to keep it that way.
Thanks for the help tho and nice spell :)
 
Status
Not open for further replies.
Top