diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index fb0fa3722fc532d3af8643033105be767152d1a7..1a64348713645744904b41cd0e9a39e412fb4b4b 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -370,10 +370,15 @@ function _M:magicMap(radius, x, y) y = y or self.y radius = math.floor(radius) + local ox, oy + + self.x, self.y, ox, oy = x, y, self.x, self.y self:computeFOV(radius, "block_sense", function(x, y) game.level.map.remembers(x, y, true) game.level.map.has_seens(x, y, true) end, true, true, true) + + self.x, self.y = ox, oy end function _M:incMoney(v) diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 8b72db0ca780df567ac8345573d1dba97fcf1857..b16e1cc4711734d5b15dcf41b73874e20c5be824 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -358,7 +358,7 @@ function _M:getTextualDesc() end if self.imbue_powers then - desc[#desc+1] = "#YELLOW#When used to imbue an armour:#LAST#" + desc[#desc+1] = "#YELLOW#When used to imbue an object:#LAST#" desc_wielder(self.imbue_powers) end diff --git a/game/modules/tome/data/birth/descriptors.lua b/game/modules/tome/data/birth/descriptors.lua index fb97a2a4fafa7d2332887cead9451447565c76f4..a45cd400ed3bebef24deae0d656e3ceeba7435b3 100644 --- a/game/modules/tome/data/birth/descriptors.lua +++ b/game/modules/tome/data/birth/descriptors.lua @@ -67,7 +67,7 @@ newBirthDescriptor{ } --------------- Difficulties ---[[ +-- [[ newBirthDescriptor{ type = "difficulty", name = "Tutorial", @@ -89,7 +89,7 @@ newBirthDescriptor{ }, copy = { resolvers.generic(function() game.difficulty = game.DIFFICULTY_EASY end) }, } -]] +--]] newBirthDescriptor{ type = "difficulty", name = "Easy", diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index 6093aafd6ccd1916a5bce6f822547dee896218c9..5dd7c74ef786bcab34df08077086ab3ca0ec3249 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -47,7 +47,8 @@ newBirthDescriptor{ {type="potion", subtype="potion", name="potion of cure disease", ego_chance=-1000}, {type="potion", subtype="potion", name="potion of cure disease", ego_chance=-1000}, }, - faction = "undead", + -- Force undead faction to undead + resolvers.genericlast(function(e) e.faction = "undead" end), default_wilderness = {34, 49}, starting_zone = "paths-of-the-dead", starting_level = 8, starting_level_force_down = true, diff --git a/game/modules/tome/data/chats/escort-quest.lua b/game/modules/tome/data/chats/escort-quest.lua index df4173ca9d951eedfb28d377d0e602a658c5fa63..f937aee668c5e68ec2c100fb8838d1af186672e6 100644 --- a/game/modules/tome/data/chats/escort-quest.lua +++ b/game/modules/tome/data/chats/escort-quest.lua @@ -132,6 +132,7 @@ local function generate_rewards() for i = 1, #npc.stats_def do if reward.stats[i] then local doit = function(npc, player) player.inc_stats[i] = (player.inc_stats[i] or 0) + reward.stats[i] + player:onStatChange(i, reward.stats[i]) player.changed = true player:hasQuest(npc.quest_id).reward_message = ("improved %s by +%d"):format(npc.stats_def[i].name, reward.stats[i]) end diff --git a/game/modules/tome/data/chats/mage-apprentice-quest.lua b/game/modules/tome/data/chats/mage-apprentice-quest.lua index 9726cea46bc8ec4e1c4da51ccb2a0e0e8636cd14..44e8d29ffa588780afbe706cabce7d5fb50e3c2a 100644 --- a/game/modules/tome/data/chats/mage-apprentice-quest.lua +++ b/game/modules/tome/data/chats/mage-apprentice-quest.lua @@ -35,12 +35,12 @@ Good day to you, fellow traveler!]], -- Reward for non-mages: access to Angolwen {"So you have enough magical items now?", jump="thanks", - cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and player.faction ~= "angolwen" end, + cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and not player:knowTalent(player.T_TELEPORT_ANGOLWEN) end, }, -- Reward for mages: upgrade a talent mastery {"So you have enough magical items now?", jump="thanks_mage", - cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and player.faction == "angolwen" end, + cond=function(npc, player) return player:hasQuest("mage-apprentice") and player:hasQuest("mage-apprentice"):isCompleted() and player:knowTalent(player.T_TELEPORT_ANGOLWEN) end, }, -- {"Do you have any items to sell?", jump="store"}, {"Sorry I have to go!"}, diff --git a/game/modules/tome/data/general/npcs/jelly.lua b/game/modules/tome/data/general/npcs/jelly.lua index 4c65de975040a278a77c5504ed6fed05a4d16909..56ee7f54570d0b98cca33a92f0d441adfa347376 100644 --- a/game/modules/tome/data/general/npcs/jelly.lua +++ b/game/modules/tome/data/general/npcs/jelly.lua @@ -37,6 +37,7 @@ newEntity{ blind_immune = 1, size_category = 3, infravision = 20, + no_breath = 1, drops = resolvers.drops{chance=60, nb=1, {type="money"} }, diff --git a/game/modules/tome/data/gfx/shaders/main_fbo.frag b/game/modules/tome/data/gfx/shaders/main_fbo.frag index ff4a3e3e6966bf09a07bb8b6013d32166e6ab38c..dd238f54dd304a8772cc764b6c0493cb71d351e0 100644 --- a/game/modules/tome/data/gfx/shaders/main_fbo.frag +++ b/game/modules/tome/data/gfx/shaders/main_fbo.frag @@ -19,9 +19,9 @@ void main(void) float fTime0_X = tick / 40000.0; vec2 coord = gl_TexCoord[0].xy; float noisy = texture3D(noisevol,vec3(coord,fTime0_X)).r; - float noisy2 = texture3D(noisevol,vec3(coord/5.0,fTime0_X)).r; - float noisy3 = texture3D(noisevol,vec3(coord/7.0,fTime0_X)).r; - float noise = (noisy+noisy2+noisy3)/3.0; +// float noisy2 = texture3D(noisevol,vec3(coord/5.0,fTime0_X)).r; +// float noisy3 = texture3D(noisevol,vec3(coord/7.0,fTime0_X)).r; +// float noise = (noisy+noisy2+noisy3)/3.0; // Center Pixel vec4 sample = vec4(0.0,0.0,0.0,0.0); diff --git a/game/modules/tome/data/talents/techniques/weaponshield.lua b/game/modules/tome/data/talents/techniques/weaponshield.lua index 70846259a2802930695357126d53133ad367cf7f..cf167d7d4018dd18f2e6e942af1159e1f2f0a835 100644 --- a/game/modules/tome/data/talents/techniques/weaponshield.lua +++ b/game/modules/tome/data/talents/techniques/weaponshield.lua @@ -191,7 +191,7 @@ newTalent{ return true end, info = function(self, t) - return ([[Let all your foes pile up on your shield then put all your strength in one mighty thrust and repel them all away.]]) + return ([[Let all your foes pile up on your shield, then put all your strength in one mighty thrust and repel them all away %d grids.]]):format(math.floor(1 + self:getTalentLevel(t))) end, } diff --git a/game/modules/tome/data/texts/message-minas-tirith.lua b/game/modules/tome/data/texts/message-minas-tirith.lua index 71e580714a025b7d89b828ebe2f17f16a4786fb9..5460976fd981b5b7d8acd1ff83e9cfdf64140837 100644 --- a/game/modules/tome/data/texts/message-minas-tirith.lua +++ b/game/modules/tome/data/texts/message-minas-tirith.lua @@ -17,7 +17,7 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -local delivered_staff = game.player:resolveSource():setQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") +local delivered_staff = game.player:resolveSource():isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") if delivered_staff then return [[@playername@, this message is of utmost importance. diff --git a/game/modules/tome/data/zones/tol-falas-ambush/npcs.lua b/game/modules/tome/data/zones/tol-falas-ambush/npcs.lua index 872b6bd9ece198abd96197a6d6cc745e070e581a..f9c49165ac676d1447beaa0bdb974524d2461b10 100644 --- a/game/modules/tome/data/zones/tol-falas-ambush/npcs.lua +++ b/game/modules/tome/data/zones/tol-falas-ambush/npcs.lua @@ -26,7 +26,7 @@ newEntity{ base="BASE_NPC_ORC", define_as = "UKRUK", name = "Ukruk the Fierce", faction = "orc-pride", color=colors.VIOLET, - desc = [[This ugly orc looks really nasty and vicious. He is obviously looking for something and bears an unkown symbol on his shield.]], + desc = [[This ugly orc looks really nasty and vicious. He is obviously looking for something and bears an unknown symbol on his shield.]], level_range = {30, 50}, exp_worth = 2, max_life = 1500, life_rating = 15, fixed_rating = true, rank = 4, diff --git a/game/modules/tome/data/zones/tutorial/grids.lua b/game/modules/tome/data/zones/tutorial/grids.lua index 649dff9ed66f0d608b12a4bb999101dcdd42386a..17d13d0604094de870b55cca229193a50d5ac0a8 100644 --- a/game/modules/tome/data/zones/tutorial/grids.lua +++ b/game/modules/tome/data/zones/tutorial/grids.lua @@ -19,3 +19,4 @@ load("/data/general/grids/basic.lua") load("/data/general/grids/forest.lua") +load("/data/general/grids/water.lua") diff --git a/game/modules/tome/data/zones/tutorial/npcs.lua b/game/modules/tome/data/zones/tutorial/npcs.lua index 8dee175f7de756658e604b91ac5eedd1c097293d..7d72a8dd6e48d68f35e78d2555c9bb95b2af32ca 100644 --- a/game/modules/tome/data/zones/tutorial/npcs.lua +++ b/game/modules/tome/data/zones/tutorial/npcs.lua @@ -17,57 +17,4 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -load("/data/general/npcs/bear.lua", rarity(0)) -load("/data/general/npcs/vermin.lua", rarity(0)) -load("/data/general/npcs/canine.lua", rarity(0)) -load("/data/general/npcs/snake.lua", rarity(0)) -load("/data/general/npcs/swarm.lua", rarity(0)) -load("/data/general/npcs/plant.lua", rarity(0)) -load("/data/general/npcs/ant.lua", rarity(0)) - -local Talents = require("engine.interface.ActorTalents") - --- The boss of trollshaws, no "rarity" field means it will not be randomly generated -newEntity{ define_as = "OLD_MAN_WILLOW", - type = "giant", subtype = "huorn", unique = true, - name = "Old Man Willow", - display = "#", color=colors.OLIVE_DRAB, - desc = [[The ancient grey willow tree, ruler of the Old Forest. He despises - trespassers in his territory. "...a huge willow-tree, old and hoary - Enormous it looked, its sprawling branches going up like racing arms - with may long-fingered hands, its knotted and twisted trunk gaping in - wide fissures that creaked faintly as the boughs moved."]], - level_range = {12, 35}, exp_worth = 2, - max_life = 200, life_rating = 17, fixed_rating = true, - max_stamina = 85, - max_mana = 200, - stats = { str=25, dex=10, cun=8, mag=20, wil=20, con=20 }, - rank = 4, - size_category = 5, - infravision = 20, - instakill_immune = 1, - move_others=true, - - resists = { [DamageType.FIRE] = -50 }, - - body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, - equipment = resolvers.equip{ {type="armor", subtype="shield", defined="OLD_MAN_WILLOW_SHIELD", autoreq=true}, }, - drops = resolvers.drops{chance=100, nb=5, {ego_chance=100} }, - - resolvers.talents{ - [Talents.T_STAMINA_POOL]=1, [Talents.T_STUN]=2, - - [Talents.T_MANA_POOL]=1, - [Talents.T_ICE_STORM]=1, - [Talents.T_TIDAL_WAVE]=1, - [Talents.T_FREEZE]=2, - }, - - autolevel = "caster", - ai = "dumb_talented_simple", ai_state = { talent_in=3, ai_move="move_astar", }, - - on_die = function(self, who) - game.player:resolveSource():grantQuest("starter-zones") - game.player:resolveSource():setQuestStatus("starter-zones", engine.Quest.COMPLETED, "old-forest") - end, -} +load("/data/general/npcs/all.lua", rarity(0)) diff --git a/game/modules/tome/data/zones/tutorial/objects.lua b/game/modules/tome/data/zones/tutorial/objects.lua index f429ad36762526f558d007ab1f0ddad69c78e8d4..b5facd63f5b34e95c1aab209db0f312a8aef3e91 100644 --- a/game/modules/tome/data/zones/tutorial/objects.lua +++ b/game/modules/tome/data/zones/tutorial/objects.lua @@ -18,29 +18,3 @@ -- darkgod@te4.org load("/data/general/objects/objects.lua") - --- Artifact, droped (and used!) by Bill the Stone Troll - -newEntity{ base = "BASE_SHIELD", - define_as = "OLD_MAN_WILLOW_SHIELD", - name = "Old Man's Willow Barkwood", unique=true, - desc = [[The barkwood of the Old Man's Willow, made into roughly the shape of a shield.]], - require = { stat = { str=25 }, }, - cost = 20, - - special_combat = { - dam = resolvers.rngavg(20,30), - physcrit = 2, - dammod = {str=1.5}, - }, - wielder = { - combat_armor = 5, - combat_def = 9, - fatigue = 14, - resists = { - [DamageType.FIRE] = -20, - [DamageType.COLD] = 20, - [DamageType.NATURE] = 20, - }, - }, -} diff --git a/game/modules/tome/data/zones/tutorial/zone.lua b/game/modules/tome/data/zones/tutorial/zone.lua index b0e8cbab693bfe55777599270144e143bb75752b..e0753cc62beca1fd1f81187fd98d591008405cb4 100644 --- a/game/modules/tome/data/zones/tutorial/zone.lua +++ b/game/modules/tome/data/zones/tutorial/zone.lua @@ -29,38 +29,29 @@ return { all_lited = true, persistant = "zone", ambiant_music = "Woods of Eremae.ogg", + no_level_connectivity = true, generator = { map = { - class = "engine.generator.map.Roomer", - nb_rooms = 10, - edge_entrances = {6,4}, - rooms = {"forest_clearing"}, - ['.'] = "GRASS", - ['#'] = {"TREE","TREE2","TREE3","TREE4","TREE5","TREE6","TREE7","TREE8","TREE9","TREE10","TREE11","TREE12","TREE13","TREE14","TREE15","TREE16","TREE17","TREE18","TREE19","TREE20",}, - up = "UP", - down = "DOWN", - door = "GRASS1", + class = "engine.generator.map.Static", }, actor = { class = "engine.generator.actor.Random", - nb_npc = {20, 30}, + nb_npc = {0, 0}, guardian = "LONE_WOLF", }, object = { class = "engine.generator.object.Random", - nb_object = {6, 9}, + nb_object = {0, 0}, }, trap = { class = "engine.generator.trap.Random", - nb_trap = {5, 8}, + nb_trap = {0, 0}, }, }, levels = { [1] = { - generator = { map = { - up = "UP_WILDERNESS", - }, }, + generator = { map = { map = "tutorial/tutorial1" }, }, }, }, } diff --git a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua index fe34205f19662fd64188ffb2a52ce719d5a955f6..4f1a10a71e8b972eda4ca1f0d448560754edf516 100644 --- a/game/modules/tome/data/zones/unremarkable-cave/npcs.lua +++ b/game/modules/tome/data/zones/unremarkable-cave/npcs.lua @@ -31,7 +31,7 @@ newEntity{ define_as = "FILLAREL", type = "humanoid", subtype = "elf", unique = true, name = "Fillarel Aldaren", faction = "neutral", display = "@", color=colors.GOLD, - desc = [[An elven women. She wears a tight robe decorated with symbols of the sun and the moon and wields a staff.]], + desc = [[An elven woman. She wears a tight robe decorated with symbols of the sun and the moon and wields a staff.]], level_range = {25, 35}, exp_worth = 2, max_life = 120, life_rating = 15, fixed_rating = true, positive_regen = 10,