From 1fe76d2f7e4b366fb6ca0c36fef0c54b1c009b19 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sun, 26 Sep 2010 20:15:07 +0000 Subject: [PATCH] test git-svn-id: http://svn.net-core.org/repos/t-engine4@1309 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 5 ++ game/modules/tome/class/Object.lua | 2 +- game/modules/tome/data/birth/descriptors.lua | 4 +- game/modules/tome/data/birth/races/undead.lua | 3 +- game/modules/tome/data/chats/escort-quest.lua | 1 + .../tome/data/chats/mage-apprentice-quest.lua | 4 +- game/modules/tome/data/general/npcs/jelly.lua | 1 + .../tome/data/gfx/shaders/main_fbo.frag | 6 +- .../data/talents/techniques/weaponshield.lua | 2 +- .../tome/data/texts/message-minas-tirith.lua | 2 +- .../tome/data/zones/tol-falas-ambush/npcs.lua | 2 +- .../tome/data/zones/tutorial/grids.lua | 1 + .../modules/tome/data/zones/tutorial/npcs.lua | 55 +------------------ .../tome/data/zones/tutorial/objects.lua | 26 --------- .../modules/tome/data/zones/tutorial/zone.lua | 21 ++----- .../data/zones/unremarkable-cave/npcs.lua | 2 +- 16 files changed, 29 insertions(+), 108 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index fb0fa3722f..1a64348713 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 8b72db0ca7..b16e1cc471 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 fb97a2a4fa..a45cd400ed 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 6093aafd6c..5dd7c74ef7 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 df4173ca9d..f937aee668 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 9726cea46b..44e8d29ffa 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 4c65de9750..56ee7f5457 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 ff4a3e3e69..dd238f54dd 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 70846259a2..cf167d7d40 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 71e580714a..5460976fd9 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 872b6bd9ec..f9c49165ac 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 649dff9ed6..17d13d0604 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 8dee175f7d..7d72a8dd6e 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 f429ad3676..b5facd63f5 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 b0e8cbab69..e0753cc62b 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 fe34205f19..4f1a10a71e 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, -- GitLab