From 5df2f840c2a440149c38f519a748dd1ac14691aa Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Fri, 25 Feb 2011 08:30:27 +0000 Subject: [PATCH] fix git-svn-id: http://svn.net-core.org/repos/t-engine4@2833 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/ai/tactical.lua | 2 +- game/modules/tome/class/Actor.lua | 13 +++++++- .../data/general/objects/boss-artifacts.lua | 17 ++++++++++ game/modules/tome/data/lore/zigur.lua | 2 +- .../tome/data/talents/gifts/storm-drake.lua | 4 +-- game/modules/tome/data/talents/misc/npcs.lua | 32 +++++++++++++++++++ .../tome/data/talents/spells/phantasm.lua | 2 +- .../tome/data/zones/deep-bellow/npcs.lua | 17 +++++----- .../tome/data/zones/deep-bellow/zone.lua | 11 +++++++ 9 files changed, 85 insertions(+), 15 deletions(-) diff --git a/game/modules/tome/ai/tactical.lua b/game/modules/tome/ai/tactical.lua index c210dd666e..40f8332ff2 100644 --- a/game/modules/tome/ai/tactical.lua +++ b/game/modules/tome/ai/tactical.lua @@ -150,7 +150,7 @@ newAI("use_tactical", function(self) -- Need to reduce paradox if avail.paradox then want.paradox = 0 - local _, failure_chance = self:paradoxChance() + local _, failure_chance = self:paradoxFailChance() if failure_chance > 10 then want.paradox = want.paradox + 0.5 elseif failure_chance > 20 then want.paradox = want.paradox + 1 elseif failure_chance > 50 then want.paradox = want.paradox + 2 diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index a515462b01..51e1012726 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -422,6 +422,17 @@ function _M:knockback(srcx, srcy, dist, recursive) end end +--- Pull in the actor +-- Overloaded to add move anim +function _M:pull(srcx, srcy, dist, recursive) + local ox, oy = self.x, self.y + engine.Actor.pull(self, srcx, srcy, dist, recursive) + if config.settings.tome.smooth_move > 0 then + self:resetMoveAnim() + self:setMoveAnim(ox, oy, 9, 5) + end +end + --- Get the "path string" for this actor -- See Map:addPathString() for more info function _M:getPathString() @@ -1579,7 +1590,7 @@ function _M:paradoxFailChance(pa) --print("[Paradox] Will modifier: ", modifier, "::", self:getParadox()) local chance = math.pow (((self:getParadox() - modifier)/200), 2)*((100 + self:combatFatigue()) / 100) --print("[Paradox] Fail chance: ", chance, "::", self:getParadox()) - return rng.percent(chance) + return rng.percent(chance), chance end --- Called before a talent is used diff --git a/game/modules/tome/data/general/objects/boss-artifacts.lua b/game/modules/tome/data/general/objects/boss-artifacts.lua index 07b7552ad6..89202fa735 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts.lua @@ -285,6 +285,23 @@ newEntity{ base = "BASE_RING", use_talent = { id = Talents.T_DARK_TENDRILS, level=2, power = 40 }, } +newEntity{ base = "BASE_RING", + power_source = {arcane=true}, + define_as = "RING_OF_HORROR", rarity=false, + name = "Ring of Horrors", unique=true, + desc = [[Fleshy tentacles seem to crawl under yoru skin as you put this ring on.]], + unided_name = "fleshy ring", + level_range = {5, 12}, + rarity = 250, + cost = 50, + material_level = 2, + wielder = { + combat_mentalresist = -20, + combat_spellresist = -20, + inc_damage={ all = 15, }, + }, +} + newEntity{ base = "BASE_HELM", power_source = {nature=true}, define_as = "HELM_OF_GARKUL", diff --git a/game/modules/tome/data/lore/zigur.lua b/game/modules/tome/data/lore/zigur.lua index 7387115a18..d837130037 100644 --- a/game/modules/tome/data/lore/zigur.lua +++ b/game/modules/tome/data/lore/zigur.lua @@ -74,7 +74,7 @@ I still remember how peaceful the evening had seemed when the townsfolk came for They pulled me over grass and stone to the town square, and though half-blinded by the tears and my swollen flesh I could still make out the wooden stake they were erecting. I tried to cry out, I tried to beg for mercy, but their response was to hold me down by my throat and pull out my tongue with the blacksmith's tongs. As I coughed up blood they put me against the wooden pole and used barbed chords to tie my wrists to it above my head. The pain was unbearable and I passed out, and did not wake until I could feel the burning at my feet. The crowd were cheering as the smoke began to wrap around me, and they cheered louder with every pained scream I released from my lungs. -I was choking from the smoke, barely able to breathe, and I could no longer feel my legs. Just when I felt my consciousness slipping away again I heard a commotion and a woman's voice shouted out, "She is no witch!" Then I saw some people coming towards me, and at the front was a halfling woman in dark armour. She rushed towards me, unheeding of the flames, and with a swift flick from her long sword she cut my bounds. She caught me as I fell and pulled me away from the fire, laying me down on the ground. I saw her soft face above mine as she whispered to me, "Tell me child, do you reject magic in all its forms?" I nodded my head \u2013 I could not say no to those bright eyes. She wiped the tears streaming down my face and kissed my forehead. "Then you will be safe - rest now." At once I passed out. +I was choking from the smoke, barely able to breathe, and I could no longer feel my legs. Just when I felt my consciousness slipping away again I heard a commotion and a woman's voice shouted out, "She is no witch!" Then I saw some people coming towards me, and at the front was a halfling woman in dark armour. She rushed towards me, unheeding of the flames, and with a swift flick from her long sword she cut my bounds. She caught me as I fell and pulled me away from the fire, laying me down on the ground. I saw her soft face above mine as she whispered to me, "Tell me child, do you reject magic in all its forms?" I nodded my head - I could not say no to those bright eyes. She wiped the tears streaming down my face and kissed my forehead. "Then you will be safe - rest now." At once I passed out. When I awoke I was in another village in a soft bed. There were wrappings round my legs and bandages covering the cuts and bruises over the rest of my body. Healers tended to me, using natural remedies and herbal balms. The halfling woman would come and see me every day to check up on me. I longed for her every visit. She would speak to me sometimes. She explained how the townsfolk weren't to blame for their actions. It was all the mages' fault. They were corrupting the world, spreading chaos, and turning people against each other. I realised I was wrong for ever brewing potions - they were infested with arcane energies and could only bring harm to the world. diff --git a/game/modules/tome/data/talents/gifts/storm-drake.lua b/game/modules/tome/data/talents/gifts/storm-drake.lua index f2fd75693d..971c6af6a1 100644 --- a/game/modules/tome/data/talents/gifts/storm-drake.lua +++ b/game/modules/tome/data/talents/gifts/storm-drake.lua @@ -189,8 +189,8 @@ newTalent{ local damage = t.getDamage(self, t) return ([[You breathe lightning in a frontal cone. Any target caught in the area will take %0.2f to %0.2f lightning damage and can be dazed for 3 turns. The damage will increase with the Strength stat]]):format( - damDesc(self, DamageType.LIGHTNING, damage / 3, - damDesc(self, DamageType.LIGHTNING, damage)) + damDesc(self, DamageType.LIGHTNING, damage / 3), + damDesc(self, DamageType.LIGHTNING, damage) ) end, } diff --git a/game/modules/tome/data/talents/misc/npcs.lua b/game/modules/tome/data/talents/misc/npcs.lua index c273fd7c56..558b386e7c 100644 --- a/game/modules/tome/data/talents/misc/npcs.lua +++ b/game/modules/tome/data/talents/misc/npcs.lua @@ -1240,3 +1240,35 @@ newTalent{ ]]):format() end, } + +newTalent{ + name = "Call of Amakthel", + type = {"technique/other", 1}, + points = 5, + cooldown = 2, + tactical = { DISABLE = 2 }, + range = 0, + radius = function(self, t) + return 10 + end, + target = function(self, t) + return {type="ball", range=self:getTalentRange(t), friendlyfire=false, radius=self:getTalentRadius(t), talent=t} + end, + action = function(self, t) + local tg = self:getTalentTarget(t) + local tgts = {} + self:project(tg, self.x, self.y, function(px, py) + local target = game.level.map(px, py, Map.ACTOR) + if not target then return end + if self:reactionToward(target) < 0 and not tgts[target] then + tgts[target] = true + target:pull(self.x, self.y, 1) + game.logSeen(target, "%s is pulled in!", target.name:capitalize()) + end + end) + return true + end, + info = function(self, t) + return ([[Pull all foes toward you.]]) + end, +} diff --git a/game/modules/tome/data/talents/spells/phantasm.lua b/game/modules/tome/data/talents/spells/phantasm.lua index 2db3b75b52..bd61204508 100644 --- a/game/modules/tome/data/talents/spells/phantasm.lua +++ b/game/modules/tome/data/talents/spells/phantasm.lua @@ -44,7 +44,7 @@ newTalent{ return true end, info = function(self, t) - local radius = t.getRadius(self, t) + local radius = self:getTalentRadius(t) return ([[Creates a globe of pure light with a radius of %d that illuminates the area. At level 3 it also blinds all who see it (except the caster).]]): format(radius) diff --git a/game/modules/tome/data/zones/deep-bellow/npcs.lua b/game/modules/tome/data/zones/deep-bellow/npcs.lua index f9663f5146..d771f5c416 100644 --- a/game/modules/tome/data/zones/deep-bellow/npcs.lua +++ b/game/modules/tome/data/zones/deep-bellow/npcs.lua @@ -36,26 +36,25 @@ newEntity{ base="BASE_NPC_CORRUPTED_HORROR", define_as = "THE_MOUTH", size_category = 4, infravision = 20, instakill_immune = 1, + never_move = true, + + -- Bad idea to melee it + combat = {dam=100, atk=1000, apr=1000, physcrit=1000}, body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, - resolvers.drops{chance=100, nb=1, {defined="CRYSTAL_FOCUS", random_art_replace={chance=75}} }, + resolvers.drops{chance=100, nb=1, {defined="RING_OF_HORRORS", random_art_replace={chance=75}} }, resolvers.drops{chance=100, nb=3, {ego_chance=100} }, resolvers.talents{ - [Talents.T_FLAME]=1, - [Talents.T_ICE_SHARDS]=1, - [Talents.T_SOUL_ROT]=1, - [Talents.T_ELEMENTAL_BOLT]=1, + [Talents.T_CALL_OF_AMAKTHEL]=1, + [Talents.T_DRAIN]=1, }, - resolvers.inscriptions(1, {"manasurge rune"}), - inc_damage = { all = -35 }, autolevel = "caster", ai = "tactical", ai_state = { talent_in=1, ai_move="move_astar", }, ai_tactic = resolvers.tactic"ranged", on_die = function(self, who) - game.player:resolveSource():grantQuest("start-shaloren") - game.player:resolveSource():setQuestStatus("start-shaloren", engine.Quest.COMPLETED, "spellblaze") + game.player:resolveSource():setQuestStatus("deep-bellow", engine.Quest.COMPLETED) end, } diff --git a/game/modules/tome/data/zones/deep-bellow/zone.lua b/game/modules/tome/data/zones/deep-bellow/zone.lua index 944b35977d..4c9c9d1e38 100644 --- a/game/modules/tome/data/zones/deep-bellow/zone.lua +++ b/game/modules/tome/data/zones/deep-bellow/zone.lua @@ -61,5 +61,16 @@ return { up = "IRON_COUNCIL", }, }, }, + [5] = { + generator = { + map = { + class = "engine.generator.map.Static", + map = "zones/deep-bellow-last", + }, + actor = { + nb_npc = {0, 0}, + }, + }, + }, }, } -- GitLab