Commit 17dcdf800f17c18d76a1c15f330534fcc5c2f2b1

Authored by DarkGod
1 parent e5d2e824

New artifact infusion

... ... @@ -296,7 +296,7 @@ newEntity{ base = "BASE_INFUSION",
296 296 inscription_kind = "utility",
297 297 inscription_data = {
298 298 cooldown = 15,
299   - dur = 5,
  299 + dur = 10, -- to 10 from 5, because this should be really good
300 300 armor = 50,
301 301 hard = 30,
302 302 },
... ...
... ... @@ -26,8 +26,63 @@ for def, e in pairs(game.state:getWorldArtifacts()) do
26 26 print("Importing "..e.name.." into world artifacts")
27 27 end
28 28
29   -
30 29 -- This file describes artifacts not bound to a special location, they can be found anywhere
  30 +
  31 +newEntity{ base = "BASE_GEM",
  32 + power_source = {arcane=true},
  33 + unique = true,
  34 + unided_name = "windy gem",
  35 + name = "Windborne Azurite", subtype = "blue",
  36 + color = colors.BLUE, image = "object/sapphire.png",
  37 + level_range = {18, 40},
  38 + desc = [[Air currents swirl around this bright blue jewel.]],
  39 + rarity = 240,
  40 + cost = 200,
  41 + identified = false,
  42 + material_level = 4,
  43 + wielder = {
  44 + inc_stats = {[Stats.STAT_DEX] = 10, [Stats.STAT_CUN] = 10 },
  45 + inc_damage = {[DamageType.LIGHTNING] = 20 },
  46 + cancel_damage_chance = 10, -- add to tooltip
  47 + damage_affinity={
  48 + [DamageType.LIGHTNING] = 20,
  49 + },
  50 + movement_speed = 0.2,
  51 + },
  52 + imbue_powers = {
  53 + inc_stats = {[Stats.STAT_DEX] = 10, [Stats.STAT_CUN] = 10 },
  54 + inc_damage = {[DamageType.LIGHTNING] = 20 },
  55 + cancel_damage_chance = 10, -- add to tooltip
  56 + damage_affinity={
  57 + [DamageType.LIGHTNING] = 20,
  58 + },
  59 + movement_speed = 0.2,
  60 + },
  61 +
  62 +}
  63 +
  64 +-- Low base values because you can stack affinity and resist
  65 +-- The 3rd type is pretty meaningless balance-wise. Magic debuffs hardly matter. The real advantage is the affinity.
  66 +newEntity{ base = "BASE_INFUSION",
  67 + name = "Primal Infusion", unique=true, image = "object/artifact/tree_of_life.png",
  68 + desc = [[This wild infusion has evolved.]],
  69 + unided_name = "pulsing infusion",
  70 + level_range = {15, 40},
  71 + rarity = 300,
  72 + cost = 300,
  73 + material_level = 3,
  74 +
  75 + inscription_kind = "protect",
  76 + inscription_data = {
  77 + cooldown = 20,
  78 + dur = 6,
  79 + power = 10,
  80 + use_stat_mod = 0.1,
  81 + what = {physical=true, mental=true, magical=true},
  82 + },
  83 + inscription_talent = "INFUSION:_PRIMAL",
  84 +}
  85 +
31 86 newEntity{ base = "BASE_STAFF",
32 87 power_source = {arcane=true},
33 88 unique = true,
... ... @@ -5920,11 +5975,10 @@ newEntity{ base = "BASE_SHIELD",
5920 5975 end,
5921 5976 }
5922 5977
5923   --- Disrupt the backline by attacking the frontline
5924   --- Effect works better fighting in the open
5925   --- Damage stats are pretty bad, not entirely sure they need to be
5926   --- Arcane if necessary, ideally nature scaling off dex. Dex is thematic with wind.
5927   --- Aesthetic Themes: Blue, windy, lightning, storm, speed
  5978 +-- No longer hits your own projectiles
  5979 +-- Hopefully fixed LUA errors with DamageType require
  5980 +-- Significant rescaling. Base damage cut by 50%, crit by 5%. The reason these hilariously bad numbers happened was derping and not accounting for the awesomeness of the 100% dex scaling. APR is still extremely high.
  5981 +-- Proc chance is now 100% up from 25%. No matter how I test this--even at 100% and 500% global action speed--it is often a pain in the ass to get procs just to test. This is supposed to be one of the main features of the item.
5928 5982 newEntity{ base = "BASE_KNIFE", --Shibari's #1
5929 5983 power_source = {nature=true},
5930 5984 unique = true,
... ... @@ -5938,24 +5992,31 @@ newEntity{ base = "BASE_KNIFE", --Shibari's #1
5938 5992 color=colors.BLUE,
5939 5993 require = { stat = { dex=30}},
5940 5994 combat = {
5941   - dam = 30,
  5995 + dam = 15,
5942 5996 apr = 20,
5943   - physcrit = 18,
  5997 + physcrit = 10,
5944 5998 dammod = {dex=1},
5945   - special_on_hit = {desc="25% chance for lightning to strike and destroy any projectiles in a radius of 10, dealing damage and stunning enemies around the projectile.", on_kill=1, fct=function(combat, who, target)
5946   - if not rng.percent(25) then return end
  5999 + special_on_hit = {desc="Causes lightning to strike and destroy any projectiles in a radius of 10 dealing damage and dazing enemies in a radius of 5 around it.", on_kill=1, fct=function(combat, who, target)
5947 6000 local grids = core.fov.circle_grids(who.x, who.y, 10, true)
5948 6001 for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
5949 6002 local i = 0
5950 6003 local p = game.level.map(x, y, engine.Map.PROJECTILE+i)
5951   - while p do
  6004 + while p do
  6005 + local DamageType = require "engine.DamageType" -- I don't entirely follow why this is necessary
  6006 + if p.src and (p.src == who) then return end -- Keep Arcane Blade procs from hitting them since the projectile is still on top of them.
  6007 + if p.name then
  6008 + game.logPlayer(who, "#GREEN#Lightning strikes the " .. p.name .. "!")
  6009 + else
  6010 + game.logPlayer(who, "#GREEN#Shantiz strikes down a projectile!")
  6011 + end
  6012 +
5952 6013 p:terminate(x, y)
5953 6014 game.level:removeEntity(p, true)
5954 6015 p.dead = true
5955   - game.level.map:particleEmitter(x, y, 5, "ball_lightning_beam", {radius=5, tx=x, ty=y}) -- I'm terrible with graphical stuff but I thought I'd at least try?
  6016 + game.level.map:particleEmitter(x, y, 5, "ball_lightning_beam", {radius=5, tx=x, ty=y})
5956 6017
5957 6018 local tg = {type="ball", radius=5, selffire=false}
5958   - local dam = who:mindCrit(30+(2*who:getDex())) -- generous because of the bad damage type, spell or phys crit would both be fine
  6019 + local dam = 4*who:getDex() -- no more crit or base damage. no real reason, just like it better.
5959 6020
5960 6021 who:project(tg, x, y, DamageType.LIGHTNING, dam)
5961 6022
... ... @@ -5973,9 +6034,9 @@ newEntity{ base = "BASE_KNIFE", --Shibari's #1
5973 6034 },
5974 6035 },
5975 6036 wielder = {
5976   - inc_stats = { [Stats.STAT_DEX] = 12 },
5977   - slow_projectiles = 40, -- synergy with proc
5978   - quick_weapon_swap = 1, -- thematic, also makes this more useful when caught in the open. In general I like this mechanic and would like to see more of it.
  6037 + inc_stats = { [Stats.STAT_DEX] = 20 },
  6038 + slow_projectiles = 40,
  6039 + quick_weapon_swap = 1,
5979 6040 },
5980 6041 }
5981 6042 --[=[
... ...
... ... @@ -184,6 +184,80 @@ newInscription{
184 184 end,
185 185 }
186 186
  187 +-- fixedart wild variant
  188 +newInscription{
  189 + name = "Infusion: Primal", image = "talents/infusion__wild.png",
  190 + type = {"inscriptions/infusions", 1},
  191 + points = 1,
  192 + no_energy = true,
  193 + tactical = {
  194 + DEFEND = 3,
  195 + CURE = function(self, t, target)
  196 + local nb = 0
  197 + local data = self:getInscriptionData(t.short_name)
  198 + for eff_id, p in pairs(self.tmp) do
  199 + local e = self.tempeffect_def[eff_id]
  200 + if data.what[e.type] and e.status == "detrimental" then
  201 + nb = nb + 1
  202 + end
  203 + end
  204 + return nb
  205 + end
  206 + },
  207 + action = function(self, t)
  208 + local data = self:getInscriptionData(t.short_name)
  209 +
  210 + local target = self
  211 + local effs = {}
  212 + local force = {}
  213 + local known = false
  214 +
  215 + -- Go through all temporary effects
  216 + for eff_id, p in pairs(target.tmp) do
  217 + local e = target.tempeffect_def[eff_id]
  218 + if data.what[e.type] and e.status == "detrimental" and e.subtype["cross tier"] then
  219 + force[#force+1] = {"effect", eff_id}
  220 + elseif data.what[e.type] and e.status == "detrimental" then
  221 + effs[#effs+1] = {"effect", eff_id}
  222 + end
  223 + end
  224 +
  225 + -- Cross tier effects are always removed and not part of the random game, otherwise it is a huge nerf to wild infusion
  226 + for i = 1, #force do
  227 + local eff = force[i]
  228 + if eff[1] == "effect" then
  229 + target:removeEffect(eff[2])
  230 + known = true
  231 + end
  232 + end
  233 +
  234 + for i = 1, 1 do
  235 + if #effs == 0 then break end
  236 + local eff = rng.tableRemove(effs)
  237 +
  238 + if eff[1] == "effect" then
  239 + target:removeEffect(eff[2])
  240 + known = true
  241 + end
  242 + end
  243 + if known then
  244 + game.logSeen(self, "%s is cured!", self.name:capitalize())
  245 + end
  246 + self:setEffect(self.EFF_PRIMAL_ATTUNEMENT, data.dur, {power=data.power + data.inc_stat})
  247 + return true
  248 + end,
  249 + info = function(self, t)
  250 + local data = self:getInscriptionData(t.short_name)
  251 + local what = table.concat(table.keys(data.what), ", ")
  252 + return ([[Activate the infusion to cure yourself of %s effects and increase affinity for all damage by %d%% for %d turns.]]):format(what, data.power+data.inc_stat, data.dur)
  253 + end,
  254 + short_info = function(self, t)
  255 + local data = self:getInscriptionData(t.short_name)
  256 + local what = table.concat(table.keys(data.what), ", ")
  257 + return ([[affinity %d%%; cure %s]]):format(data.power + data.inc_stat, what)
  258 + end,
  259 +}
  260 +
187 261 newInscription{
188 262 name = "Infusion: Movement",
189 263 type = {"inscriptions/infusions", 1},
... ... @@ -210,6 +284,8 @@ newInscription{
210 284 end,
211 285 }
212 286
  287 +
  288 +
213 289 newInscription{
214 290 name = "Infusion: Sun",
215 291 type = {"inscriptions/infusions", 1},
... ... @@ -306,6 +382,7 @@ newInscription{
306 382 end,
307 383 }
308 384
  385 +-- Opportunity cost for this is HUGE, it should not hit friendly, also buffed duration
309 386 newInscription{
310 387 name = "Infusion: Wild Growth",
311 388 type = {"inscriptions/infusions", 1},
... ... @@ -315,7 +392,7 @@ newInscription{
315 392 radius = 5,
316 393 direct_hit = true,
317 394 target = function(self, t)
318   - return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false, talent=t}
  395 + return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), selffire=false, friendlyfire = false, talent=t}
319 396 end,
320 397 getDamage = function(self, t) return 10 + self:combatMindpower() * 3.6 end,
321 398 action = function(self, t)
... ... @@ -539,6 +616,7 @@ newInscription{
539 616 end,
540 617 }
541 618
  619 +
542 620 newInscription{
543 621 name = "Rune: Vision",
544 622 type = {"inscriptions/runes", 1},
... ...
... ... @@ -182,6 +182,7 @@ newEffect{
182 182 end,
183 183 }
184 184
  185 +
185 186 newEffect{
186 187 name = "CRIPPLING_POISON", image = "talents/crippling_poison.png",
187 188 desc = "Crippling Poison",
... ... @@ -684,6 +685,25 @@ newEffect{
684 685 end,
685 686 }
686 687
  688 +-- artifact wild infusion
  689 +newEffect{
  690 + name = "PRIMAL_ATTUNEMENT", image = "talents/infusion__wild.png",
  691 + desc = "Primal Attunement",
  692 + long_desc = function(self, eff) return ("The target is attuned to the wild, increasing all damage affinity by %d%%."):format(eff.power) end,
  693 + type = "physical",
  694 + subtype = { nature=true },
  695 + status = "beneficial",
  696 + parameters = { power=20 },
  697 + on_gain = function(self, err) return "#Target# attunes to the wild.", "+Primal" end,
  698 + on_lose = function(self, err) return "#Target# is no longer one with nature.", "-Primal" end,
  699 + activate = function(self, eff)
  700 + eff.pid = self:addTemporaryValue("damage_affinity", {all=eff.power})
  701 + end,
  702 + deactivate = function(self, eff)
  703 + self:removeTemporaryValue("damage_affinity", eff.pid)
  704 + end,
  705 +}
  706 +
687 707 newEffect{
688 708 name = "PURGE_BLIGHT", image = "talents/infusion__wild.png",
689 709 desc = "Purge Blight",
... ...