找回密码
 点一下
查看: 793|回复: 4

嗯。。。只是借用一下论坛的代码高亮看一下别人的代码

[复制链接]
发表于 2012-8-28 10:04:46 | 显示全部楼层 |阅读模式
[jass]
function HPTZ7 takes integer b returns boolean //任意增加HP
    if ( not ( ModuloInteger(b, 1) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ6 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 2) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ5 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 4) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ4 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 8) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ3 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 16) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ2 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 32) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ1 takes integer b returns boolean
    if ( not ( ModuloInteger(b, 64) == 1 ) ) then
        return false
    endif
    return true
endfunction

function HPTZ0 takes unit a,integer b returns nothing
    if (HPTZ1(b) ) then
    set b = ( b - 64 )
    call UnitAddAbilityBJ( 'A006', a )
    call SetUnitAbilityLevelSwapped( 'A006', a, 2 )
    call UnitRemoveAbilityBJ( 'A006', a )
    else
    endif
    if ( HPTZ2(b) ) then
    set b = ( b - 32 )
    call UnitAddAbilityBJ( 'A005', a )
    call SetUnitAbilityLevelSwapped( 'A005', a, 2 )
    call UnitRemoveAbilityBJ( 'A005', a )
    else
    endif
    if ( HPTZ3(b) ) then
    set b = ( b - 16 )
    call UnitAddAbilityBJ( 'A004', a )
    call SetUnitAbilityLevelSwapped( 'A004', a, 2 )
    call UnitRemoveAbilityBJ( 'A004', a )
    else
    endif
    if ( HPTZ4(b) ) then
    set b = ( b - 8 )
    call UnitAddAbilityBJ( 'A003', a )
    call SetUnitAbilityLevelSwapped( 'A003', a, 2 )
    call UnitRemoveAbilityBJ( 'A003', a )
    else
    endif
    if ( HPTZ5(b) ) then
    set b = (b - 4 )
    call UnitAddAbilityBJ( 'A002', a )
    call SetUnitAbilityLevelSwapped( 'A002', a, 2 )
    call UnitRemoveAbilityBJ( 'A002', a )
    else
    endif
    if ( HPTZ6(b) ) then
    set b = ( b - 2 )
    call UnitAddAbilityBJ( 'A001', a )
    call SetUnitAbilityLevelSwapped( 'A001', a, 2 )
    call UnitRemoveAbilityBJ( 'A001', a )
    else
    endif
    if ( HPTZ7(b) ) then
    call UnitAddAbilityBJ( 'A00A', a )
    call SetUnitAbilityLevelSwapped( 'A00A', a, 2 )
    call UnitRemoveAbilityBJ( 'A00A', a )
    else
    endif
endfunction
[/jass]
发表于 2012-8-28 18:12:17 | 显示全部楼层
可以装个jasscraft……
回复

使用道具 举报

发表于 2012-8-29 23:13:12 | 显示全部楼层
板凳~~
回复

使用道具 举报

发表于 2012-8-30 09:21:17 | 显示全部楼层
[s:135]

爱路过
回复

使用道具 举报

发表于 2012-8-31 00:32:22 | 显示全部楼层
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-23 23:51 , Processed in 0.037906 second(s), 19 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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