Refonte pour utiliser le systeme de GUI #112
2 changed files with 4 additions and 4 deletions
|
@ -15,17 +15,17 @@ function FleeAction:startAction()
|
||||||
local stats = self.fighter.abstract.stats
|
local stats = self.fighter.abstract.stats
|
||||||
|
|
||||||
if (self.fighter.abstract.name == "shadow") then
|
if (self.fighter.abstract.name == "shadow") then
|
||||||
self.fighter.turns.hud:showMessage("You won't flee the battle")
|
self.fighter.turnSystem.scene:showMessage("You won't flee the battle")
|
||||||
self:finishAction()
|
self:finishAction()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local chanceToFlee = self.fighter.turnSystem:getChanceTooFlee(self.fighter:getStat(STATS.SPEED))
|
local chanceToFlee = self.fighter.turnSystem:getChanceTooFlee(self.fighter:getStat(STATS.SPEED))
|
||||||
if (math.random(100) < chanceToFlee) then
|
if (math.random(100) < chanceToFlee) then
|
||||||
self.fighter.turnSystem.hud:showMessage("You flee the battle")
|
self.fighter.turnSystem.scene:showMessage("You flee the battle")
|
||||||
self.fighter.turnSystem:fleeBattle()
|
self.fighter.turnSystem:fleeBattle()
|
||||||
else
|
else
|
||||||
self.fighter.turnSystem.hud:showMessage("You failed to flee the battle")
|
self.fighter.turnSystem.scene:showMessage("You failed to flee the battle")
|
||||||
self:finishAction()
|
self:finishAction()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ function widgets.SkillWidget:sendCharacterData()
|
||||||
core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist")
|
core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist")
|
||||||
self.character:doNothing()
|
self.character:doNothing()
|
||||||
self.assets.sfx["mError"]:play()
|
self.assets.sfx["mError"]:play()
|
||||||
self.scene.turns.hud:showMessage("You haven't enough PP!")
|
self.scene:showMessage("You haven't enough PP!")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue