The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add damage type to a spell: best way?
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
Add damage type to a spell: best way?
I need to add a dam_type to some spells, i saw that not each spells has a dam type such as lightning, fire etc...

Is there some place to add the damage type or i need to specify something on some ARGN under @spelleffect?

Thx.
12-18-2012 03:31 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Add damage type to a spell: best way?
Both lighting and fire do have damage types, however if you are not happy with the type of damage they do and want to change it or something, you could do something like I did a long long time ago when i was actually changing the types of damage different spells did.

There's probably a more efficient way of doing it now but...

Code:
ON=@SPELLEFFECT
if (<serv.spell.<argn1>.flags> & spellflag_harm) //this spell did me harm
    ctag.spellargn=<eval <ARGN>> //record the damage type
ENDIF
RETURN 0

ON=@GETHIT
IF (<CTAG0.SPELLARGN>)
        blah blah blah
CTAG.SPELLARGN=
ENDIF
RETURN 0

[Image: 2nis46r.jpg]
12-18-2012 06:08 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: Add damage type to a spell: best way?
Ah so @gethit is triggered after @spelleffect good!
Thx for your answer, now i can add dam_type to spell which has just a generic dam_type.
12-18-2012 06:18 AM
Find all posts by this user Like Post Quote this message in a reply
admin phoenix
Master
**

Posts: 354
Likes Given: 1
Likes Received: 23 in 13 posts
Joined: Mar 2012
Reputation: 3



Post: #4
RE: Add damage type to a spell: best way?
I put the damage directly under the spell trigger @effect.
12-18-2012 04:19 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)