From 4a7f16d309c2e44b9d4a9cb3d6772969c8cc5dfa Mon Sep 17 00:00:00 2001 From: HousePet <andre_axem@hotmail.com> Date: Sat, 13 Sep 2014 17:12:00 +0930 Subject: [PATCH] Various small corrections to Mindslayers, including adding in missing math.floors and fitting it around an immovable DarkGod. --- game/modules/tome/class/interface/Combat.lua | 6 ++-- .../data/talents/psionic/charged-mastery.lua | 5 +-- .../psionic/finer-energy-manipulations.lua | 2 +- .../tome/data/talents/psionic/focus.lua | 6 ++-- .../data/talents/psionic/kinetic-mastery.lua | 5 ++- .../tome/data/talents/psionic/other.lua | 6 ++-- .../tome/data/talents/psionic/projection.lua | 36 +++++++++++++++---- .../data/talents/psionic/psi-fighting.lua | 2 +- .../data/talents/psionic/thermal-mastery.lua | 10 +++--- .../tome/data/timed_effects/mental.lua | 31 ++-------------- 10 files changed, 54 insertions(+), 55 deletions(-) diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index a62b7e6026..1c39c34788 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -781,15 +781,15 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam) -- Psi Auras local psiweapon = self:getInven("PSIONIC_FOCUS") and self:getInven("PSIONIC_FOCUS")[1] if psiweapon and psiweapon.combat and psiweapon.subtype ~= "mindstar" then - if hitted and not target.dead and self:knowTalent(self.T_KINETIC_AURA) and self:isTalentActive(self.T_KINETIC_AURA) and (self.use_psi_combat or self:hasEffect(EFF_TRANSCENDENT_TELEKINESIS)) then + if hitted and not target.dead and self:knowTalent(self.T_KINETIC_AURA) and self:isTalentActive(self.T_KINETIC_AURA) and self.use_psi_combat then local t = self:getTalentFromId(self.T_KINETIC_AURA) t.do_combat(self, t, target) end - if hitted and not target.dead and self:knowTalent(self.T_THERMAL_AURA) and self:isTalentActive(self.T_THERMAL_AURA) and (self.use_psi_combat or self:hasEffect(EFF_TRANSCENDENT_TELEKINESIS)) then + if hitted and not target.dead and self:knowTalent(self.T_THERMAL_AURA) and self:isTalentActive(self.T_THERMAL_AURA) and self.use_psi_combat then local t = self:getTalentFromId(self.T_THERMAL_AURA) t.do_combat(self, t, target) end - if hitted and not target.dead and self:knowTalent(self.T_CHARGED_AURA) and self:isTalentActive(self.T_CHARGED_AURA) and (self.use_psi_combat or self:hasEffect(EFF_TRANSCENDENT_TELEKINESIS)) then + if hitted and not target.dead and self:knowTalent(self.T_CHARGED_AURA) and self:isTalentActive(self.T_CHARGED_AURA) and self.use_psi_combat then local t = self:getTalentFromId(self.T_CHARGED_AURA) t.do_combat(self, t, target) end diff --git a/game/modules/tome/data/talents/psionic/charged-mastery.lua b/game/modules/tome/data/talents/psionic/charged-mastery.lua index 7ed2c43b2b..fe1ce5db5a 100644 --- a/game/modules/tome/data/talents/psionic/charged-mastery.lua +++ b/game/modules/tome/data/talents/psionic/charged-mastery.lua @@ -44,7 +44,7 @@ newTalent{ return ([[For %d turns your electrokinesis transcends your normal limits, increasing your Lightning damage by %d%% and your Lightning resistance penetration by %d%%. In addition: The cooldowns of Charged Shield, Charged Leech, Charged Aura and Brainstorm are reset. - Charged Aura will either increase in radius to 2, or apply its damage bonus to all of your weapons, whichever is applicable. + Charged Aura effects will have their radius increased by 1. Your Charged Shield will have 100%% absorption efficiency and will absorb twice the normal amount of damage. Brainstorm will also inflict blindness. Charge Leech will also inflict confusion (%d%% effect). @@ -86,7 +86,7 @@ newTalent{ cooldown = 13, tactical = { ATTACKAREA = { LIGHTNING = 2 } }, range = 8, - radius = function(self,t) return self:combatTalentScale(t, 2, 5) end, + radius = function(self,t) return math.floor(self:combatTalentScale(t, 2, 5)) end, direct_hit = true, requires_target = true, target = function(self, t) @@ -130,6 +130,7 @@ newTalent{ require = psi_cun_high4, points = 5, mode = "sustained", + no_sustain_autoreset = true, sustain_psi = 30, cooldown = 60, tactical = { BUFF = 10}, 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 5fc61dac66..94a7538411 100644 --- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua +++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua @@ -227,7 +227,7 @@ newTalent{ local inc = t.bonus(self,t) return ([[By carefully synchronizing your mind to the resonant frequencies of your psionic focus, you strengthen its effects. For conventional weapons, this increases the percentage of your willpower and cunning that is used in place of strength and dexterity, from 60%% to %d%%. - For mindstars, this increases the amount of Psi you can store by +%d. + For mindstars, this increases the chance to pull enemies to you by +%d%%. For gems, this increases the bonus stats by %d.]]): format(60+inc, inc, math.ceil(inc/5)) end, diff --git a/game/modules/tome/data/talents/psionic/focus.lua b/game/modules/tome/data/talents/psionic/focus.lua index a6c9eb8cbf..7ab7cc1edf 100644 --- a/game/modules/tome/data/talents/psionic/focus.lua +++ b/game/modules/tome/data/talents/psionic/focus.lua @@ -74,7 +74,7 @@ newTalent{ psi = 20, tactical = { ATTACK = { FIRE = 2 } }, range = 0, - radius = function(self,t) return self:combatTalentScale(t, 4, 6) end, + radius = function(self,t) return math.floor(self:combatTalentScale(t, 4, 6)) end, getDamage = function (self, t) return self:combatTalentMindDamage(t, 20, 450) end, @@ -107,8 +107,8 @@ newTalent{ require = psi_wil_req3, psi = 15, cooldown = 10, - range = function(self,t) return self:combatTalentScale(t, 3, 5) end, - radius = function(self,t) return self:combatTalentScale(t, 2, 3) end, + range = function(self,t) return math.floor(self:combatTalentScale(t, 3, 5)) end, + radius = function(self,t) return math.floor(self:combatTalentScale(t, 2, 3)) end, tactical = { DISABLE = 2, ATTACKAREA = { LIGHTNING = 2 } }, getDamage = function(self, t) return self:combatTalentMindDamage(t, 20, 290) end, action = function(self, t) diff --git a/game/modules/tome/data/talents/psionic/kinetic-mastery.lua b/game/modules/tome/data/talents/psionic/kinetic-mastery.lua index d7e35a7aa6..93d8025d61 100644 --- a/game/modules/tome/data/talents/psionic/kinetic-mastery.lua +++ b/game/modules/tome/data/talents/psionic/kinetic-mastery.lua @@ -43,7 +43,7 @@ newTalent{ return ([[For %d turns your telekinesis transcends your normal limits, increasing your Physical damage by %d%% and you Physical resistance penetration by %d%%. In addition: The cooldowns of Kinetic Shield, Kinetic Leech, Kinetic Aura and Mindlash are reset. - Kinetic Aura will either increase in radius to 2, or apply its damage bonus to all of your weapons, whichever is applicable. + Kinetic Aura effects will have their radius increased by 1. Your Kinetic Shield will have 100%% absorption efficiency and will absorb twice the normal amount of damage. Mindlash will also inflict stun. Kinetic Leech will put enemies to sleep. @@ -53,7 +53,6 @@ newTalent{ end, } - newTalent{ name = "Kinetic Surge", image = "talents/telekinetic_throw.png", type = {"psionic/kinetic-mastery", 2}, @@ -63,7 +62,7 @@ newTalent{ cooldown = 15, psi = 20, tactical = { CLOSEIN = 2, ATTACK = { PHYSICAL = 2 }, ESCAPE = 2 }, - range = function(self, t) return self:combatTalentLimit(t, 10, 6, 9) end, + range = function(self, t) return math.floor(self:combatTalentLimit(t, 10, 6, 9)) end, getDamage = function (self, t) return math.floor(self:combatTalentMindDamage(t, 20, 180)) end, diff --git a/game/modules/tome/data/talents/psionic/other.lua b/game/modules/tome/data/talents/psionic/other.lua index aaabbe00f1..925b3ca3fd 100644 --- a/game/modules/tome/data/talents/psionic/other.lua +++ b/game/modules/tome/data/talents/psionic/other.lua @@ -200,8 +200,10 @@ newTalent{ violet = {DamageType.ARCANE, "manathrust"}, white = {DamageType.COLD, "freeze"}, yellow = {DamageType.LIGHT, "light"}, + ["multi-hued"] = {DamageType.MIND, "light"}, } - local bolt = elem[gem.subtype] + local bolt = {DamageType.MIND, "light"} + if gem.subtype and elem[gem.subtype] then bolt = elem[gem.subtype] end table.sort(list, "dist") local a = list[1].a @@ -273,7 +275,7 @@ newTalent{ local base = [[Allows you to wield a physical melee weapon, a mindstar or a gem telekinetically, gaining a special effect for each. A gem will provide +3 bonus to all primary stats per tier of the gem. A mindstar will randomly try to telekinetically grab a far away foe (5% chance and range 2 for a tier 1 mindstar, +1 range and +5% chance for each tier above 1) and pull it into melee range. - A physical melee weapon will act as a semi independant entity, attacking foes nearby each turn while also replacing Strength and Dexterity with Willpower and Cunning for accuracy and damage calculations (for all melee weapons). + A physical melee weapon will act as a semi independant entity, attacking foes nearby each turn while also replacing Strength and Dexterity with Willpower and Cunning for accuracy and damage calculations. This stat usage modification will also apply to conventionally wielded weapons. ]] diff --git a/game/modules/tome/data/talents/psionic/projection.lua b/game/modules/tome/data/talents/psionic/projection.lua index 1c2039f6cb..54229dcfe6 100644 --- a/game/modules/tome/data/talents/psionic/projection.lua +++ b/game/modules/tome/data/talents/psionic/projection.lua @@ -137,7 +137,14 @@ newTalent{ end, do_combat = function(self, t, target) -- called by _M:attackTargetWith in mod.class.interface.Combat.lua local k_dam = t.getAuraStrength(self, t) - DamageType:get(DamageType.PHYSICAL).projector(self, target.x, target.y, DamageType.PHYSICAL, k_dam) + if self:hasEffect(self.EFF_TRANSCENDENT_TELEKINESIS) then + local tg = {type="ball", range=10, radius=1, selffire=false, friendlyfire=false} + self:project(tg, target.x, target.y, function(tx, ty) + DamageType:get(DamageType.PHYSICAL).projector(self, tx, ty, DamageType.PHYSICAL, k_dam) + end) + else + DamageType:get(DamageType.PHYSICAL).projector(self, target.x, target.y, DamageType.PHYSICAL, k_dam) + end end, activate = function(self, t) self.energy.value = self.energy.value + game.energy_to_act * self:combatMindSpeed() @@ -174,7 +181,7 @@ newTalent{ return ([[Fills the air around you with reactive currents of force. If you have a gem or mindstar in your psionically wielded slot, this will do %0.1f Physical damage to all who approach. All damage done by the aura will drain one point of energy per %0.1f points of damage dealt. - If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Physical damage to its hits. + If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Physical damage to all your weapon hits. When deactivated, if you have at least %d energy, a massive spike of kinetic energy is released as a range %d beam, smashing targets for up to %d physical damage and sending them flying. #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself. The damage will improve with your Mindpower.]]): @@ -253,7 +260,14 @@ newTalent{ end, do_combat = function(self, t, target) -- called by _M:attackTargetWith in mod.class.interface.Combat.lua local t_dam = t.getAuraStrength(self, t) - DamageType:get(DamageType.FIRE).projector(self, target.x, target.y, DamageType.FIRE, t_dam) + if self:hasEffect(self.EFF_TRANSCENDENT_PYROKINESIS) then + local tg = {type="ball", range=10, radius=1, selffire=false, friendlyfire=false} + self:project(tg, target.x, target.y, function(tx, ty) + DamageType:get(DamageType.FIRE).projector(self, tx, ty, DamageType.FIRE, t_dam) + end) + else + DamageType:get(DamageType.FIRE).projector(self, target.x, target.y, DamageType.FIRE, t_dam) + end end, activate = function(self, t) self.energy.value = self.energy.value + game.energy_to_act * self:combatMindSpeed() @@ -291,7 +305,7 @@ newTalent{ return ([[Fills the air around you with reactive currents of furnace-like heat. If you have a gem or mindstar in your psionically wielded slot, this will do %0.1f Fire damage to all who approach. All damage done by the aura will drain one point of energy per %0.1f points of damage dealt. - If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Fire damage to its hits. + If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Fire damage to all your weapon hits. When deactivated, if you have at least %d energy, a massive spike of thermal energy is released as a conical blast (radius %d) of superheated air. Anybody caught in it will suffer up to %d fire damage over several turns. #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself. The damage will improve with your Mindpower.]]): @@ -373,7 +387,14 @@ newTalent{ end, do_combat = function(self, t, target) -- called by _M:attackTargetWith in mod.class.interface.Combat.lua local c_dam = t.getAuraStrength(self, t) - DamageType:get(DamageType.LIGHTNING).projector(self, target.x, target.y, DamageType.LIGHTNING, c_dam) + if self:hasEffect(self.EFF_TRANSCENDENT_ELECTROKINESIS) then + local tg = {type="ball", range=10, radius=1, selffire=false, friendlyfire=false} + self:project(tg, target.x, target.y, function(tx, ty) + DamageType:get(DamageType.LIGHTNING).projector(self, tx, ty, DamageType.LIGHTNING, c_dam) + end) + else + DamageType:get(DamageType.LIGHTNING).projector(self, target.x, target.y, DamageType.LIGHTNING, c_dam) + end end, activate = function(self, t) game:playSoundNear(self, "talents/thunderstorm") @@ -451,7 +472,7 @@ newTalent{ return ([[Fills the air around you with crackling energy. If you have a gem or mindstar in your psionically wielded slot, this will do %0.1f Lightning damage to all who approach. All damage done by the aura will drain one point of energy per %0.1f points of damage dealt. - If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Lightning damage to its hits. + If you have a conventional weapon in your psionically wielded slot, this will add %0.1f Lightning damage to all your weapon hits. When deactivated, if you have at least %d energy, a massive spike of electrical energy jumps between up to %d nearby targets, doing up to %0.1f Lightning damage to each with a 50%% chance of dazing them. #{bold}#Activating the aura takes no time but de-activating it does.#{normal}# To turn off an aura without spiking it, deactivate it and target yourself.]]): @@ -483,7 +504,8 @@ newTalent{ local dur = t.duration(self,t) return ([[Overcharge your psionic focus with energy for %d turns, producing a different effect depending on what it is. A telekinetically wielded weapon enters a frenzy, striking up to %d times every turn, also increases the radius by %d. - A mindstar or a gem will fire an energy bolt at a random enemy in range 6, each turn for %0.1f damage. The type is determined by the colour of the gem or mindstar base damage. Damage scales with Mindpower. The mindstar will stop its normal attacks.]]): + A mindstar will attempt to pull in all enemies within its normal range. + A gem will fire an energy bolt at a random enemy in range 6, each turn for %0.1f damage. The type is determined by the colour of the gem. Damage scales with Mindpower.]]): format(dur, targets, targets, t.getDamage(self,t)) end, } diff --git a/game/modules/tome/data/talents/psionic/psi-fighting.lua b/game/modules/tome/data/talents/psionic/psi-fighting.lua index 12e0b4e981..cf098b631d 100644 --- a/game/modules/tome/data/talents/psionic/psi-fighting.lua +++ b/game/modules/tome/data/talents/psionic/psi-fighting.lua @@ -142,7 +142,7 @@ newTalent{ action = function(self, t) local weapon = self:getInven(self.INVEN_PSIONIC_FOCUS) and self:getInven(self.INVEN_PSIONIC_FOCUS)[1] if type(weapon) == "boolean" then weapon = nil end - if not weapon or self:attr("disarmed")then + if not weapon or not weapon.combat or self:attr("disarmed") then game.logPlayer(self, "You cannot do that without a weapon in your telekinetic slot.") return nil end diff --git a/game/modules/tome/data/talents/psionic/thermal-mastery.lua b/game/modules/tome/data/talents/psionic/thermal-mastery.lua index 9a16dd093c..8db94a4945 100644 --- a/game/modules/tome/data/talents/psionic/thermal-mastery.lua +++ b/game/modules/tome/data/talents/psionic/thermal-mastery.lua @@ -44,7 +44,7 @@ newTalent{ return ([[For %d turns your pyrokinesis transcends your normal limits, increasing your Fire and Cold damage by %d%% and your Fire and Cold resistance penetration by %d%%. In addition: The cooldowns of Thermal Shield, Thermal Leech, Thermal Aura and Pyrokinesis are reset. - Thermal Aura will either increase in radius to 2, or apply its damage bonus to all of your weapons, whichever is applicable. + Thermal Aura effects will have their radius increased by 1. Your Thermal Shield will have 100%% absorption efficiency and will absorb twice the normal amount of damage. Pyrokinesis will inflict Flameshock. Thermal Leech will reduce enemy damage by %d%%. @@ -63,7 +63,7 @@ newTalent{ cooldown = 8, psi = 20, tactical = { ATTACK = { COLD = 3} }, - range = function(self,t) return self:combatTalentScale(t, 4, 6) end, + range = function(self,t) return math.floor(self:combatTalentScale(t, 4, 6)) end, getDamage = function (self, t) return self:combatTalentMindDamage(t, 12, 340) end, @@ -101,7 +101,7 @@ newTalent{ psi = 35, tactical = { DISABLE = 4 }, range = 6, - radius = function(self,t) return self:combatTalentScale(t, 2, 4) end, + radius = function(self,t) return math.floor(self:combatTalentScale(t, 2, 4)) end, getDuration = function (self, t) return math.floor(self:combatTalentMindDamage(t, 4, 8)) end, @@ -153,8 +153,8 @@ newTalent{ points = 5, psi = 0, cooldown = 10, - range = function(self,t) return self:combatTalentScale(t, 4, 6) end, - radius = function(self,t) return self:combatTalentScale(t, 2, 4) end, + range = function(self,t) return math.floor(self:combatTalentScale(t, 4, 6)) end, + radius = function(self,t) return math.floor(self:combatTalentScale(t, 2, 4)) end, tactical = { ATTACKAREA = { FIRE = 3, COLD = 2 }, PSI = 2 }, getDamage = function(self, t) return self:combatTalentMindDamage(t, 50, 150) end, action = function(self, t) diff --git a/game/modules/tome/data/timed_effects/mental.lua b/game/modules/tome/data/timed_effects/mental.lua index a5e0d5d902..2bb425f723 100644 --- a/game/modules/tome/data/timed_effects/mental.lua +++ b/game/modules/tome/data/timed_effects/mental.lua @@ -2997,35 +2997,10 @@ newEffect{ parameters = { }, on_gain = function(self, err) return "#Target# glints with a crystaline aura", "+Crystal Resonance" end, on_lose = function(self, err) return "#Target# is no longer glinting.", "-Crystal Resonance" end, - gem_types = { - GEM_DIAMOND = function(self, eff) return {self:effectTemporaryValue(eff, "inc_stats", {[Stats.STAT_STR] = 5, [Stats.STAT_DEX] = 5, [Stats.STAT_MAG] = 5, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 5, [Stats.STAT_CON] = 5 }), } end, - GEM_PEARL = function(self, eff) return {self:effectTemporaryValue(eff,"resists", { all = 5}), self:effectTemporaryValue(eff,"combat_armour", 5) } end, - GEM_MOONSTONE = function(self, eff) return {self:effectTemporaryValue(eff,"combat_def", 10), self:effectTemporaryValue(eff,"combat_mentalresist", 10), self:effectTemporaryValue(eff,"combat_spellresist", 10), self:effectTemporaryValue(eff,"combat_physresist", 10), } end, - GEM_FIRE_OPAL = function(self, eff) return {self:effectTemporaryValue(eff,"inc_damage", { all = 10}), self:effectTemporaryValue(eff,"combat_physcrit", 5), self:effectTemporaryValue(eff,"combat_mindcrit", 5), self:effectTemporaryValue(eff,"combat_spellcrit", 5) } end, - GEM_BLOODSTONE = function(self, eff) return {self:effectTemporaryValue(eff,"stun_immune", 0.6) } end, - GEM_RUBY = function(self, eff) return {self:effectTemporaryValue(eff,"inc_stats", {[Stats.STAT_STR] = 4, [Stats.STAT_DEX] = 4, [Stats.STAT_MAG] = 4, [Stats.STAT_WIL] = 4, [Stats.STAT_CUN] = 4, [Stats.STAT_CON] = 4 }) } end, - GEM_AMBER = function(self, eff) return {self:effectTemporaryValue(eff,"inc_damage", { all = 8}), self:effectTemporaryValue(eff,"combat_physcrit", 4), self:effectTemporaryValue(eff,"combat_mindcrit", 4), self:effectTemporaryValue(eff,"combat_spellcrit", 4) } end, - GEM_TURQUOISE = function(self, eff) return {self:effectTemporaryValue(eff,"see_stealth", 10), self:effectTemporaryValue(eff,"see_invisible", 10) } end, - GEM_JADE = function(self, eff) return {self:effectTemporaryValue(eff,"resists", { all = 4}), self:effectTemporaryValue(eff,"combat_armour", 4) } end, - GEM_SAPPHIRE = function(self, eff) return {self:effectTemporaryValue(eff,"combat_def", 8), self:effectTemporaryValue(eff,"combat_mentalresist", 8), self:effectTemporaryValue(eff,"combat_spellresist", 8), self:effectTemporaryValue(eff,"combat_physresist", 8), } end, - GEM_QUARTZ = function(self, eff) return {self:effectTemporaryValue(eff,"stun_immune", 0.3) } end, - GEM_EMERALD = function(self, eff) return {self:effectTemporaryValue(eff,"resists", { all = 3}), self:effectTemporaryValue(eff,"combat_armour", 3) } end, - GEM_LAPIS_LAZULI = function(self, eff) return {self:effectTemporaryValue(eff,"combat_def", 6), self:effectTemporaryValue(eff,"combat_mentalresist", 6), self:effectTemporaryValue(eff,"combat_spellresist", 6), self:effectTemporaryValue(eff,"combat_physresist", 6), } end, - GEM_GARNET = function(self, eff) return {self:effectTemporaryValue(eff,"inc_damage", { all = 6}), self:effectTemporaryValue(eff,"combat_physcrit", 3), self:effectTemporaryValue(eff,"combat_mindcrit", 3), self:effectTemporaryValue(eff,"combat_spellcrit", 3) } end, - GEM_ONYX = function(self, eff) return {self:effectTemporaryValue(eff,"inc_stats", {[Stats.STAT_STR] = 3, [Stats.STAT_DEX] = 3, [Stats.STAT_MAG] = 3, [Stats.STAT_WIL] = 3, [Stats.STAT_CUN] = 3, [Stats.STAT_CON] = 3 }) } end, - GEM_AMETHYST = function(self, eff) return {self:effectTemporaryValue(eff,"inc_damage", { all = 4}), self:effectTemporaryValue(eff,"combat_physcrit", 2), self:effectTemporaryValue(eff,"combat_mindcrit", 2), self:effectTemporaryValue(eff,"combat_spellcrit", 2) } end, - GEM_OPAL = function(self, eff) return {self:effectTemporaryValue(eff,"inc_stats", {[Stats.STAT_STR] = 2, [Stats.STAT_DEX] = 2, [Stats.STAT_MAG] = 2, [Stats.STAT_WIL] = 2, [Stats.STAT_CUN] = 2, [Stats.STAT_CON] = 2 }) } end, - GEM_TOPAZ = function(self, eff) return {self:effectTemporaryValue(eff,"combat_def", 4), self:effectTemporaryValue(eff,"combat_mentalresist", 4), self:effectTemporaryValue(eff,"combat_spellresist", 4), self:effectTemporaryValue(eff,"combat_physresist", 4), } end, - GEM_AQUAMARINE = function(self, eff) return {self:effectTemporaryValue(eff,"resists", { all = 2}), self:effectTemporaryValue(eff,"combat_armour", 2) } end, - GEM_AMETRINE = function(self, eff) return {self:effectTemporaryValue(eff,"inc_damage", { all = 2}), self:effectTemporaryValue(eff,"combat_physcrit", 1), self:effectTemporaryValue(eff,"combat_mindcrit", 1), self:effectTemporaryValue(eff,"combat_spellcrit", 1) } end, - GEM_ZIRCON = function(self, eff) return {self:effectTemporaryValue(eff,"resists", { all = 1}), self:effectTemporaryValue(eff,"combat_armour", 1) } end, - GEM_SPINEL = function(self, eff) return {self:effectTemporaryValue(eff,"combat_def", 2), self:effectTemporaryValue(eff,"combat_mentalresist", 2), self:effectTemporaryValue(eff,"combat_spellresist", 2), self:effectTemporaryValue(eff,"combat_physresist", 2), } end, - GEM_CITRINE = function(self, eff) return {self:effectTemporaryValue(eff,"lite", 1), self:effectTemporaryValue(eff,"infravision", 2) } end, - GEM_AGATE = function(self, eff) return {self:effectTemporaryValue(eff,"inc_stats", {[Stats.STAT_STR] = 1, [Stats.STAT_DEX] = 1, [Stats.STAT_MAG] = 1, [Stats.STAT_WIL] = 1, [Stats.STAT_CUN] = 1, [Stats.STAT_CON] = 1 }) } end, - }, activate = function(self, eff) - local buff = self.tempeffect_def.EFF_CRYSTAL_BUFF.gem_types[eff.gem] - eff.id1 = buff(self, eff) + for a, b in pairs(eff.effects) do + self:effectTemporaryValue(eff, a, b) + end end, deactivate = function(self, eff) -- GitLab