diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 3388d952cbd87c66f46b47dedbe56ede5828b2de..2f7c2efc205c6fd1c6e8a6222fc533d731af048e 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -111,7 +111,7 @@ function _M:init(t, no_default) t.vim_rating = t.vim_rating or 4 t.stamina_rating = t.stamina_rating or 3 t.positive_negative_rating = t.positive_negative_rating or 3 - t.psi_rating = t.psi_rating or 1 + t.psi_rating = t.psi_rating or 0 t.esp = t.esp or {} diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 09fa5b32730c5accfce176fdc3bbb9b9093eb98a..f9a8e10391b53244cb147da6f4e614c15f6d9b74 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -790,26 +790,48 @@ end function _M:quickSwitchWeapons() local mh1, mh2 = self.inven[self.INVEN_MAINHAND], self.inven[self.INVEN_QS_MAINHAND] local oh1, oh2 = self.inven[self.INVEN_OFFHAND], self.inven[self.INVEN_QS_OFFHAND] + local pf1, pf2 = self.inven[self.INVEN_PSIONIC_FOCUS], self.inven[self.INVEN_QS_PSIONIC_FOCUS] local mhset1, mhset2 = {}, {} local ohset1, ohset2 = {}, {} + local pfset1, pfset2 = {}, {} -- Remove them all for i = #mh1, 1, -1 do mhset1[#mhset1+1] = self:removeObject(mh1, i, true) end for i = #mh2, 1, -1 do mhset2[#mhset2+1] = self:removeObject(mh2, i, true) end for i = #oh1, 1, -1 do ohset1[#ohset1+1] = self:removeObject(oh1, i, true) end for i = #oh2, 1, -1 do ohset2[#ohset2+1] = self:removeObject(oh2, i, true) end - + if pf1 and pf2 then + for i = #pf1, 1, -1 do pfset1[#pfset1+1] = self:removeObject(pf1, i, true) end + for i = #pf2, 1, -1 do pfset2[#pfset2+1] = self:removeObject(pf2, i, true) end + end -- Put them all back for i = 1, #mhset1 do self:addObject(mh2, mhset1[i]) end for i = 1, #mhset2 do self:addObject(mh1, mhset2[i]) end for i = 1, #ohset1 do self:addObject(oh2, ohset1[i]) end for i = 1, #ohset2 do self:addObject(oh1, ohset2[i]) end - + if pf1 and pf2 then + for i = 1, #pfset1 do self:addObject(pf2, pfset1[i]) end + for i = 1, #pfset2 do self:addObject(pf1, pfset2[i]) end + end if not self:isTalentActive(T_CELERITY) then self:useEnergy() end local names = "" - if mh1[1] and oh1[1] then names = mh1[1]:getName{do_color=true}.." and "..oh1[1]:getName{do_color=true} - elseif mh1[1] and not oh1[1] then names = mh1[1]:getName{do_color=true} - elseif not mh1[1] and oh1[1] then names = oh1[1]:getName{do_color=true} + if pf1 and pf2 then + if not pf1[1] then + if mh1[1] and oh1[1] then names = mh1[1]:getName{do_color=true}.." and "..oh1[1]:getName{do_color=true} + elseif mh1[1] and not oh1[1] then names = mh1[1]:getName{do_color=true} + elseif not mh1[1] and oh1[1] then names = oh1[1]:getName{do_color=true} + end + else + if mh1[1] and oh1[1] then names = mh1[1]:getName{do_color=true}.." and "..oh1[1]:getName{do_color=true}.." and "..pf1[1]:getName{do_color=true} + elseif mh1[1] and not oh1[1] then names = mh1[1]:getName{do_color=true}.." and "..pf1[1]:getName{do_color=true} + elseif not mh1[1] and oh1[1] then names = oh1[1]:getName{do_color=true}.." and "..pf1[1]:getName{do_color=true} + end + end + else + if mh1[1] and oh1[1] then names = mh1[1]:getName{do_color=true}.." and "..oh1[1]:getName{do_color=true} + elseif mh1[1] and not oh1[1] then names = mh1[1]:getName{do_color=true} + elseif not mh1[1] and oh1[1] then names = oh1[1]:getName{do_color=true} + end end game.logPlayer(self, "You switch your weapons to: %s.", names) self.changed = true diff --git a/game/modules/tome/data/birth/classes/psionic.lua b/game/modules/tome/data/birth/classes/psionic.lua index 93c3d153ce28367877a0ab3bac89b8c4bfdf4416..95fb52018281974d910884056f16b1ddcdcc7007 100644 --- a/game/modules/tome/data/birth/classes/psionic.lua +++ b/game/modules/tome/data/birth/classes/psionic.lua @@ -34,7 +34,7 @@ newBirthDescriptor{ copy = { }, - body = { PSIONIC_FOCUS = 1, }, + body = { PSIONIC_FOCUS = 1, QS_PSIONIC_FOCUS = 1,}, } newBirthDescriptor{ diff --git a/game/modules/tome/data/talents/divine/eclipse.lua b/game/modules/tome/data/talents/divine/eclipse.lua index 25e561221696ee811200a7c4eb5332c9d42aec00..472f19ab1aeace1d44b830bdfeb01e5607f11723 100644 --- a/game/modules/tome/data/talents/divine/eclipse.lua +++ b/game/modules/tome/data/talents/divine/eclipse.lua @@ -58,8 +58,8 @@ newTalent{ return true end, info = function(self, t) - local penetration = t.getDuration(self, t) - local duration = t.getResistancePenetration(self, t) + local duration = t.getDuration(self, t) + local penetration = t.getResistancePenetration(self, t) local cooldownreduction = t.getCooldownReduction(self, t) return ([[Increases your light and darkness resistance penetration by %d%% for %d turns and brings all your divine talents on cooldown, %d turns closer to being off cooldown. The resistance penetration will increase with your Cunning stat.]]): diff --git a/game/modules/tome/data/talents/psionic/augmented-mobility.lua b/game/modules/tome/data/talents/psionic/augmented-mobility.lua index 3df2ce01a5c6da18730e864f0565f91ae8315c92..14dd344c538740858e4512e4a98fcd1b7d67c7cb 100644 --- a/game/modules/tome/data/talents/psionic/augmented-mobility.lua +++ b/game/modules/tome/data/talents/psionic/augmented-mobility.lua @@ -81,7 +81,8 @@ newTalent{ newTalent{ - name = "Superhuman Leap", + --name = "Super"..self.race.." Leap", + name = "Telekinetic Leap", type = {"psionic/augmented-mobility", 3}, require = psi_wil_high3, cooldown = 15, @@ -99,8 +100,14 @@ newTalent{ local tg = {default_target=self, type="ball", nolock=true, pass_terrain=false, nowarning=true, range=self:getTalentRange(t), radius=0, requires_knowledge=false} local x, y = self:getTarget(tg) if not x or not y then return nil end - local _ _, _, _, x, y = self:canProject(tg, x, y) - self:move(x, y, true) + --local _ _, _, _, x, y = self:canProject(tg, x, y) + --self:move(x, y, true) + local fx, fy = util.findFreeGrid(x, y, 5, true, {[Map.ACTOR]=true}) + if not fx then + return + end + self:move(fx, fy, true) + return true end, info = function(self, t) diff --git a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua index ff9919d12732787249734a6f847f346ca6113ac1..c590ce161219e40bdccc5a2aad5804e76ef37548 100644 --- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua +++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua @@ -106,7 +106,11 @@ newTalent{ o.wielder.fatigue = o.orig_fat o.wielder.combat_armor = (o.wielder.combat_armor or 0) + t.arm_boost(self, t) o.wielder.fatigue = (o.wielder.fatigue or 0) - t.fat_red(self, t) - if o.wielder.fatigue < 0 then o.wielder.fatigue = 0 end + if o.wielder.fatigue < 0 and not (o.orig_fat < 0) then + o.wielder.fatigue = 0 + elseif o.wielder.fatigue < 0 and o.orig_fat < 0 then + o.wielder.fatigue = o.orig_fat + end o.old_fat = t.fat_red(self, t) game.logPlayer(self, "You reshape your %s.", o:getName{do_colour=true, no_count=true}) if not o.been_reshaped then diff --git a/game/modules/tome/data/talents/psionic/other.lua b/game/modules/tome/data/talents/psionic/other.lua index 2750043c6e50606d0473e05ab7a589c9dce1459e..8bed044519292a8882a325ad29df2d0dd116bb4c 100644 --- a/game/modules/tome/data/talents/psionic/other.lua +++ b/game/modules/tome/data/talents/psionic/other.lua @@ -122,6 +122,7 @@ newTalent{ if hit and not sound then sound = o.combat.sound elseif not hit and not sound_miss then sound_miss = o.combat.sound_miss end if not o.combat.no_stealth_break then break_stealth = true end + self:breakStepUp() end end else diff --git a/game/modules/tome/data/talents/psionic/projection.lua b/game/modules/tome/data/talents/psionic/projection.lua index 415001f6e5f4f30b4bf0cc581d4175b3b052e3f1..3daba351e15a7fa3aa3af098464b4e3a190a14c5 100644 --- a/game/modules/tome/data/talents/psionic/projection.lua +++ b/game/modules/tome/data/talents/psionic/projection.lua @@ -25,6 +25,10 @@ local function aura_strength(self, t) return self:combatTalentIntervalDamage(t, "wil", 10, 50) + add end +local function aura_spike_strength(self, t) + return (40 + 10*self:getTalentLevel(t))*math.sqrt(aura_strength(self, t)) +end + local function aura_mastery(self, t) return 10 + (self:getTalentLevel(self.T_AURA_DISCIPLINE) or 0) + getGemLevel(self) end @@ -124,6 +128,9 @@ newTalent{ getAuraStrength = function(self, t) return aura_strength(self, t) end, + getAuraSpikeStrength = function(self, t) + return aura_spike_strength(self, t) + end, getKnockback = function(self, t) return 3 + math.floor(self:getTalentLevel(t)) end, @@ -135,6 +142,7 @@ newTalent{ local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(-dam/mast) + self:breakStepUp() end DamageType:get(DamageType.PHYSICAL).projector(self, tx, ty, DamageType.PHYSICAL, dam) end) @@ -147,7 +155,7 @@ newTalent{ return true end, deactivate = function(self, t, p) - local dam = 50 + 0.4 * t.getAuraStrength(self, t)*t.getAuraStrength(self, t) + local dam = t.getAuraSpikeStrength(self, t) local cost = t.getSpikeCost(self, t) if self:getPsi() <= cost then game.logPlayer(self, "The aura dissipates without producing a spike.") @@ -170,7 +178,7 @@ newTalent{ info = function(self, t) local dam = t.getAuraStrength(self, t) - local spikedam = 50 + 0.4 * dam * dam + local spikedam = t.getAuraSpikeStrength(self, t) local mast = aura_mastery(self, t) local spikecost = t.getSpikeCost(self, t) return ([[Fills the air around you with reactive currents of force that do %d physical damage to all who approach. All damage done by the aura will drain one point of energy per %0.2f points of damage dealt. @@ -236,6 +244,9 @@ newTalent{ getAuraStrength = function(self, t) return aura_strength(self, t) end, + getAuraSpikeStrength = function(self, t) + return 0.8*aura_spike_strength(self, t) + end, getSpikeCost = function(self, t) return t.sustain_psi - 2*getGemLevel(self) end, @@ -247,6 +258,7 @@ newTalent{ local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(-dam/mast) + self:breakStepUp() end DamageType:get(DamageType.FIRE).projector(self, tx, ty, DamageType.FIRE, dam) end) @@ -259,7 +271,7 @@ newTalent{ return true end, deactivate = function(self, t, p) - local dam = 50 + 0.4 * t.getAuraStrength(self, t)*t.getAuraStrength(self, t) + local dam = t.getAuraSpikeStrength(self, t) local cost = t.getSpikeCost(self, t) --if self:isTalentActive(self.T_CONDUIT) then return true end if self:getPsi() <= cost then @@ -283,7 +295,7 @@ newTalent{ info = function(self, t) local dam = t.getAuraStrength(self, t) local rad = self:getTalentRadius(t) - local spikedam = 50 + 0.4 * dam * dam + local spikedam = t.getAuraSpikeStrength(self, t) local mast = aura_mastery(self, t) local spikecost = t.getSpikeCost(self, t) return ([[Fills the air around you with reactive currents of furnace-like heat that do %d fire damage to all who approach. All damage done by the aura will drain one point of energy per %0.2f points of damage dealt. @@ -353,6 +365,9 @@ newTalent{ getAuraStrength = function(self, t) return aura_strength(self, t) end, + getAuraSpikeStrength = function(self, t) + return aura_spike_strength(self, t) + end, getNumSpikeTargets = function(self, t) return 1 + math.floor(0.5*self:getTalentLevel(t)) + getGemLevel(self) end, @@ -364,6 +379,7 @@ newTalent{ local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(-dam/mast) + self:breakStepUp() end DamageType:get(DamageType.LIGHTNING).projector(self, tx, ty, DamageType.LIGHTNING, dam) end) @@ -377,7 +393,7 @@ newTalent{ return true end, deactivate = function(self, t, p) - local dam = 50 + 0.4 * t.getAuraStrength(self, t)*t.getAuraStrength(self, t) + local dam = t.getAuraSpikeStrength(self, t) local cost = t.getSpikeCost(self, t) --if self:isTalentActive(self.T_CONDUIT) then return true end if self:getPsi() <= cost then @@ -440,7 +456,7 @@ newTalent{ info = function(self, t) local dam = t.getAuraStrength(self, t) - local spikedam = 50 + 0.4 * dam * dam + local spikedam = t.getAuraSpikeStrength(self, t) local mast = aura_mastery(self, t) local spikecost = t.getSpikeCost(self, t) local nb = t.getNumSpikeTargets(self, t) diff --git a/game/modules/tome/data/talents/psionic/voracity.lua b/game/modules/tome/data/talents/psionic/voracity.lua index 005feb36edb260e608001d04033bcb25efe54d40..6b64537e7d37bde3be9411ea5e1e8213c43a59b6 100644 --- a/game/modules/tome/data/talents/psionic/voracity.lua +++ b/game/modules/tome/data/talents/psionic/voracity.lua @@ -24,7 +24,7 @@ newTalent{ points = 5, psi = 0, cooldown = function(self, t) - return math.ceil(40 - self:getTalentLevel(t)*4) + return math.ceil(25 - self:getTalentLevelRaw(t)*3) end, tactical = { DEFEND = 1, DISABLE = 2 }, direct_hit = true, @@ -43,11 +43,11 @@ newTalent{ local dam = .1 + 0.03*self:getTalentLevel(t) local tg = self:getTalentTarget(t) self:project(tg, self.x, self.y, function(tx, ty) - DamageType:get(DamageType.MINDSLOW).projector(self, tx, ty, DamageType.MINDSLOW, dam) local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(en) end + DamageType:get(DamageType.MINDSLOW).projector(self, tx, ty, DamageType.MINDSLOW, dam) end) return true end, @@ -67,7 +67,7 @@ newTalent{ require = psi_wil_req2, points = 5, cooldown = function(self, t) - return math.ceil(50 - self:getTalentLevel(t)*4) + return math.ceil(25 - self:getTalentLevelRaw(t)*3) end, psi = 0, tactical = { DEFEND = 2, DISABLE = 2 }, @@ -86,11 +86,11 @@ newTalent{ local dam = math.ceil(1 + 0.5*self:getTalentLevel(t)) local tg = self:getTalentTarget(t) self:project(tg, self.x, self.y, function(tx, ty) - DamageType:get(DamageType.MINDFREEZE).projector(self, tx, ty, DamageType.MINDFREEZE, dam) local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(en) end + DamageType:get(DamageType.MINDFREEZE).projector(self, tx, ty, DamageType.MINDFREEZE, dam) end) return true end, @@ -112,7 +112,7 @@ newTalent{ points = 5, psi = 0, cooldown = function(self, t) - return math.ceil(50 - self:getTalentLevel(t)*5) + return math.ceil(25 - self:getTalentLevelRaw(t)*3) end, tactical = { DEFEND = 2, ATTACKAREA = 2, DISABLE = 1 }, direct_hit = true, @@ -131,11 +131,11 @@ newTalent{ local dam = self:spellCrit(self:combatTalentMindDamage(t, 28, 270)) local tg = self:getTalentTarget(t) self:project(tg, self.x, self.y, function(tx, ty) - DamageType:get(DamageType.LIGHTNING_DAZE).projector(self, tx, ty, DamageType.LIGHTNING_DAZE, dam) local act = game.level.map(tx, ty, engine.Map.ACTOR) if act then self:incPsi(en) end + DamageType:get(DamageType.LIGHTNING_DAZE).projector(self, tx, ty, DamageType.LIGHTNING_DAZE, dam) end) -- Lightning ball gets a special treatment to make it look neat local sradius = (tg.radius + 0.5) * (engine.Map.tile_w + engine.Map.tile_h) / 2 diff --git a/game/modules/tome/load.lua b/game/modules/tome/load.lua index 8d6e71c3e9d41429b281b06a0e15e3f4c775e0e3..5ee4a6c3be410dcf4795db551e7451b77afd388b 100644 --- a/game/modules/tome/load.lua +++ b/game/modules/tome/load.lua @@ -106,7 +106,7 @@ dofile("/mod/resolvers.lua") -- Body parts ActorInventory:defineInventory("MAINHAND", "In main hand", true, "Most weapons are wielded in the main hand.") ActorInventory:defineInventory("OFFHAND", "In off hand", true, "You can use shields or a second weapon in your off-hand, if you have the talents for it.") -ActorInventory:defineInventory("PSIONIC_FOCUS", "Psionic Focus", true, "Object help in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers.") +ActorInventory:defineInventory("PSIONIC_FOCUS", "Psionic focus", true, "Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers.") ActorInventory:defineInventory("FINGER", "On fingers", true, "Rings are worn on fingers.") ActorInventory:defineInventory("NECK", "Around neck", true, "Amulets are worn around the neck.") ActorInventory:defineInventory("LITE", "Light source", true, "A light source allows you to see in the dark places of the world.") @@ -123,6 +123,7 @@ ActorInventory:defineInventory("GEM", "Socketed Gems", true, "Socketed gems.") ActorInventory:defineInventory("MOUNT", "Mount", false, "Your mount.") ActorInventory:defineInventory("QS_MAINHAND", "Second weapon set: In main hand", false, "Weapon Set 2: Most weapons are wielded in the main hand. Press 'x' to switch weapon sets.", true) ActorInventory:defineInventory("QS_OFFHAND", "Second weapon set: In off hand", false, "Weapon Set 2: You can use shields or a second weapon in your off-hand, if you have the talents for it. Press 'x' to switch weapon sets.", true) +ActorInventory:defineInventory("QS_PSIONIC_FOCUS", "Second weapon set: psionic focus", false, "Weapon Set 2: Object held in your telekinetic grasp. It can be a weapon or some other item to provide a benefit to your psionic powers. Press 'x' to switch weapon sets.", true) -- Damage types DamageType:loadDefinition("/data/damage_types.lua")