• 🏆 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!

Abettor v1.3

  • Like
Reactions: deepstrasz
WHAT THIS SPELL DO:
hello,
===============================================================================================
The Abettor
A hero calls his ally to help him in battle. On casting, some percentage of the life of the summoned unit is dealt as damage to the target. The summoned unit lasts for a period of time. When the target dies, the summoned unit will instantly disappear. Each level, a new stronger unit is summoned. Though the summoned unit is timed, I want it that he (the summoned unit) cand still be controlled by the owner of the summoned unit.
Last: 10/20/30 seconds
Damage Dealt: 15 % life of the summoned unit
Summoned units: Bandit/Rogue/Bandit Lord
===============================================================================================
How to Import:
Just copy the triggers or the folder named "Arbettor" and the variables into your map. You may also want to copy the custom ability in this map into your map.

NOTE:
PLease give credits to me if you use this spell in your map.

thank you,

eubz
===============================================================================================
Thanks to Hanky's Dynamic endixer.

CHANGE LOGS.
1. First version - The summoned unit is ordered to attack the target. He is also summoned just beside the caster.
2. Second version - The damage is triggered, summoned unit is given locust ability so his owner will not be able to control him. Giving him this ability makes the spell awkward and then adding an action to play attack animation for the summoned unit makes it more awkward. Here, I decided to add some more action that, whenever the target unit moves away from the summoned unit, the summoned unit still follows the target. This even makes the spell more awkward.
3. Third version (present version) - Creates the summoned unit just beside the target. Deleted the locust ability so the owner of the summoned unit can control him. The action ordering the summoned unit to attack the target is now deleted (in fact, the summoned unit will always attack the target for all targets of this spell are caster's enemies).

  • Arb init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- ============================================================== --------
      • -------- =============YOU CAN CONFIGURE THE VALUES BELOW=========== --------
      • -------- you can configure the damage dealt by the summoned unit. --------
      • Set Ab_Damage = 25.00
      • -------- you can configure the time. --------
      • -------- this is also multiplied by the level of the ability --------
      • Set Ab_Time = 10.00
      • -------- ============================================================== --------
      • -------- configure the damage dealt to the target during the cast --------
      • Set Ab_damage_percent = 6.67
      • -------- using 6.67 in damage_percent means 15% --------
      • -------- the formula is: Timed_Damage[integer] = (((Life of u[integer]) x (Real((Level of Cripple (Neutral Hostile) for caster[integer])))) / damage_percent) --------
      • -------- so, if life of the summoned unit is 250, multiply that to the level of the ability divided by the damage_percent, that's the real damage dealt to the target unit --------
      • -------- using this configuration, the damage would be: --------
      • -------- Level 1 = 35.982008 or just 36 to round this off --------
      • -------- Level 2 = 59.97001 or 60 --------
      • -------- Level 3 = 142.4287857 or 142 --------
      • -------- ============================================================== --------
      • -------- you can configure the kind of unit to spawn in each level --------
      • -------- in the object editor, do not forget to configure the food cost and lumber cost of the units to be used here --------
      • -------- food cost and lumber cost should be set to zero --------
      • -------- it is also the best to create custom units only for this --------
      • Set Ab_TimedUnit[1] = Bandit
      • -------- HP = 240 --------
      • Set Ab_TimedUnit[2] = Rogue
      • -------- HP = 400 --------
      • Set Ab_TimedUnit[3] = Bandit Lord
      • -------- HP = 950 --------
      • -------- ============================================================== --------
      • -------- configure all the special effects --------
      • Set Ab_SFXCreationPath = Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
      • Set Ab_SFXRemovePath = Abilities\Spells\Human\MassTeleport\MassTeleportCaster.mdl
      • Set Ab_TargetSFXPath = Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
      • -------- configure the attachment point for the target --------
      • Set Ab_TargetSFXAttchment = origin
      • -------- ============================================================== --------
      • Set Ab_Spell = Abettor
      • -------- =============END OF CONFIGURABLES=========== --------
      • -------- ============================================================== --------
      • -------- DON'T TOUCH THE ACTION BELOW --------
      • -------- ============================================================== --------
      • Set Ab_unit_counter = 1
      • -------- ============================================================== --------
  • Arb create
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Ab_Spell
    • Actions
      • -------- DON'T TOUCH THE ACTIONS BELOW --------
      • Set Ab_size = (Ab_size + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Ab_size Greater than Ab_maxsize
        • Then - Actions
          • Set Ab_index[Ab_size] = Ab_size
          • Set Ab_maxsize = Ab_size
        • Else - Actions
      • Set Ab_integer = Ab_index[Ab_size]
      • -------- ========================================================== --------
      • Set Ab_target[Ab_integer] = (Target unit of ability being cast)
      • Set Ab_caster[Ab_integer] = (Triggering unit)
      • Set Ab_TargetPos = (Position of Ab_target[Ab_integer])
      • Set Ab_SpawnUnit[Ab_integer] = (Ab_unit_counter x (Level of Abettor for Ab_caster[Ab_integer]))
      • Set Ab_TimedLife[Ab_integer] = (Ab_Time x (Real((Level of Abettor for Ab_caster[Ab_integer]))))
      • Set Ab_caster_position = (Position of Ab_caster[Ab_integer])
      • Set Ab_u_pos_initial[Ab_integer] = (Ab_TargetPos offset by 100.00 towards (Facing of Ab_caster[Ab_integer]) degrees)
      • -------- ======================================================= --------
      • Unit - Create 1 Ab_TimedUnit[Ab_SpawnUnit[Ab_integer]] for (Owner of Ab_caster[Ab_integer]) at Ab_u_pos_initial[Ab_integer] facing Default building facing degrees
      • Set Ab_timed_unit[Ab_integer] = (Last created unit)
      • Set Ab_Timed_Damage[Ab_integer] = ((Life of Ab_timed_unit[Ab_integer]) / Ab_damage_percent)
      • Set Ab_DamageReal[Ab_integer] = (Ab_Damage x (Real((Level of Ab_Spell for Ab_caster[Ab_integer]))))
      • Special Effect - Create a special effect at Ab_u_pos_initial[Ab_integer] using Ab_SFXCreationPath
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect attached to the Ab_TargetSFXAttchment of Ab_target[Ab_integer] using Ab_TargetSFXPath
      • Set Ab_target_SFX[Ab_integer] = (Last created special effect)
      • Unit - Cause Ab_caster[Ab_integer] to damage Ab_target[Ab_integer], dealing Ab_Timed_Damage[Ab_integer] damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation(udg_Ab_u_pos_initial[udg_Ab_integer])
      • Custom script: call RemoveLocation(udg_Ab_caster_position)
      • Custom script: call RemoveLocation(udg_Ab_TargetPos)
      • Trigger - Turn on Arb timer <gen>
      • -------- ======================================================= --------
Arb timer
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
-------- DON'T TOUCH THE ACTIONS BELOW --------
For each (Integer Ab_loop) from 1 to Ab_size, do (Actions)
Loop - Actions
Set Ab_integer = Ab_index[Ab_loop]
Set Ab_u_pos = (Position of Ab_timed_unit[Ab_integer])
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
Ab_TimedLife[Ab_integer] Less than or equal to 0.00
(Ab_target[Ab_integer] is dead) Equal to True
(Ab_timed_unit[Ab_integer] is dead) Equal to True
Then - Actions
Special Effect - Create a special effect at Ab_u_pos using Ab_SFXRemovePath
Special Effect - Destroy (Last created special effect)
Special Effect - Destroy Ab_target_SFX[Ab_integer]
Animation - Reset Ab_timed_unit[Ab_integer]'s animation
Unit - Remove Ab_timed_unit[Ab_integer] from the game
Set Ab_index[Ab_loop] = Ab_index[Ab_size]
Set Ab_index[Ab_size] = Ab_integer
Set Ab_size = (Ab_size - 1)
Set Ab_loop = (Ab_loop - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Ab_size Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Else - Actions
Set Ab_TimedLife[Ab_integer] = (Ab_TimedLife[Ab_integer] - 1.00)
Custom script: call RemoveLocation(udg_Ab_u_pos)[/trigger]


Keywords:
ally, abet, friend, eubz
Contents

Arbettor v1.1 (Map)

Reviews
Moderator: Pharaoh_ Date: 12th of July, 2012 22:31 (GMT+2) Approved. Ab_u_pos_initial[Ab_integer]: Doesn't need an array. Set Ab_caster[Ab_integer] = (Triggering unit): Doesn't need an array either, it's not used in the looping trigger anyway...

Moderator

M

Moderator

160036-albums4747-picture55861.png

Moderator: Pharaoh_
Date: 12th of July, 2012 22:31 (GMT+2)

Review
Approved.
Suggested changes

Ab_u_pos_initial[Ab_integer]: Doesn't need an array.
Set Ab_caster[Ab_integer] = (Triggering unit): Doesn't need an array either, it's not used in the looping trigger anyway. Just use Ab_caster = (Triggering unit).
Play the unit's attack animation and damage the target with triggers, instead of manually ordering to attack the target. I don't see why I can control the unit, when the trigger orders it to only attack the target; you should use Locust. Trigger description is "ubz" as Author's name; fix it.
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
Jesus! I also use Hanky's dynamic indexing system, but i combine those triggers into one trigger and everything works well... you can see my spells just below this text and see that it's true!

Or maybe we are talking about different things... but i think we aren't because he just sets the variables that can be modified by the user in a separate trigger, while i set them in the trigger where the spell is being casted.

Nevermind, it's not a big problem (if it's a problem at all). Nice spell! :)
 
Jesus! I also use Hanky's dynamic indexing system, but i combine those triggers into one trigger and everything works well... you can see my spells just below this text and see that it's true!

Or maybe we are talking about different things... but i think we aren't because he just sets the variables that can be modified by the user in a separate trigger, while i set them in the trigger where the spell is being casted.

Nevermind, it's not a big problem (if it's a problem at all). Nice spell! :)

It is more efficient to have them separated. Init only runs once, while spell cast runs every time the spell is cast, and every time it does it will reset those variables.
It is unneeded to merge them.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Review


Abettor v1.3
This spell had been reviewed by jakeZinc.


Trigger Code
The trigger looks good and short.
  • Unit - Create 1 Ab_TimedUnit[Ab_SpawnUnit[Ab_integer]] for (Owner of Ab_caster[Ab_integer]) at Ab_u_pos_initial[Ab_integer] facing Default building facing degrees
at this, it is created at execution so you don't need GetOwningPlayer so use TriggeringPlayer.
  • Set Ab_u_pos = (Position of Ab_timed_unit[Ab_integer])
You can set the point variable to the inside of the ITE Condition Block. Other than that none =).
Documentation
Well the documentation is nice and it is heavy documentation in the configuration
Configuration
  • Unit - Cause Ab_caster[Ab_integer] to damage Ab_target[Ab_integer], dealing Ab_Timed_Damage[Ab_integer] damage of attack type Spells and damage type Normal
The attacktype and the damagetype can be configurable. The configuration is complete and documented tho.
Pros
It is leakless, lagless and MUI Spell.
Cons
None.
Importing Instruction
The importing instruction is lacking at least.
Special Effects
Well adding a special effect from removing the unit and spawning the unit seems enough and executed well.
Usefulness
Very useful and this spell can help him in the combats.
Suggestions
None.
Description Tooltip
The tooltip can hurt my eyes and it is colorful xD, anyway it is supporting every levels so,

jakeZinc Score Board
Rejected: 1-10
Unacceptable : 11-30
Lacking : 31-49
Useful : 50-69
Recommended : 70-90
Highly Recommended : 91-100
Director Cut : 101-105
Scores
1) Triggering - 18/20
2) Documentation - 9/10
3) Importing Instruction - 5/10
4) Special Effects - 8/15
5) Usefulness - 20/20
6) Tooltip - 9/10
7) Configuration - 8/10
Ratings
Total Score - 77/105
jakeZinc Rating - 4/5
Status - Recommended
 
Top