Komaqtion
You can change this now in User CP.
- Reaction score
- 469
Tormental Wrath
Hi!
Just thought that because i've gotten alot of help here on thehelper on this spell, you could see the final product.
It's my very first spell (Both to be submitted here on the forum, and the first real thing i've made in JASS), so i was hoping you could give me feedback and maybe suggestion on how to "efficienize" is XD
MUI/MPI: MUI
GUI/JASS/vJASS: vJASS
Requires: The spell trigger itself
the XEbasic, XEfx, XEcollider and XEdamage libraries
the BoundSentinel library
JASS Newgen Pack version 5d
And finally, the patch 1.23b, or higher, for Warcraft 3.
Here are some screenshots
If the "screenies" does not give you the feeling you want, download the map and test it out for yourself !
And here's the spells code:
Please give much feedback, and tips both for this spell and future stuff
Tormental Wrath
By Komaqtion
By Komaqtion
Hi!
Just thought that because i've gotten alot of help here on thehelper on this spell, you could see the final product.
It's my very first spell (Both to be submitted here on the forum, and the first real thing i've made in JASS), so i was hoping you could give me feedback and maybe suggestion on how to "efficienize" is XD
MUI/MPI: MUI
GUI/JASS/vJASS: vJASS
Requires: The spell trigger itself
the XEbasic, XEfx, XEcollider and XEdamage libraries
the BoundSentinel library
JASS Newgen Pack version 5d
And finally, the patch 1.23b, or higher, for Warcraft 3.
Here are some screenshots
If the "screenies" does not give you the feeling you want, download the map and test it out for yourself !
And here's the spells code:
JASS:
scope TormentalWrath initializer Init // requires xedamage, xebasic, xefx, xecollider, BoundSentinel
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//***********************************************************************************************************//
//@@//////////////////////////////////Tormental Wrath, Made by Komaqtion///////////////////////////////////@@//
//@@ Now using XE! @@//
//@@ @@//
//@@ @@//
//@@ How to import: @@//
//@@ @@//
//@@ ¤ First copy the ability "Tormental Wrath" and the unit "Dummy" and change the constant @@//
//@@ "SPELL_ID" to the rawcode of the newly copied spell, then go into the trigger called @@//
//@@ "xebasic", and change "XE_DUMMY_UNITID" to the Dummy's rawcode ! @@//
//@@ Then you need to import Vexorian's dummy.mdx file from this map, or another, and change @@//
//@@ the "Dummy" unit's model to it. Then, of course, you need to import the triggers, which @@//
//@@ are in the categories "The Spell" and "Required Systems". @@//
//@@ Then you're free to change any of the given global constants to suit your needs. @@//
//@@ @@//
//@@ @@//
//@@ Requirements: @@//
//@@ @@//
//@@ ¤ Patch 1.23b or newer. @@//
//@@ ¤ JASS Newgen Pack, version 5d or newer. @@//
//@@ ¤ This spell, of course ! @@//
//@@ ¤ The dummy.mdx, BoundSentinel and the XE libraries, all made by Vexorian ! @@//
//@@ ¤ GroupUtils, made by Rising_Dusk ! @@//
//@@ @@//
//@@ @@//
//@@ Credits to: @@//
//@@ @@//
//@@ * Vexorian, for the dummy.mdx file, BoundSentinel and the XE libraries ! @@//
//@@ * Anitarf and Pyrogasm, for their help on the rewrite of it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ * Rising_Dusk, for making GroupUtils, and helping me a bit on the forum ! @@//
//@@ @@//
//@@ And, of course, so many thanks to all of the many helpful people at WC3C.net @@//
//@@ who has helped get is spell working! @@//
//@@ @@//
//@@ @@//
//@@ Note: This is my very first fully working, and quite good, spell made completely in vJASS. @@//
//@@ @@//
//@@ So much feedback, and suggestions are very much welcome, and maybe some tips to make it @@//
//@@ even better would be nice <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> @@//
//@@ @@//
//@@///////////////////////////////////////////////////////////////////////////////////////////////////////@@//
//***********************************************************************************************************//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
globals
// Effects! Change as you'd like <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite2" alt=";)" title="Wink ;)" loading="lazy" data-shortname=";)" />\\
private constant string EFFECT_C = "Abilities\\Spells\\Human\\HolyBolt\\HolyBoltSpecialArt.mdl" // Effect on the caster!
private constant string EFFECT_1 = "Abilities\\Spells\\Undead\\AnimateDead\\AnimateDeadTarget.mdl" // Effect 200 range from the caster!
private constant string EFFECT_2 = "Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl" // Effect at the end!
private constant string EFFECT_T = "Abilities\\Spells\\Items\\AIfb\\AIfbSpecialArt.mdl" // Effect on the damaged units!
private constant string ATTACH_POINT = "origin" // The attach point of EFFECT_T!
private constant string ODD_EFFECT = "Abilities\\Spells\\Demon\\DarkPortal\\DarkPortalTarget.mdl" // The effect which appears at each ODD_PERIOD!
private constant string DUMMY_EFFECT = "Abilities\\Weapons\\DemolisherFireMissile\\DemolisherFireMissile.mdl" // Effect on the moving dummy!
// Rawcodes! Change these rawcodes to the ones on your map <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> (Note: To change the Dummy unit's ID, you'll need to go into the trigger called "xebasic", and change "XE_DUMMY_UNITID" !) \\
private constant integer SPELL_ID = 039;0000039; // ID of the spell!
// Other constant integers! Change at will <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />\\
private constant real DAMAGE_FACTOR = 1. // Just a simple real to make it easy to change the damage!
private constant real RANGE_FACTOR = 1. // Just a simple real to make it easy to change the range!
private constant integer ANGLES = 16 // The number of angles the effects will show at! (360/ANGLES)
private constant attacktype ATTACK_TYPE = ATTACK_TYPE_NORMAL // Explains itself i think XD
private constant damagetype DAMAGE_TYPE = DAMAGE_TYPE_UNIVERSAL // Same here <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" />
private constant weapontype WEAPON_TYPE = WEAPON_TYPE_WHOKNOWS // And same here <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
private constant real TIME = 2.5 // How long it takes for the spell to complete!
private constant real SLIDE_SPEED = TIME/XE_ANIMATION_PERIOD * TIME // How much the dummy effect moves each second! (It's 200. atm <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />)
private constant real EXPLOSION_OFFSET = 200. // How much range the first explosions are offset the casters porition!
private constant boolean ODD_EFFECTS = true // Wether or not the ODD_EFFECT s will appear!
private constant real ODD_EFFECT_TIMEOUT = .75 // How frequently the ODD_EFFECT s appear!
private constant boolean DAMAGE_ALLIES = false // Wether the spell should damage allies, or not!
private constant boolean ATTACK = true // If the spell should count the damage dealt by it as an attack!
private constant boolean RANGED = true // If the spell should count the damage dealt by it as ranged!
// Here are some UNIT_TYPE's which you can add that won't be damages during this spell!\\
private constant unittype STRUCTURE = UNIT_TYPE_STRUCTURE
private constant unittype MAGIC = UNIT_TYPE_MAGIC_IMMUNE
// To add more "exeptions" to the spell, simply create another on of these constants, and also add another one of " set dmg.factor(input unittype constant here, .0) "
// to the function "Spell_Actions"... There are other ones of these there, so you should find it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />
endglobals
// Damage functions!\\
// V // This one is for the DPS on the projectiles! \\ V \\
private function Damage_Small takes integer lv returns real
return DAMAGE_FACTOR * lv
endfunction
// V // This one is for the explosions around the caster! \\ V \\
private function Damage_Medium takes integer lv returns real
return 50 + lv * DAMAGE_FACTOR * 25
endfunction
// V // This one is for the explosions at the very end! \\ V \\
private function Damage_High takes integer lv returns real
return 50 + lv * DAMAGE_FACTOR * 50
endfunction
// Range functions!\\
// V // This one is for the DPS on the projectiles! \\ V \\
private function Range_Small takes nothing returns real
return RANGE_FACTOR * 100
endfunction
// V // This one is for the explosions around the caster! \\ V \\
private function Range_Medium takes nothing returns real
return RANGE_FACTOR * 10
endfunction
// V // This one is for the explosions at the very end! \\ V \\
private function Range_High takes nothing returns real
return RANGE_FACTOR * RANGE_FACTOR
endfunction
// V V !!!!! Filters are below these globals and the struct !!!!! V V \\
globals // Don't touch these globals ! \\
private integer tempData
private xedamage dmg
endglobals // Don't touch these globals ! \\
private struct Data extends xecollider
player play
unit cast
real cx
real cy
integer lvl
private real tick
private method onDestroy takes nothing returns nothing
call .flash(EFFECT_2)
call dmg.damageAOE(.cast, .x, .y, Range_High(), Damage_High(.lvl))
endmethod
private method loopControl takes nothing returns nothing
set tempData = this
set .tick = .tick + XE_ANIMATION_PERIOD
if .tick >= ODD_EFFECT_TIMEOUT and ODD_EFFECTS == true then
call DestroyEffect(AddSpecialEffect(ODD_EFFECT, .x, .y))
call dmg.damageAOE(.cast, .x, .y, Range_Medium(), Damage_Medium(.lvl))
set .tick = 0
else
call dmg.damageAOE(.cast, .x, .y, Range_Small(), Damage_Small(.lvl))
endif
endmethod
endstruct
// End of Configuration!\\
private function Spell_Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function Spell_Actions takes nothing returns nothing
local Data d
local integer i = 0
local unit u = GetTriggerUnit()
local real x=GetUnitX(u)
local real y=GetUnitY(u)
local real x2
local real y2
local real a=GetUnitFacing(u)*bj_DEGTORAD
call DestroyEffect(AddSpecialEffect(EFFECT_C, x, y))
loop
exitwhen i >= ANGLES
set d = Data.create(x, y, a)
set d.fxpath=(DUMMY_EFFECT)
set d.collisionSize=(Range_Small())
set d.direction=a
set d.speed = SLIDE_SPEED
set d.expirationTime = TIME
set d.play = GetOwningPlayer(u)
set d.cast = u
set d.cx = x
set d.cy = y
set d.lvl = GetUnitAbilityLevel(u, SPELL_ID)
set x2 = x+EXPLOSION_OFFSET*Cos(a)
set y2 = y+EXPLOSION_OFFSET*Sin(a)
call DestroyEffect(AddSpecialEffect(EFFECT_1, x2, y2))
call dmg.damageAOE(d.cast, x2, y2, Range_Medium(), Damage_Medium(d.lvl))
set a = a + (2*bj_PI/ANGLES)
set i = i + 1
endloop
set u = null
endfunction
private function Init takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(t,Condition(function Spell_Conditions))
call TriggerAddAction(t,function Spell_Actions)
set dmg = xedamage.create()
set dmg.dtype = DAMAGE_TYPE
set dmg.atype = ATTACK_TYPE
set dmg.wtype = WEAPON_TYPE
set dmg.damageAllies = DAMAGE_ALLIES
call dmg.factor(STRUCTURE, .0)
call dmg.factor(MAGIC, .0)
call dmg.useSpecialEffect(EFFECT_T, ATTACH_POINT)
endfunction
endscope
Please give much feedback, and tips both for this spell and future stuff
Changelog
V 1.00 - Initial release!
V 1.10
¤ Changed "Range functions" to return real values instead of using I2R.
¤ Added a new constant, ANGLES, which configures how many angles the effects will show at.
¤ Added some new comments on the constants.
¤ Removed nulling triggers.
v 1.15
¤ Split the global block into two.
¤ Added constants for attack-type and damage-type.
¤ Added a constant to decide how many angles the effects will be created at.
V 1.20 - Major Update!
¤ New library replaces "Timed Handles".(Named "EAE" by kingkingyyk3, Thanks ALOT !!!)
¤ Now destroys dummy and special effect together, instead of the dummy had timed life.
¤ Using the new "EAE" library, now creates the last special effect at the right point.
¤ Fixed the spell not doing any damage, because the constants "LEVEL" didn't get set before the function for the damage and range. XD
¤ Instead of creating 16 groups inside the loop, it now creates 1 group each outside the loop in the 3 functions using them.
¤ Added/Changed some comments.
V 1.20b
¤ Fixed it to use the constant ANGLES correctly.
V 1.21
¤ DAMAGE_FACTOR is now a real.
¤ Uses global group instead of many local ones.
¤ Added another constant, "SLIDE_SPEED". Determines how much the moving effect is moved each 0.05 seconds.
V 1.22
¤ Updated Key Timers 2 to the latest version.
¤ Changed a typo in credits. Sorry, Jesus4Lyf XD
V 1.23
¤ Updated Key Timers to 1.7.0.
¤ Reduced the map size to half, lol.
V 1.23b
¤ Updated Key Timer 2 again. XD
V 1.24
¤ Fixed a bug where the dummies didn't get destroyed and stopped by using Timer Ticker instead of Key Timers 2.
¤ Changed some comments a bit.
V 1.25
¤ Added levels to the actual ability, as it didn't have it before.
¤ Changed name to "Tormental Wrath"!
¤ Changed a commonly used local unit variable to a global instead.
¤ Kingkingyyk3 updated the EAE library to be more efficient!
V 1.30
¤ Big rewrite of the spell's script! (Thanks to Kingkingyyk3!!!!)
¤ Now only needs the system Timer Ticker. (No more EAE that is )
¤ Fixed a bug where the dummy projectiles went further with higher speed than the others!
¤ Now completely MUI!!
¤ Made some adjustments to the comments.
¤ Balanced the damage slightly, reduced the damage by 40%!
V 1.31
¤ Added a couple of constants: Weapontype, attach point, slide interval!
¤ Changed weapontype to WEAPON_TYPE_WHOKNOWS
V 1.4
¤ Added 2 configurables. DISTANCE and TIME.
¤ Added "some" more comments on some configurables.
¤ Removed a struct member, now uses locals instead.
¤ Switched from using TT (Timer Ticker) to using KT2 (Key Timers 2) ... Again!
¤ Some minor tweaks.
V 1.41
¤ Did some major balancing, as it was way too overpowered before!
¤ Changed the tooltip of the spell, quite a bit!
¤ Added a configurable, EXPLOSION_OFFSET, which determines how much offset the first explosions will be.
¤ A few more minor tweaks to the code.
V 1.5
¤ Added a TimerUtils version of the spell, as it can't be approved at WC3C.net if it doesn't use it.
¤ Made some minor changes in the documentation.
V 1.51
¤ The spell now uses GroupUtils!
¤ Changed the spell to correctly use the ANGLE constant!
¤ Changed from using FirstOfGroup, to use ForGroup calls.
¤ Changed the constant SLIDE_SPEED to be Units/Second instead of Units/Interval.
¤ Some slight changes in the documentation.
V 2.00
¤ Complete rewrite of the entire code !
¤ Now uses only the xe libraries, and BoundSentinel !
¤ Added more constants !
¤ And many, many more changes !
V 1.00 - Initial release!
V 1.10
¤ Changed "Range functions" to return real values instead of using I2R.
¤ Added a new constant, ANGLES, which configures how many angles the effects will show at.
¤ Added some new comments on the constants.
¤ Removed nulling triggers.
v 1.15
¤ Split the global block into two.
¤ Added constants for attack-type and damage-type.
¤ Added a constant to decide how many angles the effects will be created at.
V 1.20 - Major Update!
¤ New library replaces "Timed Handles".(Named "EAE" by kingkingyyk3, Thanks ALOT !!!)
¤ Now destroys dummy and special effect together, instead of the dummy had timed life.
¤ Using the new "EAE" library, now creates the last special effect at the right point.
¤ Fixed the spell not doing any damage, because the constants "LEVEL" didn't get set before the function for the damage and range. XD
¤ Instead of creating 16 groups inside the loop, it now creates 1 group each outside the loop in the 3 functions using them.
¤ Added/Changed some comments.
V 1.20b
¤ Fixed it to use the constant ANGLES correctly.
V 1.21
¤ DAMAGE_FACTOR is now a real.
¤ Uses global group instead of many local ones.
¤ Added another constant, "SLIDE_SPEED". Determines how much the moving effect is moved each 0.05 seconds.
V 1.22
¤ Updated Key Timers 2 to the latest version.
¤ Changed a typo in credits. Sorry, Jesus4Lyf XD
V 1.23
¤ Updated Key Timers to 1.7.0.
¤ Reduced the map size to half, lol.
V 1.23b
¤ Updated Key Timer 2 again. XD
V 1.24
¤ Fixed a bug where the dummies didn't get destroyed and stopped by using Timer Ticker instead of Key Timers 2.
¤ Changed some comments a bit.
V 1.25
¤ Added levels to the actual ability, as it didn't have it before.
¤ Changed name to "Tormental Wrath"!
¤ Changed a commonly used local unit variable to a global instead.
¤ Kingkingyyk3 updated the EAE library to be more efficient!
V 1.30
¤ Big rewrite of the spell's script! (Thanks to Kingkingyyk3!!!!)
¤ Now only needs the system Timer Ticker. (No more EAE that is )
¤ Fixed a bug where the dummy projectiles went further with higher speed than the others!
¤ Now completely MUI!!
¤ Made some adjustments to the comments.
¤ Balanced the damage slightly, reduced the damage by 40%!
V 1.31
¤ Added a couple of constants: Weapontype, attach point, slide interval!
¤ Changed weapontype to WEAPON_TYPE_WHOKNOWS
V 1.4
¤ Added 2 configurables. DISTANCE and TIME.
¤ Added "some" more comments on some configurables.
¤ Removed a struct member, now uses locals instead.
¤ Switched from using TT (Timer Ticker) to using KT2 (Key Timers 2) ... Again!
¤ Some minor tweaks.
V 1.41
¤ Did some major balancing, as it was way too overpowered before!
¤ Changed the tooltip of the spell, quite a bit!
¤ Added a configurable, EXPLOSION_OFFSET, which determines how much offset the first explosions will be.
¤ A few more minor tweaks to the code.
V 1.5
¤ Added a TimerUtils version of the spell, as it can't be approved at WC3C.net if it doesn't use it.
¤ Made some minor changes in the documentation.
V 1.51
¤ The spell now uses GroupUtils!
¤ Changed the spell to correctly use the ANGLE constant!
¤ Changed from using FirstOfGroup, to use ForGroup calls.
¤ Changed the constant SLIDE_SPEED to be Units/Second instead of Units/Interval.
¤ Some slight changes in the documentation.
V 2.00
¤ Complete rewrite of the entire code !
¤ Now uses only the xe libraries, and BoundSentinel !
¤ Added more constants !
¤ And many, many more changes !