fix: always use fullname

Fix #50
This commit is contained in:
Kazhnuz 2020-08-23 08:53:44 +02:00
parent 5139d9727d
commit e6cf6b5761
5 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,7 @@
return {
name = "spinattack",
fullname = "Spin Attack",
cost = 03,
targetNumber = 1, -- 0 for targeting all ennemies

View file

@ -1,5 +1,6 @@
return {
name = "spindash",
fullname = "Spin Dash",
cost = 05,
targetNumber = 1, -- 0 for targeting all ennemies
targetEnnemies = true,

View file

@ -3,7 +3,7 @@ local fancy = require "game.modules.menus.fancy"
local BattleMenu = fancy.FancyMenu:extend()
local MENUPOS_X1, MENUPOS_Y = 88, 72
local MENU_WIDTH = 180-24
local MENU_WIDTH = 180-32
local MENU_ITEM_NUMBER = 6
function BattleMenu:new(scene, name)

View file

@ -30,11 +30,11 @@ end
function MenuConstructor:buildBaseMenu(character)
CharacterMenu(self.scene, "BaseMenu")
widgets.ActionWidget(character, "BaseMenu", "attack")
widgets.ActionWidget(character, "BaseMenu", "attack", "Attack")
self:addSubMenu("BaseMenu", "SkillMenu", "Skills")
self:addSubMenu("BaseMenu", "ObjectMenu", "Objects")
widgets.ActionWidget(character, "BaseMenu", "defend")
widgets.ActionWidget(character, "BaseMenu", "flee")
widgets.ActionWidget(character, "BaseMenu", "defend", "Defend")
widgets.ActionWidget(character, "BaseMenu", "flee", "Flee")
end
function MenuConstructor:set(currentCharacter)

View file

@ -48,9 +48,10 @@ end
-- ActionWidget
-- The basic action widget
function widgets.ActionWidget:new(character, menu_name, action)
function widgets.ActionWidget:new(character, menu_name, action, label)
self.actionType = action or ""
widgets.ActionWidget.super.new(self, character, menu_name, action, "")
local label = label or self.actionType
widgets.ActionWidget.super.new(self, character, menu_name, label, "")
end
function widgets.ActionWidget:sendCharacterData()
@ -104,7 +105,7 @@ function widgets.SkillWidget:new(character, menu_name, skill)
end
end
widgets.SkillWidget.super.new(self, character, menu_name, self.skillname, "-" .. label2, "skills")
widgets.SkillWidget.super.new(self, character, menu_name, self.skilldata.fullname, "-" .. label2, "skills")
end
function widgets.SkillWidget:sendCharacterData()