From b28d9bf62426da2a4ad9c11925a543804ea88022 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 29 Aug 2020 11:36:59 +0200 Subject: [PATCH] feat: basic item menu Fix #48 --- .../gameplay/battlesystem/battleitems.md | 2 + .../assets/gui/fonts/hudsmallnumbers.png | Bin 5177 -> 5229 bytes sonic-radiance.love/assets/gui/itembox.lua | 6 + sonic-radiance.love/assets/gui/itembox.png | Bin 0 -> 7855 bytes .../gamedata/items/medicines/chilidog.lua | 2 +- .../game/modules/gui/assets.lua | 3 + .../overworld/screens/mainmenu/init.lua | 3 +- .../overworld/screens/mainmenu/items.lua | 137 ++++++++++++++++++ .../overworld/screens/mainmenu/pause.lua | 2 +- .../scenes/overworld/screens/parent.lua | 2 +- 10 files changed, 153 insertions(+), 4 deletions(-) create mode 100644 sonic-radiance.love/assets/gui/itembox.lua create mode 100644 sonic-radiance.love/assets/gui/itembox.png create mode 100644 sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua diff --git a/game-design/gameplay/battlesystem/battleitems.md b/game-design/gameplay/battlesystem/battleitems.md index 539966e..8eaf511 100644 --- a/game-design/gameplay/battlesystem/battleitems.md +++ b/game-design/gameplay/battlesystem/battleitems.md @@ -35,6 +35,8 @@ - Awakener (cure sleep) - Cure-All Spray (cure all status) +- Heal Unit (cure all status + restore all HP) + ## Battle items ### Powerups diff --git a/sonic-radiance.love/assets/gui/fonts/hudsmallnumbers.png b/sonic-radiance.love/assets/gui/fonts/hudsmallnumbers.png index a7c8dfe2f73f933641f0d18473987c938f7c8309..cd66ec52ce8bde2e2c1aef8b942441c4b2331c94 100644 GIT binary patch delta 4751 zcmV;A5^(LgDD5baBmwP_B_My6+`0{f|8o^t0^cB)!v}ayc97-g1Em>z>>FopGHv%m zQd1;Qs4B3X{_CH|{e!=pqIbDStG!mwU+%fb!JFovzj2>~&-eNMmHwU!UynO4?}^Bv z#A|v!w)!4djz_MK@A37HGdNy;8mQ}gVtzd_-hpC!Z}1-fxKRqv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uz3-$fuX4wImtA7y-UvUJl58<;uD#z{k@*yH&10|>N^H>YksJ*7$O6N zREW6N^^Ko{z}sN}K5rwg6-pJ_DWX!6?@9u;j;_2+T2O!?Gyl38cpCUbfP!S4gl3Zr zg?KvcW!+i*t7VI8g-}r|NznBOTOL7l4CSGz?b~ZxKuFhVPk}8g?0}yqtn7J%t#7b- z&p3{_)(|Q;X%Tc3QQO5Ybxi58gBf^O8u$#2AxW^v`1xe|8$Snw_y3=vMUnrPr#}Dy N002ovPDHLkV1g&LL{0zz literal 0 HcmV?d00001 diff --git a/sonic-radiance.love/datas/gamedata/items/medicines/chilidog.lua b/sonic-radiance.love/datas/gamedata/items/medicines/chilidog.lua index 165847a..94caf6f 100644 --- a/sonic-radiance.love/datas/gamedata/items/medicines/chilidog.lua +++ b/sonic-radiance.love/datas/gamedata/items/medicines/chilidog.lua @@ -1,7 +1,7 @@ return { name = "chilidog", fullname = "Chili Dog", - description = "Sonic's favorite food.", + description = "Sonic's favorite meal, complete with jalapeƱos. Heal a bit", conditions = { {"status", "ko", false} }, diff --git a/sonic-radiance.love/game/modules/gui/assets.lua b/sonic-radiance.love/game/modules/gui/assets.lua index a31e17b..fcce4e7 100644 --- a/sonic-radiance.love/game/modules/gui/assets.lua +++ b/sonic-radiance.love/game/modules/gui/assets.lua @@ -2,6 +2,9 @@ return { ["sprites"] = { {"cursorground", "assets/gui/cursor/ground"} }, + ["tilesets"] = { + {"itembox", "assets/gui/itembox"} + }, ["textures"] = { {"menucursor", "assets/gui/cursor-menulist.png"}, {"statusbar", "assets/gui/status_bar.png"}, diff --git a/sonic-radiance.love/scenes/overworld/screens/mainmenu/init.lua b/sonic-radiance.love/scenes/overworld/screens/mainmenu/init.lua index 7827691..e42606b 100644 --- a/sonic-radiance.love/scenes/overworld/screens/mainmenu/init.lua +++ b/sonic-radiance.love/scenes/overworld/screens/mainmenu/init.lua @@ -1,4 +1,5 @@ return { pause = require "scenes.overworld.screens.mainmenu.pause", - character = require "scenes.overworld.screens.mainmenu.character" + character = require "scenes.overworld.screens.mainmenu.character", + items = require "scenes.overworld.screens.mainmenu.items" } diff --git a/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua b/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua new file mode 100644 index 0000000..f3a45b1 --- /dev/null +++ b/sonic-radiance.love/scenes/overworld/screens/mainmenu/items.lua @@ -0,0 +1,137 @@ +local ParentScreen = require "scenes.overworld.screens.parent" +local ItemsScreen = ParentScreen:extend() + +local menu = require "game.modules.menus.list" +local const = require "scenes.overworld.screens.mainmenu.const" +local gui = require "game.modules.gui" + +local ItemWidget = menu.DualTextWidget:extend() +local BackWidget = menu.DualTextWidget:extend() + +local DESC_SIZE = 48*4 + +function ItemsScreen:new(scene) + self.menuIndex = 1 + self.choiceBack = gui.newChoiceBack(DESC_SIZE) + self.descBox = gui.newTextBox("assets/gui/dialogbox.png", DESC_SIZE, 40+16) + self.effectBox = gui.newTextBox("assets/gui/dialogbox.png", DESC_SIZE, 40) + self.desc = "" + self.effects = "" + ItemsScreen.super.new(self, scene, "Items") +end + +function ItemsScreen:update(dt) + local keys = self.scene:getKeys(1) + if (keys["left"].isPressed) then + self:getMenu(self.menuIndex - 1) + end + if (keys["right"].isPressed) then + self:getMenu(self.menuIndex + 1) + end +end + +function ItemsScreen:getMenu(newMenuIndex) + local newMenuIndex = newMenuIndex or 1 + if (newMenuIndex > #game.loot.inventory) then + newMenuIndex = 1 + end + if (newMenuIndex < 1) then + newMenuIndex = #game.loot.inventory + end + + self.menuIndex = newMenuIndex + self.scene.menusystem:reset() + self:setMenu() +end + +function ItemsScreen:setMenu() + self.pocket = game.loot:getPocketById(self.menuIndex) + local w = 128+32 + menu.ListMenu(self.scene, "menu", const.X2 - w, const.Y + 8, 128+32, 9, true) + for i,item in ipairs(self.pocket.list) do + --menu.DualTextWidget(self.scene, "menu", item.name, "x" .. item.number) + ItemWidget(self.scene, self.pocket.name, item) + end + BackWidget(self.scene) + self.scene.menusystem.menus["menu"]:setCancelWidget() + self.scene.menusystem:switchMenu("menu") +end + +function ItemsScreen:draw() + self.scene.assets.fonts["small"]:setLineHeight(16/18) + self:drawPocket() + self:drawDescription(const.X, const.Y2 - (88+16)) + self:drawEffects(const.X, const.Y2 - 40) +end + +function ItemsScreen:drawDescription(x, y) + love.graphics.draw(self.descBox, x, y) + local xx, yy, ww = x + 6, y + 4, DESC_SIZE - 12 + self.scene.assets.fonts["small"]:draw(self.desc, xx, yy, ww, "left") +end + +function ItemsScreen:drawEffects(x, y) + love.graphics.draw(self.effectBox, x, y) + local xx, yy, ww = x + 6, y + 4, DESC_SIZE - 12 + self.scene.assets.fonts["small"]:draw(self.effects, xx, yy, ww, "left") +end + +function ItemsScreen:drawPocket() + local middleX = ((16) + (DESC_SIZE - 24)) / 2 + love.graphics.draw(self.choiceBack, const.X, const.Y) + + self.scene.assets.fonts["small"]:draw("<", const.X + 16, const.Y - 2, -1, "left") + self.scene.assets.fonts["small"]:draw(">", const.X + DESC_SIZE - 24, const.Y - 2, -1, "right") + self.scene.assets.fonts["small"]:draw(self.pocket.fullname, const.X + middleX, const.Y - 2, -1, "center") + + self:drawPocketRoll(const.X + 48*2, const.Y + 20) +end + +function ItemsScreen:drawPocketRoll(x, y) + core.screen:setScissor(const.X, const.Y+ 16, 48*4, 48) + + local trueX = x - ((self.menuIndex - 1) * 32) + for i, pocket in ipairs(game.loot.inventory) do + local trueIndex = i - self.menuIndex + if (trueIndex > 4) then + trueIndex = trueIndex - 8 + end + if (trueIndex < -4) then + trueIndex = trueIndex + 8 + end + if (trueIndex ~= 0) then + love.graphics.setColor(.3, .3, .3, .6) + end + self.scene.assets.tileset["itembox"]:drawTile(i, x + ((trueIndex)*32), y, 0, 1, 1, 14, 0) + utils.graphics.resetColor() + end + + core.screen:resetScissor() +end + +-- Widgets +function ItemWidget:new(scene, pocket, item) + self.item = item + self.itemData = game.loot:getItemData(pocket, self.item.name) + ItemWidget.super.new(self, scene, "menu", self.itemData.fullname, "x" .. self.item.number) +end + +function ItemWidget:selectAction() + self.scene.currentScreen.desc = self.itemData.description +end + +--BackWidget +function BackWidget:new(scene) + ItemWidget.super.new(self, scene, "menu", "Back", "") +end + +function BackWidget:selectAction() + self.scene.currentScreen.desc = "" + self.scene.currentScreen.effects = "" +end + +function BackWidget:action() + self.scene.screens.mainmenu["pause"](self.scene, "main", 3) +end + +return ItemsScreen diff --git a/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua b/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua index a0676bc..6ef28a7 100644 --- a/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua +++ b/sonic-radiance.love/scenes/overworld/screens/mainmenu/pause.lua @@ -30,7 +30,7 @@ function PauseScreen:setMenu() menu.FancyMenu(self.scene, "main", const.X, const.Y, 108, 10, false) TeamWidget(self.scene) menu.BaseWidget(self.scene, "main", "Quest", ">") - menu.BaseWidget(self.scene, "main", "Items", ">") + ViewWidget(self.scene, "Items", "items") menu.BaseWidget(self.scene, "main", "Chao", ">") menu.BaseWidget(self.scene, "main", "Encylopedia", ">") menu.BaseWidget(self.scene, "main", "Options", ">") diff --git a/sonic-radiance.love/scenes/overworld/screens/parent.lua b/sonic-radiance.love/scenes/overworld/screens/parent.lua index fb625ef..19e177a 100644 --- a/sonic-radiance.love/scenes/overworld/screens/parent.lua +++ b/sonic-radiance.love/scenes/overworld/screens/parent.lua @@ -30,7 +30,7 @@ end function MenuScreenParent:drawForeground() self.scene.assets.fonts["SA2font"]:print(self.title, 160, 12) - --love.graphics.rectangle("line", const.X, const.Y, const.WIDTH, const.HEIGHT) + love.graphics.rectangle("line", const.X, const.Y, const.WIDTH, const.HEIGHT) self:draw() end