diff --git a/publish/publish.sh b/publish/publish.sh index 3636ec5..c80172c 100644 --- a/publish/publish.sh +++ b/publish/publish.sh @@ -28,7 +28,7 @@ cd - rsync -aP --exclude=".git" ./src/ ${dist}/src/ rsync -aP ./publish/skynet ${dist}/ rsync -aP --exclude={config/develop.lua,config/nodenames.lua} config ${dist}/ -cp kill.sh ${dist}/ -cp run.sh ${dist}/ +# cp kill.sh ${dist}/ +# cp run.sh ${dist}/ # rsync -aP --exclude-from="./publish/exclude.list" ${origin}/ ./${dist}/ diff --git a/src/adv/AdvPlayer.lua b/src/adv/AdvPlayer.lua index d926812..e5b25b0 100644 --- a/src/adv/AdvPlayer.lua +++ b/src/adv/AdvPlayer.lua @@ -416,9 +416,13 @@ end function BaseObject:recover(value, releaser, params) params = params or {} value = math.max(0, math.ceil(value)) + local old = self.hp self.hp = math.min(self.hpMax, self.hp + value) + local change = self.hp - old if self:is("Player") then - self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value}) + if change > 0 then + self.battle.adv:pushBackEvent(AdvBackEventType.HpChange, {change = value}) + end end end -- libgit2 0.21.2