Commit 894db07d30c4c0f191b17b988b104b9778b5de2c
1 parent
7be0126e
Fixed teluvorta bug on load
Teluvortas now only swap 50% of the time Teluvorta swap now has a saving throw Fixed riposte not giving crit bonus git-svn-id: http://svn.net-core.org/repos/t-engine4@5133 51575b47-30f0-44d4-a5cc-537603b46e54
Showing
3 changed files
with
20 additions
and
9 deletions
... | ... | @@ -37,7 +37,7 @@ local function doTeluvortaSwap(self) |
37 | 37 | local a, id = rng.table(tgts) |
38 | 38 | local target = a |
39 | 39 | |
40 | - if target:canBe("teleport") and self:canBe("teleport") then | |
40 | + if self:checkHit(self:combatSpellpower(), target:combatSpellResist()) and target:canBe("teleport") and self:canBe("teleport") then | |
41 | 41 | -- first remove the target so the destination tile is empty |
42 | 42 | game.level.map:remove(target.x, target.y, Map.ACTOR) |
43 | 43 | local px, py |
... | ... | @@ -151,7 +151,8 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
151 | 151 | combat_armor = 0, combat_def = 20, combat_def_ranged = 20, |
152 | 152 | on_melee_hit = { [DamageType.TEMPORAL] = resolvers.mbonus(20, 10), }, |
153 | 153 | ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_snake" }, |
154 | - | |
154 | + doTeluvortaSwap = doTeluvortaSwap, | |
155 | + | |
155 | 156 | talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3}, |
156 | 157 | |
157 | 158 | resolvers.talents{ |
... | ... | @@ -161,7 +162,9 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
161 | 162 | resolvers.sustains_at_birth(), |
162 | 163 | |
163 | 164 | on_act = function(self) |
164 | - doTeluvortaSwap(self) | |
165 | + if rng.chance(2) then | |
166 | + self:doTeluvortaSwap() | |
167 | + end | |
165 | 168 | end, |
166 | 169 | } |
167 | 170 | |
... | ... | @@ -175,7 +178,8 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
175 | 178 | combat_armor = 0, combat_def = 20, combat_def_ranged = 20, |
176 | 179 | on_melee_hit = { [DamageType.TEMPORAL] = resolvers.mbonus(20, 10), }, |
177 | 180 | ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_snake" }, |
178 | - | |
181 | + doTeluvortaSwap = doTeluvortaSwap, | |
182 | + | |
179 | 183 | talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3}, |
180 | 184 | |
181 | 185 | resolvers.talents{ |
... | ... | @@ -185,7 +189,9 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
185 | 189 | }, |
186 | 190 | resolvers.sustains_at_birth(), |
187 | 191 | on_act = function(self) |
188 | - doTeluvortaSwap(self) | |
192 | + if rng.chance(2) then | |
193 | + self:doTeluvortaSwap() | |
194 | + end | |
189 | 195 | end, |
190 | 196 | } |
191 | 197 | |
... | ... | @@ -201,7 +207,8 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
201 | 207 | combat_armor = 0, combat_def = 20, combat_def_ranged = 20, |
202 | 208 | on_melee_hit = { [DamageType.TEMPORAL] = resolvers.mbonus(20, 10), }, |
203 | 209 | ai = "tactical", ai_state = { talent_in=2, ai_move="move_snake" }, |
204 | - | |
210 | + doTeluvortaSwap = doTeluvortaSwap, | |
211 | + | |
205 | 212 | talent_cd_reduction = {[Talents.T_DUST_TO_DUST]=-3}, |
206 | 213 | |
207 | 214 | resolvers.talents{ |
... | ... | @@ -213,6 +220,8 @@ newEntity{ base = "BASE_NPC_TELUGOROTH", |
213 | 220 | }, |
214 | 221 | resolvers.sustains_at_birth(), |
215 | 222 | on_act = function(self) |
216 | - doTeluvortaSwap(self) | |
223 | + if rng.chance(2) then | |
224 | + self:doTeluvortaSwap() | |
225 | + end | |
217 | 226 | end, |
218 | 227 | } | ... | ... |
... | ... | @@ -400,7 +400,7 @@ newEntity{ |
400 | 400 | special_on_hit = {desc="20% chance to curse the target", fct=function(combat, who, target) |
401 | 401 | if not rng.percent(20) then return end |
402 | 402 | local eff = rng.table{"vuln", "defenseless", "impotence", "death", } |
403 | - if not target:checkHit(who:combatSpellpower(), target:combatSpellResist()) then return end | |
403 | + if not who:checkHit(who:combatSpellpower(), target:combatSpellResist()) then return end | |
404 | 404 | if eff == "vuln" then target:setEffect(target.EFF_CURSE_VULNERABILITY, 2, {power=20}) |
405 | 405 | elseif eff == "defenseless" then target:setEffect(target.EFF_CURSE_DEFENSELESSNESS, 2, {power=20}) |
406 | 406 | elseif eff == "impotence" then target:setEffect(target.EFF_CURSE_IMPOTENCE, 2, {power=20}) |
... | ... | @@ -912,7 +912,7 @@ newEntity{ |
912 | 912 | if not rng.percent(20) then return end |
913 | 913 | local eff = rng.table{"stun", "blind", "pin", "confusion", "silence",} |
914 | 914 | if not target:canBe(eff) then return end |
915 | - if not target:checkHit(who:combatMindpower(), target:combatMentalResist()) then return end | |
915 | + if not who:checkHit(who:combatMindpower(), target:combatMentalResist()) then return end | |
916 | 916 | if eff == "stun" then target:setEffect(target.EFF_STUNNED, 3, {}) |
917 | 917 | elseif eff == "blind" then target:setEffect(target.EFF_BLINDED, 3, {}) |
918 | 918 | elseif eff == "pin" then target:setEffect(target.EFF_PINNED, 3, {}) | ... | ... |
... | ... | @@ -1790,10 +1790,12 @@ newEffect{ |
1790 | 1790 | activate = function(self, eff) |
1791 | 1791 | eff.tmpid = self:addTemporaryValue("counterstrike", 1) |
1792 | 1792 | eff.def = self:addTemporaryValue("combat_def", -eff.power) |
1793 | + eff.crit = self:addTemporaryValue("combat_crit_vulnerable", eff.crit_inc or 0) | |
1793 | 1794 | eff.dur = eff.dur * (self.global_speed or 1) |
1794 | 1795 | end, |
1795 | 1796 | deactivate = function(self, eff) |
1796 | 1797 | self:removeTemporaryValue("counterstrike", eff.tmpid) |
1797 | 1798 | self:removeTemporaryValue("combat_def", eff.def) |
1799 | + self:removeTemporaryValue("combat_crit_vulnerable", eff.crit) | |
1798 | 1800 | end, |
1799 | 1801 | } | ... | ... |
-
Please register or login to post a comment