Epidemic in b39...too powerful?
Posted: Sat Apr 21, 2012 3:56 am
If epidemic in b39 cannot be resisted, does that mean if NPCs cast it, one's character will then get the disease, even if disease immunity is 100% ???
Seems like a random boss with this talent could be very nasty indeed in that case. I'm not in favour of effects that bypass saving throws and/or immunities.
Seems like a random boss with this talent could be very nasty indeed in that case. I'm not in favour of effects that bypass saving throws and/or immunities.
Code: Select all
newTalent{
205 name = "Epidemic",
206 type = {"corruption/plague", 4},
207 require = corrs_req4,
208 points = 5,
209 vim = 20,
210 cooldown = 13,
211 range = 6,
212 radius = 2,
213 tactical = { ATTACK = {BLIGHT = 2} },
214 requires_target = true,
215 do_spread = function(self, t, carrier)
216 -- List all diseases
217 local diseases = {}
218 for eff_id, p in pairs(carrier.tmp) do
219 local e = carrier.tempeffect_def[eff_id]
220 if e.subtype.disease then
221 diseases[#diseases+1] = {id=eff_id, params=p}
222 end
223 end
224
225 if #diseases == 0 then return end
226 self:project({type="ball", radius=self:getTalentRadius(t)}, carrier.x, carrier.y, function(px, py)
227 local target = game.level.map(px, py, engine.Map.ACTOR)
228 if not target or target == carrier or target == self then return end
229
230 local disease = rng.table(diseases)
231 local params = disease.params
232 params.src = self
233 if target:canBe("disease") then
234 target:setEffect(disease.id, 6, {src=self, dam=disease.params.dam, str=disease.params.str, dex=disease.params.dex, con=disease.params.con, heal_factor=disease.params.heal_factor, burst=disease.params.burst, rot_timer=disease.params.rot_timer, apply_power=self:combatSpellpower()})
235 else
236 game.logSeen(target, "%s resists the disease!", target.name:capitalize())
237 end
238 game.level.map:particleEmitter(px, py, 1, "slime")
239 end)
240 end,
241 action = function(self, t)
242 local tg = {type="bolt", range=self:getTalentRange(t)}
243 local x, y = self:getTarget(tg)
244 if not x or not y then return nil end
245
246 -- Try to rot !
247 self:project(tg, x, y, function(px, py)
248 local target = game.level.map(px, py, engine.Map.ACTOR)
249 if not target or (self:reactionToward(target) >= 0) then return end
250 target:setEffect(self.EFF_EPIDEMIC, 6, {src=self, dam=self:combatTalentSpellDamage(t, 15, 50), heal_factor=40 + self:getTalentLevel(t) * 4, resist=30 + self:getTalentLevel(t) * 6, apply_power=self:combatSpellpower()})
251 game.level.map:particleEmitter(px, py, 1, "slime")
252 end)
253 game:playSoundNear(self, "talents/slime")
254
255 return true
256 end,
257 info = function(self, t)
258 return ([[Infects the target with a very contagious disease doing %0.2f damage per turn for 6 turns.
259 If any blight damage from non-diseases hits the target, the epidemic may activate and spread a random disease to nearby targets within a radius 2 ball.
260 Creatures suffering from that disease will also suffer healing reduction (%d%%) and diseases immunity reduction (%d%%).
261 Epidemic is an extremely potent disease, as such it fully ignores the target's diseases immunity.
262 The damage will increase with your Magic stat, and the spread chance increases with the blight damage.]]):
263 format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 50)), 40 + self:getTalentLevel(t) * 4, 30 + self:getTalentLevel(t) * 6)
264 end,
265 }