Merge branch 'bugfix' into dev

This commit is contained in:
xichaoyin 2024-01-03 18:47:04 +08:00
commit 1090a5f8df
2 changed files with 36 additions and 14 deletions

View File

@ -37,7 +37,7 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
let _bossMaxHp = _bossData.maxhp
let _bossDelHp = _bossData.delhp
/**格式化boss属性 */
let hpjc = Number(((_bossMaxHp - _bossDelHp) / _bossMaxHp).toFixed(2)) || 0.01 // 继承血量比
let hpjc = Number(((_bossMaxHp - _bossDelHp) / _bossMaxHp).toFixed(2)) || 0.01 // 继承血量比
let _bossFightId = _con.army // boss 战斗id
let _npcFightData = await LingZhuLaiXifun.getBossFightInof(_bossFightId, Number(hpjc))
// let _npcFightData = await LingZhuLaiXifun.getBossFightInof(25, Number(hpjc)) // 测试数据
@ -63,7 +63,6 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
{ type: 'lingzhulaixi' },
{ $set: G.mongodb.createTreeObj({ key: `maxdps.${call.req.bid}`, val: 0 }) }
)
} else {
// 超过回合,直接赋值输
result.winSide = 1
@ -93,11 +92,13 @@ export default async function (call: ApiCall<ReqPkBoss, ResPkBoss>) {
_mySetDat = {
maxdps: _myData.maxdps,
time: _myData.time,
num: _myData.num + 1
}
_bossData.delhp += result.totalDamage[0]
}
// 无论挑战成功失败都扣除战斗次数
_mySetDat["num"] = _myData.num + 1;
// 设置boss数据
await LingZhuLaiXifun.setBossData(_bossData.bid, _setData)
await LingZhuLaiXifun.setMyData(call, { $set: _mySetDat })

View File

@ -34,16 +34,6 @@
"limit":500,
"tips":"地下钱庄使用次数超过500次"
},
{
"key":"shop/Buy/2",
"limit":50,
"tips":"势力商店购买某一商品超过50次"
},
{
"key":"shop/Buy/1",
"limit":10,
"tips":"杂货商店购买某一商品超过10次"
},
{
"key":"peijiancangku/Jump",
"limit":500,
@ -68,5 +58,36 @@
"key":"gonghui/FbFight",
"limit":5,
"tips":"势力战斗boss超过5次"
},
{
"key":"shop/Buy/2",
"limit":50,
"tips":"势力商店购买超过50次"
},
{
"key":"shop/Buy/1",
"limit":20,
"tips":"杂货商店购买超过20次"
},
{
"key":"shop/Buy/10",
"limit":20,
"tips":"荣誉商店购买超过20次"
},
{
"key":"shop/Buy/4",
"limit":10,
"tips":"饰品商店购买超过10次"
},
{
"key":"shop/Buy/11",
"limit":5,
"tips":"功绩商店购买超过5次"
},
{
"key":"shop/Buy/3",
"limit":5,
"tips":"战争商店购买超过5次"
}
]