Commit 9b6ed746e9df764d9580f3c1667c93ca7f4566d0

Authored by dg
1 parent ad5953ac

Changed Blighted Soil to reduce diseases resistance and grant all attacks made b…

…y the creature has a 40% chance to infect the target with a random disease


git-svn-id: http://svn.net-core.org/repos/t-engine4@5832 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -189,6 +189,7 @@ function _M:dumpToJSON(js, bypass, nosub)
189 189 if self:isUnarmed() then
190 190 local mean, dam = self.combat, self.combat
191 191 local d = {}
  192 + c.barehand = {}
192 193 c.barehand[#c.barehand+1] = d
193 194 if mean and dam then
194 195 d.accuracy = string.format("%d", self:combatAttack(mean))
... ... @@ -200,6 +201,7 @@ function _M:dumpToJSON(js, bypass, nosub)
200 201 if mean and mean.range then d.range = mean.range end
201 202 end
202 203 if self:getInven(self.INVEN_OFFHAND) then
  204 + c.offhand = {}
203 205 for i, o in ipairs(self:getInven(self.INVEN_OFFHAND)) do
204 206 local offmult = self:getOffHandMult(o.combat)
205 207 local mean, dam = o.combat, o.combat
... ...
... ... @@ -412,6 +412,14 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
412 412 src.turn_procs.is_crit = nil
413 413 end
414 414
  415 + if src.turn_procs and not src.turn_procs.blighted_soil and src:attr("blighted_soil") and rng.percent(src:attr("blighted_soil")) then
  416 + local tid = rng.table{src.EFF_ROTTING_DISEASE, src.EFF_DECREPITUDE_DISEASE, src.EFF_DECREPITUDE_DISEASE}
  417 + if not target:hasEffect(tid) then
  418 + local l = game.zone:level_adjust_level(game.level, game.zone, "object")
  419 + local p = math.ceil(4 + l / 2)
  420 + target:setEffect(tid, 8, {str=p, con=p, dex=p, dam=5 + l / 2, src=src})
  421 + end
  422 + end
415 423
416 424 return dam + add_dam
417 425 end
... ...
... ... @@ -38,7 +38,7 @@ else
38 38 level.map:particleEmitter(x, y, 3, "ultrashield", {rm=50, rM=80, gm=80, gM=100, bm=30, bM=60, am=220, aM=250, radius=3, density=1, life=14, instop=17})
39 39 end
40 40
41   -local on_stand = function(self, x, y, who) if who.life and who.life < who.max_life then who:setEffect(who.EFF_BLIGHTED_SOIL, 1, {}) end end
  41 +local on_stand = function(self, x, y, who) who:setEffect(who.EFF_BLIGHTED_SOIL, 1, {}) end
42 42
43 43 local grids = core.fov.circle_grids(x, y, 3, "do not block")
44 44 for x, yy in pairs(grids) do for y, _ in pairs(yy) do
... ...
... ... @@ -116,7 +116,7 @@ newTalent{
116 116 local dam = t.getDamage(self, t)
117 117 return ([[You focus the aether into a spinning beam of arcane energies doing %0.2f arcane damage and having 25%% chance to silence the creatures.
118 118 The beam will also damage its epicenter each turn for 10%% of the damage (but it will not silence).
119   - THe beam spins with incredible speed (1600%%).
  119 + The beam spins with incredible speed (1600%%).
120 120 The damage will increase with Spellpower.]]):
121 121 format(damDesc(self, DamageType.ARCANE, dam))
122 122 end,
... ...
... ... @@ -78,19 +78,10 @@ floorEffect{
78 78
79 79 floorEffect{
80 80 desc = "Blighted Soil", image = "talents/blightzone.png",
81   - long_desc = "The target is walking on blighted soil, reducing diseases resistance by 30% and giving a chance to be infected with a random disease.",
  81 + long_desc = "The target is walking on blighted soil, reducing diseases resistance by 60% and giving all attacks a 40% chance to infect the target with a random disease (can only happen once per turn).",
82 82 activate = function(self, eff)
83   - self:effectTemporaryValue(eff, "disease_immune", -0.3)
84   - end,
85   - on_timeout = function(self, eff)
86   - if rng.chance(10) then
87   - local tid = rng.table{self.EFF_ROTTING_DISEASE, self.EFF_DECREPITUDE_DISEASE, self.EFF_DECREPITUDE_DISEASE}
88   - if not self:hasEffect(tid) then
89   - local l = game.zone:level_adjust_level(game.level, game.zone, "object")
90   - local p = math.ceil(4 + l / 2)
91   - self:setEffect(tid, 8, {str=p, con=p, dex=p, dam=5 + l / 2, src=self})
92   - end
93   - end
  83 + self:effectTemporaryValue(eff, "disease_immune", -0.6)
  84 + self:effectTemporaryValue(eff, "blighted_soil", 40)
94 85 end,
95 86 }
96 87
... ...
... ... @@ -58,7 +58,7 @@ function _M:init(title, actor, filter, action, on_select)
58 58 local bi = self.actor:getInven(ui.inven)
59 59 local ws = self.actor:getInven(wear_o:wornInven())
60 60 local os = self.actor:getObjectOffslot(wear_o)
61   - if (ws and ws.id == bi.id) or (os and self.actor:getInven(os).id == bi.id) then
  61 + if bi and (ws and ws.id == bi.id) or (os and self.actor:getInven(os).id == bi.id) then
62 62 self.actor:doTakeoff(ui.inven, ui.item, ui:getItem(), true)
63 63 end
64 64 end
... ...