• 🏆 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!

Earth Shield v1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
"Earth Shield"
Create a rock around from hero and dealing damage to enemy unit!

level 1 - 25 dps/sec, +5 armor
level 2 - 50 dps/sec, +10 armor
level 3 - 75 dps/sec, +15 armor
level 4 - 100 dps/sec, +20 armor

Add Ability "Release Rocks" if cast "Earth Shield"
"Release Rocks"
Release rocks from hero and rocks jump 2 times and Dealing damage!

level 1 - 50 damage each jump
level 2 - 100 damage each jump
level 3 - 150 damage each jump
level 4 - 200 damage each jump

Keywords:
Armor, Rock, Shield, Warcraft
Contents

Earth Shield v1.1 (Map)

Reviews
12th Dec 2015 IcemanBo: For long time as NeedsFix. Rejected. 12:47, 30th May 2011 Maker: You leak a lot and the spell is not MUI.
Status
Not open for further replies.

Moderator

M

Moderator

12th Dec 2015
IcemanBo: For long time as NeedsFix. Rejected.

12:47, 30th May 2011
Maker:
You leak a lot and the spell is not MUI.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
The coding needs a lot of work. You should use coordinates instead of locations.

For example, instead of GetUnitLoc you should use GetUnitX and GetUnitY.

You're using lots of functions that call other functions, when you could use the function directly. Such are for example:

CreateNUnitsAtLoc
UnitApplyTimedLifeBJ
GetUnitAbilityLevelSwapped
GetBooleanAnd

and many more.

Is this GUI conveted to JASS?

JASS:
function Trig_Cast_Conditions takes nothing returns boolean
    if ( not ( GetSpellAbilityId() == udg_Ability ) ) then
        return false
    endif
    return true
endfunction

function Trig_Cast_Actions takes nothing returns nothing
    call RemoveUnit( udg_Dummy_Unit )
    call DisableTrigger( gg_trg_Move_Unit )
    call DisableTrigger( gg_trg_Damage )
    set udg_Caster = GetTriggerUnit()
    set udg_Point = GetUnitLoc(udg_Caster)
    call CreateNUnitsAtLoc( 1, 'n000', GetOwningPlayer(udg_Caster), udg_Point, bj_UNIT_FACING )
    call RemoveLocation (udg_Point)
    set udg_Dummy_Unit = GetLastCreatedUnit()
    call UnitApplyTimedLifeBJ( ( 5.00 * I2R(GetUnitAbilityLevelSwapped('A000', udg_Caster)) ), 'BTLF', udg_Dummy_Unit )
    set udg_Damage = ( 15 * GetUnitAbilityLevelSwapped(udg_Ability, udg_Caster) )
    set udg_Stone_Armor_Buff = 'B000'
    set udg_Offset_Caster = 100
    set udg_Offset_Dummy = 20
    set udg_Distance = 200
    set udg_Chance_Bash = ( 5 * GetUnitAbilityLevelSwapped('A002', udg_Caster) )
    call EnableTrigger( gg_trg_Move_Unit )
    call EnableTrigger( gg_trg_Damage )
endfunction

//===========================================================================
function InitTrig_Cast takes nothing returns nothing
    set gg_trg_Cast = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_Cast, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( gg_trg_Cast, Condition( function Trig_Cast_Conditions ) )
    call TriggerAddAction( gg_trg_Cast, function Trig_Cast_Actions )
endfunction

JASS:
function Trig_Move_Unit_Func002002003001 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction

function Trig_Move_Unit_Func002002003002001 takes nothing returns boolean
    return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

function Trig_Move_Unit_Func002002003002002 takes nothing returns boolean
    return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_Caster)) == true )
endfunction

function Trig_Move_Unit_Func002002003002 takes nothing returns boolean
    return GetBooleanAnd( Trig_Move_Unit_Func002002003002001(), Trig_Move_Unit_Func002002003002002() )
endfunction

function Trig_Move_Unit_Func002002003 takes nothing returns boolean
    return GetBooleanAnd( Trig_Move_Unit_Func002002003001(), Trig_Move_Unit_Func002002003002() )
endfunction

function Trig_Move_Unit_Func003A takes nothing returns nothing
    call SetUnitPositionLoc( GetEnumUnit(), GetUnitLoc(udg_Caster) )
endfunction

function Trig_Move_Unit_Func005Func001C takes nothing returns boolean
    if ( not ( GetRandomInt(1, 1000) <= udg_Chance_Bash ) ) then
        return false
    endif
    return true
endfunction

function Trig_Move_Unit_Func005A takes nothing returns nothing
    if ( Trig_Move_Unit_Func005Func001C() ) then
        call UnitAddAbilityBJ( 'A000', udg_Dummy_Unit )
        call SetUnitAbilityLevelSwapped( 'A000', udg_Dummy_Unit, GetUnitAbilityLevelSwapped('A002', udg_Caster) )
        call IssueTargetOrderBJ( udg_Dummy_Unit, "thunderbolt", GetEnumUnit() )
        call UnitRemoveAbilityBJ( 'A000', udg_Dummy_Unit )
    else
        call DoNothing(  )
    endif
endfunction

function Trig_Move_Unit_Func007C takes nothing returns boolean
    if ( not ( UnitHasBuffBJ(udg_Caster, udg_Stone_Armor_Buff) == false ) ) then
        return false
    endif
    return true
endfunction

function Trig_Move_Unit_Actions takes nothing returns nothing
    set udg_Dummy_Group = GetUnitsOfTypeIdAll('n000')
    set udg_Stun_Group = GetUnitsInRangeOfLocMatching(200.00, GetUnitLoc(udg_Dummy_Unit), Condition(function Trig_Move_Unit_Func002002003))
    call ForGroupBJ( udg_Dummy_Group, function Trig_Move_Unit_Func003A )
    call DestroyGroup (udg_Dummy_Group)
    call ForGroupBJ( udg_Stun_Group, function Trig_Move_Unit_Func005A )
    call DestroyGroup (udg_Stun_Group)
    if ( Trig_Move_Unit_Func007C() ) then
        call RemoveUnit( udg_Dummy_Unit )
        call DisableTrigger( GetTriggeringTrigger() )
        call DisableTrigger( gg_trg_Damage )
    else
        call DoNothing(  )
    endif
endfunction

//===========================================================================
function InitTrig_Move_Unit takes nothing returns nothing
    set gg_trg_Move_Unit = CreateTrigger(  )
    call DisableTrigger( gg_trg_Move_Unit )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Move_Unit, 0.01 )
    call TriggerAddAction( gg_trg_Move_Unit, function Trig_Move_Unit_Actions )
endfunction

JASS:
function Trig_Damage_Conditions takes nothing returns boolean
    if ( not ( UnitHasBuffBJ(udg_Caster, udg_Stone_Armor_Buff) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_Damage_Func003002003001 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false )
endfunction

function Trig_Damage_Func003002003002001 takes nothing returns boolean
    return ( IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

function Trig_Damage_Func003002003002002 takes nothing returns boolean
    return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(udg_Caster)) == true )
endfunction

function Trig_Damage_Func003002003002 takes nothing returns boolean
    return GetBooleanAnd( Trig_Damage_Func003002003002001(), Trig_Damage_Func003002003002002() )
endfunction

function Trig_Damage_Func003002003 takes nothing returns boolean
    return GetBooleanAnd( Trig_Damage_Func003002003001(), Trig_Damage_Func003002003002() )
endfunction

function Trig_Damage_Func004A takes nothing returns nothing
    set udg_Picked_Unit = GetEnumUnit()
    call UnitDamageTargetBJ( udg_Dummy_Unit, udg_Picked_Unit, I2R(udg_Damage), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction

function Trig_Damage_Actions takes nothing returns nothing
    set udg_Group_Damage = GetUnitsInRangeOfLocMatching(I2R(udg_Distance), GetUnitLoc(udg_Dummy_Unit), Condition(function Trig_Damage_Func003002003))
    call ForGroupBJ( udg_Group_Damage, function Trig_Damage_Func004A )
    call DestroyGroup (udg_Group_Damage)
endfunction

//===========================================================================
function InitTrig_Damage takes nothing returns nothing
    set gg_trg_Damage = CreateTrigger(  )
    call DisableTrigger( gg_trg_Damage )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Damage, 0.50 )
    call TriggerAddCondition( gg_trg_Damage, Condition( function Trig_Damage_Conditions ) )
    call TriggerAddAction( gg_trg_Damage, function Trig_Damage_Actions )
endfunction
 
Level 2
Joined
Jan 24, 2011
Messages
6
yes it is GUI! but I'm trying for the best result! Thank you very much for helping and I hope the next time out a better result!

is not a screenshot...is a photo from the screen because it is damaged Pts Sc ! :D


I want to learn to use Jass but I can not read English very well
 
Status
Not open for further replies.
Top