Commit 16c9a3b3c73513ae264a2e4f5d53faacade324fe

Authored by DarkGod
2 parents eff3c2aa 505cb52a

Merge branch 'Bugs' into 'master'

Bugs

This is all very exciting.

See merge request !481
... ... @@ -1107,6 +1107,14 @@ function _M:changeLevelReal(lev, zone, params)
1107 1107
1108 1108 -- place the player on the level
1109 1109 if self.zone.wilderness then -- Move back to old wilderness position
  1110 + local x, y = self.player.wild_x, self.player.wild_y
  1111 + local blocking_actor = self.level.map(x, y, engine.Map.ACTOR)
  1112 + if blocking_actor then
  1113 + -- This is mostly protecting the Angolwen Apprentice from misc stuff like leaving Timepoint Zero
  1114 + local newx, newy = util.findFreeGrid(x, y, 2, true, {[Map.ACTOR]=true})
  1115 + if newx and newy then blocking_actor:move(newx, newy, true)
  1116 + else blocking_actor:teleportRandom(x, y, 10) end
  1117 + end
1110 1118 self.player:move(self.player.wild_x, self.player.wild_y, true)
1111 1119 self.player.last_wilderness = self.zone.short_name
1112 1120 else
... ...
... ... @@ -214,6 +214,7 @@ However, I suggest you still carry it with you in case something manages to remo
214 214 {"That could be quite useful. Yes, please do it.", action=function(npc, player)
215 215 local cloak = player:findInAllInventoriesBy("define_as", "CLOAK_DECEPTION")
216 216 cloak.upgraded_cloak = true
  217 + player.permanent_undead_cloak = true -- Prevents the effect being removed from moving the flags
217 218 q.shertul_energy = q.shertul_energy - 10
218 219 q:setStatus(engine.Quest.COMPLETED, "permanent-cloak")
219 220 end},
... ...
... ... @@ -48,6 +48,7 @@ for x, yy in pairs(grids) do for y, _ in pairs(yy) do
48 48 end
49 49 g.always_remember = true
50 50 g.on_stand_safe = true
  51 + g:resolve()
51 52 game.zone:addEntity(game.level, g, "terrain", x, y)
52 53 end end
53 54 print("[EVENT] spellblaze-scar centered at ", x, y)
... ...
... ... @@ -91,7 +91,7 @@ newEntity{ base = "BASE_RUNE",
91 91 rarity = 300,
92 92 cost = 500,
93 93 inscription_kind = "protect",
94   - types = {"FIRE", "LIGHTNING", "COLD", "ACID", "MIND", "ARCANE", "BLIGHT", "NATURE", "TEMPORAL", "LIGHT", "DARK"},
  94 + types = {"FIRE", "LIGHTNING", "COLD", "ACID", "MIND", "ARCANE", "BLIGHT", "NATURE", "TEMPORAL", "LIGHT", "DARKNESS"},
95 95 inscription_data = {
96 96 cooldown = 18,
97 97 dur = 6,
... ...
... ... @@ -27,7 +27,7 @@ newTalent{
27 27 psi = 10,
28 28 range = 1,
29 29 requires_target = true,
30   - tactical = { ATTACK = { PHYSICAL = 2 } },
  30 + tactical = { ATTACK = { PHYSICAL = 2 }, DISABLE = {STUN = 2} },
31 31 is_melee = true,
32 32 target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end,
33 33 duration = function(self, t) return math.floor(self:combatTalentScale(t, 2, 6)) end,
... ...
... ... @@ -101,8 +101,17 @@ newTalent{
101 101
102 102 local tg = {type="beam", x=self.x, y=self.y, range=self.rad, selffire=self.summoner:spellFriendlyFire()}
103 103 self.summoner.__project_source = self
104   - self.summoner:project(tg, x, y, engine.DamageType.ARCANE_SILENCE, {dam=self.dam, chance=25}, nil)
105 104 self.summoner:project(tg, self.x, self.y, engine.DamageType.ARCANE, self.dam/10, nil)
  105 + self:project(tg, x, y, function(tx, ty)
  106 + -- In rare circumstances this can hit the same target 4-7 times so we need to sanity check it
  107 + local target = game.level.map(tx, ty, Map.ACTOR)
  108 + if not target then return end
  109 + if target.turn_procs.aether_beam and target.turn_procs.aether_beam > 2 then return end
  110 + target.turn_procs.aether_beam = target.turn_procs.aether_beam or 0
  111 + target.turn_procs.aether_beam = target.turn_procs.aether_beam + 1
  112 + DamageType:get(DamageType.ARCANE_SILENCE).projector(self, tx, ty, DamageType.ARCANE_SILENCE, {dam=self.dam, chance=25})
  113 + end)
  114 +
106 115 self.summoner.__project_source = nil
107 116 local _ _, x, y = self:canProject(tg, x, y)
108 117 game.level.map:particleEmitter(self.x, self.y, math.max(math.abs(x-self.x), math.abs(y-self.y)), "mana_beam", {tx=x-self.x, ty=y-self.y})
... ... @@ -122,7 +131,7 @@ newTalent{
122 131 local dam = t.getDamage(self, t)
123 132 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 it pierces.
124 133 The beam will also damage its epicenter each turn for 10%% of the damage (but it will not silence).
125   - The beam spins with incredible speed (1600%%).
  134 + The beam spins with incredible speed (1600%%) and can only hit the same target up to 3 times inbetween their turns.
126 135 The damage will increase with your Spellpower.]]):
127 136 format(damDesc(self, DamageType.ARCANE, dam))
128 137 end,
... ...
... ... @@ -2254,6 +2254,7 @@ newEffect{
2254 2254 if self.player then engine.Map:setViewerFaction(self.faction) end
2255 2255 end,
2256 2256 deactivate = function(self, eff)
  2257 + if self.permanent_undead_cloak then return end -- Make absolutely sure that players can't lose this effect
2257 2258 self.faction = self.old_faction_cloak
2258 2259 if self.descriptor and self.descriptor.race and self:attr("undead") then self.descriptor.fake_race = nil end
2259 2260 if self.descriptor and self.descriptor.subrace and self:attr("undead") then self.descriptor.fake_subrace = nil end
... ...