mordocai
New Member
- Reaction score
- 17
Hey guys, im on a rampage of spell requesting/making atm for my map as some of you have seen by all my requests, this one will be easy though. GUI or (v)Jass will be accepted and appreciated. My first request is to transform the trigger at the end of this post from jass into vjass. And my spell request will be this
Spell- Tree Manifestation
Description- Malfurion becomes enraged with all the non-tree huggers and decides to take action himself. He summons up a tree at the spot of the enemy, that binds the enemy to it essentially "hugging" the enemy. Once the tree fully grows(2-3 seconds and enemy is invun during this time), it explodes sending splinters into the enemy dealing x dmg. This spell would need 3levels as it is an ulti.
Plus rep will be awarded as well as credits
Here is jass code that needs optimization.
Spell- Tree Manifestation
Description- Malfurion becomes enraged with all the non-tree huggers and decides to take action himself. He summons up a tree at the spot of the enemy, that binds the enemy to it essentially "hugging" the enemy. Once the tree fully grows(2-3 seconds and enemy is invun during this time), it explodes sending splinters into the enemy dealing x dmg. This spell would need 3levels as it is an ulti.
Plus rep will be awarded as well as credits
Here is jass code that needs optimization.
JASS:
//Put this next line in your map header
group BDGROUP = CreateGroup()
//Put the above line in your map header
private function DURATION takes integer level returns integer
return (level + 2)
endfunction
private function AOE takes integer level returns integer
return ((level * 100) + 300)
endfunction
// +----------------------------------------------+
// | -=-=- NO TOUCHIE PAST HERE -=-=- |
// | -=-=- NO TOUCHIE PAST HERE -=-=- |
// | -=-=- NO TOUCHIE PAST HERE -=-=- |
// +----------------------------------------------+
private function BDGConditions takes nothing returns boolean
return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) and IsUnitType(GetFilterUnit(), UNIT_TYPE_DEAD) != true
endfunction
private function BDGActions takes nothing returns nothing
if (bj_cineFadeContinueTimer != null) then
call DestroyTimer(bj_cineFadeContinueTimer)
endif
if (bj_cineFadeFinishTimer != null) then
call DestroyTimer(bj_cineFadeFinishTimer)
endif
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(100, 100, 100, 100)
call SetCineFilterEndColor(0, 0, 0, 0)
call SetCineFilterDuration(0.50)
call DisplayCineFilter(true)
if (bj_cineFadeContinueTimer != null) then
call DestroyTimer(bj_cineFadeContinueTimer)
endif
if (bj_cineFadeFinishTimer != null) then
call DestroyTimer(bj_cineFadeFinishTimer)
endif
call SetCineFilterTexture("ReplaceableTextures\\CameraMasks\\Black_mask.blp")
call SetCineFilterBlendMode(BLEND_MODE_BLEND)
call SetCineFilterTexMapFlags(TEXMAP_FLAG_NONE)
call SetCineFilterStartUV(0, 0, 1, 1)
call SetCineFilterEndUV(0, 0, 1, 1)
call SetCineFilterStartColor(0, 0, 0, 0)
call SetCineFilterEndColor(100, 100, 100, 100)
call SetCineFilterDuration(DURATION(GetUnitAbilityLevel(GetTriggerUnit(), BDID)))
call DisplayCineFilter(true)
endfunction
private function BDConditions takes nothing returns boolean
return (GetSpellAbilityId() == 039;A000039;)
endfunction
private function BDActions takes nothing returns nothing
local real CX = GetUnitX(GetTriggerUnit())
local real CY = GetUnitY(GetTriggerUnit())
call GroupEnumUnitsInRange(BDGROUP, CX, CY, AOE(GetUnitAbilityLevel(GetTriggerUnit(), 039;A000039;)), Condition(function BDGConditions))
call ForGroup(BDGROUP, function BDGActions)
endfunction
//====================================================================================================
private function BDInit takes nothing returns nothing
local trigger t = CreateTrigger()
local integer i = 0
loop
call TriggerRegisterPlayerUnitEvent(t, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT, null)
set i = i + 1
exitwhen i == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition(t, Condition(function BDConditions))
call TriggerAddAction(t, function BDActions)
endfunction