Commit b8eb016b85cfacf40e40efc7451eae7828c6b1d9
1 parent
4f8dfe80
冒险条件扣血扣蓝直接作用
Showing
1 changed file
with
6 additions
and
1 deletions
Show diff stats
src/adv/Adv.lua
| ... | ... | @@ -943,6 +943,7 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) |
| 943 | 943 | -- sp 到达指定值 |
| 944 | 944 | [6] = function(_, value) |
| 945 | 945 | if self.battle.player.sp >= value then |
| 946 | + self.battle.player:changeSp(-value) | |
| 946 | 947 | return true |
| 947 | 948 | end |
| 948 | 949 | end, |
| ... | ... | @@ -959,7 +960,11 @@ local function chooseCommon(self, room, block, chooseData, choose, tag) |
| 959 | 960 | end, |
| 960 | 961 | -- 9 = 生命值大于x% |
| 961 | 962 | [9] = function (_, value) |
| 962 | - return self.battle.player.hp / self.battle.player.hpMax * 100 > value | |
| 963 | + local cost = value / 100 * self.battle.player.hpMax | |
| 964 | + if self.battle.player.hp > cost then | |
| 965 | + self.battle.player:hurt(cost, nil, {hurtType = 6, buffId = -1}) | |
| 966 | + return true | |
| 967 | + end | |
| 963 | 968 | end, |
| 964 | 969 | -- 10 = 未获得x神器 |
| 965 | 970 | [10] = function(_, artifactId) | ... | ... |