[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Spells


Closed Thread
 
Thread Tools
This resource is not available
Old 08-18-2012, 10:22 AM   #2 (permalink)
Registered User Kingz
I don't care.
 
Kingz's Avatar
 
Join Date: Jun 2008
Posts: 2,769
Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)
Techtree Contest #6 - Winner: Demon Race: Kingz has managed to create a WarCraft3 race without importing additional material, yet presenting something unique to the public! A race made by Kingz. 
If a user modifies the gameplay constant the system will break tho.
You should mention that.

Jass:
           constant real    INV          = Pow(2,32)

Why not use a calculator and just put the direct value in here? Pow is really a heavy function call.

Edit:

2^32 = 4294967296
__________________
Apheraz Lucent and -Grendel will forever live in my memory, two extraordinary persons taken away from our world before their time.

And so i dedicate my signature to them, a small sign of memory that will forever remain on my profile, for as long as it exists.
I am sad it's all i can do for them now and i hope i never did something to bring them anything but joy in their life.
World is a cruel place, but it was a better place with both of you in it. Miss you both.
Kingz is offline  
Old 08-18-2012, 03:28 PM   #3 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,702
Magtheridon96 has a brilliant future (1824)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
I forgot to mention the following points in my review:
  • Pow(2, 32) is both inefficient, and overflows. Pow(2, 31) - 1 is the greatest integer you can have in Wc3 since it's a 32-bit application.
    If you want higher numbers, use reals, but I doubt that's what you want.
  • Don't use BJs. (The red-colored functions)
  • Don't use GUI systems for vJASS systems.
  • Don't put systems inside scopes.
  • Use only libraries for systems.
  • You should add configurable constants to the system because currently, this system will only work for the default ones.
__________________
Magtheridon96 is offline  
Old 08-18-2012, 04:01 PM   #4 (permalink)
Registered User edo494
User
 
edo494's Avatar
 
Join Date: Apr 2012
Posts: 986
edo494 is a jewel in the rough (204)edo494 is a jewel in the rough (204)
you could set hp of the unit we are going to inspect to max, dmg it and set it back that way you wont kill it unless it has very low health as base
__________________
my resources
GetLastCastAbility, Reputation System(Awaiting approval), GetKiller(Awaiting approval), Spell Steal
[22-00-51] Geries: edo494, no
[22-00-57] Geries: edo494, but I'm gay
edo494 is offline  
Old 08-18-2012, 04:15 PM   #5 (permalink)
Registered User gorillabull
bot
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 958
gorillabull is a jewel in the rough (169)
updated everything except the damage engine and indexer i cant find a better system so that's why i kept it, it should not be problematic as it is coded mostly in jass.
__________________
+

Last edited by gorillabull; 08-19-2012 at 07:07 AM.
gorillabull is online now  
Old 08-19-2012, 12:19 PM   #6 (permalink)
Registered User edo494
User
 
edo494's Avatar
 
Join Date: Apr 2012
Posts: 986
edo494 is a jewel in the rough (204)edo494 is a jewel in the rough (204)
In function GetReduction you have to null the unit before returning value or you will leak.
Also your typing is quite odd, why do you tab on every set in the second function, you should tab only after if, loop or function/method/library/scope/module header, also all calls should be in one line(same spaces), it should look like
Jass:
function GetType takes nothing returns integer
    local unit u = null
    local real r = 0.

    set r = GetUnitX(u)
    call BJDebugMsg("Hello")
    call SetUnitY(u, r+r*r)

    if r < 500. then
        set r = 500+r
    endif

    set u = null
endfunction
- this is example, also the free lines are not needed but its nothing bad
This is optional but also instead of armor_amount you could name it armorAmount(camelCase), its standard here on the hive
__________________
my resources
GetLastCastAbility, Reputation System(Awaiting approval), GetKiller(Awaiting approval), Spell Steal
[22-00-51] Geries: edo494, no
[22-00-57] Geries: edo494, but I'm gay
edo494 is offline  
Old 08-19-2012, 12:47 PM   #7 (permalink)
Registered User gorillabull
bot
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 958
gorillabull is a jewel in the rough (169)
Quote:
Originally Posted by edo494 View Post
In function GetReduction you have to null the unit before returning value or you will leak.
hmmm i didnt know that included user defined globals too, if its a local it will leak but the global carries the value until it is re assigned

also camel case is great and so are one word variables i must have skipped that one
__________________
+
gorillabull is online now  
Old 08-19-2012, 02:37 PM   #8 (permalink)
Registered User edo494
User
 
edo494's Avatar
 
Join Date: Apr 2012
Posts: 986
edo494 is a jewel in the rough (204)edo494 is a jewel in the rough (204)
well, you have local unit u in GetReduction and you dont even use it so its useless :D
but about the globals you are right you dont need null globals
__________________
my resources
GetLastCastAbility, Reputation System(Awaiting approval), GetKiller(Awaiting approval), Spell Steal
[22-00-51] Geries: edo494, no
[22-00-57] Geries: edo494, but I'm gay
edo494 is offline  
Old 08-19-2012, 06:52 PM   #9 (permalink)
Registered User SeekAndDestroy
TimeToRapeYou
 
SeekAndDestroy's Avatar
 
Join Date: Apr 2011
Posts: 33
SeekAndDestroy has little to show at this moment (6)
why do you need this when you already can click on the armor of the hero and tell you everything you need to know...?
SeekAndDestroy is offline  
Old 08-19-2012, 11:32 PM   #10 (permalink)
Registered User gorillabull
bot
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 958
gorillabull is a jewel in the rough (169)
i will give a few examples.

this system is meant to be used with a damage detection system or dds, with a dds you have great control over every damage amount dealt on your map, dds allows you to trigger spells, say you want your hero to do a fraction of his intelligence , create new damage types even detect what damage is dealt. With this system you can now get the armor stats, even though you can see them on the armor tooltip, it is not possible to utilize them efficiently. for example you want to code a spell which bypasses all armor damage resistances and multiplyers, it is not very practical when the spell is cast to have to look at the target's armor and have to enter those values manually the armor type can be used to set dynamic resistances of any armors
__________________
+
gorillabull is online now  
Old 08-20-2012, 03:55 AM   #11 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,702
Magtheridon96 has a brilliant future (1824)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
UnitIndexer and DamageEvent by Nestharus are the better alternatives.
They can be found in the JASS section of this site.
(Not the Spells section, the Spells section's standards are relatively low)
__________________
Magtheridon96 is offline  
Old 08-20-2012, 04:43 AM   #12 (permalink)
Registered User gorillabull
bot
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 958
gorillabull is a jewel in the rough (169)
updated uses Nestharus' systems
__________________
+

Last edited by gorillabull; 08-21-2012 at 09:26 AM.
gorillabull is online now  
Old 08-21-2012, 06:45 PM   #13 (permalink)
Registered User Matarael
Heavy drinker.
 
Join Date: Dec 2005
Posts: 524
Matarael has a spectacular aura about (133)Matarael has a spectacular aura about (133)Matarael has a spectacular aura about (133)Matarael has a spectacular aura about (133)
Tag.
Matarael is offline  
Old 08-31-2012, 04:22 AM   #14 (permalink)
Registered User gorillabull
bot
 
gorillabull's Avatar
 
Join Date: Jul 2011
Posts: 958
gorillabull is a jewel in the rough (169)
damn haha ok i guess i have to learn a few more things

Last edited by gorillabull; 09-18-2012 at 06:26 PM.
gorillabull is online now  
Closed Thread

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 05:59 AM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle