Skip to content
Snippets Groups Projects
Commit e2f9d127 authored by DarkGod's avatar DarkGod
Browse files

Wraithform now teleports if you end up in a wall

fix crash
parent 2005c3da
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,7 @@ newTalent{
info = function(self, t)
return ([[Turn into a wraith, allowing you to walk through walls (but not preventing suffocation) for %d turns.
Also increases your Defense and Armour by %d and %d, respectively.
If you are still in a wall when the effect ends you will randomly teleport.
The bonuses will increase with your Spellpower.]]):
format(t.getDuration(self, t), self:combatTalentSpellDamage(t, 5, 19), self:combatTalentSpellDamage(t, 5, 15))
end,
......
......@@ -954,6 +954,9 @@ newEffect{
self:removeTemporaryValue("can_pass", eff.tmpid)
self:removeTemporaryValue("combat_def", eff.defid)
self:removeTemporaryValue("combat_armor", eff.armid)
if not self:canMove(self.x, self.y) then
self:teleportRandom(self.x, self.y, 50)
end
end,
}
......
......@@ -204,6 +204,7 @@ static int particles_die(lua_State *L)
// Runs into main thread
static void particles_draw(particles_type *ps, float x, float y, float zoom)
{
if (!ps->alive || !ps->vertices || !ps->colors || !ps->texcoords) return;
GLfloat *vertices = ps->vertices;
GLfloat *colors = ps->colors;
GLshort *texcoords = ps->texcoords;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment