SPELL CONTEST | theme: Hell | 29.06.08 - 13.07.08

Status
Not open for further replies.

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
Meaning, if you do know how to make you spell MUI then you obviously must know something about coding,
thus, producing better and cleaner code which is more likely to score more points.
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Here's my spell. It's called Demonic Pact.

It's just a lot of special effects and some damage, nothing much. No attachment systems used. Just a snippet for a random location in a circle.

What it does?
First it creates 4 demons (Firelords) around you that will channel energies. Then random effects spawn in 600 AoE while all units in the area take damage (including the caster due to the pact with a demon). Then one by one each demon turns into a molten chunk of lava that crashes in the middle of the area, sending chaos everywhere.

Edits:
JASS:

v1[1].0 - First post.
v1[1].1 - Fixed a little leak.
v1[1].2 - Removed a special effect. Added 3 more instead.
        - Made the spell drain mana as well as life.
        - Removed the preloader because it was reducing a hell lot of lag.


Code: (if someone's interested in it...)
JASS:

scope DemonicPact

// CONFIGURATION
globals
// Raw code of the Demonic Pact ability
    private constant integer AID_DEMONIC_PACT = 'A000'
// Raw code of the Demonic Pact Damage ability
    private constant integer AID_WAVE_DAMAGE = 'A001'
// Raw code of the Demon Spawns
    private constant integer UID_DEMON_SPAWN = 'Nfir'
// Raw code of the Meteor (Magma rock) unit that spawns from the demons
    private constant integer UID_METEOR = 'h000'
// Raw code of the dummy unit
    private constant integer UID_DUMMY = 'h001'
// Flame Strike special effect
    private constant string SFX_FLAME_STRIKE = "Abilities\\Spells\\Human\\FlameStrike\\FlameStrike1.mdl" 
// Phoenix Missile special effect
    private constant string SFX_MISSILE = "Abilities\\Weapons\\PhoenixMissile\\Phoenix_Missile.mdl" 
// Building explosion special effect
    private constant string SFX_EXPLODE = "Objects\\Spawnmodels\\Other\\NeutralBuildingExplosion\\NeutralBuildingExplosion.mdl"
// Phoenix thingy special effect
    private constant string SFX_PHOENIX = "Abilities\\Spells\\Human\\MarkOfChaos\\MarkOfChaosTarget.mdl"
// Volcano Death special effect
    private constant string SFX_VOLCANO = "Abilities\\Spells\\Other\\Volcano\\VolcanoDeath.mdl"
// Doom special effect
    private constant string SFX_DOOM = "Abilities\\Spells\\Other\\Doom\\DoomDeath.mdl"
endglobals
// The damage dealt every 0.3 seconds
    private function DAMAGING takes unit cast, integer lvl returns real
        return lvl * 20.
        // Included the caster because someone might
        // want to base the damage on the caster's attributes
    endfunction
// The mana drained every 0.3 seconds
    private function MANA takes unit cast, integer lvl returns real
        return lvl * 5.
    endfunction
// END OF CONFIGURATION

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == AID_DEMONIC_PACT
endfunction

private function Enum takes nothing returns boolean
    return IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetWidgetLife(GetFilterUnit()) > 0.405
endfunction

private function Damage takes unit cast, integer lvl, real x, real y returns nothing
    local group gr = CreateGroup()
    local unit first
    call GroupEnumUnitsInRange(gr, x, y, 600., Condition(function Enum))
    loop
        set first = FirstOfGroup(gr)
        exitwhen first == null
        call UnitDamageTarget(cast, first, DAMAGING(cast, lvl), false, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_MAGIC, null)
        call SetUnitState(cast, UNIT_STATE_MANA, GetUnitState(cast, UNIT_STATE_MANA) - MANA(cast, lvl))
        call GroupRemoveUnit(gr, first)
    endloop
    call DestroyGroup(gr)
    set gr = null
    set first = null
endfunction

private function Nova takes unit cast, integer lvl, real x, real y returns nothing
    local integer i = 1
    local real px
    local real py
    local unit dummy
    loop
        exitwhen i > 8
        set px = x + 300. * Cos((i * 45.) * bj_DEGTORAD)
        set py = y + 300. * Sin((i * 45.) * bj_DEGTORAD)
        set dummy = CreateUnit(GetOwningPlayer(cast), UID_DUMMY, x, y, i * 45)
        call UnitAddAbility(dummy, AID_WAVE_DAMAGE)
        call SetUnitAbilityLevel(dummy, AID_WAVE_DAMAGE, lvl)
        call IssuePointOrder(dummy, "breathoffire", px, py)
        call UnitApplyTimedLife(dummy, 'BTLF', 2.)
        set i = i + 1
    endloop
    set dummy = null
endfunction

private function Sfx takes unit cast, integer lvl, real x, real y returns nothing
    local integer i = 1
    local location loc
    local effect array sfx
    loop
        exitwhen i > 12
        set loc = RandomPointCircle(x, y, 600.)
        // I set flame strike to a variable
        // Because it is destroyed instantly
        // And won't be seen if I used DestroyEffect(AddSpecialEffectLoc())
        set sfx<i> = AddSpecialEffectLoc(SFX_FLAME_STRIKE, loc)
        call RemoveLocation(loc)
        set loc = RandomPointCircle(x, y, 600.)
        call DestroyEffect(AddSpecialEffectLoc(SFX_MISSILE, loc))
        call RemoveLocation(loc)
        set loc = RandomPointCircle(x, y, 600.)
        call DestroyEffect(AddSpecialEffectLoc(SFX_PHOENIX, loc))
        call RemoveLocation(loc)
        set loc = RandomPointCircle(x, y, 600.)
        call DestroyEffect(AddSpecialEffectLoc(SFX_DOOM, loc))
        call RemoveLocation(loc)
        call TriggerSleepAction(0.33)
        call Damage.execute(cast, lvl, x, y)
        set i = i + 1
    endloop
    set i = 1
    loop
        exitwhen i &gt; 12
        call DestroyEffect(sfx<i>)
        set sfx<i> = null
        set i = i + 1
    endloop
    set loc = null
endfunction

private function Actions takes nothing returns nothing
    local unit cast = GetTriggerUnit()
    local integer i = 1
    local real x = GetUnitX(cast)
    local real y = GetUnitY(cast)
    local real xx
    local real yy
    local real dex
    local real dey
    local unit array demon
    local integer lvl = GetUnitAbilityLevel(cast, AID_DEMONIC_PACT)
    loop
        exitwhen i &gt; 4
        set xx = x + 600. * Cos((90 * i) * bj_DEGTORAD)
        set yy = y + 600. * Sin((90 * i) * bj_DEGTORAD)
        set demon<i> = CreateUnit(Player(PLAYER_NEUTRAL_AGGRESSIVE), UID_DEMON_SPAWN, xx, yy, 90. * i)
        call SetUnitVertexColor(demon<i>, 255, 180, 180, 128)
        call PauseUnit(demon<i>, true)
        call SetUnitAnimation(demon<i>, &quot;channel&quot;)
        call UnitAddAbility(demon<i>, &#039;Aloc&#039;)
        set i = i + 1
    endloop
    call Sfx.execute(cast, lvl, x, y)
    call TriggerSleepAction(1.75)
    set i = 1
    loop
        exitwhen i &gt; 4
        set dex = GetUnitX(demon<i>)
        set dey = GetUnitY(demon<i>)
        call KillUnit(demon<i>)
        set demon<i> = CreateUnit(GetOwningPlayer(cast), UID_METEOR, dex, dey, 0.)
        call IssuePointOrder(demon<i>, &quot;move&quot;, x, y)
        call TriggerSleepAction(1.3)
        call KillUnit(demon<i>)
        call DestroyEffect(AddSpecialEffect(SFX_EXPLODE, x, y))
        call DestroyEffect(AddSpecialEffect(SFX_VOLCANO, x, y))
        call Nova.execute(cast, lvl, x, y)
        set i = i + 1
    endloop
    set cast = null
    set demon[1] = null
    set demon[2] = null
    set demon[3] = null
    set demon[4] = null
endfunction

function InitTrig_DemonicPact takes nothing returns nothing
    local trigger trig = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(trig, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(trig, Condition(function Conditions))
    call TriggerAddAction(trig, function Actions)
endfunction

endscope
</i></i></i></i></i></i></i></i></i></i></i></i></i></i>



Note!
I included CSSafety but for some reason I forgot to use it.
I'm too lazy to reopen the map so I'll leave the code as it is.
Pretend that I didn't put the CSSafety trigger. :p
 

Attachments

  • cr4xzZz - Demonic Pact v1[1].2.w3x
    22.4 KB · Views: 208

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I don't see a problem with it as long as the helpers start to post the whole code for the spell.
 

XeNiM666

I lurk for pizza
Reaction score
138
oh so we can ask question like "how to's" but not "can you do this for me:D
thx!
 

Sevion

The DIY Ninja
Reaction score
413
Here's my spell.

Level 1:
Code:
Damage: 50 Per Explosion
Type: Line
Range: 250
Mana Cost: 150
Cooldown: 15 Seconds

The Hell Bender channels his rage into the area targeted rasing the very pyres of Hell to roast his enemies. Deals damage in a line per explosive pyre created. If a unit is targeted, he will be infected with Hell Fire. The area around the Hell Bender will become tainted with Hell's Fury and will reduce the armor of all enemy units standing in the circle by 10.

Level 2:
Code:
Damage: 75 Per Explosion
Type: Line
Range: 250
Mana Cost: 175
Cooldown: 15 Seconds

The Hell Bender channels his rage into the area targeted rasing the very pyres of Hell to roast his enemies. Deals damage in a line per explosive pyre created. If a unit is targeted, he will be infected with Hell Fire. The area around the Hell Bender will become tainted with Hell's Fury and will reduce the armor of all enemy units standing in the circle by 15.

Leve l3:
Code:
Damage: 100 Per Explosion
Type: Line
Range: 250
Mana Cost: 200
Cooldown: 15 Seconds

The Hell Bender channels his rage into the area targeted rasing the very pyres of Hell to roast his enemies. Deals damage in a line per explosive pyre created. If a unit is targeted, he will be infected with Hell Fire. The area around the Hell Bender will become tainted with Hell's Fury and will reduce the armor of all enemy units standing in the circle by 20.

Note: Range is only how far the target must be from the Hell Bender. I made it like that so the Hell Bender will hit in front and behind of the target. If you're smart using this, you'll know where to target :)

I may change the spell a bit before the deadline. This may not be the final version.


Edit: I've modified the spell a bit and added two new effects: Hell Fire and Hell Fury. Check page 16 for more info on these effects.
 

warden13

New Member
Reaction score
32
Punishment

About Skill:

And this is my spell. It is suitable for a melee map in many points. First of all, it is very basic spell like Storm Bolt, Chain Lighting, Water Elementals etc. Also it is not exxaggerated. It doesen't overuse effects and it does not cause lag. It is MPI. There is no problem if it is used in Professional Melee Game tournaments.​

Description:

<Hero Name>(I used Hell Guard.), pays his victim's sins by using hellfire and the people of hell. His victim can't move and takes damage temporarily.

Type: Single Target / Disable

Have Fun
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
Pretty neat spell, warden, I love the ability, but you may want to check out the memory leaks you have, specifically the special effect creation leaks!
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
A little bit more than 7 days is left to the end of this contest!

I will not open a single map before the deadline is over so any edits are still allowed!


Have fun and good luck!


(I wonder whether this contest will possibly surpass the 50 contestant limit...)
 

manofsteel

New Member
Reaction score
36
Don't think I got time to make the spell for the contest, going away for 7 days now... So I'm out of the contest.
 

Trollvottel

never aging title
Reaction score
262
okay, today i started with making my spell. its 1/3 done now and even now i can tell you, andrewgosu, it will take kinda long time to look through it :)
 

AdamGriffith

You can change this now in User CP.
Reaction score
69
Does 300 lines of code sound like it's full of fluff?

Going to post my code shortly.

IT IS NOT OPTIMIZED YET! ^_^
 

Trollvottel

never aging title
Reaction score
262
300 lines dont sound like its full of fluff, i dont know what you spell will do. up to now mine has 212 lines but there is so much to add that i think and cant have less than 400 - will be a horrible job to look through all it and - in the end - find no errors unless the ones i built in to make the judge happier :)
 

Ithladir

Member
Reaction score
5
I'd really like to join ^^ and i hope you like my a little "unormal" spell. and i think it works even if every player would choose him (i hope :l) :)

[EDIT]: Want comments! Im just trying to touch the MUI and MPI etc. topics but need all help/suggestions i can get. thanks ^^
 

Attachments

  • Ithladir Spell Contest entry.w3x
    18.2 KB · Views: 216

Sevion

The DIY Ninja
Reaction score
413
300 lines dont sound like its full of fluff, i dont know what you spell will do. up to now mine has 212 lines but there is so much to add that i think and cant have less than 400 - will be a horrible job to look through all it and - in the end - find no errors unless the ones i built in to make the judge happier :)

My spell uses 51 lines total. Lol. I may add more. I have an idea for more effects.
 

Prometheus

Everything is mutable; nothing is sacred
Reaction score
589
Lines mean nothing. A lot of systems have a lot of lines because of spacing, comments and the like.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
Question(s):

For a spell that summons a unit, does the summoned unit:
1) Have to have a custom spell?
2) Or is allowed to have default spells?
3) Have a limit on spells / abilities?
4) Give bonus points for custom spells?
5) Or just make it summon a default unit?

SPOILER: My spell is going to summon a Doom Guard.
EDIT: A custom Doom Guard.
 

Andrewgosu

The Silent Pandaren Helper
Reaction score
716
I will only grade the summoning spell.

The summoned unit's spells will not be graded, if there are any.
 
T

The Mapmaker

Guest
Code:
SPOILER: My spell is going to summon a Doom Guard.

Now, isn't that original..........:)
 

denmax

You can change this now in User CP.
Reaction score
155
I don't know what to make T_T..

AND ONE DAY LEFT (and I'm still unregistered T_T)

That's how I hate making maps, it steals all of my ideas..


EDIT:

I thought of something:

nvm changed my mind

I'll trigger it as fast as I can..

PS: Don't worry, I didn't add it to my map (yet =P)..

Anyway I have a question. When we submit these kind of spells, is it only to the purpose of this contest?
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top