Spellpack Weapon Spells

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
last updated: Dec. 04, 2007
version 1.01: Glaive Trap now a levelable ability; fixed issue with Glaives exploding too early
version 1.02: Hammer Throw code cleaned up for MPI
version 1.03: replaced Rending Blow with Rising Axe Storm
version 1.04: leak fixes


Split Spear
Description: The Hero sprays an area with a spread of piercing spears, damaging all enemy units in their path for 40 damage each. The spread angle of the spears is determined by the distance between the Hero and your mouse click point. [75 mana cost.]
Level 1 - Shoots three spears.
Level 2 - Shoots four spears.
Level 3 - Shoots five spears.

Note: This is similar to how the "Multiple Shot" and "Teeth" skills from Diablo 2 work. (In fact, that was my inspiration.)

Coding: GUI
Leaks: Leakless
Multi Instancability: MUI
Lag-susceptibility: none
Implementation: Instructions included as trigger comments

Trigger:
Code:
Split Spear
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Split Spear 
    Actions
        Set tempPoint1 = (Position of (Triggering unit))
        Set tempPoint2 = (Target point of ability being cast)
        Set SS_Angle = (Angle from tempPoint1 to tempPoint2)
        Set SS_Distance = (Distance between tempPoint1 and tempPoint2)
        Set SS_SplitAngle = ((60.00 - (SS_Distance / 20.00)) / (((Real((Level of Split Spear  for (Triggering unit)))) / 2.00) + 0.50))
        For each (Integer A) from 1 to ((Level of Split Spear  for (Triggering unit)) + 2), do (Actions)
            Loop - Actions
                Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at tempPoint1 facing SS_Angle degrees
                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                Unit - Add Spear (for Split Spear) to (Last created unit)
                Set tempPoint3 = (tempPoint1 offset by 500.00 towards (SS_Angle + (SS_SplitAngle x (((Real((Integer A))) - ((Real((Level of Split Spear  for (Triggering unit)))) / 2.00)) - 1.50))) degrees)
                Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm tempPoint3
                Custom script:   call RemoveLocation (udg_tempPoint3)
        Custom script:   call RemoveLocation (udg_tempPoint1)
        Custom script:   call RemoveLocation (udg_tempPoint2)
Screenshot:




Hammer Throw
Description: A hammer that is thrown at an enemy unit, causing damage and stunning the target. There is no mana cost and a very fast cooldown, but the number of Hammers is limited. After a unit is struck, the Hammer falls to the ground and the Hero can then retrieve it to replenish the number of Hammers stored.
Level 1 - 75 damage, 1 second stun; maximum of 3 Hammers can be stored.
Level 2 - 150 damage, 1 second stun; maximum of 4 Hammers can be stored.
Level 3 - 225 damage, 1 second stun; maximum of 5 Hammers can be stored.

Note: Depending on how this skill is implemented in a map, I can foresee some potential problems. (E.g. You might lose track of some of your Hammers, and can never find them again, thus making your skill unusable from that point onwards.) That is why I also included an item version of this skill as an alternate. Another possibility would be to have some method for automatically regenerating lost Hammers after a long period of time, or purchasing new ones.

Coding: GUI
Leaks: Leakless
Multi Instancability: MPI only
Lag-susceptibility: none
Implementation: Instructions included as trigger comments

Trigger:
Code:
Hammer Throw Learn
    Events
        Unit - A unit Learns a skill
    Conditions
        (Learned Hero Skill) Equal to Hammer Throw 
    Actions
        Set tempGroup1 = (Units owned by (Owner of (Triggering unit)) of type Hammer (dummy for reqs))
        Unit Group - Pick every unit in tempGroup1 and do (Actions)
            Loop - Actions
                Unit - Remove (Picked unit) from the game
        Custom script:   call DestroyGroup(udg_tempGroup1)
        Set tempPoint1 = (Center of Region 000 <gen>)
        For each (Integer A) from 1 to ((Level of Hammer Throw  for (Triggering unit)) + 2), do (Actions)
            Loop - Actions
                Unit - Create 1 Hammer (dummy for reqs) for (Owner of (Triggering unit)) at tempPoint1 facing Default building facing degrees
        Custom script:   call RemoveLocation (udg_tempPoint1)
        Set HammerCount[(Player number of (Owner of (Triggering unit)))] = ((Level of Hammer Throw  for (Triggering unit)) + 2)
        Floating Text - Create floating text that reads ((String(HammerCount[(Player number of (Owner of (Triggering unit)))])) + |nHammer(s)|navailable) above (Triggering unit) with Z offset -200.00, using font size 10.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 120.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
        Floating Text - Hide (Last created floating text) for (All players)
        Set tempForce = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
        Floating Text - Show (Last created floating text) for tempForce
        Custom script:   call DestroyForce (udg_tempForce)

Code:
Hammer Throw Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Hammer Throw 
    Actions
        Set tempGroup1 = (Units owned by (Owner of (Triggering unit)) of type Hammer (dummy for reqs))
        Unit - Remove (Random unit from tempGroup1) from the game
        Custom script:   call DestroyGroup(udg_tempGroup1)
        Set tempPoint1 = (Position of (Target unit of ability being cast))
        Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at tempPoint1 facing Default building facing degrees
        Unit - Add a 0.60 second Generic expiration timer to (Last created unit)
        Unit - Set the custom value of (Last created unit) to 1
        Custom script:   call RemoveLocation (udg_tempPoint1)
        Set HammerCount[(Player number of (Owner of (Triggering unit)))] = (HammerCount[(Player number of (Owner of (Triggering unit)))] - 1)
        Floating Text - Create floating text that reads ((String(HammerCount[(Player number of (Owner of (Triggering unit)))])) + |nHammer(s)|navailable) above (Triggering unit) with Z offset -200.00, using font size 10.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 120.00 degrees
        Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
        Floating Text - Hide (Last created floating text) for (All players)
        Set tempForce = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
        Floating Text - Show (Last created floating text) for tempForce
        Custom script:   call DestroyForce (udg_tempForce)

Code:
Hammer Throw Create Item
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Dummy Caster
        (Custom value of (Triggering unit)) Equal to 1
    Actions
        Set tempPoint1 = (Position of (Triggering unit))
        Set tempPoint2 = (tempPoint1 offset by 50.00 towards (Random angle) degrees)
        Item - Create Hammer at tempPoint2
        Item - Make (Last created item) Invulnerable
        Special Effect - Create a special effect at tempPoint2 using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation (udg_tempPoint1)
        Custom script:   call RemoveLocation (udg_tempPoint2)

Code:
Hammer Throw Acquire
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item-type of (Item being manipulated)) Equal to Hammer
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Level of Hammer Throw  for (Triggering unit)) Greater than or equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        HammerCount[(Player number of (Owner of (Triggering unit)))] Less than ((Level of Hammer Throw  for (Triggering unit)) + 2)
                    Then - Actions
                        Set HammerCount[(Player number of (Owner of (Triggering unit)))] = (HammerCount[(Player number of (Owner of (Triggering unit)))] + 1)
                        Set tempPoint1 = (Center of Region 000 <gen>)
                        Unit - Create 1 Hammer (dummy for reqs) for (Owner of (Triggering unit)) at tempPoint1 facing Default building facing degrees
                        Custom script:   call RemoveLocation (udg_tempPoint1)
                    Else - Actions
                Floating Text - Create floating text that reads ((String(HammerCount[(Player number of (Owner of (Triggering unit)))])) + |nHammer(s)|navailable) above (Triggering unit) with Z offset -200.00, using font size 10.00, color (0.00%, 100.00%, 100.00%), and 0.00% transparency
                Floating Text - Change (Last created floating text): Disable permanence
                Floating Text - Set the velocity of (Last created floating text) to 100.00 towards 120.00 degrees
                Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
                Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
                Floating Text - Hide (Last created floating text) for (All players)
                Set tempForce = (All players matching ((Matching player) Equal to (Owner of (Triggering unit))))
                Floating Text - Show (Last created floating text) for tempForce
                Custom script:   call DestroyForce (udg_tempForce)
            Else - Actions
                Set tempPoint1 = (Position of (Item being manipulated))
                Wait 0.01 game-time seconds
                Item - Create Hammer at tempPoint1
                Custom script:   call RemoveLocation (udg_tempPoint1)
Screenshot:




Rising Axe Storm
Description: The Hero creates a mass of axes that slowly rises higher up into the air. The mass sprays out triple spirals of projectiles that grow wider as the mass gains altitude. Attacks ground units. [100 mana cost.]
Level 1 - mass lasts for 4 seconds and each projectile deals 30 damage.
Level 2 - mass lasts for 5 seconds and each projectile deals 45 damage.
Level 3 - mass lasts for 6 seconds and each projectile deals 60 damage.

Note: Because of the way this spell is set up, the damage done is affected by the target's armor value.

Coding: GUI
Leaks: Leakless
Multi Instancability: MUI
Lag-susceptibility: low to none
Implementation: Instructions included as trigger comments

Trigger:
Code:
Rising Axe Storm Initialization
    Events
        Map initialization
    Conditions
    Actions
        Set DummyAxes[1] = Dummy Axe 1
        Set DummyAxes[2] = Dummy Axe 2
        Set DummyAxes[3] = Dummy Axe 3

Code:
Rising Axe Storm Cast
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Rising Axe Storm 
    Actions
        Set tempPoint1 = (Position of (Triggering unit))
        For each (Integer A) from 0 to 2, do (Actions)
            Loop - Actions
                Unit - Create 1 DummyAxes[(Level of Rising Axe Storm  for (Triggering unit))] for (Owner of (Triggering unit)) at tempPoint1 facing ((Real((Integer A))) x 120.00) degrees
                Unit - Add a ((Real((Level of Rising Axe Storm  for (Triggering unit)))) + 3.00) second Generic expiration timer to (Last created unit)
                Animation - Change (Last created unit) flying height to 500.00 at 50.00
        Custom script:   call RemoveLocation (udg_tempPoint1)
        Trigger - Turn on Rising Axe Storm Periodic <gen>

Code:
Rising Axe Storm Periodic
    Events
        Time - Every 0.15 seconds of game time
    Conditions
    Actions
        Set tempGroup1 = (Units of type DummyAxes[1])
        Set tempGroup2 = (Units of type DummyAxes[2])
        Set tempGroup3 = (Units of type DummyAxes[3])
        Unit Group - Add all units of tempGroup2 to tempGroup1
        Unit Group - Add all units of tempGroup3 to tempGroup1
        Unit Group - Pick every unit in tempGroup1 and do (Actions)
            Loop - Actions
                Set tempPoint1 = (Position of (Picked unit))
                Set tempPoint2 = (tempPoint1 offset by (((Real((Custom value of (Picked unit)))) x 20.00) + 100.00) towards ((Facing of (Picked unit)) + (12.00 - ((Real((Custom value of (Picked unit)))) x 0.10))) degrees)
                Unit - Make (Picked unit) face tempPoint2 over 0.00 seconds
                Unit - Order (Picked unit) to Attack Ground tempPoint2
                Custom script:   call RemoveLocation (udg_tempPoint2)
                Custom script:   call RemoveLocation (udg_tempPoint1)
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in tempGroup1) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions
        Custom script:   call DestroyGroup (udg_tempGroup1)
        Custom script:   call DestroyGroup (udg_tempGroup2)
        Custom script:   call DestroyGroup (udg_tempGroup3)
Screenshot:




Glaive Trap
Description: A quick channeling ability that lays down a field of Glaives around the Hero in two concentric rings. Enemy ground units take damage when they step on the Glaives. [100 mana cost]
Level 1 - Glaives have 100 life, last for 15 seconds, and deal up to 40 damage.
Level 2 - Glaives have 150 life, last for 25 seconds, and deal up to 80 damage.

Note: This spell uses the Custom Value of the Hero.

Coding: GUI
Leaks: Leakless
Multi Instancability: MUI
Lag-susceptibility: none
Implementation: Instructions included as trigger comments

Trigger:
Code:
Glaive Trap Start
    Events
        Unit - A unit Begins channeling an ability
    Conditions
        (Ability being cast) Equal to Glaive Trap 
    Actions
        Trigger - Turn on Glaive Trap Periodic <gen>

Code:
Glaive Trap Stop
    Events
        Unit - A unit Stops casting an ability
    Conditions
        (Ability being cast) Equal to Glaive Trap 
    Actions
        Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed
        Unit - Set the custom value of (Triggering unit) to 0

Code:
Glaive Trap Periodic [I][initially off][/I]
    Events
        Time - Every 0.25 seconds of game time
    Conditions
    Actions
        Set tempGroup1 = (Units in (Playable map area) matching ((Current order of (Matching unit)) Equal to (Order(acidbomb))))
        Unit Group - Pick every unit in tempGroup1 and do (Actions)
            Loop - Actions
                Animation - Change (Picked unit)'s animation speed to 325.00% of its original speed
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Abs((Custom value of (Picked unit)))) mod 2) Equal to 1
                    Then - Actions
                        Set tempPoint1 = (Position of (Picked unit))
                        For each (Integer A) from 0 to 2, do (Actions)
                            Loop - Actions
                                Set tempPoint2 = (tempPoint1 offset by ((((Sign((Real((Custom value of (Picked unit)))))) x -1.00) + 3.00) x 150.00) towards ((((Abs((Real((Custom value of (Picked unit)))))) + 1.00) x 15.00) + ((Real((Integer A))) x 120.00)) degrees)
                                Unit - Create 1 Dummy Caster for (Owner of (Picked unit)) at tempPoint1 facing tempPoint2
                                Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
                                Animation - Change (Last created unit)'s size to (50.00%, 50.00%, 50.00%) of its original size
                                Unit - Add Summon Glaive (for Dummy Caster) to (Last created unit)
                                Unit - Set level of Summon Glaive (for Dummy Caster) for (Last created unit) to (Level of Glaive Trap  for (Picked unit))
                                Unit - Order (Last created unit) to Neutral Tinker - Pocket Factory tempPoint2
                                Custom script:   call RemoveLocation (udg_tempPoint2)
                        Custom script:   call RemoveLocation (udg_tempPoint1)
                    Else - Actions
                Unit - Set the custom value of (Picked unit) to ((Custom value of (Picked unit)) - 1)
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Picked unit)) Equal to -8
                    Then - Actions
                        Unit - Set the custom value of (Picked unit) to 8
                    Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Number of units in tempGroup1) Equal to 0
            Then - Actions
                Trigger - Turn off (This trigger)
            Else - Actions
        Custom script:   call DestroyGroup(udg_tempGroup1)

Code:
Glaive Created
    Events
        Unit - A unit enters (Playable map area)
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Unit-type of (Triggering unit)) Equal to Glaive (land mine lvl1)
                (Unit-type of (Triggering unit)) Equal to Glaive (land mine lvl2)
    Actions
        Animation - Change (Triggering unit)'s animation speed to 75.00% of its original speed
        Wait 0.25 game-time seconds
        Animation - Change (Triggering unit)'s animation speed to 50.00% of its original speed
        Wait 0.25 game-time seconds
        Animation - Change (Triggering unit)'s animation speed to 25.00% of its original speed
        Wait 0.25 game-time seconds
        Animation - Change (Triggering unit)'s animation speed to 0.00% of its original speed

Code:
Glaive Dies
    Events
        Unit - A unit Dies
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Unit-type of (Triggering unit)) Equal to Glaive (land mine lvl1)
                (Unit-type of (Triggering unit)) Equal to Glaive (land mine lvl2)
    Actions
        Animation - Change (Triggering unit)'s animation speed to 100.00% of its original speed
Screenshot:
 

Attachments

  • [Spellpack] Weapon Spells v1.04b.w3x
    65.2 KB · Views: 885

Mr.Tutorial

Hard in the Paint.
Reaction score
42
Overall the spells look great and look leakless.

> It would be nice if we could download the map

Yeah that would be a good thing :shades:
 

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
Thanks to all you reppers and thanks for all comments thus far. I'm hoping for more feedback; I'm especially interested in hearing what people think about Hammer Throw.

updated: version 1.01
 

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
updated: version 1.02

I realized that Hammer Throw cannot be MUI; it can only be MPI at best because of the way the techtree requirements works. In other words, the "Hammer" dummy units (the units that are needed for the techtree requirements of this ability) will apply to the Players as a whole, not to the individual Hero; so therefore, this can only be MPI.

So in v1.02 I cleaned up the Hammer Throw code a bit to make it cleaner for MPI (got rid of the 0.01 waits).

Didnt dl the map yet but the screenys make it look good

+rep :)

Thanks, but please check out the spells too. Don't judge a book by its cover! :eek:
 

neckface

terrain contest winner! :) dance contest loser. :(
Reaction score
34
Hammer Throw is a really neat idea, and is implemented well. It could be alot of fun for a character in an RPG (conversely, it might get irritating after a little while, always having to pick up your spent hammers...).

The hammers on the ground look a tad strange, as they have the motion blur animation. You should set the animation speed to 0 for the dummy unit (I can't recall if you did this or not) or maybe consider trying the gryphon rider missile art model (also with paused animation).

This adds an excellent amount of "realism" to a fantasy RPG. Are you working these spells into a current project?
 

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
The hammers on the ground look a tad strange, as they have the motion blur animation. You should set the animation speed to 0 for the dummy unit (I can't recall if you did this or not) or maybe consider trying the gryphon rider missile art model (also with paused animation).

I know what you mean about the blur lines and it bothers me a bit too. Unfortunately, I don't know how to solve that problem because the Hammers on the ground are actually Items, not Units. As far as I know, there's no way to change an Item's animation (short of model editing); it will always play its "stand" animation. (By the way, it is the Gryphon Rider's missile that is being used.) So, in the end, it's just something that I've learned to live with.

Are you working these spells into a current project?

Nope. I just make these spells as inspiration arises and it usually has nothing to do with my current projects. I'm currently working on a TD and a Hero Siege type map. No RPG's on the table at this time.

Edit: Thanks to you reppers down there.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i liked the split spear and also the glaive trap anyway god job +Rep
 

DrinkSlurm

Eat Bachelor Chow!
Reaction score
50
Thanks again to you +reppers.

updated: version 1.03

I replaced the Rending Blow skill with a new one called Rising Axe Storm. Please check it out.
 

Tinki3

Special Member
Reaction score
418
Awesome weaponry spells ;).

In these triggers:
Code:
Hammer Throw Create Item
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Dummy Caster
        (Custom value of (Triggering unit)) Equal to 1
    Actions
        Set tempPoint1 = ((Position of (Triggering unit)) offset by 50.00 towards (Random angle) degrees)
        Item - Create Hammer at tempPoint1
        Item - Make (Last created item) Invulnerable
        Special Effect - Create a special effect at tempPoint1 using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation (udg_tempPoint1)

Reusable Hammers Create Item
    Events
        Unit - A unit Dies
    Conditions
        (Unit-type of (Triggering unit)) Equal to Dummy Caster
        (Custom value of (Triggering unit)) Equal to 2
    Actions
        Set tempPoint1 = ((Position of (Triggering unit)) offset by 50.00 towards (Random angle) degrees)
        Item - Create Reusable Hammers at tempPoint1
        Item - Set charges remaining in (Last created item) to 1
        Special Effect - Create a special effect at tempPoint1 using Abilities\Spells\Orc\MirrorImage\MirrorImageDeathCaster.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation (udg_tempPoint1)
...the first line in the actions leaks - you must first store "((Position of (Triggering unit))"
and then use another different variable to store the polar offset from that first point variable.

For ex:
Set point1 = ((Position of (Triggering unit))
Set point2 = point1 offset by ...

Then use point2 as reference.

All other triggers seem fine, and good.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top