|
if DrawStrBoxYesNo(-1, -1, "要洗武功吗?", C_WHITE, CC.DefaultFont) then
Cls()
local nexty = CC.MainSubMenuY + CC.SingleLineHeight
local p = SelectTeamMenu(CC.MainSubMenuX, nexty)
if p > 0 then
local pid = JY.Base["队伍" .. p]
local menu = {}
for i = 1, 12 do
if JY.Person[pid]["武功"..i] > 0 then
local wg = JY.Person[pid]["武功"..i]
menu[#menu+1] = {JY.Wugong[wg]["名称"], nil, 1, wg, i}
end
end
Cls()
local r = ShowMenu(menu, #menu, 0, CC.MainSubMenuX, CC.MainSubMenuY, 0, 0, 1, 1, CC.DefaultFont, C_ORANGE, C_WHITE)
if r > 0 then
local thingid = -1
for i = 0, JY.ThingNum - 1 do
if JY.Thing[i]["练出武功"] > 0 and JY.Thing[i]["练出武功"] == menu[r][4] then
thingid = i
local level = math.modf(JY.Person[pid]["武功等级" .. menu[r][5]] / 100) + 1
AddPersonAttrib(pid, "攻击力", -JY.Thing[thingid]["加攻击力"]*level)
AddPersonAttrib(pid, "轻功", -JY.Thing[thingid]["加轻功"]*level)
AddPersonAttrib(pid, "防御力", -JY.Thing[thingid]["加防御力"]*level)
if match_ID(pid,56) or match_ID(pid,77) then
AddPersonAttrib(pid,"拳掌功夫",-JY.Thing[i]["加拳掌功夫"]*2*level)
AddPersonAttrib(pid,"指法技巧",-JY.Thing[i]["加指法技巧"]*2*level)
AddPersonAttrib(pid,"御剑能力",-JY.Thing[i]["加御剑能力"]*2*level)
AddPersonAttrib(pid,"耍刀技巧",-JY.Thing[i]["加耍刀技巧"]*2*level)
AddPersonAttrib(pid,"特殊兵器",-JY.Thing[i]["加特殊兵器"]*2*level)
else
AddPersonAttrib(pid,"拳掌功夫",-JY.Thing[i]["加拳掌功夫"]*level)
AddPersonAttrib(pid,"指法技巧",-JY.Thing[i]["加指法技巧"]*level)
AddPersonAttrib(pid,"御剑能力",-JY.Thing[i]["加御剑能力"]*level)
AddPersonAttrib(pid,"耍刀技巧",-JY.Thing[i]["加耍刀技巧"]*level)
AddPersonAttrib(pid,"特殊兵器",-JY.Thing[i]["加特殊兵器"]*level)
break
end
end
end
for i = menu[r][5], #menu - 1 do
JY.Person[pid]["武功"..i] = JY.Person[pid]["武功"..i+1]
JY.Person[pid]["武功等级"..i] = JY.Person[pid]["武功等级"..i+1]
end
JY.Person[pid]["武功"..#menu] = 0
JY.Person[pid]["武功等级"..#menu] = 0
QZXS(JY.Person[pid]["姓名"].."已经洗掉"..menu[r][1])
end
end
end
加了黄蓉和萧中慧兵器值双倍,洗武功会减属性了 |
|