- --显示人物具体信息
- function ShowPersonStatus_sub(id, page)
- local size = CC.DefaultFont
- local p = JY.Person[id]
- local p0 = JY.Person[0]
- local width = 18 * size + 15
- local h = size + CC.PersonStateRowPixel
- local height = 13 * h + 10
- local dx = (CC.ScreenW - width) / 2
- local dy = (CC.ScreenH - height) / 2
- local i = 1
- local x1, y1, x2 = nil, nil, nil
- DrawBox(dx, dy, dx + width, dy + height, C_WHITE)
- x1 = dx + 5
- y1 = dy + 5
- x2 = 4 * size
- local headw, headh = lib.PicGetXY(1, p["头像代号"] * 2)
- local headx = (width / 2 - headw) / 3
- local heady = (h * 6 - headh) / 6
- local hid = nil
- if id == 0 then
- if GetS(4, 5, 5, 5) < 8 then
- hid = 280 + GetS(4, 5, 5, 5)
- else
- hid = 287 + GetS(4, 5, 5, 4)
- end
- else
- hid = p["头像代号"]
- end
- lib.PicLoadCache(1, hid * 2, x1 + headx, y1 + heady, 1)
- i = 4
- DrawString(x1, y1 + h * i, p[CC.s23], C_WHITE, size)
- DrawString(x1 + 10 * size / 2, y1 + h * i, string.format("%3d", p["等级"]), C_GOLD, size)
- DrawString(x1 + 13 * size / 2, y1 + h * i, "级", C_ORANGE, size)
- i = i + 1
- DrawString(x1, y1 + h * (i), CC.s24, C_GOLD, size)
-
- --主角如果不是特殊人物,天赋
- if id == 0 and p[CC.s23] ~= JY.LEQ and p[CC.s23] ~= JY.SQ and p[CC.s23] ~= JY.XYK then
- DrawString(x1 + size * 3, y1 + h * (i), ZJTF[JY.Thing[201][WZ7]], C_GOLD, size)
- end
-
- --零二七,天赋
- if p[CC.s23] == JY.LEQ and id == 0 then
- DrawString(x1 + size * 3, y1 + h * (i), RWTFLB["01"], C_GOLD, size)
- end
-
- --水镜四奇
- if p[CC.s23] == JY.SQ and id == 0 then
- DrawString(x1 + size * 3, y1 + h * (i), RWTFLB["02"], C_GOLD, size)
- end
-
- --萧雨客
- if p[CC.s23] == JY.XYK and id == 0 then
- DrawString(x1 + size * 3, y1 + h * (i), RWTFLB["03"], C_GOLD, size)
- end
-
- --普通角色天赋
- if id ~= 0 and RWTFLB[id] ~= nil then
- DrawString(x1 + size * 3, y1 + h * (i), RWTFLB[id], C_GOLD, size)
- end
-
-
- --称号
- i = i + 1
- DrawString(x1, y1 + h * (i), CC.s25, C_GOLD, size)
- if RWWH[id] ~= nil and id ~= 35 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH[id], C_GOLD, size)
- end
- if id == 35 then
- if GetS(10, 1, 1, 0) == 1 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["35"], C_GOLD, size)
- else
- DrawString(x1 + size * 3, y1 + h * (i), RWWH[id], C_GOLD, size)
- end
- end
- if id == 0 and p[CC.s23] == JY.LEQ then
- if GetS(10, 0, 7, 0) == 1 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["01b"], C_GOLD, size)
- else
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["01"], C_GOLD, size)
- end
- end
- if id == 0 and p[CC.s23] == JY.SQ then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["02"], C_GOLD, size)
- end
- if id == 0 and p[CC.s23] == JY.XYK then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["03"], C_GOLD, size)
- end
- if id == 0 and GetS(10, 0, 7, 0) == 1 and JY.Thing[201][WZ7] ~= 8 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["04"], C_GOLD, size)
- end
-
- if JY.Person[49]["武功1"] == 8 and id == 49 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["49"], C_GOLD, size)
- end
-
-
- --武功
- for w = 1, 10 do
- if JY.Person[38]["武功" .. w] <= 0 then
- break;
- end
- if JY.Person[38]["武功" .. w] == 102 and id == 38 then
- DrawString(x1 + size * 3, y1 + h * (i), RWWH["38"], C_GOLD, size)
- end
- end
-
-
- --受伤,流血,中毒,封穴,内力性质等属性
- local function DrawAttrib(str, color1, color2, v)
- if not v then
- v = 0
- end
- DrawString(x1, y1 + h * i, str, color1, size)
- DrawString(x1 + x2, y1 + h * i, string.format("%5d", p[str] + v), color2, size)
- i = i + 1
- end
- if page == 1 then
- local color = nil
- if p["受伤程度"] < 33 then
- color = RGB(236, 200, 40)
- elseif p["受伤程度"] < 66 then
- color = RGB(244, 128, 32)
- else
- color = RGB(232, 32, 44)
- end
- i = i + 1
- DrawString(x1, y1 + h * (i), "生命", C_ORANGE, size)
- DrawString(x1 + 2 * size, y1 + h * (i), string.format("%5d", p["生命"]), color, size)
- DrawString(x1 + 9 * size / 2, y1 + h * (i), "/", C_GOLD, size)
- if p["中毒程度"] == 0 then
- color = RGB(252, 148, 16)
- elseif p["中毒程度"] < 50 then
- color = RGB(120, 208, 88)
- else
- color = RGB(56, 136, 36)
- end
- DrawString(x1 + 5 * size, y1 + h * (i), string.format("%5s", p["生命最大值"]), color, size)
- i = i + 1
- if p["内力性质"] == 0 then
- color = RGB(208, 152, 208)
- elseif p["内力性质"] == 1 then
- color = RGB(236, 200, 40)
- else
- color = RGB(236, 236, 236)
- end
- if GetS(4, 5, 5, 5) == 5 and id == 0 then
- color = RGB(216, 20, 24)
- end
- DrawString(x1, y1 + h * (i), "内力", C_ORANGE, size)
- DrawString(x1 + 2 * size, y1 + h * (i), string.format("%5d/%5d", p["内力"], p["内力最大值"]), color, size)
- i = i + 1
- DrawString(x1, y1 + h * (i), "体力", C_ORANGE, size)
- DrawString(x1 + size * 2 + 8, y1 + h * (i), p["体力"], C_GOLD, size)
- DrawString(x1 + size * 4 + 16, y1 + h * (i), "体质", C_ORANGE, size)
- DrawString(x1 + size * 6 + 32, y1 + h * (i), p["生命增长"], C_GOLD, size)
- i = i + 1
-
- --实战
- DrawString(x1, y1 + h * (i), "实战", C_ORANGE, size)
- for j = 1, #TeamP do
- if id == TeamP[j] then
- local num, cl = GetS(5, j, 6, 5) - 2, C_GOLD
- if num > 499 then
- num = "极"
- cl = C_RED
- end
- DrawString(x1 + size * 2 + 8, y1 + h * (i), num, cl, size)
- end
- end
-
- --左右
- DrawString(x1 + size * 4 + 16, y1 + h * (i), "互搏", C_ORANGE, size)
- local hb = nil
- if p["左右互搏"] == 1 then
- hb = "◎"
- else
- hb = "※"
- end
-
- --经验值
- DrawString(x1 + size * 6 + 24, y1 + h * (i), hb, C_GOLD, size)
- i = i + 1
- DrawString(x1, y1 + h * (i), "升级", C_ORANGE, size)
- local kk = nil
- if p["等级"] >= 30 then
- kk = " ="
- else
- kk = 2 * (p["经验"] - CC.Exp[p["等级"] - 1])
- if kk < 0 then
- kk = " 0"
- elseif kk < 10 then
- kk = " " .. kk
- elseif kk < 100 then
- kk = " " .. kk
- elseif kk < 1000 then
- kk = " " .. kk
- end
- end
-
- --等级
- DrawString(x1 + size * 2 + 16, y1 + h * (i), kk, C_GOLD, size)
- local tmp = nil
- if CC.Level <= p["等级"] then
- tmp = "="
- else
- tmp = 2 * (CC.Exp[p["等级"]] - CC.Exp[p["等级"] - 1])
- end
-
- --装备
- DrawString(x1 + size * 4 + 16, y1 + h * (i), "/" .. tmp, C_GOLD, size)
- local tmp1, tmp2, tmp3 = 0, 0, 0
- if p["武器"] > -1 then
- tmp1 = tmp1 + JY.Thing[p["武器"]]["加攻击力"]
- tmp2 = tmp2 + JY.Thing[p["武器"]]["加防御力"]
- tmp3 = tmp3 + JY.Thing[p["武器"]]["加轻功"]
- end
- if p["防具"] > -1 then
- tmp1 = tmp1 + JY.Thing[p["防具"]]["加攻击力"]
- tmp2 = tmp2 + JY.Thing[p["防具"]]["加防御力"]
- tmp3 = tmp3 + JY.Thing[p["防具"]]["加轻功"]
- end
-
- --中毒、封穴、流血
- i = i + 1
- DrawString(x1, y1 + h * (i), "中毒", C_ORANGE, size)
- DrawString(x1 + size * 2 + 10, y1 + h * (i), p["中毒程度"], C_BLACK, size)
- DrawString(x1 + size * 4 + 25, y1 + h * (i), "内伤", C_ORANGE, size)
- DrawString(x1 + size * 6 + 35, y1 + h * (i), p["受伤程度"], C_RED, size)
- DrawString(x1 + size * 8 + 50, y1 + h * (i), "封穴", C_ORANGE, size)
- if JY.Status == GAME_WMAP and WAR.FXDS[id] ~= nil then
- DrawString(x1 + size * 10 + 60, y1 + h * (i), WAR.FXDS[id], C_GOLD, size)
- else
- DrawString(x1 + size * 10 + 60, y1 + h * (i), 0, C_GOLD, size)
- end
- DrawString(x1 + size * 12 + 75, y1 + h * (i), "流血", C_ORANGE, size)
- if JY.Status == GAME_WMAP and WAR.LXZT[id] ~= nil then
- DrawString(x1 + size * 14 + 85, y1 + h * (i), WAR.LXZT[id], C_RED, size)
- else
- DrawString(x1 + size * 14 + 85, y1 + h * (i), 0, C_RED, size)
- end
- i = 0
- x1 = dx + width / 2 - 24
- DrawAttrib("攻击力", C_WHITE, C_GOLD)
- DrawString(x1 + size * 7, y1, "↑ " .. tmp1, C_GOLD, size)
- DrawAttrib("防御力", C_WHITE, C_GOLD)
- DrawString(x1 + size * 7, y1 + h, "↑ " .. tmp2, C_GOLD, size)
- DrawAttrib("轻功", C_WHITE, C_GOLD)
- if tmp3 > -1 then
- DrawString(x1 + size * 7, y1 + h * 2, "↑ " .. tmp3, C_GOLD, size)
- else
- tmp3 = -(tmp3)
- DrawString(x1 + size * 7, y1 + h * 2, "↓ " .. tmp3, C_GOLD, size)
- end
-
- --能力属性
- DrawAttrib("医疗能力", C_WHITE, C_GOLD)
- DrawAttrib("用毒能力", C_WHITE, C_GOLD)
- DrawAttrib("解毒能力", C_WHITE, C_GOLD)
- DrawAttrib("拳掌功夫", C_WHITE, C_GOLD)
- DrawAttrib("御剑能力", C_WHITE, C_GOLD)
- DrawAttrib("耍刀技巧", C_WHITE, C_GOLD)
- DrawAttrib("特殊兵器", C_WHITE, C_GOLD)
- DrawAttrib("暗器技巧", C_WHITE, C_GOLD)
- DrawAttrib("资质", C_WHITE, C_GOLD)
- elseif page == 2 then
- i = i + 1
- DrawString(x1, y1 + h * (i), "武器:", C_ORANGE, size)
- if p["武器"] > -1 then
- DrawString(x1 + size * 3, y1 + h * (i), JY.Thing[p["武器"]]["名称"], C_GOLD, size)
- end
- i = i + 1
- DrawString(x1, y1 + h * (i), "防具:", C_ORANGE, size)
- if p["防具"] > -1 then
- DrawString(x1 + size * 3, y1 + h * (i), JY.Thing[p["防具"]]["名称"], C_GOLD, size)
- end
- i = i + 1
- DrawString(x1, y1 + h * (i), "修炼物品", C_ORANGE, size)
- local thingid = p["修炼物品"]
- if thingid > 0 then
- i = i + 1
- DrawString(x1 + size, y1 + h * (i), JY.Thing[thingid]["名称"], C_GOLD, size)
- i = i + 1
- local n = TrainNeedExp(id)
- if n < math.huge then
- DrawString(x1 + size, y1 + h * (i), string.format("%5d/%5d", p["修炼点数"], n), C_GOLD, size)
- else
- DrawString(x1 + size, y1 + h * (i), string.format("%5d/===", p["修炼点数"]), C_GOLD, size)
- end
- else
- i = i + 2
- end
- i = i + 1
- DrawString(x1, y1 + h * (i), "左右键翻页 上下键换人 空格键能力解说", C_RED, size)
- i = 0
- x1 = dx + width / 2
-
- --武功显示
- DrawString(x1, y1 + h * i, "所会功夫", C_ORANGE, size)
- local T = {"一", "二", "三", "四", "五", "六", "七", "八", "九", "十", "极"}
- if JY.Person[0]["武功1"] > 108 and JY.Person[0]["武功等级1"] < 900 then
- JY.Person[0]["武功等级1"] = 900
- end
- for j = 1, 10 do
- i = i + 1
- local wugong = p["武功" .. j]
- if wugong > 0 then
- local level = math.modf(p["武功等级" .. j] / 100) + 1
- if p["武功等级" .. j] == 999 then
- level = 11
- end
- DrawString(x1 + size, y1 + h * (i), string.format("%s", JY.Wugong[wugong]["名称"]), C_GOLD, size)
- if p["武功等级" .. j] > 900 then
- lib.SetClip(x1 + size, y1 + h * 1, x1 + size + string.len(JY.Wugong[wugong]["名称"]) * size * (p["武功等级" .. j] - 900) / 200, y1 + h * (i) + h)
- DrawString(x1 + size, y1 + h * (i), string.format("%s", JY.Wugong[wugong]["名称"]), C_ORANGE, size)
- lib.SetClip(0, 0, 0, 0)
- end
- DrawString(x1 + size * 7, y1 + h * (i), T[level], C_WHITE, size)
- end
- end
- i = 11
- DrawString(x1 + size, y1 + h * i, "怒气", C_ORANGE, size)
- if JY.Status == GAME_WMAP and WAR.LQZ[id] ~= nil then
- DrawString(x1 + size * 3 + 10, y1 + h * i, WAR.LQZ[id], C_GOLD, size)
- else
- DrawString(x1 + size * 3 + 10, y1 + h * i, 0, C_GOLD, size)
- end
- if id == 0 then
- DrawString(x1 + size * 5 + 10, y1 + h * i, "武常", C_ORANGE, size)
- DrawString(x1 + size * 7 + 20, y1 + h * i, p["武学常识"], C_GOLD, size)
- else
- DrawString(x1 + size * 5 + 10, y1 + h * i, "※※", C_ORANGE, size)
- DrawString(x1 + size * 7 + 20, y1 + h * i, 0, C_GOLD, size)
- end
- end
- end
复制代码 |