HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Vengeful Curse (Spell Session 03)

05-13-2006, 10:04 PM#1
Vuen
Vengeful Curse 1.4

This spell was made for the Spell Making Session 03. It is free to use in any playable map you wish, and you may modify it however you like. Please give credit if you use it.

If you have any questions or comments, feel free to post here or send me an email. Enjoy!

- Vuen ([email protected])



Description:

Curses a target enemy unit, causing it to speed up and attack one of your enemies. When the cursed unit hits someone, it transfers the curse.

Adds bonus damage on each attack. Lasts a set number of hops.



Features:
  • Cursed units will only attack units capable of carrying the curse; magic immune units, non-combat units (pack horses, villagers), and neutral units are ignored. The spell fizzles when cast on units incapable of attacking.

  • Hero targets, flying targets, and mechanical targets are optional. Cursed units will properly ignore invalid targets (and melee units will properly ignore flying units).

  • Properly interacts with missed attacks (with abilities such as Evasion); when a cursed unit misses it simply attacks again.

  • Properly handles units that are inaccessible. If a cursed unit can't reach a target, it will simply try another (or dispel if it can't find any).

  • The caster properly gets credited in score, bounty and experience for kills by cursed units.

  • Melee units will seek the nearest target, while ranged units will attack a random unit in range. This creates a fantastic mix between "round the bend" melee chains and "hot potato" ranged chains.

  • Multiple curses on the same group of units flow seamlessly. Active curses individually keep track of those units which they have already cursed, and they do not conflict or cancel eachother out.

  • The spell can be configured to allow units to be rehit by the same curse. This can make a curse lock two units together in battle.

  • Ethereal units cannot be cursed. Ensnared or webbed melee units cannot be cursed, because they cannot move to reach their targets. Ensnared or webbed ranged units can still be cursed, because they don't need to move to attack.

  • Ignores units affected by any buff from a readily configurable list. This means it optionally will not conflict with units currently under the effects of other custom spells.

  • Lightning effect will not leak even when cursed units are removed abnormally via triggers. The spell is designed to interact extremely well even in heavily triggered maps.

  • Like any chain spell, this cannot be dispelled once cast. However you can dispel it via triggers by simply removing the buff. Use this to prevent the spell from being cast in certain areas or on certain units for example.

  • As per the JESP standard, the spell is fully multi-instanceable and, to my knowledge, completely leak-free. Gamecache entries for an instance of the spell are flushed by category every hop, so leaked memory should not occur. All Player calls are also wrapped to prevent the game from crashing should something go wrong.
Attached Images
File type: jpgVengefulCurseZoomed.jpg (45.0 KB)
File type: jpgVengefulCurse1.4.jpg (266.1 KB)
Attached Files
File type: w3xVengeful Curse 1.4.w3x (54.0 KB)
05-17-2006, 04:48 PM#2
blu_da_noob
My apologies for the delay. Well made spell, follows the JESP standard; approved. My only gripe would be your frequent use of BJ functions, which should preferably be replaced by their native counterparts.
05-25-2006, 02:36 PM#3
Vuen
Actually it uses almost no BJ functions. It mostly just uses the buff functions instead of ability functions for readability, and the converted player functions because I use player 0 to indicate no curse; this makes it faster than having a separate gamecache call to check if the unit is cursed.
05-25-2006, 02:58 PM#4
blu_da_noob
Things like:

InitGameCacheBJ
AddSpecialEffectTargetUnitBJ
CreateNUnitsAtLoc (especially seeing as you only use it to create one unit)
SetUnitVertexColorBJ
IsUnitGroupEmptyBJ (enums through the whole group, can be replaced with FirstOfGroup == null)
GroupRemoveUnitSimple
GroupAddUnitSimple
SetUnitPositionLocFacingLocBJ
IssueTargetOrderBJ
GetUnitAbilityLevelSwapped
GetAttackedUnitBJ
UnitDamageTargetBJ
ForGroupBJ
SetLightningColorBJ
DestroyLightningBJ
StoreIntegerBJ
StartTimerBJ


UnitHasBuff and UnitRemoveBuff are excusable, because you have semi-valid reasons. There is no excuse for those.

Collapse JASS:
        call AddSpecialEffectTargetUnitBJ( VengefulCurse_DispelEffectAttach(level), un, VengefulCurse_DispelEffect(level))
        call DestroyEffect( GetLastCreatedEffectBJ() )
Can be replaced with:
Collapse JASS:
        call DestroyEffect(AddSpecialEffectTarget( VengefulCurse_DispelEffectAttach(level), un, VengefulCurse_DispelEffect(level)))

I would hardly call that 'almost no BJ functions' (most of those are used multiple times).
05-26-2006, 12:59 PM#5
Vuen
Hmm, I didn't realize I used that many. Well I'll update it in a few days.