Skip to content
Snippets Groups Projects
Commit bbb18c47 authored by dg's avatar dg
Browse files

Reavers free melee blow only works on active talents, not sustains

Fix black entity icon in tooltips


git-svn-id: http://svn.net-core.org/repos/t-engine4@5499 51575b47-30f0-44d4-a5cc-537603b46e54
parent 09b6e1c8
No related branches found
No related tags found
No related merge requests found
......@@ -237,7 +237,9 @@ function _M:drawRow(row, row_i, nb_keyframes, x, y, total_w, total_h, loffset_x,
local one_by_white = 1/255
local tmp_total_h = total_h
for j = 1, #self.columns do
total_h = tmp_total_h
col = self.columns[j]
clip_y_start = 0
clip_y_end = 0
......@@ -317,11 +319,15 @@ function _M:drawRow(row, row_i, nb_keyframes, x, y, total_w, total_h, loffset_x,
else
row.cells[j].display_offset.x = 0
end
if self.text_shadow then row.cells[j]._tex:toScreenPrecise(column_w_offset + 1 + col.frame_sel.b4.w, y + 1 + center_h - frame_clip_y, col.width - 2 * col.frame_sel.b4.w, row.cells[j].h - (clip_y_start + clip_y_end), row.cells[j].display_offset.x * one_by_tex_w, (row.cells[j].display_offset.x + col.width - 2 * col.frame_sel.b4.w) * one_by_tex_w, clip_y_start * one_by_tex_h, (row.cells[j].h - clip_y_end) * one_by_tex_h, 0, 0, 0, self.text_shadow) end
row.cells[j]._tex:toScreenPrecise(column_w_offset + col.frame_sel.b4.w, y + center_h - frame_clip_y, col.width - 2 * col.frame_sel.b4.w, row.cells[j].h - (clip_y_start + clip_y_end), row.cells[j].display_offset.x * one_by_tex_w, (row.cells[j].display_offset.x + col.width - 2 * col.frame_sel.b4.w) * one_by_tex_w, clip_y_start * one_by_tex_h, (row.cells[j].h - clip_y_end) * one_by_tex_h, row.color[1] * one_by_white, row.color[2] * one_by_white, row.color[3] * one_by_white, 1.0 )
_, _, frame_clip_y, _ = util.clipOffset(0, center_h, total_w, total_h, loffset_x, loffset_y, clip_area)
total_h = tmp_total_h + center_h
if self.text_shadow then util.clipTexture(row.cells[j], column_w_offset + 1 + col.frame_sel.b4.w, y + 1 + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h, 0, total_h, row.cells[j].display_offset.x, loffset_y, { w = col.width - 2 * col.frame_sel.b4.w, h = clip_area.h}, 0, 0, 0, self.text_shadow) end
util.clipTexture(row.cells[j], column_w_offset + col.frame_sel.b4.w, y + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h, 0, total_h, row.cells[j].display_offset.x, loffset_y, { w = col.width - 2 * col.frame_sel.b4.w, h = clip_area.h })
else
if self.text_shadow then row.cells[j]._tex:toScreenPrecise(column_w_offset + 1 + col.frame_sel.b4.w, y + 1 + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h - (clip_y_start + clip_y_end), 0, row.cells[j].w * one_by_tex_w, clip_y_start * one_by_tex_h, (row.cells[j].h - clip_y_end) * one_by_tex_h, 0, 0, 0, self.text_shadow) end
row.cells[j]._tex:toScreenPrecise(column_w_offset + col.frame_sel.b4.w, y + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h - (clip_y_start + clip_y_end), 0, row.cells[j].w * one_by_tex_w, clip_y_start * one_by_tex_h, (row.cells[j].h - clip_y_end) * one_by_tex_h, row.color[1] * one_by_white, row.color[2] * one_by_white, row.color[3] * one_by_white, 1.0 )
_, _, frame_clip_y, _ = util.clipOffset(0, center_h, total_w, total_h, loffset_x, loffset_y, clip_area)
total_h = tmp_total_h + center_h
if self.text_shadow then util.clipTexture(row.cells[j], column_w_offset + 1 + col.frame_sel.b4.w, y + 1 + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h, 0, total_h, 0, loffset_y, clip_area, 0, 0, 0, self.text_shadow) end
util.clipTexture(row.cells[j], column_w_offset + col.frame_sel.b4.w, y + center_h - frame_clip_y, row.cells[j].w, row.cells[j].h, 0, total_h, 0, loffset_y, clip_area)
end
end
clip_y_start = clip_y_start + frame_clip_y
......
......@@ -754,7 +754,7 @@ function tstring:maxWidth(font)
elseif type(v) == "boolean" then max_w = math.max(max_w, line_max) line_max = 0 end
end
font:setStyle(old_style)
max_w = math.max(max_w, line_max)
max_w = math.max(max_w, line_max) + 1
return max_w
end
......@@ -1313,6 +1313,8 @@ end
function util.clipTexture(texture, x, y, w, h, total_w, total_h, loffset_x, loffset_y, dest_area, r, g, b, a)
if not texture then return 0, 0, 0, 0 end
x, y, w, h = math.floor(x), math.floor(y), math.floor(w), math.floor(h)
total_w, total_h, loffset_x, loffset_y = math.floor(total_w), math.floor(total_h), math.floor(loffset_x), math.floor(loffset_y)
dest_area.w , dest_area.h = math.floor(dest_area.w), math.floor(dest_area.h)
local clip_y_start = 0
local clip_y_end = 0
local clip_x_start = 0
......
......@@ -976,7 +976,7 @@ function _M:move(x, y, force)
self:breakPsionicChannel()
end
if not forced and moved and ox and oy and (ox ~= self.x or oy ~= self.y) and self:knowTalent(self.T_LIGHT_OF_FOOT) then
if not force and moved and ox and oy and (ox ~= self.x or oy ~= self.y) and self:knowTalent(self.T_LIGHT_OF_FOOT) then
self:incStamina(self:getTalentLevelRaw(self.T_LIGHT_OF_FOOT) * 0.2)
end
......@@ -3375,7 +3375,7 @@ function _M:preUseTalent(ab, silent, fake)
-- Special checks
if ab.on_pre_use and not (ab.mode == "sustained" and self:isTalentActive(ab.id)) and not ab.on_pre_use(self, ab, silent, fake) then return false end
if self:attr("use_only_arcane") and ab.type[1] ~= "spell/arcane" and ab.type[1] ~= "spell/aether" then return false end
-- Cant heal
......@@ -3437,7 +3437,7 @@ function _M:postUseTalent(ab, ret)
end
-- Free melee blow
if self:knowTalent(self.T_CORRUPTED_STRENGTH) and not self:attr("forbid_corrupted_strength_blow") then
if ab.mode ~= "sustained" and self:knowTalent(self.T_CORRUPTED_STRENGTH) and not self:attr("forbid_corrupted_strength_blow") then
local tgts = {}
for _, c in pairs(util.adjacentCoords(self.x, self.y)) do
local target = game.level.map(c[1], c[2], Map.ACTOR)
......
......@@ -933,7 +933,7 @@ newTalent{
local tg = self:getTalentTarget(t)
local x, y = self:getTarget(tg)
if not x or not y then return nil end
self:project(tg, x, y, DamageType.PHYSKNOCKBACK, {dist=3+self:getTalentLevelRaw(t), dam=self:spellCrit(12 + self:getStr(50, true) * self:getTalentLevel(t))}, {type="archery"})
self:project(tg, x, y, DamageType.PHYSKNOCKBACK, {dist=3+self:getTalentLevelRaw(t), dam=self:mindCrit(12 + self:getStr(50, true) * self:getTalentLevel(t))}, {type="archery"})
game:playSoundNear(self, "talents/ice")
return true
end,
......
......@@ -180,8 +180,7 @@ newTalent{
end,
info = function(self, t)
return ([[Fill yourself if aether forces, completly surrounding your body for %d turns.
While active you can only cast arcane or aether spells, your cooldown for them is divived by 3.
The damage will increase with your Spellpower.]]):
While active you can only cast arcane or aether spells, your cooldown for them is divived by 3.]]):
format(t.getNb(self, t))
end,
}
......@@ -189,7 +188,7 @@ newTalent{
newTalent{
name = "Pure Aether",
type = {"spell/aether",4},
require = spells_req_high4,
require = spells_req_high4,
points = 5,
mode = "sustained",
sustain_mana = 50,
......
No preview for this file type
......@@ -7,3 +7,4 @@
* sub-tile entities, like the spiders for the arachnomancer: split a tile in 16 (4x4)
* fun caster egos: apply/change tthe cross-tier effects o some things funky
* improve profile speed: if starting a game before it finishes generic stuff it wont register
......@@ -514,9 +514,11 @@ static int map_objects_display(lua_State *L)
* Render to buffer
***************************************************/
int moid = 3;
int dz = moid;
while (lua_isuserdata(L, moid))
{
map_object *m = (map_object*)auxiliar_checkclass(L, "core{mapobj}", moid);
map_object *dm;
int z;
if (m->shader) useShader(m->shader, 1, 1, 1, 1, 1, 1, 1, 1);
......@@ -526,19 +528,27 @@ static int map_objects_display(lua_State *L)
tglBindTexture(m->textures_is3d[z] ? GL_TEXTURE_3D : GL_TEXTURE_2D, m->textures[z]);
}
int dx = 0, dy = 0;
int dz = moid;
dm = m;
while (dm)
{
tglBindTexture(GL_TEXTURE_2D, dm->textures[0]);
int dx = 0, dy = 0;
texcoords[0] = m->tex_x[0]; texcoords[1] = m->tex_y[0];
texcoords[2] = m->tex_x[0] + m->tex_factorx[0]; texcoords[3] = m->tex_y[0];
texcoords[4] = m->tex_x[0] + m->tex_factorx[0]; texcoords[5] = m->tex_y[0] + m->tex_factory[0];
texcoords[6] = m->tex_x[0]; texcoords[7] = m->tex_y[0] + m->tex_factory[0];
texcoords[0] = m->tex_x[0]; texcoords[1] = m->tex_y[0];
texcoords[2] = m->tex_x[0] + m->tex_factorx[0]; texcoords[3] = m->tex_y[0];
texcoords[4] = m->tex_x[0] + m->tex_factorx[0]; texcoords[5] = m->tex_y[0] + m->tex_factory[0];
texcoords[6] = m->tex_x[0]; texcoords[7] = m->tex_y[0] + m->tex_factory[0];
vertices[0] = dx; vertices[1] = dy; vertices[2] = dz;
vertices[3] = w + dx; vertices[4] = dy; vertices[5] = dz;
vertices[6] = w + dx; vertices[7] = h + dy; vertices[8] = dz;
vertices[9] = dx; vertices[10] = h + dy; vertices[11] = dz;
glDrawArrays(GL_QUADS, 0, 4);
vertices[0] = dx; vertices[1] = dy; vertices[2] = dz;
vertices[3] = w + dx; vertices[4] = dy; vertices[5] = dz;
vertices[6] = w + dx; vertices[7] = h + dy; vertices[8] = dz;
vertices[9] = dx; vertices[10] = h + dy; vertices[11] = dz;
glDrawArrays(GL_QUADS, 0, 4);
dm = dm->next;
dz++;
}
if (m->shader) glUseProgramObjectARB(0);
......
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