1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Light Shield 2.1.3

Submitted by Flame_Phoenix
This bundle is marked as approved. It works and satisfies the submission rules.
Ok people, this is the return of my infamous Light Shield. After a discussion with Rising_Dusk complaining about me not using systems and doing things in an insane way, I quited the spell again, after all it worked well. However, recently (once again) I started working on the spell to make it approved, I decided that after so much time wasted on the spell, it would be a crime not to make an acceptable version of it. Therefore I returned from the shadows making this spell as modular as I can, with as much experience as possible for a newbie like me xD
Also this spell was already approved in wc3c, so it is sure to be of quality =D
You can see link here.

Description:
- A JESP spell that allows the hero to cast a shield on a not Ud ally or on an Ud enemy (just like Holy Light). The shield will absorb an amount of damage for the allied unit thus protecting it from harm, or it will amplify the damage caused to the unit if it is enemy. When the shield dies, the shield unit will get healed by the remaining energies of the shield if it is an ally, or it will be damage by the remaining energies if it is an enemy.

Requirements:
- Jass NewGen Pack (uses vJASS)
- Timer Utils ( I use Blue flavor)
- xe basic and xedamage module
- ABuff and ADamage
- LastOrder(stand alone version) and AbortSpell

History:
Version 1.0:
- Start of the spell, release to the forums in order to upgrade and search solutions

Version 1.1, 1.2, 1.3, 1.4:
- Testing and construction of the spell, fix of bugs and add of functionalities
- Public release as ready

Version 1.5
- Decided to join the community standards and so the spell now uses ADamage and Abuff

Version 1.6, 1.7:
- Improved many other aspects of the spell, including personalized error messages
among other new features

Version 1.8:
- Improved map to use AborSpell better
- Reduced the two error messages to only 1, thus simplifying the code and the SETUP
section
- Fixed a bug on the targets, now choosing targets work fine
- Corrected a few documentation typos

Version 1.9:
- Removed the alone version, it was buggy and inferior when compared to the other
- Improved the code, now the extra damage considers enemy armor when dealt
- Added w3gamer to credits

Version 2.0:
- Quick fix to a bug. Now when you cast the spell with chainlightning as an
order string it wont conflict
- Corrected a typo in the documentation and updated the JESP document
- Updated the requirements of the spell

Version 2.0.1:
- Removed the use of tags, after all, they are useless for this spell
- Improved the code in a line
- Updated the credits
- Changed the attack type to chaos
- Corrected the requirements of the spell

Version 2.0.2:
- Added another function to the SETUP that allows use to make a better use of the
spell
- Eliminated a useless variable ".lastDamage", this allowed me to greatly simplify
the if statements of some sections and allowed me to clean up the code a lot better
- Minos fixes in the change log

Version 2.1:
- Added another xedamage object that allows the use to calibrate the lastDamage
caused by the destruction of the shield in a different way
- Added new globals that allow the user to define the attachment points of the
effects on the units
- Fixed a leak problem
- Added another function that allows the to chose what he wants to do when the shield
dies
- Increased and corrected code documentation

Version 2.1.1:
- Fixed the capitalization conventions for the SETUP section
- Improved comments

Version 2.1.2:
- Fixed the description of the ability
- Fixed the description of the map
- Fixed the description of the loading screen
- Added more levels to the aura
- Fixed the tooltip of the buff, now it is not red, it is green

Version 2.1.3:
- Updated for patch 1.24

Keywords:
shield, light, divine, counter undead, heal, defend, defensive
Contents

Light shield (Map)

Reviews
Moderator
13:37, 13th Jun 2009 hvo-busterkomo: A great vJASS spell, following the JESP standard. ShieldDyingEffect and Conditions could be made constant, but it doesn't really matter.
  1. 13:37, 13th Jun 2009
    hvo-busterkomo: A great vJASS spell, following the JESP standard. ShieldDyingEffect and Conditions could be made constant, but it doesn't really matter.
     
  2. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Downloading...
    Btw you didn't use the hidden tags correctly...
    EDIT:
    Strange, can't test it and i have JNGP o_O
    Got an error in this line:
    Code (vJASS):
    set LightShield_id.eventCreate = ABuffEvent_Create.LightShield___Create

    Will try to test it from the warcraft, not we...
     
  3. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Well, I'm not going to fully read this, but there are two BJ's which could be easily replaced:
    Code (vJASS):
    call TriggerRegisterAnyUnitEventBJ( LightShieldTrg, EVENT_PLAYER_UNIT_SPELL_EFFECT )


    With:
    Code (vJASS):
    local integer intr
    set intr = 0
    loop
        call TriggerRegisterPlayerUnitEvent(LightShieldTrg, Player(intr), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
        set intr = intr + 1
        exitwhen intr == bj_MAX_PLAYER_SLOTS
    endloop


    The same applies for the other BJ:
    Code (vJASS):
    call TriggerRegisterAnyUnitEventBJ(LightShieldTrg, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )



    The script is very well documented and seems nicely done.
    A lot of libraries are used, but they seem to be necessary...
    Also it's very friendly user and easily adjustable

    Well I like the idea, so all in all well done ;)


    @ Kingz:
    it opens normally on my WE :s
     
  4. xxdingo93xx

    xxdingo93xx

    Joined:
    Sep 8, 2007
    Messages:
    746
    Resources:
    2
    Maps:
    1
    Spells:
    1
    Resources:
    2
    Those BJ's aren't dangerous or so slow that you have to replace it. You can just let it be there, it is no problem.
     
  5. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Well yes I know, but if they're not hard to replace, why not...?
    But I know that it barely affects efficiency by like merely few nanoseconds so yes it's no big deal :p
     
  6. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    I am admired how fast people replied to this thread ... anyway:

    @Kingz:
    The hidden tags problem was fixed. About your problem, you are experiencing a bug with the JassHelper. This is a bug from the JassHelper in version 5c, please either run my spell with version 5b or simply update your JassHelper to the most recent version here:
    http://www.wc3c.net/showthread.php?t=88142

    @Deuterium:
    You are correct about the BJ's, however those BJ's are not evil in the meaning of the word, they do some useful work. In this case I prefer code easy to read to a code that is hyper-mega-super efficient. We are talking about a few nanoseconds here, I don't think it is worth it xD

    @xxdingo93xx:
    Long time no see, thx for the fast reply buddy =D
    Hope you can learn from this spell as well and make your spells even better than mine =P
     
    Last edited: Jun 12, 2009
  7. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    @Flame_Phoenix
    Can you post a link to JNGP 5b here?
    The 5c also has reinventing the craft which makes my warcraft freeze...
    EDIT:
    Fats people, eh?^^
     
  8. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Wermm, I mean fast ! *fixed xD
    There are no links for 5b, but fortunately I still have a 5b version backup, in case I need one. However the version is 120MB and so I can't attach it here =S

    Your problem is easy to fix however, just download JassHelper from the link I gave you above, and then replace the JassHelper folder in your JNGP by the new one =D
     
  9. hell gate

    hell gate

    Joined:
    Nov 23, 2008
    Messages:
    477
    Resources:
    10
    Models:
    1
    Spells:
    9
    Resources:
    10
    the spell looks good but i can't say someting about the script, because i'm the greatest noob in Jass or vJass.

    120MB?! 5c is about 48MB great! so i can't belive it
     
  10. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    it's never too late to learn =P

    Want a picture of it?
     
  11. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Bump ... will someone mod this ?
     
  12. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    It takes time, you can only wait :p
     
  13. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    OMG ... who are the mods on this section?
    It is hard to see other resources being approved by no reason xD
     
  14. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Really you shouldn't complain :p
    I have spells old for several months, maybe even a year...
    There are even several years old resources here that haven't been reviewed(at least i think)...
    There is more thank 1000 pending spells on the hive so it will take time...
     
  15. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    Me too ....

    You think well...

    Oh well ... I am used to Hanky... he used to mod my spells in an instant =P
     
  16. Dark_Dragon

    Dark_Dragon

    Joined:
    Jul 19, 2007
    Messages:
    596
    Resources:
    8
    Tools:
    1
    Spells:
    7
    Resources:
    8
    ohh well nice spell FP!

    i checked it out and well you really use a lot of librarys :D
    coding is object leakless MUI and not GUI
    the only leaks i found are table ones (i mean boolexpr) leaks i dont know did you read Hankys tutor but using null as boolexpr is a leak! AnyUnitEventBJ creates 16 boolexpr leaks! but ill let you off since all GUI spells leak that!

    still all other is quite nice ;) gj 4.7/5
    but ill rate it 5/5 :D

    Greets!
    ~Dark Dragon
     
  17. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    I find it weird that AnyUnitEventBj leaks. If that happens then our maps should freeze after a few minutes of game, because that is one of the functions that is used massively. I can not discuss Table, that is something you have to do with Vex (it's creator). Also, Table already has an update for 1.23b, so this is not the most recent version it has (I decided to wait for 1.23b to update the lib, which will be just copy and paste xD ). There is a chance this "leak problem" you are reporting is fixed for 1.23b but I am not sure.

    By the way, can you link me to Hanky's tut ? I didn't read it, I may learn something =)

    Thx for the rating =D
     
  18. Dark_Dragon

    Dark_Dragon

    Joined:
    Jul 19, 2007
    Messages:
    596
    Resources:
    8
    Tools:
    1
    Spells:
    7
    Resources:
    8
    no no no :D your game wont freeze coz of this leaks nor will it freeze if u leak locations, groups... unless u leak 2^13 objects then u will see lag and delay in game...

    what i mean by table is not table library but boolexpr coz type boolexpr is not an object its a table of boolean conditions thats what i mean and u leak them i could explain u better then that tutorial but i think that that hanky-s tutorial will be enough for u! ;)

    Memory Leaks
    currently number 1 tutorial about leaks i have ever seen!

    np ty for checking my spell as well ;)
    Greets!
    ~Dark Dragon
     
  19. Flame_Phoenix

    Flame_Phoenix

    Joined:
    May 4, 2007
    Messages:
    2,283
    Resources:
    11
    Tools:
    1
    Maps:
    1
    Spells:
    6
    Tutorials:
    3
    Resources:
    11
    It means you have two triggers called "xebasic". You are importing the same thing twice on your map.