Commit 2c8b7f216ddfcc56cbf39bdbeba6ca19eaf52071

Authored by DarkGod
2 parents 2a9e0be2 a536aacd

Merge branch 'Misc' into 'master'

Misc



See merge request !613
... ... @@ -1390,7 +1390,7 @@ function _M:changeLevelReal(lev, zone, params)
1390 1390 if self.level.last_turn and self.level.last_turn < self.turn then
1391 1391 local perc = util.bound(math.floor((self.turn - self.level.last_turn) / 10), 0, 10)
1392 1392 for uid, target in pairs(self.level.entities) do
1393   - if target.life and target.max_life and self.player:reactionToward(target) < 0 then
  1393 + if target.life and target.max_life and ((self.player:reactionToward(target) < 0) or target:attr("hostile_for_level_change")) then
1394 1394 target.life = util.bound(target.life + target.max_life * perc / 10, 0, target.max_life)
1395 1395 target.changed = true
1396 1396 target.talents_cd = {}
... ...
... ... @@ -67,13 +67,15 @@ newBirthDescriptor{
67 67 ["corruption/sanguisuge"]={true, 0.0},
68 68 ["corruption/reaving-combat"]={true, 0.3},
69 69 ["corruption/scourge"]={true, 0.3},
70   - ["corruption/plague"]={true, 0.0},
  70 + ["corruption/plague"]={true, 0.3},
71 71 ["corruption/hexes"]={false, 0.3},
72 72 ["corruption/curses"]={false, 0.3},
73 73 ["corruption/bone"]={true, 0.3},
74 74 ["corruption/torment"]={true, 0.3},
75 75 ["corruption/vim"]={true, 0.0},
76 76 ["corruption/rot"]={false, 0.3},
  77 + ["corruption/vile-life"]={false, 0.0},
  78 +
77 79 },
78 80 talents = {
79 81 [ActorTalents.T_CORRUPTED_STRENGTH] = 1,
... ...
... ... @@ -105,7 +105,6 @@ newEntity{ base = "BASE_NPC_WILD_DRAKE",
105 105 [Talents.T_CHARGE_LEECH]={base=5, every=5, max = 10},
106 106 [Talents.T_INSATIABLE]={base=5, every=5, max = 30},
107 107 [Talents.T_PHASE_DOOR]={base=5, every=5, max = 10},
108   - [Talents.T_PROBABILITY_TRAVEL]={base=5, every=5, max = 10},
109 108 },
110 109
111 110 resolvers.inscriptions(2, {"phase door rune", "phase door rune"}),
... ...
... ... @@ -43,7 +43,7 @@ newEntity{
43 43 return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf)
44 44 end,
45 45 wound=function(combat, who)
46   - local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350)) -- Doesn't stack
  46 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350))) -- Doesn't stack
47 47 local hf = 50
48 48 return dam, hf
49 49 end,
... ... @@ -149,7 +149,7 @@ newEntity{
149 149 return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):format(dam, math.ceil(dam / 8))
150 150 end,
151 151 acid_splash=function(who)
152   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250))
  152 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250)))
153 153 return dam
154 154 end,
155 155 fct=function(combat, who, target, dam, special)
... ... @@ -176,7 +176,7 @@ newEntity{
176 176 return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):format(dam)
177 177 end,
178 178 arc=function(who)
179   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))
  179 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)))
180 180 return dam
181 181 end,
182 182 on_kill=1,
... ... @@ -319,7 +319,7 @@ newEntity{
319 319 return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):format(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" )
320 320 end,
321 321 explosion=function(self, who)
322   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)) * (1 + (self.elemental_bonus or 0) / 100)
  322 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)) * (1 + (self.elemental_bonus or 0) / 100))
323 323 return dam
324 324 end,
325 325 fct=function(combat, who, target, dam, special)
... ... @@ -467,7 +467,7 @@ newEntity{
467 467 return ("#LIGHT_GREEN#20%%#LAST# chance to create an air burst in radius 3 knocking enemies back 2 spaces and dealing #RED#%d#LAST# physical damage"):format(dam)
468 468 end,
469 469 explosion=function(who)
470   - local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 250))
  470 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 250)))
471 471 return dam
472 472 end,
473 473 fct=function(combat, who, target, dam, special)
... ... @@ -498,7 +498,7 @@ newEntity{
498 498 return ("#LIGHT_GREEN#20%%#LAST# chance to create vines that bind the target to the ground dealing #YELLOW#%d#LAST# nature damage and pinning them for 3 turns"):format(dam)
499 499 end,
500 500 damage=function(who)
501   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))
  501 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350)))
502 502 return dam
503 503 end,
504 504 fct=function(combat, who, target, dam, special)
... ... @@ -577,7 +577,7 @@ newEntity{
577 577 format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20))
578 578 end,
579 579 manaburn=function(who)
580   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))
  580 + local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150)))
581 581 return dam
582 582 end,
583 583 fct=function(combat, who, target, dam, special)
... ... @@ -682,7 +682,7 @@ newEntity{
682 682 return ("#LIGHT_GREEN#20%%#LAST# chance to knock the target back 3 spaces and deal #YELLOW#%d#LAST# physical damage"):format(dam)
683 683 end,
684 684 psychokinetic_damage=function(who)
685   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))
  685 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350)))
686 686 return dam
687 687 end,
688 688 fct=function(combat, who, target, dam, special)
... ...
... ... @@ -467,7 +467,7 @@ newEntity{
467 467 format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20))
468 468 end,
469 469 manaburn=function(who)
470   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))
  470 + local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150)))
471 471 return dam
472 472 end,
473 473 fct=function(combat, who, target, dam, special)
... ...
... ... @@ -130,13 +130,14 @@ newTalent{
130 130 type = {"corruption/vile-life", 3},
131 131 require = corrs_req3,
132 132 points = 5,
133   - cooldown = 15,
  133 + cooldown = 10,
134 134 vim = 16,
135   - range = 10,
  135 + range = 8,
  136 + radius = 4,
136 137 tactical = { DISABLE = 2 },
137 138 direct_hit = true,
138 139 requires_target = true,
139   - target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end,
  140 + target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), friendlyfire=false, talent=t} end,
140 141 getPower = function(self,t) return self:combatLimit(self:combatTalentSpellDamage(t, 4, 100), 100, 0, 0, 18.1, 18.1) end, -- Limit to <100%
141 142 action = function(self, t)
142 143 local tg = self:getTalentTarget(t)
... ... @@ -151,9 +152,9 @@ newTalent{
151 152 return true
152 153 end,
153 154 info = function(self, t)
154   - return ([[You manipulate the vim of your target to temporarily invert all healing done to it (but not regeneration).
  155 + return ([[You manipulate the vim of enemies in radius %d to temporarily invert all healing done to them (but not natural regeneration).
155 156 For 5 turns all healing will instead damage them for %d%% of the healing done as blight.
156   - The effect will increase with your Spellpower.]]):format(t.getPower(self,t))
  157 + The effect will increase with your Spellpower.]]):format(self:getTalentRadius(t), t.getPower(self,t))
157 158 end,
158 159 }
159 160
... ... @@ -162,14 +163,16 @@ newTalent{
162 163 type = {"corruption/vile-life", 4},
163 164 require = corrs_req4,
164 165 points = 5,
165   - cooldown = 10,
  166 + cooldown = 15,
166 167 vim = 18,
167 168 direct_hit = true,
168 169 requires_target = true,
169 170 range = 4,
  171 + no_npc_use = true, -- Bypasses all forms of immunity and such
170 172 target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end,
171 173 getNb = function(self, t) return math.floor(self:combatTalentScale(t, 2, 4, "log")) end,
172 174 getDam = function(self, t) return self:combatTalentLimit(t, 2, 10, 5) end, --Limit < 10% life/effect
  175 + getVim = function(self, t) return 18 end,
173 176 action = function(self, t)
174 177 local tg = self:getTalentTarget(t)
175 178 local x, y = self:getTarget(tg)
... ... @@ -187,26 +190,17 @@ newTalent{
187 190 end
188 191 end
189 192
190   - local dam = t.getDam(self, t) * self.life / 100
191 193 while #list > 0 and nb > 0 do
192   - if self:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 5) then
193   - local eff_id = rng.tableRemove(list)
194   - local p = self.tmp[eff_id]
195   - local e = self.tempeffect_def[eff_id]
196   - local effectParam = self:copyEffect(eff_id)
197   - effectParam.__tmpparticles = nil
198   - if effectParam then
199   - effectParam.src = self
200   -
201   - target:setEffect(eff_id, p.dur, effectParam)
202   - self:removeEffect(eff_id)
203   - local dead, val = self:takeHit(dam, self, {source_talent=t})
204   - target:heal(val, self)
205   - game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):format(e.desc))
206   - end
  194 + local eff_id = rng.tableRemove(list)
  195 + local e = self.tempeffect_def[eff_id]
  196 + self:cloneEffect(eff_id, target, {apply_power = self:combatSpellpower()})
  197 + if target:hasEffect(eff_id) then
  198 + self:removeEffect(eff_id)
  199 + game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):format(e.desc))
  200 + self:incVim(-t.getVim(self, t)) -- Vim costs life if there isn't enough so no need to check total
207 201 end
208   - nb = nb - 1
209 202 end
  203 + nb = nb - 1
210 204 end)
211 205 local _ _, _, _, x, y = self:canProject(tg, x, y)
212 206 game.level.map:particleEmitter(x, y, tg.radius, "circle", {oversize=0.7, g=100, r=100, a=90, limit_life=8, appear=8, speed=2, img="blight_circle", radius=self:getTalentRadius(t)})
... ... @@ -214,9 +208,9 @@ newTalent{
214 208 return true
215 209 end,
216 210 info = function(self, t)
217   - return ([[You transfer up to %d physical or magical detrimental effects currently affecting you to a nearby creature by touching it.
218   - The transfer takes %0.1f%% of your remaining life for each effect transferred and heals the target for the same amount.
  211 + return ([[You transfer up to %d physical or magical detrimental effects currently affecting you to a nearby creature at a cost of %d vim per effect.
  212 + Specific effect immunities will not prevent the transfer.
219 213 The chance to transfer each effect increases with your Spellpower.]]):
220   - format(t.getNb(self, t), t.getDam(self, t))
  214 + format(t.getNb(self, t), t.getVim(self, t))
221 215 end,
222 216 }
... ...
... ... @@ -30,7 +30,7 @@ newTalent{
30 30 tactical = { ATTACK = { PHYSICAL = 1, COLD = 1, FIRE = 1, LIGHTNING = 1, ACID = 1 } },
31 31 requires_target = true,
32 32 target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end,
33   - getWeaponDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.6, 2.3) end,
  33 + getWeaponDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.2, 2.0) end,
34 34 getBurstDamage = function(self, t) return self:combatTalentMindDamage(t, 20, 230) end,
35 35 getPassiveSpeed = function(self, t) return (self:combatTalentScale(t, 2, 10, 0.5)/100) end,
36 36 radius = function(self, t) return math.floor(self:combatTalentScale(t, 1.5, 3.5)) end,
... ...
... ... @@ -66,11 +66,11 @@ newTalent{
66 66 effs[#effs+1] = {"effect", eff_id, priority=2}
67 67 elseif e.subtype.confusion and self:getTalentLevel(t) >=3 then
68 68 effs[#effs+1] = {"effect", eff_id, priority=3}
69   - elseif e.subtype.pin and self:getTalentLevel(t) >=4 then
  69 + elseif e.subtype.pin and self:getTalentLevel(t) >=3 then
70 70 effs[#effs+1] = {"effect", eff_id, priority=4}
71   - elseif e.subtype.slow and self:getTalentLevel(t) >=5 then
  71 + elseif e.subtype.disarm and self:getTalentLevel(t) >=4 then
72 72 effs[#effs+1] = {"effect", eff_id, priority=5}
73   - elseif e.subtype.disarm and self:getTalentLevel(t) >=5 then
  73 + elseif e.subtype.slow and self:getTalentLevel(t) >=4 then
74 74 effs[#effs+1] = {"effect", eff_id, priority=6}
75 75 end
76 76 end
... ... @@ -89,8 +89,8 @@ newTalent{
89 89 info = function(self, t)
90 90 local chance = t.getChance(self, t)
91 91 return ([[You've learned to recover quickly from effects that would disable you. Each turn, you have a %d%% chance to recover from a single stun effect.
92   - At talent level 2 you may also recover from blindness, at level 3 confusion, level 4 pins, and level 5 disarms and slows.
93   - Effects will be cleansed with the priority order Stun > Blind > Confusion > Pin > Slow > Disarm.
  92 + At talent level 2 you may also recover from Blindness, at level 3 Confusion and Pins, and level 4 Disarms and Slows.
  93 + Effects will be cleansed with the priority order Stun > Blind > Confusion > Pin > Disarm > Slow.
94 94 Only one effect may be recovered from each turn, and the chance to recover from an effect scales with your Constitution.]]):
95 95 format(chance)
96 96 end,
... ...
... ... @@ -193,7 +193,7 @@ uberTalent{
193 193 Whenever you have stored %d damage of one type you unleash a powerful blast at a random enemy dealing %d damage of that type in radius %d and applying one of the following effects:
194 194
195 195 Physical: Slows combat, mind, and spell speed by 20%%.
196   - #GREEN#Acid:#LAST# Deals %d acid damage each turn for 5 turns.
  196 + #GREEN#Acid:#LAST# Deals %d acid damage each turn for 5 turns (%d total).
197 197 #DARK_GREEN#Blight:#LAST# Deals %d blight damage each turn for 5 turns and reduces strength, constitution, and dexterity by %d.
198 198 #GREY#Darkness:#LAST# Reduces damage dealt by %d%% for 5 turns.
199 199 #LIGHT_STEEL_BLUE#Temporal:#LAST# Slows global action speed by %d%% for 5 turns.
... ... @@ -202,7 +202,7 @@ uberTalent{
202 202 Each effect can only happen once per 10 player turns. This does not count as a typical cooldown.
203 203 The damage and effect power increase with your Cunning, the threshold with your level, and the apply power is the highest of your mind or spell power.
204 204 %s]])
205   - :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), t.getAcid(self, t), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str)
  205 + :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getAcid(self, t)), damDesc(self, DamageType.ACID, t.getAcid(self, t)*5), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str)
206 206 end,
207 207 }
208 208
... ...
... ... @@ -4432,6 +4432,7 @@ newEffect{
4432 4432 self:setTarget() -- clear ai target
4433 4433 eff.olf_faction = self.faction
4434 4434 self.faction = eff.src.faction
  4435 + self:effectTemporaryValue(eff, "hostile_for_level_change", 1)
4435 4436 if core.shader.active() then
4436 4437 local h1x, h1y = self:attachementSpot("head", true) if h1x then eff.particle = self:addParticles(Particles.new("circle", 1, {shader=true, oversize=1, a=225, appear=8, speed=0, img="domination_hex_debuff_aura", base_rot=0, radius=0, x=h1x, y=h1y})) end
4437 4438 end
... ...
... ... @@ -233,6 +233,7 @@ newEffect{
233 233 self.faction = eff.src.faction
234 234 self:effectTemporaryValue(eff, "never_anger", 1)
235 235 self:effectTemporaryValue(eff, "invulnerable", 1)
  236 + self:effectTemporaryValue(eff, "hostile_for_level_change", 1)
236 237 end,
237 238 deactivate = function(self, eff)
238 239 if eff.particle then self:removeParticles(eff.particle) end
... ...
... ... @@ -56,7 +56,6 @@ newEntity{ define_as = "BRIAGH",
56 56 resolvers.drops{chance=100, nb=5, {type="gem"} },
57 57
58 58 resolvers.talents{
59   - [Talents.T_PROBABILITY_TRAVEL]=10,
60 59 [Talents.T_SUMMON]=1,
61 60 [Talents.T_SAND_BREATH]={base=8, every=8, max=12},
62 61 [Talents.T_STUN]={base=5, every=5, max=8},
... ...