• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Spell] Reflect spell passively

Status
Not open for further replies.
Level 2
Joined
Jul 14, 2011
Messages
11
hi!
I want to make a passive for a hero, the passive is 10% chance to reflect spell.
I'm thinked about it a lot. but I don't have an idea how to do it. Maybe Evasion?
So i want lo make it like, the enemy casts a stormbolt, and reflects back to him (like he casted it) and the enemy gets the damage, or/and stun etc.
 
Level 3
Joined
Sep 21, 2005
Messages
33
Depends what you want to do with it, to simply implement it:
-copy and paste the code
-copy an ability with no effects such as storm hammers
-press ctrl+d to see its ascii code such as A007
-copy that code into SPELL_ID = '' section
-do the same for the ascii code for your dummy unit, but into DUMMY_ID if you don't know about those i'm sure there's a lot of descriptions/tutorials on the site

If you want to edit it
-change GetChance to your % chance to fire
-GetDuration is the duration the ability lasts
-It also might be a good idea to change the: call UnitApplyTimedLife(dummy, 'BTLF', 2.0) line to a greater number than 2.0 as that is how long the dummy will live, and that will cut spells like blizzard short

if you want to make it so it a true "reflect" so it both blocks a spell and casts back.. well that's a fair bit more tricky.

*Edit*
Had another look at the mimic spell, i noticed it can't react to aoe or immediate effects and (probably on purpose) does not tell friend from foe, if you do not know jass and wanted those features, you will probably need someone to help you implement.
 
Status
Not open for further replies.
Top