• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Reaping Field v1.00

Places a powerful curse upon an area that deepens the wounds of enemies caught in the area. Deals damage based on missing hit points.

If you play DotA, you can think of it as somehow like an Over-Time+AOE type, Reaper's Scythe

JASS:
/*
    Reaping Field v1.00
    by Adiktuz
    
    --------------------------------------------------------
    
    External Library Requirements:
    
    Nova - http://www.hiveworkshop.com/forums/spells-569/nova-system-2-01-a-181884/
    SpellEffectEvent - http://www.hiveworkshop.com/forums/jass-resources-412/snippet-spelleffectevent-187193/

    --------------------------------------------------------
    
    How to Import:
    
    1) Import the Nova and Spell trigger folders to your map
    2) Import the dummy.mdx model (if you haven't have one already) and create a dummy caster
    3) Modify the spell settings on the globals block and spell setting functions
       of the Reaping Field(this trigger)
    4) Make sure that you set the dummy's rawcode on the Nova library
    
    --------------------------------------------------------
*/


library ReapingField initializer OnInit requires Nova, SpellEffectEvent 
    
    globals
        private constant integer SPELL_ID = 'A000'  //Rawcode of the spell
        private constant string PATH = "Abilities\\Spells\\Undead\\OrbOfDeath\\AnnihilationMissile.mdl"   //Path to the effect of the spell
        private constant attacktype AT = ATTACK_TYPE_MAGIC  //attack type of the spell
        private constant damagetype DT = DAMAGE_TYPE_MAGIC  //damage type of the spell
        private constant string HIT_PATH = "Abilities\\Spells\\Undead\\DeathandDecay\\DeathandDecayTarget.mdl"  //Path to the effect played upon hit
        private constant boolean SHOW_HIT = true //set this to true if you're using HIT_PATH
        private constant boolean ONCAST = true //Does the spell's effect start right after cast?
    endglobals
    
    //Setting functions for the base spell
    
    //Determines the damage AOE of the spell
    private function Faoe takes integer level, unit caster returns real
        return 150.0 + 50.0*level
    endfunction
    
    //Determines the scale of the special effect
    private function Scale takes integer level, unit caster returns real
        return 2.0 + 0.2*level
    endfunction
    
    //Determines the height of the special effect
    private function Height takes integer level, unit caster returns real
        return 50.0
    endfunction
    
    //Determines the total time of the spell
    private function TotalTime takes integer level, unit caster returns real
        return 5.0
    endfunction
    
    //Determines the time interval per damage of the spell
    private function TimeInterval takes integer level, unit caster returns real
        return 1.0
    endfunction
    
    //Determines the damage multiplier for the spell
    //Damage = (Max HP - Current HP)*multiplier
    private function DamageMulti takes integer level, unit caster returns real
        return level*0.3
    endfunction
    
    //Manages the showing of hit effects
    static if SHOW_HIT then
        private function OnDamage takes nothing returns nothing
            call DestroyEffect(AddSpecialEffectTarget(HIT_PATH,NovaSystem.data.filter,"origin"))
        endfunction
    endif
    
    //Handles setting of damage per target
    //Do not edit if you don't now what you're doing
    private function OnHit takes nothing returns nothing
        local NovaSystem nova = NovaSystem.data
        local real maxhp = GetUnitState(nova.filter,UNIT_STATE_MAX_LIFE)
        set nova.damage = (maxhp-GetWidgetLife(nova.filter))*DamageMulti(GetUnitAbilityLevel(nova.caster,SPELL_ID),nova.caster)
    endfunction
    
    //Main spell function
    
    private function Fire takes nothing returns nothing
        local unit u = GetTriggerUnit()
        local integer level = GetUnitAbilityLevel(u,SPELL_ID)
        call NovaSystem.create(u, null, GetSpellTargetX(), GetSpellTargetY(), 0.0, Faoe(level,u), Height(level,u), 1,/*
        */1, TimeInterval(level,u), TotalTime(level,u),0.0, Scale(level,u), false, ONCAST,/*
        */false, PATH, AT, DT, true, SPELL_ID)
        set u = null
    endfunction
    
    private function OnInit takes nothing returns nothing
        call RegisterSpellEffectEvent(SPELL_ID, function Fire)
        call NovaSystem.registerOnHit(SPELL_ID, function OnHit)
        static if SHOW_HIT then
            call NovaSystem.registerOnDamage(SPELL_ID, function OnDamage)
        endif
    endfunction
    
endlibrary

Keywords:
lanthanum,adiktuz,reaper,dota,damage,area,overtime
Contents

Reaping Field 1.0 (Map)

Reviews
12:54, 2nd Jun 2013 Magtheridon96: Approved. Looking good.

Moderator

M

Moderator

12:54, 2nd Jun 2013
Magtheridon96: Approved.
Looking good.
 
MAX HP bro, widgetlife gets the current life... XD...

Well, truth be told, I think NovaSys is the most usable script that I have made... When I get a new idea, it almost always involves an AOE...

Though I still have one thing to fix on that system, the capability to create a nova from within the onXX methods without problem... coz right now, if I create a nova from within the onXX methods, it copies the data of the triggering nova...
 
I actually had another idea before this... A freezing field like spell that is casted on the target unit instead, and of course follows the unit not the caster... which is why I realized that the Nova sys doesn't have a follow target capability so I updated it...

and maybe you can say that I'm trying to utilize the remaining vacation time that I have coz I only got 1 more day of vacation then work starts... XD
 
I think most users take a look more on new uploads rather than updates of old ones... And that would be the best approach as these spells are meant to be used by the not so industrious people when it comes to spellmaking, which are my target users...

anyway, I won't be making that spell for now... I'm thinking of what I can add to it to make it more interesting because as you said it would be really easy... just one function call of NovaSystem.create and its done... and as such even I won't find it worthy of being uploaded... hahahaha...


btw, I now already have another spell idea... it would be a cooperative work of some of my systems... XD...
 
Top