• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Fan of Knives v1.03

fanofknives-icon.gif


Fan of Knives


Warden throws 26 daggers around her in random directions.
Each dagger deals damage on the impact.
Daggers flies in the area.
There is a chance that Warden turns invisible for a few seconds.

Level 1

Warden throws 26 daggers around her in random directions.
Each dagger deals 55 damage on the impact, but deals up to maximum 165 total damage.
Daggers flies in the area of 300.
There is a 10% chance that Warden turns invisible for 4 seconds.

Level 2

Warden throws 26 daggers around her in random directions.
Each dagger deals 70 damage on the impact, but deals up to maximum 210 total damage.
Daggers flies in the area of 375.
There is a 20% chance that Warden turns invisible for 6 seconds.

Level 3

Warden throws 26 daggers around her in random directions.
Each dagger deals 85 damage on the impact, but deals up to maximum 255 total damage.
Daggers flies in the area of 450.
There is a 30% chance that Warden turns invisible for 8 seconds.

Spell is:
-MUI/MPI
-Leak free
-Bug free
-Easy to understand and modify

Please leave comments and rate =)

NOTE:
You can use this icon, it fits the spell really well, and the icon is made by me :D

icons_8385_btn.jpg

Icon Download Link

Keywords:
Fan, knives, dagger, warden, spin, throw, impact, invisibility
Contents

Fan of Knives (Map)

Reviews
16:03, 4th Feb 2009 Hanky: Advice: 5 points are the highest rating and 1 point is the lowest rating. Documentation: 4 Visual Effects: 5 Triggering: 4 Idea: 5 A nice and easy spell which surely fits in many maps. I really liked the...

Moderator

M

Moderator

16:03, 4th Feb 2009
Hanky:
Evaluation

Rating Points
Advice: 5 points are the highest rating and 1 point is the lowest rating.

Documentation: 4
Visual Effects: 5
Triggering: 4
Idea: 5
Rating Comment

A nice and easy spell which surely fits in many maps. I really liked the idea of the chance to be invisible after the cast.

You could add some documentation about how your spell have to be imported. But else the documentation was ok. Maybe some newbies can learn from it. Please remove the leaks in the demo trigger, apart from the demo trigger leaks I didn't found any leaks yet.
Advice: If you didn't understood my rating or if you maybe have questions because you don't know how to fix bugs or leaks etc.. You can always send a private message to me. I will answer as soon I got time.
 
Level 15
Joined
Jul 19, 2007
Messages
618
Wot! overpowerd :p

Well Warden is my fav hero and this is one of my fav spells.
You made it well but you should not make it random direction coz if to much blades are send to one point the damage would be to heavy if units are there and if they are not spell could be to weak. Lol my cast left Blood Mage on about 100 hp form 550 and heroes take only 75% damage from spells and footman's ... where killed :D

In any way i would like you to make this spell go in all directions and on first hit it will disappear and slow target as well as dealing damage. (some shadow slow) would be nice

Other then that 4/5 since it to overpowerd and well is GUI which is slow but still nice since well i have to give difference from jass and GUI ^^

Other spell is MUI, works well in game (no bugs) found, does not leak and is nice idea for now 4/5 +rep
 
Level 37
Joined
Mar 5, 2008
Messages
3,887
Thanks Dragon for your comment =)

Yes that would be good that the dagger disappears after the impact, but i dont know how to make it :S

Overpowered, not really and yes, it depends how you look at it. It is if 10 daggers fly in the same direction, and not if the unit is really near.(if you know what i mean)

And i also noticed..that formula for points, in most of the cases no daggers are thrown in the down right corner of the screen (i did some calculations and that shouldn't happen)

So if i calculate again 26 because 36"="360 36/2=18 18/2=9 18+9=27(but for round number 26 :p) and random number average is 14 (13.547..) so if we calculate it again its 26*14=364 something like that and we have the full circle, but with random points ^^ but it doesn't seem to work sometimes.

I will lower the damage by 15 on each level, or maybe just on level 2 and 3.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
You have to convert an integer to a real?
No you dont, intergers can be used as real values without any conversion being needed. The only conversion needed is from real to integer as a loss of data must occur. Ofcouse, converting types is not the most speed efficent, however you do not need to convert an integer into a real as JASS will nativly convert it for you.

If GUI forces you to convert it, then it proves how GUI is.
 
Level 6
Joined
Dec 28, 2007
Messages
178
nice spell :D but:
-just as Dark_Dragon said it's overpowered as hell (=D). Using carrior swarm for the knife damage you can set the maximum damage of the knives making it do only for exampe 75 damage total on one target and nothing to others. Or you need a projectile system to make the knives dissappear.
-about the circle: you may do it with less knives somehow like the warden throwes a knife in a random degree between 0 and 30, and another knife between 30 and 60 until 360. it'll be 12 knives in a 'random-but-complete' circle =)
-about the range: 600? wow, too much :D. Maybe you should create about 3 dummy carrior swarm with 3 different ranges (for example: 350, 450, 600) and in the trigger create a function that ramdomly picks one of these three for the dummy unit and each knife will have a ranom range :)

overall nice idea to recreate the well-known spell
3/5 because of the balanceless knives =(
 
Level 15
Joined
Jul 19, 2007
Messages
618
Hmm about real to integer conversion and randomize here is GUI code:

  • Fan of Knives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • -------- Setting the casting unit --------
      • Set Unit[1] = (Triggering unit)
      • -------- - --------
      • -------- Setting the position --------
      • Set Point[1] = (Position of Unit[1])
      • -------- - --------
      • -------- Getting the level of ability --------
      • Set Integer[2] = (Level of (Ability being cast) for Unit[1])
      • -------- - --------
      • -------- Base chance value --------
      • Set Integer[1] = 15
      • -------- - --------
      • For each (Integer A) from 1 to 26, do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- Setting the position --------
          • -------- ######## See Here: ######### --------
          • Set Point[2] = (Point[1] offset by 50.00 towards (((360.00 / 26.00) x (Real((Integer A)))) + (Random real number between 0.00 and (360.00 / 26.00))) degrees)
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Setting ability --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy for (Owner of Unit[1]) at Point[1] facing Default Unit Facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Fan of Knives(dummy) to (Last created unit)
          • -------- ######## See Here: ######### --------
          • Unit - Set level of Fan of Knives(dummy) for (Last created unit) to Integer[2]
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm Point[2]
          • -------- - --------
          • -------- Clearing leaks --------
          • Custom script: call RemoveLocation(udg_Point[2])
          • -------- - --------
          • -------- Condition gets the chance to trigger the futher actions --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (Integer[1] x (Integer(Real[1])))
        • Then - Actions
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Setting ability --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy for (Owner of Unit[1]) at Point[1] facing Default Unit Facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Fan of Knives(dummy, invisibility) to (Last created unit)
          • Unit - Set level of Fan of Knives(dummy, invisibility) for (Last created unit) to (Integer(Real[1]))
          • Unit - Order (Last created unit) to Human Sorceress - Invisibility Unit[1]
        • Else - Actions
      • -------- Clearing leaks --------
      • Custom script: call RemoveLocation(udg_Point[1])
Ok let me explain randomize formula its really simple:

360 -> max angle since it really is
26 -> knifes

so: (360/26)*Loop A + Rnd(0., 360/26)

first we get single part of loop and the multiply it by current loop so we get each loop constant factor + add random direction which is from constant (zero) to max distance from new constant factor (in next loop)

About balance now is fare more balanced but still you will need to reduce damage a bit + really add carrion swarm max damage to something like 25 + level*25 or something like that.

Since if you don't know how to make that knife disappears on hit but still i like the spell and tell me if my code helped you out.

Oh before i forget there is one thing in your map which slows down map startup because you use arrays and allocate 100 empty places but use only 1 you don't actually need arrays and GUI arrays don't need to be allocated on map startup because they are globals and globals are auto set to null or 0 if integer, real, false for boolean...

So if you need array simple just set size to 1 and it will work just fine + optimize map start up. You have 5 variables with array size of 100 so on map start up 101*5 = 505 loops wow thats slow and UnitGroup = you leak 101 UnitGroups -> since they are allocated with function CreateGroup

why 101 since 0 to 100 = 101 places to allocate

well if you really need that much of groups then yeah you need to allocate them but i just tell you this to teach you something new :p

Ok i wrote really much now guess i helped you out a bit!
Have a nice day!
 
Level 15
Joined
Jul 19, 2007
Messages
618
Then if you want to read something again check this out no array fast map start up and fast spell as it can go in GUI:

  • Fan of Knives
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • -------- Setting the casting unit --------
      • Set FOK_Caster = (Triggering unit)
      • -------- - --------
      • -------- Setting the owner --------
      • Set FOK_Owner = (Owner of FOK_Caster)
      • -------- - --------
      • -------- Setting the position --------
      • Set FOK_CastPoint = (Position of FOK_Caster)
      • -------- - --------
      • -------- Getting the level of ability --------
      • Set FOK_ILevel = (Level of (Ability being cast) for FOK_Caster)
      • -------- - --------
      • For each (Integer A) from 1 to 26, do (Actions)
        • Loop - Actions
          • -------- - --------
          • -------- Setting the position --------
          • Set FOK_TempPoint = (FOK_CastPoint offset by 50.00 towards (((360.00 / 26.00) x (Real((Integer A)))) + (Random real number between 0.00 and (360.00 / 26.00))) degrees)
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Setting ability --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy for FOK_Owner at FOK_CastPoint facing Default Unit Facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Fan of Knives(dummy) to (Last created unit)
          • Unit - Set level of Fan of Knives(dummy) for (Last created unit) to FOK_ILevel
          • Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm FOK_TempPoint
          • -------- - --------
          • -------- Clearing leaks --------
          • Custom script: call RemoveLocation(udg_FOK_TempPoint)
          • -------- - --------
          • -------- Condition gets the chance to trigger the futher actions --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to (15 x FOK_ILevel)
        • Then - Actions
          • -------- - --------
          • -------- Creating dummy --------
          • -------- Adding ability --------
          • -------- Setting ability --------
          • -------- Ordering dummy to cast a spell --------
          • Unit - Create 1 Dummy for FOK_Owner at FOK_CastPoint facing Default Unit Facing degrees
          • Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
          • Unit - Add Fan of Knives(dummy, invisibility) to (Last created unit)
          • Unit - Set level of Fan of Knives(dummy, invisibility) for (Last created unit) to FOK_ILevel
          • Unit - Order (Last created unit) to Human Sorceress - Invisibility FOK_Caster
        • Else - Actions
      • -------- Clearing leaks --------
      • Custom script: call RemoveLocation(udg_FOK_CastPoint)
I tested it and it works fine but you will still need to balance damage :p

Good luck anyway!
 
Level 37
Joined
Mar 5, 2008
Messages
3,887
Ok, thanks for that trigger again, I'll have to rework it again (the triggering) I all ready did it (the first trigger you posted) it worked nice, looks like this will take another 5 minutes. :p

I also balanced the damage.
Also i tried with "different knives" like 3 different distances like random distances 475/325/200 but it looked odd, so i left it at 475.

But still,...i fell like something spectacular is missing in the spell, i just can't get some good idea what to add...

@nerovesper

Yep, I'll update it soon ^^
*in a day or two
 
Level 37
Joined
Mar 5, 2008
Messages
3,887
Z doesn't work on Carrion swarm (i tried)

The distance is constant on all levels a.t.m. (475) but i could change that and i will =)

Also i have some question...

What about i make 26 small dumies with the dagger model, and order them to move towards.
The dummies would have damage upon death ability with small radius.
You think that could work?
The problem would appear with the distance...but its just a flash in my head :p

[I'm off for today]

Have fun :D
 
Level 15
Joined
Jul 19, 2007
Messages
618
well 475 is fine making dummies means there max speed is 522 which won't look better, map would (spell be slower) coz of that much dummies + making extra damage on death would cause your spell to be even more imba :p well that is if you ask me + you will need more code...

I think that you did it good for now but if you want dummies do it its your spell :D

Currently waiting for version 1.1 :D
 
Level 23
Joined
Nov 29, 2006
Messages
2,482
Nice, that looks impressive, GUIly made:p

Just one note, which isnt related to the spell.
Is the Dummy(knife) unit used? I didnt notice that he is.
If he is... He is using an unknown ability (A004). You might wanna remove that, or the unit:p

Its simply made, yet looks nice. Good work =)
 
Level 15
Joined
Jul 19, 2007
Messages
618
Much better now -BZK- and yeah you did the spell nice now so 5/5 from me.

There is just one thing that bothers me, you used formula i give you but did you wanted to do double randomize or was it a miss click coz you are adding 2 times same function randomize.

  • Set FoK_Target_Point = (FoK_Position offset by 50.00 towards ((360.00 / 26.00) x (((Real((Integer A))) + (Random real number between 0.00 and (360.00 / 26.00))) + (Random real number between 0.00 and (360.00 / 26.00)))) degrees)
as you can see that could be buggy since randomize might send your knife in the other knifes direction and so on... again might deal to much damage at one point but other then that its really nice, i would like you to fix this but its your choice :p

Anyway as i said 5/5 from me
 
Top