HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is it possible to creat a spell that does...

01-18-2007, 08:00 PM#1
doctorlee
Is it possible to create a spell like Cleave or Slow Poison that only activates chance? They are always activated.
I want those to be similar to how Critical Strike works.
01-18-2007, 08:07 PM#2
Naakaloh
You can utilize a damage detection system of some sort.
01-18-2007, 08:45 PM#3
Av3n
You can but it is an very hard progress

-Av3n
01-19-2007, 01:56 AM#4
doctorlee
Does anyone know how???
01-19-2007, 02:07 AM#5
maximilianx
for like..cleave, i guess you could use triggers like..
a unit is attacked
attacking unit has ability (cleave chance)
deal damage in area..yadda yadda yadda
01-19-2007, 03:44 AM#6
doctorlee
I don't get it....
01-20-2007, 12:53 PM#7
Raydude
Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to (Attacking unit)
(Random integer number between 1 and 10) Equal to 1
Actions
Unit - Remove Cleaving Attack (Dummy) to (Triggering unit)
Unit - Add Cleaving Attack to (Triggering unit)
Wait 0.50 seconds
Unit - Remove Cleaving Attack from (Triggering unit)
Unit - Add Cleaving Attack (Dummy) to (Triggering unit)

Untitled Trigger 002
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to (Attacking unit)
(Random integer number between 1 and 10) Equal to 1
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Position of (Triggering unit)) facing ((Position of (Triggering unit)) offset by 256.00 towards (Facing of (Triggering unit)) degrees)
Unit - Order (Last created unit) to Attack (Attacked unit)
Wait 0.50 seconds
Unit - Remove (Last created unit) from the game

This 2 works but it's very choppy i think...I'm still learning so correct this if you can :). For second one the footman already has cleaving attack and it's a dummy unit so you can't see or select it.
01-20-2007, 06:47 PM#8
st33m
Dont Tauren have a move that does area of effect damage on chance? Pulverize or something?
01-20-2007, 07:37 PM#9
maximilianx
yeah but thats different than cleave, cleave does damage in a small are around the attacked target, while pulverize does damage around the attacking unit
01-20-2007, 07:38 PM#10
Hydrolisk
I have another idea. Make this trigger:
Event: A unit is attacked
Conditions: Attacking unit has "X ABILITY"
Random Real value between 0.00 and 1.00 equal to or less than "X DECIMAL"
Actions: Set life to units in range (of splash) matching condition is enemy to attacking player to picked units current life-"X DAMAGE OF SPLASH"

OR do a damage trigger. Either one works though I think both would leak. BTW, you would need some damage detection system so you can get the X DAMAGE OF SPLASH to deal correct random splash damage. So yeah, it's tough.

Hidden information:
Yeah, st33m states the truth. It's perfect for your move.
BTW @ Raywhatever:
Quote:
Untitled Trigger 001
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to (Attacking unit)
(Random integer number between 1 and 10) Equal to 1
Actions
Unit - Remove Cleaving Attack (Dummy) to (Triggering unit)
Unit - Add Cleaving Attack to (Triggering unit)
Wait 0.50 seconds
Unit - Remove Cleaving Attack from (Triggering unit)
Unit - Add Cleaving Attack (Dummy) to (Triggering unit)

Untitled Trigger 002
Events
Unit - A unit Is attacked
Conditions
(Triggering unit) Equal to (Attacking unit)
(Random integer number between 1 and 10) Equal to 1
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Position of (Triggering unit)) facing ((Position of (Triggering unit)) offset by 256.00 towards (Facing of (Triggering unit)) degrees)
Unit - Order (Last created unit) to Attack (Attacked unit)
Wait 0.50 seconds
Unit - Remove (Last created unit) from the game
. NOT good. Why would a condition be Triggering unit equal to attacked unit? And, don't use integers for dice rolls. Use real values. FYI: Random Real number between 0.00 and 1.00 is less than or equal to 0.25=25% chance. Also, you could add a GENERIC TIMER to last created unit so that it gives a timer to how long it's ingame. You would set the timer to something below the cooldown. Also, that's sorta pointless for the footman to be created and attacks. That would only hit the attacked target. So yeah.

BTW I can't bother to actually look at those triggers.
01-20-2007, 09:06 PM#11
Feroc1ty
pulverize would work for melee...
01-22-2007, 09:50 AM#12
Falitian
You could take the easy and sloppy way out, and do this:

Event: A Unit Is Attacked
Condition: Attacking Unit is Equal to Footman
Actions:
-Set CleaveChanceVariable to (Random Integer Between 1-10)
-(If Then Else)
If CleaveChanceVariable is Equal to 1 then Create 1 CleaveUnit at Position of Triggering Unit Facing Attacked Unit Else Do Nothing
-Order CleaveUnit to cast Cleave
-Kill CleaveUnit
-Remove CleaveUnit


Not exactly sure if that would work, but in my head it does :p

CleaveUnit is just a dummy unit with the cleave ability that you can customize to whatever damage parameters and such you want. This would end up being a bit difficult with several ranks of the spell, but it is doable.
01-22-2007, 04:31 PM#13
NmdSnprEnigma
You'd need on damage triggers and something like the following.

if your random number is under your cleave number then pick all units in range CleaveRange around position of Damaged Unit matching condition enemy unit = true. TURN OFF ACTIVATION FOR THIS TRIGGERDamage picked unit for Damage taken times percentage. TURN ACTIVATION FOR THIS TRIGGER BACK ON.

I've basically done this before to add splash to attacks. Just adding a percentage chance to that gives you cleave. would even work with ranged attacks. Once I get back to my WE I'll try'n post the real trigger.
01-23-2007, 12:05 AM#14
Pyrogasm
Try Vexorian's Caster System. As far as I remember, there is a spell template called "anti-orb", which enables you to do on-attack, chance activated passives that can even configured to fire only once every X seconds.

Vex's Homepage
01-23-2007, 11:44 AM#15
NmdSnprEnigma
Made up a quick sample map, and yeah, if you wanna use the caster system like Pyrogasm suggested, I found the DamageUnitsInAOELoc function, which you could set up easy, but that'd hit the targetted unit as well, far as I can tell. I'm sure there's something else in the CS that'd work, though. Mine's a mostly GUI solution, but based off of a bunch of other's ppl's JASS.
Attached Files
File type: w3xPercentCleaveTestMap.w3x (597.0 KB)