Commit c17756b0232a92baa92da7cad3b9460e54fdf919
Merge branch 'conveyance_revision' into 'master'
Revise Conveyance 1. slightly reduce the mana cost of Phase Door, it's somewhat too much for a basic mobility talent; 2. remove the 35% failure rate of teleport, increase the mana cost, cooldown and reduce accuracy instead; 3. makes it possible to open vaults while Probability Travel is sustained btw, makes Body of Stone not break when bumping to attack others. See merge request !782
Showing
2 changed files
with
18 additions
and
21 deletions
... | ... | @@ -1390,29 +1390,34 @@ function _M:move(x, y, force) |
1390 | 1390 | end |
1391 | 1391 | end |
1392 | 1392 | |
1393 | + local can_move = true | |
1393 | 1394 | -- Sleeping? Do nothing.. |
1394 | 1395 | if not force and self:attr("sleep") and not self:attr("lucid_dreamer") then |
1395 | 1396 | game.logPlayer(self, "You are asleep and unable to move!") |
1396 | - -- Encased in ice, attack the ice | |
1397 | + can_move = false | |
1398 | + -- Encased in ice, attack the ice | |
1397 | 1399 | elseif not force and self:attr("encased_in_ice") then |
1398 | 1400 | self:attackTarget(self) |
1399 | 1401 | moved = true |
1400 | - -- Should we prob travel through walls ? | |
1402 | + can_move = false | |
1403 | + -- Should we prob travel through walls ? | |
1401 | 1404 | elseif not force and self:attr("prob_travel") and not self:attr("prob_travel_deny") and game.level.map:checkEntity(x, y, Map.TERRAIN, "block_move", self) then |
1402 | - moved = self:probabilityTravel(x, y, self:attr("prob_travel")) | |
1403 | - if self:attr("prob_travel_penalty") then | |
1405 | + moved = self:probabilityTravel(x, y, self:attr("prob_travel")) and (self.x ~= ox or self.y ~= oy) | |
1406 | + if moved and self:attr("prob_travel_penalty") then | |
1404 | 1407 | local d = core.fov.distance(ox, oy, self.x, self.y) |
1405 | 1408 | self:setEffect(self.EFF_PROB_TRAVEL_UNSTABLE, d * self:attr("prob_travel_penalty"), {}) |
1406 | 1409 | end |
1410 | + can_move = not moved | |
1411 | + end | |
1407 | 1412 | -- Never move but tries to attack ? ok |
1408 | - elseif not force and self:attr("never_move") then | |
1413 | + if not moved and can_move and not force and self:attr("never_move") then | |
1409 | 1414 | -- A bit weird, but this simple asks the collision code to detect an attack |
1410 | 1415 | if not game.level.map:checkAllEntities(x, y, "block_move", self, true) then |
1411 | 1416 | game.logPlayer(self, "You are unable to move!") |
1412 | 1417 | end |
1413 | - else | |
1414 | - moved = engine.Actor.move(self, x, y, force) | |
1418 | + can_move = false | |
1415 | 1419 | end |
1420 | + moved = moved or (can_move and engine.Actor.move(self, x, y, force)) | |
1416 | 1421 | if not force and moved and (self.x ~= ox or self.y ~= oy) and not self.did_energy then |
1417 | 1422 | local eff = self:hasEffect(self.EFF_CURSE_OF_SHROUDS) |
1418 | 1423 | if eff then eff.moved = true end |
... | ... | @@ -1475,7 +1480,7 @@ function _M:move(x, y, force) |
1475 | 1480 | t.curseFloor(self, t, x, y) |
1476 | 1481 | end |
1477 | 1482 | |
1478 | - if moved and self:isTalentActive(self.T_BODY_OF_STONE) and not self:attr("preserve_body_of_stone") then | |
1483 | + if moved and ox and oy and (ox ~= self.x or oy ~= self.y) and self:isTalentActive(self.T_BODY_OF_STONE) and not self:attr("preserve_body_of_stone") then | |
1479 | 1484 | self:forceUseTalent(self.T_BODY_OF_STONE, {ignore_energy=true}) |
1480 | 1485 | end |
1481 | 1486 | ... | ... |
... | ... | @@ -68,7 +68,7 @@ newTalent{ |
68 | 68 | require = spells_req1, |
69 | 69 | points = 5, |
70 | 70 | random_ego = "utility", |
71 | - mana = function(self, t) return self:attr("phase_door_force_precise") and 1 or 30 end, | |
71 | + mana = function(self, t) return self:attr("phase_door_force_precise") and 1 or 20 end, | |
72 | 72 | cooldown = function(self, t) return self:attr("phase_door_force_precise") and 3 or 12 end, |
73 | 73 | tactical = teleport_tactical, |
74 | 74 | getRange = function(self, t) return self:combatLimit(self:combatTalentSpellDamage(t, 10, 15), 40, 4, 0, 13.4, 9.4) end, -- Limit to range 40 |
... | ... | @@ -88,7 +88,7 @@ newTalent{ |
88 | 88 | _, _, _, tx, ty = self:canProject(tg, tx, ty) |
89 | 89 | if tx then |
90 | 90 | target = game.level.map(tx, ty, Map.ACTOR) |
91 | - if ai_target and target ~= aitarget then target = self end | |
91 | + if not self:playerControlled() and aitarget and target ~= aitarget then target = self end | |
92 | 92 | end |
93 | 93 | end |
94 | 94 | end |
... | ... | @@ -173,12 +173,12 @@ newTalent{ |
173 | 173 | require = spells_req2, |
174 | 174 | points = 5, |
175 | 175 | random_ego = "utility", |
176 | - mana = 20, | |
177 | - cooldown = 30, | |
176 | + mana = 30, | |
177 | + cooldown = 50, | |
178 | 178 | tactical = teleport_tactical, |
179 | 179 | getRange = function(self, t) return 100 + self:combatSpellpower(1) end, |
180 | 180 | range = function(self, t) return self:getTalentLevel(t) >= 4 and 10 or 0 end, -- for targeting enemies |
181 | - getRadius = function(self, t) return math.ceil(self:combatTalentLimit(t, 0, 19, 12)) end, -- Limit > 0 | |
181 | + getRadius = function(self, t) return math.round(self:combatTalentLimit(t, 5, 30, 18)) end, -- Limit > 5 | |
182 | 182 | minRange = 15, |
183 | 183 | |
184 | 184 | is_teleport = true, |
... | ... | @@ -242,13 +242,6 @@ newTalent{ |
242 | 242 | if not x then return nil end |
243 | 243 | _, _, _, x, y = self:canProject(tg, x, y) |
244 | 244 | range = radius |
245 | - -- Check LOS | |
246 | - -- Should this even be able to fizzle? The point of teleport is to go far away, i.e. out of line of sight, and teleport isn't particularly accurate anyway | |
247 | - if not self:hasLOS(x, y) and rng.percent(35 + (game.level.map.attrs(self.x, self.y, "control_teleport_fizzle") or 0)) then | |
248 | - game.logPlayer(self, "The targetted teleport fizzles and works randomly!") | |
249 | - x, y = self.x, self.y | |
250 | - range = t.getRange(self, t) | |
251 | - end | |
252 | 245 | local _ _, x, y = self:canProject(tg, x, y) |
253 | 246 | game.level.map:particleEmitter(target.x, target.y, 1, "teleport") |
254 | 247 | newpos = target:teleportRandom(x, y, range) |
... | ... | @@ -277,7 +270,6 @@ newTalent{ |
277 | 270 | return ([[Teleports you randomly within a large range (%d). |
278 | 271 | At level 4, it allows you to specify which creature to teleport. You need to bypass spell save with your spellpower to teleport hostile creatures. |
279 | 272 | At level 5, it allows you to choose the target area (radius %d). |
280 | - If the target area is not in line of sight, there is a chance the spell will partially fail and teleport the target randomly. | |
281 | 273 | Random teleports have a minimum range of %d. |
282 | 274 | The range will increase with your Spellpower.]]):tformat(range, radius, t.minRange) |
283 | 275 | end, | ... | ... |
-
Please register or login to post a comment