• 🏆 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!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

Freeze / Shatter, Combo Abilities, Stat Checks

Status
Not open for further replies.
Level 5
Joined
Feb 13, 2019
Messages
128
Hellllllo again. I'm trying to figure out a way to implement "stat checks", and "spell combos", to start I figure I want to take the standard Warcraft 3 spell Breath of Frost and make it "check" the unit it is damaging stats (by stats I mean Hero Attributes), to see if they pass a "stat check", and if it fails, it is frozen solid instead of just damaged, slowed, etc.

What I'm imagining is lets say we compare the Strength of the unit with the spell being cast on it, to the Intelligence of the unit casting the spell, and if the Intelligence of said unit is higher than the Strength of the other unit, it "fails the skill/stat check", so it ends up frozen solid. (stunned)

But I want to make it so if you use a spell that could "shatter" the frozen unit, (like lets say there's an ability where you ummmmm, shoot an empowered shot from, lets say a ranged unit with a crossbow, and the ability "combos" where if you shoot this at a unit that is "frozen", and they react together, making it "shatter", ( Like an ability is used on a unit already under the effect of, another ability I guess? and an effect happens, in this case death) AND/OR you just do enough damage to pass a damage threshold", (lets say, 1/4 of the units HP)) it "shatters" and is instantly killed.



This is what I have so far:

  • Cone of cold stat check
    • Events
      • Game - DamageEvent becomes Equal to 1.00
    • Conditions
      • (Ability being cast) Equal to Breath of Frost 1
    • Actions
      • Set AttackingUnit = DamageEventSource
      • Set AttackingUnit = DamageEventSource
      • Set HeroINT[1] = (Intelligence of AttackingUnit (Include bonuses))
      • Set HeroIntReal[1] = (Real(HeroINT[1]))
      • Set HeroSTR[1] = (Strength of AttackedUnit (Include bonuses))
      • Set HeroStrReal[1] = (Real(HeroSTR[1]))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HeroIntReal[1] Greater than HeroStrReal[1]
        • Then - Actions
        • Else - Actions
But it's finishing up the effect that has me stumped, do I want to use a buff and maybe make a custom one or something of the sort? (I haven't gotten to tinkering with buffs yet and am still unsure of how they work) Or a dummy unit that casts a stun or some kind of ability, or activates some trigger or script or something for me? o_O

and wrapping up the actual shatter effect is a little tricky I feel like, I have Bribe's Damage Engine so I imagine I could use the DamageEventAmout variable to create some kind of equation/code? where if a unit takes the 25% of it's current/or max hp (something of the like) it triggers some kind of effect (I don't know the first thing that comes to mind is it takes lets say it's current Health Points and deal damage equal to that amount to 100% kill it and create some special effect where ice chunk looking particles fall.


Please forgive my noob-ness if this is a stupid question.
 
Last edited:
Level 41
Joined
Feb 27, 2007
Messages
5,229
Ability being cast in this context will not return the ability that caused damage. Bribe's damage engine can tell if a unit took spell damage but not which spell dealt the damage. To do that, you'll need to base your abilities on something that actually gives a buff (just giving Breath of Frost a buff will not make it confer that buff) and then check to see if the damaged unit has that buff.
 
Level 5
Joined
Feb 13, 2019
Messages
128
Ability being cast in this context will not return the ability that caused damage. Bribe's damage engine can tell if a unit took spell damage but not which spell dealt the damage. To do that, you'll need to base your abilities on something that actually gives a buff (just giving Breath of Frost a buff will not make it confer that buff) and then check to see if the damaged unit has that buff.

Hmmm damn, although I looked around I think Breath of Frost applies a buff, o_O it has one it editor but I'm not quite sure how to check for one in the trigger I'll have to poke around


Edit: Unless of course you wanted to elaborate :p I just feel like I recognize your account from earlier and kind of feel bad asking you for help again, I don't want to abuse the privilege lol.
 
Last edited:
Level 5
Joined
Feb 13, 2019
Messages
128
No you're good I was just more asking that buff would work right? and that is actually super good to know causeee I definitely would have tried that in the future LOL. and thank you so much, seriously, this is fucking rad.
 
Level 5
Joined
Feb 13, 2019
Messages
128
I just assumed BoF didn't have a buff by default; it very well might have one. My point was to say that adding a buff to an ability that doesn't have one does not make that ability confer that buff. The 'unit has buff' is under "boolean comparison". Most checks are.


So wait, would you have any idea how to transfer a buff via Blizzard, so I could also freeze/stun with that spell not just BoF?
 
Level 41
Joined
Feb 27, 2007
Messages
5,229
Buffs are entirely visual and do not do things like stun or slow or damage just on their own. You cannot add a buff to make an ability stun, you must use an ability that naturally stuns the unit. Blizzard can never stun a target. Dummy cast something like storm bolt on all targets or by triggering the stun yourself using the new PauseUnitEx function.
 
Level 5
Joined
Feb 13, 2019
Messages
128
Oh I'm sorry I should've been more specific it was just really late, I was tired, etc. :razz:

But I have a trigger that as of right now works by checking to see if the unit has the BoF buff, and then "freezes" stuns the unit, depending on the two Hero's in combat's Strength and Intelligence stats yadda yadda yadda.

But yeah I feel like the solution is probably still dummy casters so thank you as always, very insightful and knowledgeable! :pcon:
 

Uncle

Warcraft Moderator
Level 68
Joined
Aug 10, 2018
Messages
7,153
Dunno if you figured it out but this is what I would do.
1. Change your heroes Breath of Frost ability so that it's based off of Channel (so it has no effects)
2. Make a unit version of your Breath of Frost ability and create a new dummy unit named BoF Dummy
3. Then in your triggers do something like this:

Events:
a unit starts the effect of an ability
Condtions:
ability being cast = Breath of Frost
Actions:
create your new dummy unit -> add BoF to it -> order it to cast BoF at the targeted point of ability being cast

4. In our damage events trigger, check to see if our damageeventsource = BoF Dummy, and if it is then check to see if DamageEventAmount is enough to "shatter" the damaged unit

This way we will know that any damage dealt by a unit of type BoF Dummy came from your Breath of Frost ability. Otherwise, if you didn't use a dummy and your hero had the Breath of Frost ability, then the DamageEvents trigger would run for let's say your Frost Nova or Shockwave spells if your hero had these spells too. (note: this is only relevant if your hero has other damaging spells besides BoF).
 
Last edited:
Status
Not open for further replies.
Top