How does Cyst Burst interact with Virulent Disease?
Posted: Fri Apr 20, 2012 1:03 am
Is the damage level of the disease that Cyst Burst spreads based on Virulent Disease or on Cyst Burst?
So if I have VD 2/5 and CB at 4/5, does it spread diseases of level 2 or level 4, or do they interact in some way?
I've studied the code but my understanding of the game and of lua is not good enough to figure it out:
So if I have VD 2/5 and CB at 4/5, does it spread diseases of level 2 or level 4, or do they interact in some way?
I've studied the code but my understanding of the game and of lua is not good enough to figure it out:
Code: Select all
61 newTalent{
62 name = "Cyst Burst",
63 type = {"corruption/plague", 2},
64 require = corrs_req2,
65 points = 5,
66 vim = 18,
67 cooldown = 9,
68 range = 7,
69 radius = function(self, t)
70 return 1 + math.floor(self:getTalentLevelRaw(t) / 2)
71 end,
72 tactical = { ATTACK = function(self, t, target)
73 -- Count the number of diseases on the target
74 local val = 0
75 for eff_id, p in pairs(target.tmp) do
76 local e = target.tempeffect_def[eff_id]
77 if e.subtype.disease then
78 val = val + 1
79 end
80 end
81 return val
82 end },
83 requires_target = true,
84 target = function(self, t)
85 -- Target trying to combine the bolt and the ball disease spread
86 return {type="ballbolt", radius=self:getTalentRadius(t), range=self:getTalentRange(t)}
87 end,
88 action = function(self, t)
89 local tg = {type="bolt", range=self:getTalentRange(t)}
90 local x, y = self:getTarget(tg)
91 if not x or not y then return nil end
92
93 local dam = self:combatTalentSpellDamage(t, 15, 85)
94 local diseases = {}
95
96 -- Try to rot !
97 local source = nil
98 self:project(tg, x, y, function(px, py)
99 local target = game.level.map(px, py, engine.Map.ACTOR)
100 if not target then return end
101
102 for eff_id, p in pairs(target.tmp) do
103 local e = target.tempeffect_def[eff_id]
104 if e.subtype.disease then
105 diseases[#diseases+1] = {id=eff_id, params=p}
106 end
107 end
108
109 if #diseases > 0 then
110 DamageType:get(DamageType.BLIGHT).projector(self, px, py, DamageType.BLIGHT, dam * #diseases)
111 game.level.map:particleEmitter(px, py, 1, "slime")
112 end
113 source = target
114 end)
115
116 if #diseases > 0 then
117 self:project({type="ball", radius=self:getTalentRadius(t), range=self:getTalentRange(t)}, x, y, function(px, py)
118 local target = game.level.map(px, py, engine.Map.ACTOR)
119 if not target or target == source or target == self or (self:reactionToward(target) >= 0) then return end
120
121 local disease = rng.table(diseases)
122 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})
123 game.level.map:particleEmitter(px, py, 1, "slime")
124 end)
125 end
126 game:playSoundNear(self, "talents/slime")
127
128 return true
129 end,
130 info = function(self, t)
131 return ([[Make your target's diseases burst, doing %0.2f blight damage for each disease it is infected with.
132 This will also spread a random disease to any nearby foes in a radius of %d.
133 The damage will increase with your Magic stat.]]):
134 format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 85)), self:getTalentRadius(t))
135 end,
136 }