不就是伤害系统吗?本喵也有~
魔兽地图编辑器吧
全部回复
仅看楼主
level 13
tanruixin258 楼主
2012年10月02日 05点10分 1
level 9
2012年10月02日 05点10分 2
level 11
2012年10月02日 05点10分 3
[吐血]
2012年10月02日 05点10分
level 13
tanruixin258 楼主
//暴击系统分为物理暴击和法术暴击
//物理暴击采用受到伤害后追加强化伤害的方法模拟
//每个英雄都天生拥有1.5倍暴击,默认0%几率,物品和技能只提高暴击几率和暴击伤害,都是线性叠加
//关于提高暴击伤害的说明:提高50%暴击伤害实际上就是提高0.5倍,100%就是提高1倍,依此类推
//如果拥有两个提高50%暴击伤害的物品,则总共提高100%,技能与物品可以叠加
//只需侦测得到或丢弃暴击物品,学习暴击技能,再设置全局就行
//全局变量说明:
//udg_CorSis_per 整数数组 暴击几率(去掉百分号的值)
//udg_CorSis_updam 实数数组 暴击伤害提高
暴击系统就直接用GUI就行了
2012年10月02日 05点10分 4
level 13
tanruixin258 楼主
吸血直接用GUI
2012年10月02日 05点10分 5
吧务
level 14
伤害系统是什么?
2012年10月02日 05点10分 6
小汐大神别嘲讽~
2012年10月02日 05点10分
level 13
tanruixin258 楼主
伤害函数在这里
//伤害函数1.0
function ShanaSistemOfDamage takes unit u,unit target,real value,integer ty,real zzf returns nothing
local real dam
local attacktype atty
local damagetype daty
local string Ps=""
local texttag tag1
local texttag tag2
local integer R
local integer G
local integer B
local real Si=0.00
if ty==0 or ty==3 then
set dam=value
set udg_ABDamHit[GetConvertedPlayerId(GetOwningPlayer(u))]=value
set R=255
set G=10
set B=10
set atty=ATTACK_TYPE_HERO
if ty==0 then
set daty=DAMAGE_TYPE_NORMAL
else
set daty=DAMAGE_TYPE_ENHANCED
endif
else
if ty!=5 then
if (((udg_MagicDamPer[GetConvertedPlayerId(GetOwningPlayer(u))]>0)and(GetRandomInt(1,100)<=udg_MagicDamPer[GetConvertedPlayerId(GetOwningPlayer(u))]))) then
set dam=I2R(udg_MagicDamEX[GetConvertedPlayerId(GetOwningPlayer(u))])*zzf+value*udg_MagicDamMul[GetConvertedPlayerId(GetOwningPlayer(u))]
set Ps="!"
set Si=8.00
else
set dam=I2R(udg_MagicDamEX[GetConvertedPlayerId(GetOwningPlayer(u))])*zzf+value
endif
if ty==1 or ty==2 then
set dam=dam*(1-udg_MagicResistPer[GetConvertedPlayerId(GetOwningPlayer(u))])
set atty=ATTACK_TYPE_NORMAL
if ty==1 then
set daty=DAMAGE_TYPE_MAGIC
set R=10
set G=10
set B=255
else
set daty=DAMAGE_TYPE_NORMAL
set R=255
set G=10
set B=255
endif
else
set atty=ATTACK_TYPE_HERO
set daty=DAMAGE_TYPE_MAGIC
set R=10
set G=10
set B=255
endif
//法术吸血
call MakeUnitLife(u,true,dam*udg_AbsorbValueAT[GetConvertedPlayerId(GetOwningPlayer(u))],null)
call YDWETimerDestroyEffect(2.00,AddSpecialEffectTarget("Abilities\\Spells\\Undead\\VampiricAura\\VampiricAuraTarget.mdl",GetEventDamageSource(),"origin"))
else
set atty=ATTACK_TYPE_HERO
set daty=DAMAGE_TYPE_UNIVERSAL
set R=254
set G=186
set B=14
endif
endif
call UnitDamageTarget(u,target,dam,false,false,atty,daty,WEAPON_TYPE_WHOKNOWS)
//漂浮文字
if GetOwningPlayer(u) == GetLocalPlayer() then
set tag1=CreateTextTag()
call SetTextTagTextBJ(tag1,I2S(R2I(dam))+Ps,(12.00+Si))
call SetTextTagColor(tag1,R,G,B,235)
call SetTextTagPos(tag1,GetUnitX(target),GetUnitY(target),80.00)
call SetTextTagVelocityBJ(tag1,70.00,YDWER2Deg(GetRandomReal(40.00, 140.00)))
call SetTextTagPermanent(tag1,false)
call SetTextTagLifespan(tag1,4.00)
call SetTextTagFadepoint(tag1,2.00)
elseif GetOwningPlayer(target) == GetLocalPlayer() then
set tag2=CreateTextTag()
call SetTextTagTextBJ(tag2,I2S(R2I(dam)),12.00)
call SetTextTagPos(tag2,GetUnitX(target),GetUnitY(target),80.00)
call SetTextTagColor(tag2,100,100,100,235)
call SetTextTagVelocityBJ(tag2,70.00,YDWER2Deg(GetRandomReal(40.00, 140.00)))
call SetTextTagPermanent(tag2,false)
call SetTextTagLifespan(tag2,4.00)
call SetTextTagFadepoint(tag2,2.00)
endif
set tag1=null
set tag2=null
endfunction
//0为物理,1为魔法,2为混合,3为物理穿透,4为魔法穿透,5为完全
我今天还要修正一下关于漂浮文字的函数段~
2012年10月02日 05点10分 7
level 13
tanruixin258 楼主
技能伤害全模拟 都是调用桑面那段函数 参数最后一个zzf是自在法精通系数
2012年10月02日 05点10分 8
你的大脑都是电脑做的么![怒]每次看到这么长一串东西就头晕。
2012年10月02日 05点10分
@🌟血色琉璃 其实我也一样 克服~
2012年10月02日 05点10分
level 14
[Yeah]纯物编才是最厉害的!
2012年10月02日 05点10分 9
风酱来一个纯物编的~
2012年10月02日 05点10分
level 10
留名回家看。
2012年10月02日 06点10分 10
level 10
这个能吃么? [惊讶]
2012年10月02日 06点10分 11
level 12
吸血暴击伤害计算减免都一个函数搞定,返回值返回实际造成的伤害,用起来比这样拆分开好用多了~
2012年10月02日 06点10分 13
我中间是各种技能对变量的运算啊~~
2012年10月02日 06点10分
level 11
[惊讶]好牛比 水13给跪
2012年10月02日 06点10分 15
level 9
dota的伤害是全模拟的吗?
2012年10月02日 10点10分 16
不是~~
2012年10月02日 10点10分
level 8
好长
2012年10月02日 10点10分 18
level 10
演示图呢?
2012年10月02日 13点10分 19
level 13
[Love]好厉害
2012年10月02日 14点10分 20
1