找回密码
 点一下
楼主: lclacd

求助:这个JASS要怎么编写才有这样的伤害?

  [复制链接]
发表于 2008-3-12 21:37:01 | 显示全部楼层
直接改怎么可能不行呢………………
就在SetUnitUserData里改啊………………怎么会不可以………………

test.w3x (19 KB, 下载次数: 14)
回复

使用道具 举报

发表于 2008-3-12 21:37:25 | 显示全部楼层
敏捷/2 × 技能等级 好像很简单吧...
0伤害技能+命令单位伤害T?
回复

使用道具 举报

 楼主| 发表于 2008-3-12 22:19:41 | 显示全部楼层
感动
经过一番折腾 偶终于做成了偶想要的技能了
谢谢zhuzeitou大哥都我的支持和帮助 现在偶编写的JASS如下:
[codes=jass]globals
    // Generated
    trigger                 gg_trg_MRJ                 = null
    trigger                 gg_trg_MRJ1               = null
endglobals

//===========================================================================
// Trigger: MRJ
//===========================================================================
function Trig_MRJ_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'o000' ) ) then
        return false
    endif
    if ( not ( GetTriggerUnit() == GetKillingUnitBJ() ) ) then
        return false
    endif
    if ( not ( GetUnitUserData(GetTriggerUnit()) != 0 ) ) then
        return false
    endif
    return true
endfunction

function Trig_MRJ_Func003001003001 takes nothing returns boolean
    return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true )
endfunction

function Trig_MRJ_Func003001003002 takes nothing returns boolean
    return ( IsPlayerInForce(GetOwningPlayer(GetFilterUnit()), GetPlayersAllies(GetOwningPlayer(GetTriggerUnit()))) == false )
endfunction

function Trig_MRJ_Func003001003 takes nothing returns boolean
    return GetBooleanAnd( Trig_MRJ_Func003001003001(), Trig_MRJ_Func003001003002() )
endfunction

function Trig_MRJ_Func003A takes nothing returns nothing
    call UnitDamageTargetBJ( GetTriggerUnit(), GetEnumUnit(), ( I2R(GetUnitUserData(GetTriggerUnit())) / 2.00 ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_ENHANCED )
endfunction

function Trig_MRJ_Actions takes nothing returns nothing
    call ForGroupBJ( GetUnitsInRangeOfLocMatching(500.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_MRJ_Func003001003)), function Trig_MRJ_Func003A )
    call RemoveLocation(GetUnitLoc(GetTriggerUnit()))
    call DestroyForce(GetPlayersAllies(GetOwningPlayer(GetTriggerUnit())))
endfunction

//===========================================================================
function InitTrig_MRJ takes nothing returns nothing
    set gg_trg_MRJ = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_MRJ, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_MRJ, Condition( function Trig_MRJ_Conditions ) )
    call TriggerAddAction( gg_trg_MRJ, function Trig_MRJ_Actions )
endfunction

//===========================================================================
// Trigger: MRJ1
//===========================================================================
function Trig_MRJ1_Conditions takes nothing returns boolean
    if ( not ( GetUnitTypeId(GetTriggerUnit()) == 'o000' ) ) then
        return false
    endif
    if ( not ( UnitHasItemOfTypeBJ(GetSummoningUnit(), 'nspi') == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_MRJ1_Actions takes nothing returns nothing
    call SetUnitUserData( GetTriggerUnit(), ( GetHeroStatBJ(bj_HEROSTAT_AGI, GetSummoningUnit(), true) * GetUnitAbilityLevelSwapped('A049', GetSummoningUnit()) ) )
endfunction

//===========================================================================
function InitTrig_MRJ1 takes nothing returns nothing
    set gg_trg_MRJ1 = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_MRJ1, EVENT_PLAYER_UNIT_SUMMON )
    call TriggerAddCondition( gg_trg_MRJ1, Condition( function Trig_MRJ1_Conditions ) )
    call TriggerAddAction( gg_trg_MRJ1, function Trig_MRJ1_Actions )
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
    call InitTrig_MRJ(  )
    call InitTrig_MRJ1(  )
endfunction[/codes]
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-24 22:43 , Processed in 0.054509 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表