本帖最后由 Allen 于 2024-5-27 19:12 编辑
注销的是以前版本显血,没有删掉
- function BattleHelperModule:onBattleCommand(battleIndex)
- -- local enemyTable = {}
- local battleTurn = Battle.GetTurn(battleIndex) + 1
- for slot = 10, 19 do
- local guai = Battle.GetPlayer(battleIndex, slot)
- if (guai >= 0) then
- guaihp[slot] = Char.GetData(guai,%对象_血%) or 0
- guaihp2[slot] = Char.GetData(guai,%对象_最大血%) or 0
- guaimp[slot] = Char.GetData(guai,%对象_魔%) or 0--留着,但一般不显示魔量,没做
- guaimp2[slot] = Char.GetData(guai,%对象_最大魔%) or 0--留着,但一般不显示魔量,没做
- else
- guaihp[slot] = 0
- guaihp2[slot] = 0
- guaimp[slot] = 0--留着,但一般不显示魔量,没做
- guaimp2[slot] = 0--留着,但一般不显示魔量,没做
- -- local level = Char.GetData(charIndex, CONST.CHAR_等级)
- -- local hp = Char.GetData(charIndex, CONST.CHAR_血)
- -- local maxHp = Char.GetData(charIndex, CONST.CHAR_最大血)
- -- local hpRatio = math.floor(hp / maxHp * 1000) / 10
- -- local mp = Char.GetData(charIndex, CONST.CHAR_魔)
- -- local maxMp = Char.GetData(charIndex, CONST.CHAR_最大魔)
- -- local mpRatio = math.floor(mp / maxMp * 1000) / 10
- -- local endPos = Battle.GetPos(battleIndex,charIndex);
- -- local name = Char.GetData(charIndex, CONST.CHAR_名字)
- -- local outputStr = { endPos, ', ', name, ', 等级:', level, ', HP:', hp, ', MP:', mp, '' }
- -- table.insert(enemyTable, table.concat(outputStr))
- end
- end
- local playerIndex = Battle.GetPlayer(battleIndex, 0)
- if showEnemyInfo then
- -- pd[battleindex] = 1--防重复显示
- -- Char.AddGold(player,-jiage)--扣费
- neirong0 = "----------------------------------------"
- neirong1 = "后排: "..show(guaihp[14],guaihp2[14]).." | "..show(guaihp[12],guaihp2[12]).." | "..show(guaihp[10],guaihp2[10]).." | "..show(guaihp[11],guaihp2[11]).." | "..show(guaihp[13],guaihp2[13])
- neirong2 = "前排: "..show(guaihp[19],guaihp2[19]).." | "..show(guaihp[17],guaihp2[17]).." | "..show(guaihp[15],guaihp2[15]).." | "..show(guaihp[16],guaihp2[16]).." | "..show(guaihp[18],guaihp2[18])
- neirong3 = "---------------回合数:"..battleTurn.." ---------------"
- NLG.Say(playerIndex,-1,neirong0,4,0)
- NLG.Say(playerIndex,-1,neirong1,4,0)--结尾4,0,4为字体颜色,第二个0为字体大小,数字自己改了测试
- NLG.Say(playerIndex,-1,neirong2,4,0)
- NLG.Say(playerIndex,-1,neirong3,4,0)
- -- NLG.TalkToCli(playerIndex, -1, '========== 回合: ' .. battleTurn .. ' ==========', 4, 1)
- -- for idx, outputStr in ipairs(enemyTable) do
- -- NLG.TalkToCli(playerIndex, -1, '> ' .. outputStr, 4, 1)
- -- end
- -- NLG.TalkToCli(playerIndex, -1, ' ', 4, 1)
- end
- end
复制代码
|