闲得无聊帮人写的,顺便就发出来了,理论上兼容所有苍炎衍生的diy版本
代码作用:
洗去队伍里任意队友的任意武功,但是作为惩罚双倍扣掉修炼该武功的属性点(这个你可以自己改)- 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, 10 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]["加内力最大值"] * 2 * level)
- AddPersonAttrib(pid, "攻击力", -JY.Thing[thingid]["加攻击力"] * 2 * level)
- AddPersonAttrib(pid, "轻功", -JY.Thing[thingid]["加轻功"] * 2 * level)
- AddPersonAttrib(pid, "防御力", -JY.Thing[thingid]["加防御力"] * 2 * level)
- AddPersonAttrib(pid, "医疗能力", -JY.Thing[thingid]["加医疗能力"] * 2 * level)
- AddPersonAttrib(pid, "用毒能力", -JY.Thing[thingid]["加用毒能力"] * 2 * level)
- AddPersonAttrib(pid, "解毒能力", -JY.Thing[thingid]["加解毒能力"] * 2 * level)
- AddPersonAttrib(pid, "抗毒能力", -JY.Thing[thingid]["加抗毒能力"] * 2 * level)
- AddPersonAttrib(pid, "拳掌功夫", -JY.Thing[thingid]["加拳掌功夫"] * 2 * level)
- AddPersonAttrib(pid, "御剑能力", -JY.Thing[thingid]["加御剑能力"] * 2 * level)
- AddPersonAttrib(pid, "耍刀技巧", -JY.Thing[thingid]["加耍刀技巧"] * 2 * level)
- AddPersonAttrib(pid, "特殊兵器", -JY.Thing[thingid]["加特殊兵器"] * 2 * level)
- break
- 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
复制代码 |