Import Difficulty: Medium
MUI: Yes
JASS/GUI: JASS
--------------------------------------------------------------------------------------------------
Based in the one in Dragon Ball Z Tribute, but made by me it's a really cool spell. I even think that it looks better that the one in DBZ Tribute. Also it's based on the Dragon Fist attack In one of Dragon Ball Z movies.
MUI: Yes
JASS/GUI: JASS
--------------------------------------------------------------------------------------------------
Based in the one in Dragon Ball Z Tribute, but made by me it's a really cool spell. I even think that it looks better that the one in DBZ Tribute. Also it's based on the Dragon Fist attack In one of Dragon Ball Z movies.
Code:
The caster charges his weapon. When it finish the charge, it attack, calling upon the power of the AllMighty Dragon to strike with all his strenght in the floor.
JASS:
scope DragonFist
//*******************************************************************************************
//********************************Basic Configuration****************************************
//*******************************************************************************************
//**********************Edit This in your map (Specially the Raw Codes)**********************
//*******************************************************************************************
globals
private integer DragonId=039;A001039; // The Main Ability Id
private integer DummyIncinerate=039;h005039; // The Incinerate Effect..
private integer DummyDragonFist=039;h002039; // The Resurrection eFfect
private integer DummyDragon=039;h000039; // The Dragon
private integer DummyFlameStrike=039;h004039; // The FlameStrike Giant effect
private real AoE=300//The basic aoe of the spell damage
private boolean IsUltimate=true//If it's true the spell will deal full damage to the target if not the damage should be reduced.
private boolean StaticDamage=false // If true it will damage all units by an static damage not the damage per str..
//**********************If The damage is static then modify this..***************************
private real StaticBase=400 // Deals this multiplied by each level...
//**********************If The damage isn't a static damage then modify this*****************
private integer Multiplier=5 // This multiplier is the base of the damage
private integer SumDamage=3 //This is the SumDamage that multiplies by the level so 5+3*level is 5 8 11 * str <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
//*******************************************************************************************
//*******************************End of Basic Configuration**********************************
//*******************************************************************************************
//*******************************Preload Unit Function***************************************
//*******************************************************************************************
function PreloadUnit takes integer unitid returns nothing
local real x=GetRectCenterX(bj_mapInitialPlayableArea)
local real y=GetRectCenterY(bj_mapInitialPlayableArea)
call RemoveUnit(CreateUnit(Player(PLAYER_NEUTRAL_PASSIVE),unitid,x,y,270))
endfunction
//*******************************************************************************************
//*******************************Preload Unit Function End***********************************
//*******************************Main Spell Script*******************************************
//*******************************************************************************************
private function SpellId takes nothing returns boolean
return GetSpellAbilityId()==DragonId
endfunction
private function ally takes nothing returns boolean
return IsUnitAlly(GetFilterUnit(),GetOwningPlayer(GetSpellAbilityUnit()))==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_STRUCTURE)==false and IsUnitType(GetFilterUnit(),UNIT_TYPE_FLYING)==false
endfunction
private function Trig_Beast_Fist_Actions takes nothing returns nothing
local group g=CreateGroup()
local unit w
local unit Caster=GetSpellAbilityUnit()
local location l=GetSpellTargetLoc()
local real x=GetLocationX(l)
local real y=GetLocationY(l)
local boolexpr maincondition=Condition(function ally)
local integer level=GetUnitAbilityLevel(Caster,DragonId)
local real damagemultiplier=Multiplier+SumDamage*level
local real IfStaticDamage=StaticBase*level
local terraindeformation t
call GroupEnumUnitsInRange(g,x,y,AoE,maincondition)
call DestroyBoolExpr(maincondition)
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(Caster),DummyIncinerate,x,y,GetUnitFacing(Caster))
call SetUnitTimeScale(bj_lastCreatedUnit, 25.00 * 0.01)
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(Caster),DummyDragonFist,x,y,GetUnitFacing(Caster))
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(Caster),DummyDragon,x,y,GetUnitFacing(Caster))
call SetUnitFlyHeight(bj_lastCreatedUnit,0.00,800.00)
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(Caster),DummyIncinerate,x,y,GetUnitFacing(Caster))
call SetUnitTimeScale(bj_lastCreatedUnit, 25.00 * 0.01)
set t=TerrainDeformCrater(x,y,300,150,R2I(5.50)*1000,false)
loop
set w=FirstOfGroup(g)
exitwhen w==null
call GroupRemoveUnit(g,w)
if StaticDamage==false then
if IsUltimate==true then
call UnitDamageTarget(Caster,w,GetHeroStr(Caster,true)*damagemultiplier,true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)//Deals full damage to the units.
else
call UnitDamageTarget(Caster,w,GetHeroStr(Caster,true)*damagemultiplier,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) // This damage will be reduced i think,..
endif
endif
if StaticDamage==true then
if IsUltimate==true then
call UnitDamageTarget(Caster,w,IfStaticDamage,true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_UNIVERSAL,WEAPON_TYPE_WHOKNOWS)//Deals full damage to the units.
else
call UnitDamageTarget(Caster,w,IfStaticDamage,true,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_NORMAL,WEAPON_TYPE_WHOKNOWS) // This damage will be reduced i think,..
endif
endif
endloop
set bj_lastCreatedUnit=CreateUnit(GetOwningPlayer(Caster),DummyFlameStrike,x,y,GetUnitFacing(Caster))
call SetUnitAnimation(bj_lastCreatedUnit,"birth")
call DestroyBoolExpr(maincondition)
call DestroyGroup(g)
call TerrainDeformStop(t,5*1000)
call RemoveLocation(l)
set Caster=null
set t=null
endfunction
//*******************************************************************************************
//**************************************End of Main Script***********************************
//**************************************Init Trig..******************************************
//*******************************************************************************************
function InitTrig_Dragon_Fist takes nothing returns nothing
set gg_trg_Dragon_Fist=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(gg_trg_Dragon_Fist,EVENT_PLAYER_UNIT_SPELL_EFFECT)
call TriggerAddCondition(gg_trg_Dragon_Fist,Condition(function SpellId))
call TriggerAddAction(gg_trg_Dragon_Fist,function Trig_Beast_Fist_Actions)
call PreloadUnit(DummyIncinerate)
call PreloadUnit(DummyDragonFist)
call PreloadUnit(DummyDragon)
call PreloadUnit(DummyFlameStrike)
endfunction
//*******************************************************************************************
//***************************************End of Init Trig..**********************************
//*******************************************************************************************
endscope