From 30a57269e46d83f8707cbf0e61f22a83fc723869 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Mon, 27 Sep 2010 13:10:12 +0000 Subject: [PATCH] Unided items can not stack git-svn-id: http://svn.net-core.org/repos/t-engine4@1314 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/engines/default/engine/Birther.lua | 4 ++-- game/modules/tome/class/Game.lua | 2 +- game/modules/tome/class/Object.lua | 7 +++++++ game/modules/tome/data/birth/races/dwarf.lua | 4 +++- game/modules/tome/data/birth/races/elf.lua | 8 ++++++-- game/modules/tome/data/birth/races/hobbit.lua | 5 ++++- game/modules/tome/data/birth/races/human.lua | 8 ++++++-- game/modules/tome/data/birth/races/undead.lua | 8 ++++++-- 8 files changed, 35 insertions(+), 11 deletions(-) diff --git a/game/engines/default/engine/Birther.lua b/game/engines/default/engine/Birther.lua index 5d40f06b6f..8c1cd276e0 100644 --- a/game/engines/default/engine/Birther.lua +++ b/game/engines/default/engine/Birther.lua @@ -60,13 +60,13 @@ end --- Instanciates a birther for the given actor -function _M:init(actor, order, at_end, quickbirth) +function _M:init(actor, order, at_end, quickbirth, w, h) self.quickbirth = quickbirth self.actor = actor self.order = order self.at_end = at_end - engine.Dialog.init(self, "Character Creation: "..actor.name, 600, 400) + engine.Dialog.init(self, "Character Creation: "..actor.name, w or 600, h or 400) self.descriptors = {} diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index f57d2c2eab..381ad4cfa0 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -156,7 +156,7 @@ function _M:newGame() self.player:onBirth(birth) end)) end) - end, quickbirth) + end, quickbirth, 720, 500) self:registerDialog(birth) end diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index b16e1cc471..4bd21a8ac4 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -441,3 +441,10 @@ function _M:on_prepickup(who, idx) return true end end + +--- Can it stacks with others of its kind ? +function _M:canStack(o) + -- Can only stack known things + if not self:isIdentified() or not o:isIdentified() then return false end + return engine.Object.canStack(self, o) +end diff --git a/game/modules/tome/data/birth/races/dwarf.lua b/game/modules/tome/data/birth/races/dwarf.lua index 0d3d06f976..e02111b601 100644 --- a/game/modules/tome/data/birth/races/dwarf.lua +++ b/game/modules/tome/data/birth/races/dwarf.lua @@ -63,7 +63,9 @@ newBirthDescriptor "The children of Aule, a strong but small race.", "Miners and fighters of legend.", "They possess the #GOLD#Resilience of the Dwarves#WHITE# which allows them to increase their armour, physical and spell saves for a few turns.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +4 Strength, +3 Constitution, +3 Willpower, -2 Magic, -2 Dexterity", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +4 Strength, -2 Dexterity, +3 Constitution", + "#LIGHT_BLUE# * -2 Magic, +3 Willpower, +0 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 12", "#GOLD#Experience penality:#LIGHT_BLUE# 25%", }, diff --git a/game/modules/tome/data/birth/races/elf.lua b/game/modules/tome/data/birth/races/elf.lua index 8f5bba20b8..c8c0766062 100644 --- a/game/modules/tome/data/birth/races/elf.lua +++ b/game/modules/tome/data/birth/races/elf.lua @@ -66,7 +66,9 @@ newBirthDescriptor "Elves who turned aside from the Great Journey in the early days and settled in th east of the Misty Mountains.", "Both the Wood-Elves of Mirkwood and the Elves of Lórien are Nandor.", "They posses the #GOLD#Grace of the Eldar#WHITE# talent which allows them a boost of speed every once in a while.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +2 Magic, +3 Willpower, +1 Cunning, +1 Dexterity, -2 Strength", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * -2 Strength, +1 Dexterity, +0 Constitution", + "#LIGHT_BLUE# * +2 Magic, +3 Willpower, +1 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 9", "#GOLD#Experience penality:#LIGHT_BLUE# 35%", }, @@ -87,7 +89,9 @@ newBirthDescriptor "The Noldor were the High Elves most enamoured of knowledge and the making of things. After the theft of the Silmarils, many Noldor forsook the blessed land and returned to Middle Earth, but for their sins en-route they were placed under the Doom of the Valar. After the Doom was lifted, most of the Noldor sailed west, but a few still remain in Middle Earth.", "They are implacable foes of the servants of Morgoth, wherever they may be found.", "They possess the #GOLD#Wrath of the Eldar#WHITE# talent, which allows them a boost to the damage both inflicted and resisted once in a while.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +2 Strength, +3 Dexterity, +1 Willpower, +1 Constitution, -2 Magic", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +2 Strength, +3 Dexterity, +1 Constitution", + "#LIGHT_BLUE# * -2 Magic, +1 Willpower, +0 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 11", "#GOLD#Experience penality:#LIGHT_BLUE# 35%", }, diff --git a/game/modules/tome/data/birth/races/hobbit.lua b/game/modules/tome/data/birth/races/hobbit.lua index 0f5a384975..48c84767dd 100644 --- a/game/modules/tome/data/birth/races/hobbit.lua +++ b/game/modules/tome/data/birth/races/hobbit.lua @@ -63,7 +63,10 @@ newBirthDescriptor "Most of them are happy to live a quiet life of farming and gardening, but a few have an adventurous heart.", "Hobbits are agile, lucky, and resilient but lacking in strength.", "They possess the #GOLD#Luck of the Little Folk#WHITE# which allows them to increase their critical strike chance for a few turns.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# -3 Strength, +3 Dexterity, +3 Cunning, +1 Constitution, +5 Luck", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * -3 Strength, +3 Dexterity, +10 Constitution", + "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +3 Cunning", + "#LIGHT_BLUE# * +5 Luck", "#GOLD#Life per levels:#LIGHT_BLUE# 12", "#GOLD#Experience penality:#LIGHT_BLUE# 15%", }, diff --git a/game/modules/tome/data/birth/races/human.lua b/game/modules/tome/data/birth/races/human.lua index 755f9a90a3..feedf47673 100644 --- a/game/modules/tome/data/birth/races/human.lua +++ b/game/modules/tome/data/birth/races/human.lua @@ -59,7 +59,9 @@ newBirthDescriptor desc = { "The greatest of the Edain, humans in all respects but stronger, smarter, and wiser.", "They possess the #GOLD#Gift of Kings#WHITE# which allows them to regenerate their wounds once in a while.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +1 Strength, +1 Cunning, +1 Dexterity, +1 Willpower", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +1 Strength, +1 Dexterity, +0 Constitution", + "#LIGHT_BLUE# * +0 Magic, +1 Willpower, +1 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 11", "#GOLD#Experience penality:#LIGHT_BLUE# 15%", }, @@ -84,7 +86,9 @@ newBirthDescriptor desc = { "Humans hailing from the northen town of Bree. A common kind of man, unremarkable in all respects.", "Humans are an inherently very adaptable race and as such they gain a #GOLD#talent category point#WHITE# at birth(others only gain one at level 10, 20 and 30).", - "#GOLD#Stats modifiers:#LIGHT_BLUE# none", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution", + "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 10", "#GOLD#Experience penality:#LIGHT_BLUE# 0%", }, diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index 5dd7c74ef7..14298e021e 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -71,7 +71,9 @@ newBirthDescriptor "- fear immunity", "- special ghoul talents: ghoulish leap, gnaw and retch", "The rotting body of ghouls also forces them to act a bit slower than most creatures.", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +3 Strength, +5 Constitution, +1 Dexterity, -2 Cunning, -2 Willpower", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +3 Strength, +1 Dexterity, +5 Constitution", + "#LIGHT_BLUE# * +0 Magic, -2 Willpower, -2 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 14", "#GOLD#Experience penality:#LIGHT_BLUE# 100%", "#GOLD#Speed penality:#LIGHT_BLUE# -20%", @@ -116,7 +118,9 @@ newBirthDescriptor "- fear immunity", "- no need to breathe", "- special skeleton talents: sharp bones, bone amour, re-assemble", - "#GOLD#Stats modifiers:#LIGHT_BLUE# +3 Strength, +4 Dexterity", + "#GOLD#Stats modifiers:", + "#LIGHT_BLUE# * +3 Strength, +4 Dexterity, +0 Constitution", + "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +0 Cunning", "#GOLD#Life per levels:#LIGHT_BLUE# 12", "#GOLD#Experience penality:#LIGHT_BLUE# 100%", }, -- GitLab