Commit 71b952c3a68e3b272ab89b4a76ed071688635fb0

Authored by DarkGod
1 parent 6b156fb8

Much improved Wintertide

Undeads now start with a Heat Beam rune instead of phase door
... ... @@ -62,9 +62,14 @@ newBirthDescriptor{
62 62 undead = 1,
63 63 forbid_nature = 1,
64 64 inscription_restrictions = { ["inscriptions/runes"] = true, ["inscriptions/taints"] = true, },
65   - resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=100}),
66   - resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10, dur=5, power=15}),
  65 + resolvers.inscription("RUNE:_SHIELDING", {cooldown=14, dur=5, power=130}),
  66 + --resolvers.inscription("RUNE:_PHASE_DOOR", {cooldown=7, range=10, dur=5, power=15}),
  67 + resolvers.inscription("RUNE:_HEAT_BEAM", {cooldown=18, range=8, power=40}), -- yeek and undead starts are unfun to the point of absurdity
  68 + resolvers.inventory({id=true, transmo=false,
  69 + {type="scroll", subtype="rune", name="phase door rune", ego_chance=-1000, ego_chance=-1000}}), -- keep this in inventory incase people actually want it, can't add it baseline because some classes start with 3 inscribed
67 70 },
  71 +
  72 +
68 73 random_escort_possibilities = { {"tier1.1", 1, 2}, {"tier1.2", 1, 2}, {"daikara", 1, 2}, {"old-forest", 1, 4}, {"dreadfell", 1, 8}, {"reknor", 1, 2}, },
69 74 }
70 75
... ...
... ... @@ -742,6 +742,25 @@ newDamageType{
742 742 death_message = {"psyched", "mentally tortured", "mindraped"},
743 743 }
744 744
  745 +newDamageType{
  746 + name = "winter", type = "WINTER",
  747 + projector = function(src, x, y, type, dam)
  748 + local srcx, srcy = dam.x, dam.y
  749 + local base = dam
  750 + dam = dam.dam
  751 + if not base.st then
  752 + DamageType:get(DamageType.COLD).projector(src, x, y, DamageType.COLD, dam)
  753 + else
  754 + DamageType:get(base.st).projector(src, x, y, base.st, dam)
  755 + end
  756 + local target = game.level.map(x, y, Map.ACTOR)
  757 + if target then
  758 + local energyDrain = (game.energy_to_act * 0.2)
  759 + target.energy.value = target.energy.value - energyDrain
  760 + end
  761 + end,
  762 +}
  763 +
745 764 -- Temporal damage
746 765 newDamageType{
747 766 name = "temporal", type = "TEMPORAL", text_color = "#LIGHT_STEEL_BLUE#",
... ...
... ... @@ -22,6 +22,8 @@ local Talents = require "engine.interface.ActorTalents"
22 22
23 23 -- This file describes artifacts associated with a boss of the game, they have a high chance of dropping their respective ones, but they can still be found elsewhere
24 24
  25 +-- Design: Revamp Wintertide to make it more unique, interesting, and not terrible.
  26 +-- Balance: A cold themed weapon doesn't play nice with melee scalers, and Ice Block on hit, while useful overall, has some obvious anti-synergy. So instead of focusing on stats I added a decent passive on hit and a very powerful active. The active is a "better" Stone Wall but you have to be actively using the weapon in melee to make use of it. The delayed expansion of the storm also limits its strength as an "oh shit" button.
25 27 newEntity{ base = "BASE_LONGSWORD",
26 28 power_source = {arcane=true},
27 29 define_as = "LONGSWORD_WINTERTIDE", unided_name = "glittering longsword", image="object/artifact/wintertide.png",
... ... @@ -31,32 +33,147 @@ It is said the Conclave created this weapon for their warmaster during the dark
31 33 require = { stat = { str=35 }, },
32 34 level_range = {35, 45},
33 35 rarity = 280,
34   - cost = 2000,
  36 + cost = 1000,
35 37 material_level = 5,
  38 + winterStorm = nil,
  39 + special_desc = function(self)
  40 + if not self.winterStorm then
  41 + return ("Storm Duration: None")
  42 + else
  43 + return ("Storm Duration: " .. (self.winterStorm.duration or "None"))
  44 + end
  45 + end,
36 46 combat = {
37   - dam = 45,
  47 + dam = 39, -- lower damage, defensive item with extremely powerful effects
38 48 apr = 10,
39 49 physcrit = 10,
40 50 dammod = {str=1},
41 51 damrange = 1.4,
42   - melee_project={[DamageType.ICE] = 45},
  52 + melee_project={[DamageType.ICE] = 25}, -- Iceblock HP is based on damage, since were adding iceblock pierce we want this to be less generous
  53 + special_on_hit = {desc="Create a Winter Storm that gradually expands, dealing cold damage to your enemies each turn and reducing their turn energy by 20%. Melee attacks will relocate the storm on top of your target and increase its duration.", on_kill=1, fct=function(combat, who, target)
  54 + local self, item, inven_id = who:findInAllInventoriesBy("define_as", "LONGSWORD_WINTERTIDE")
  55 + if not self or not who:getInven(inven_id).worn then return end
  56 +
  57 + if self.winterStorm and self.winterStorm.duration <= 0 then
  58 + self.winterStorm = nil
  59 + --return
  60 + end
  61 +
  62 + if (self.winterStorm and (game.level.id ~= self.winterStorm.checkZone) ) then
  63 + self.winterStorm = nil
  64 + end
  65 +
  66 + if not self.winterStorm then
  67 + local stormDam = who:combatStatScale("str", 20, 80, 0.75) -- does this need a require?
  68 + self.winterStorm = game.level.map:addEffect(who,
  69 + target.x, target.y, 5,
  70 + engine.DamageType.WINTER, {dam=stormDam, x=target.x, y=target.y}, -- Winter is cold damage+energy reduction, enemy only
  71 + 1,
  72 + 5, nil,
  73 + {type="icestorm", only_one=true},
  74 + function(e)
  75 + if e.radius < 4 then
  76 + e.radius = e.radius + 0.2
  77 +
  78 + -- this is a hack to fix the effect breaking if you reload with it active, whatever is going on is very weird but the table on the item no longer points to this
  79 + local self2, item, inven_id = e.src:findInAllInventoriesBy("define_as", "LONGSWORD_WINTERTIDE")
  80 + if not self2 then return end
  81 + self2.winterStorm = e
  82 + end
  83 + return true
  84 + end,
  85 + false)
  86 + self.winterStorm.checkZone = game.level.id
  87 + else
  88 + -- move the storm on top of the target
  89 + self.winterStorm.x = target.x
  90 + self.winterStorm.y = target.y
  91 + if self.winterStorm.duration < 5 then -- duration can be extended forever while meleeing
  92 + self.winterStorm.duration = self.winterStorm.duration + 1
  93 + end
  94 + end
  95 +
  96 + end
  97 +
  98 + },
  99 +
43 100 },
44 101 wielder = {
45   - lite = 1,
46   - see_invisible = 2,
47   - resists={[DamageType.COLD] = 25},
  102 + iceblock_pierce=35, -- this can be generous because of how melee specific the item is
  103 + resists = { [DamageType.COLD] = 25 },
  104 + on_melee_hit={[DamageType.ICE] = 40},
48 105 inc_damage = { [DamageType.COLD] = 20 },
49 106 },
50   - max_power = 18, power_regen = 1,
51   - use_power = { name = "generate a burst of ice", power = 8,
  107 + max_power = 40, power_regen = 1,
  108 + use_power = { name ="intensify your winter storm creating unbreakable ice walls in each space", power = 30,
52 109 use = function(self, who)
53   - local tg = {type="ball", range=0, radius=4, selffire=false}
54   - who:project(tg, who.x, who.y, engine.DamageType.ICE, 40 + (who:getMag() + who:getWil()), {type="freeze"})
55   - game:playSoundNear(who, "talents/ice")
56   - game.logSeen(who, "%s invokes the power of %s!", who.name:capitalize(), self.name)
  110 +
  111 + local Object = require "mod.class.Object"
  112 + local Map = require "engine.Map"
  113 +
  114 + if not self.winterStorm then return end
  115 +
  116 + if self.winterStorm and self.winterStorm.duration <= 0 then
  117 + self.winterStorm = nil
  118 + return
  119 + end
  120 +
  121 + local grids = core.fov.circle_grids(self.winterStorm.x, self.winterStorm.y, self.winterStorm.radius, true)
  122 + local self = who
  123 +
  124 +
  125 + for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
  126 + local oe = game.level.map(x, y, engine.Map.TERRAIN)
  127 +
  128 + if oe then
  129 + local e = Object.new{
  130 + old_feat = oe,
  131 + name = "winter wall", image = "npc/iceblock.png",
  132 + display = '#', color_r=255, color_g=255, color_b=255, back_color=colors.GREY,
  133 + desc = "a summoned wall of ice",
  134 + type = "wall", --subtype = "floor",
  135 + always_remember = true,
  136 + can_pass = {pass_wall=1},
  137 + does_block_move = true,
  138 + show_tooltip = true,
  139 + block_move = true,
  140 + block_sight = true,
  141 + temporary = 10,
  142 + x = x, y = y,
  143 + canAct = false,
  144 + act = function(self)
  145 + self:useEnergy()
  146 + self.temporary = self.temporary - 1
  147 + if self.temporary <= 0 then
  148 + game.level.map(self.x, self.y, engine.Map.TERRAIN, self.old_feat)
  149 + game.level:removeEntity(self)
  150 + -- game.level.map:redisplay()
  151 + end
  152 + end,
  153 + dig = function(src, x, y, old)
  154 + game.level:removeEntity(old)
  155 + -- game.level.map:redisplay()
  156 + return nil, old.old_feat
  157 + end,
  158 + summoner_gain_exp = true,
  159 + summoner = self,
  160 + }
  161 + e.tooltip = mod.class.Grid.tooltip
  162 + game.level:addEntity(e)
  163 + game.level.map(x, y, engine.Map.TERRAIN, e)
  164 + end
  165 + end end
  166 +
57 167 return {id=true, used=true}
58 168 end
59 169 },
  170 + on_wear = function(self, who)
  171 + --self.winterStorm = nil
  172 + end,
  173 + on_pickup = function(self, who)
  174 + self.winterStorm = nil
  175 + end,
  176 +
60 177 }
61 178
62 179 newEntity{ base = "BASE_LITE", define_as = "WINTERTIDE_PHIAL",
... ...