diff --git a/game/engine/Dialog.lua b/game/engine/Dialog.lua index bcbe8bc6349a0485de82ea162a13c9ae9c5ef674..f421082c375aa5e77c8c10656e85c3b8628600a6 100644 --- a/game/engine/Dialog.lua +++ b/game/engine/Dialog.lua @@ -196,6 +196,8 @@ function _M:drawSelectionList(s, x, y, hskip, list, sel, prop, scroll, max, colo else lines = {v} end for j = 1, #lines do if sel == i then + local sx, sy = self.font:size(lines[j]) +-- s:erase(selcolor[1]/3, selcolor[2]/3, selcolor[3]/3, 1, x, y, sx, sy) s:drawColorStringBlended(self.font, lines[j], x, y, selcolor[1], selcolor[2], selcolor[3]) else local r, g, b = color[1], color[2], color[3] diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index c316f6080b5e3b7d60ea1e422a67b1f842a22f88..86bb33ad8d7868b179553431b8f8f9aaeac2ecbd 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -564,9 +564,10 @@ end function _M:levelup() self.unused_stats = self.unused_stats + 3 + self:getRankStatAdjust() - if self.level % 5 == 0 then self.unused_talents = self.unused_talents + 1 end self.unused_talents = self.unused_talents + 1 self.unused_skills = self.unused_skills + 1 + if self.level % 5 == 0 then self.unused_talents = self.unused_talents + 1 end + if self.level % 5 == 0 then self.unused_skills = self.unused_skills - 1 end -- At levels 10, 20 and 30 we gain a new talent type if self.level == 10 or self.level == 20 or self.level == 30 then self.unused_talents_types = self.unused_talents_types + 1 diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 084ed7230ee4c4bb1c3f60864033884dfb059a4d..6631750104580ae4b1794374ad2b4a9ede6a8bd6 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -80,7 +80,7 @@ end function _M:run() self.flash = LogFlasher.new(0, 0, self.w, 20, nil, nil, nil, {255,255,255}, {0,0,0}) self.logdisplay = LogDisplay.new(0, self.h * 0.8, self.w * 0.5, self.h * 0.2, nil, nil, nil, {255,255,255}, {30,30,30}) - self.player_display = PlayerDisplay.new(0, 20, 200, self.h * 0.8 - 20, {30,30,0}) + self.player_display = PlayerDisplay.new(0, 220, 200, self.h * 0.8 - 220, {30,30,0}) self.hotkeys_display = HotkeysDisplay.new(nil, self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2, {30,30,0}) self.calendar = Calendar.new("/data/calendar_rivendell.lua", "Today is the %s %s of the %s year of the Fourth Age of Middle-earth.\nThe time is %02d:%02d.", 122) self.tooltip = Tooltip.new(nil, nil, {255,255,255}, {30,30,30}) @@ -169,7 +169,7 @@ function _M:onResolutionChange() self:setupDisplayMode() self.flash:resize(0, 0, self.w, 20) self.logdisplay:resize(0, self.h * 0.8, self.w * 0.5, self.h * 0.2) - self.player_display:resize(0, 20, 200, self.h * 0.8 - 20) + self.player_display:resize(0, 220, 200, self.h * 0.8 - 220) self.hotkeys_display:resize(self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2) end @@ -342,6 +342,7 @@ function _M:changeLevel(lev, zone) for uid, e in pairs(self.level.entities) do self.level.map:addPathString(e:getPathString()) end + self.zone_name_s = nil self.level.map:redisplay() end @@ -413,6 +414,15 @@ function _M:display() self.target:display() end + if not self.zone_name_s then + self.zone_name_s = core.display.drawStringBlendedNewSurface(self.player_display.font, ("%s (%d)"):format(self.zone.name, self.level.level), 0, 255, 255) + end + local znsx, znsy = self.zone_name_s:getSize() + self.zone_name_s:toScreen( + self.level.map.display_x + self.level.map.viewport.width - znsx, + self.level.map.display_y + self.level.map.viewport.height - znsy + ) + -- Display a tooltip if available if self.tooltip_x then self.tooltip:displayAtMap(self.level.map:getMouseTile(self.tooltip_x , self.tooltip_y)) end @@ -422,9 +432,9 @@ function _M:display() end self.old_tmx, self.old_tmy = tmx, tmy - if self.minimap_mode == 2 then - self.level.map:minimapDisplay(self.w - 200, 20, util.bound(self.player.x - 25, 0, self.level.map.w - 50), util.bound(self.player.y - 25, 0, self.level.map.h - 50), 50, 50, 0.6) - elseif self.minimap_mode == 3 then + self.level.map:minimapDisplay(0, 20, util.bound(self.player.x - 25, 0, self.level.map.w - 50), util.bound(self.player.y - 25, 0, self.level.map.h - 50), 50, 50, 1) +--[[ + if self.minimap_mode == 3 then local mx, my = 0, 0 local mw, mh = math.floor((self.w - 200) / 8), math.floor(self.h * .80 / 8) @@ -436,6 +446,7 @@ function _M:display() self.level.map:minimapDisplay(200, 20, mx, my, mw, mh, 0.9) end +]] end engine.GameTurnBased.display(self) diff --git a/game/modules/tome/class/PlayerDisplay.lua b/game/modules/tome/class/PlayerDisplay.lua index efd5614ffd1eea8dcfb50fe1f8d846397deec2d0..d05036b60d8f3601df506605ab83d55a13ec0162 100644 --- a/game/modules/tome/class/PlayerDisplay.lua +++ b/game/modules/tome/class/PlayerDisplay.lua @@ -51,9 +51,6 @@ function _M:display() local cur_exp, max_exp = game.player.exp, game.player:getExpChart(game.player.level+1) local h = 0 - self.surface:drawStringBlended(self.font, game.player.name, 0, h, 0, 200, 255) h = h + self.font_h - self.surface:drawStringBlended(self.font, game.player.descriptor.subrace or "", 0, h, 0, 200, 255) h = h + self.font_h - h = h + self.font_h self.surface:drawColorStringBlended(self.font, "Level: #00ff00#"..game.player.level, 0, h, 255, 255, 255) h = h + self.font_h self.surface:drawColorStringBlended(self.font, ("Exp: #00ff00#%2d%%"):format(100 * cur_exp / max_exp), 0, h, 255, 255, 255) h = h + self.font_h self.surface:drawColorStringBlended(self.font, ("Gold: #00ff00#%0.2f"):format(game.player.money or 0), 0, h, 255, 255, 255) h = h + self.font_h @@ -99,21 +96,5 @@ function _M:display() self.surface:drawColorStringBlended(self.font, ("#7fffd4#Negative:#ffffff#%d/%d"):format(game.player:getNegative(), game.player.max_negative), 0, h, 255, 255, 255) h = h + self.font_h end - h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("STR: #00ff00#%3d"):format(game.player:getStr()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("DEX: #00ff00#%3d"):format(game.player:getDex()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("MAG: #00ff00#%3d"):format(game.player:getMag()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("WIL: #00ff00#%3d"):format(game.player:getWil()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("CUN: #00ff00#%3d"):format(game.player:getCun()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawColorStringBlended(self.font, ("CON: #00ff00#%3d"):format(game.player:getCon()), 0, h, 255, 255, 255) h = h + self.font_h - h = h + self.font_h - self.surface:drawStringBlended(self.font, ("Fatigue %3d%%"):format(game.player.fatigue), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawStringBlended(self.font, ("Armor %3d"):format(game.player:combatArmor()), 0, h, 255, 255, 255) h = h + self.font_h - self.surface:drawStringBlended(self.font, ("Defense %3d"):format(game.player:combatDefense()), 0, h, 255, 255, 255) h = h + self.font_h - - if game.zone and game.level then - self.surface:drawStringBlended(self.font, ("%s (%d)"):format(game.zone.name, game.level.level), 0, self.h - self.font_h, 0, 255, 255) h = h + self.font_h - end - return self.surface end diff --git a/ideas/classes.ods b/ideas/classes.ods index 3328f08e0b8cb690ec91299d7bc1510f9b544ee6..bbbd8ca2bfbb221a0e11c49ce0e2a40e7cee06af 100644 Binary files a/ideas/classes.ods and b/ideas/classes.ods differ diff --git a/ideas/crafting.ods b/ideas/crafting.ods index bf13c5514b7cccc9da3eb43e70fc5bbe8199d5b7..66190c55e06fdac9f94fe7ae4c9e1067bc816ecf 100644 Binary files a/ideas/crafting.ods and b/ideas/crafting.ods differ