feat(autoget): autoget can not get hp&mana potion

This commit is contained in:
bdf1 2023-03-26 03:27:16 +13:00
parent 54415e1d7b
commit 5adad81f4f
2 changed files with 2 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@ -1863,6 +1863,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (idx in canGetItems) return false;
var blk = blockMap[idx];
if (blk && !blk.disable && blk.event.cls == 'items' && !core.isMapBlockDisabled(core.status.floorId, blk.x, blk.y) && blk.event.trigger == 'getItem') {
if (/hero\.(hp|mana) \+= [1-9]/.test(core.material.items[blk.event.id].itemEffect)) return false;
canGetItems[idx] = { x: x, y: y, id: blk.event.id };
return !core.status.checkBlock.damage[idx] && !core.status.checkBlock.ambush[idx];
}