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

ahah so neat!

git-svn-id: http://svn.net-core.org/repos/t-engine4@3692 51575b47-30f0-44d4-a5cc-537603b46e54
parent 39e21018
No related branches found
No related tags found
No related merge requests found
......@@ -265,6 +265,15 @@ function _M:makeMapObject(tiles, idx)
local mo = core.map.newObject(self.uid, 1, false, false, false, amo.display_x or 0, amo.display_y or 0, amo.display_w or 1, amo.display_h or 1, amo.display_scale or 1)
tex, texx, texy, pos_x, pos_y = tiles:get("", 0, 0, 0, 0, 0, 0, amo.image, false, false, true)
mo:texture(0, tex, false, texx, texy, pos_x, pos_y)
if amo.particle then
local args = amo.particle_args or {}
local e = engine.Particles.new(amo.particle, 1, args)
mo:displayCallback(function(x, y, w, h)
e:checkDisplay()
if e.ps:isAlive() then e.ps:toScreen(x + w / 2 + (args.x or 0), y + h / 2 + (args.y or 0), true, w / game.level.map.tile_w) end
return true
end)
end
cmo:chain(mo)
cmo = mo
end
......
......@@ -1746,7 +1746,13 @@ function _M:updateModdableTile()
i = self.inven[self.INVEN_CLOAK]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile):format("shoulder")..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
i = self.inven[self.INVEN_BODY]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile)..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
i = self.inven[self.INVEN_BODY]; if i and i[1] and i[1].moddable_tile2 then add[#add+1] = {image = base..(i[1].moddable_tile2)..".png"} end
i = self.inven[self.INVEN_MAINHAND]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile):format("right")..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
i = self.inven[self.INVEN_MAINHAND]; if i and i[1] and i[1].moddable_tile then
add[#add+1] = {image = base..(i[1].moddable_tile):format("right")..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1}
if i[1].moddable_tile_particle then
add[#add].particle = i[1].moddable_tile_particle[1]
add[#add].particle_args = i[1].moddable_tile_particle[2]
end
end
i = self.inven[self.INVEN_OFFHAND]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile):format("left")..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
i = self.inven[self.INVEN_HEAD]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile)..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
i = self.inven[self.INVEN_FEET]; if i and i[1] and i[1].moddable_tile then add[#add+1] = {image = base..(i[1].moddable_tile)..".png", display_y=i[1].moddable_tile_big and -1 or 0, display_h=i[1].moddable_tile_big and 2 or 1} end
......
......@@ -19,21 +19,27 @@
base_size = 64
return {
system_rotation = 0, system_rotationv = 0.5,
return { system_rotation = 0, system_rotationv = 0.5,generator = function()
base = 1000,
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
local r = rng.range(15, 20)
angle = { 0, 0 }, anglev = { 0, 0 }, anglea = { 0, 0 },
return {
life = 100,
size = size or 128, sizev = 0, sizea = 0,
life = { 100, 100 },
size = { 128, 128 }, sizev = {0, 0}, sizea = {0, 0},
x = 0, xv = 0, xa = 0,
y = 0, yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = {255, 255}, rv = {0, 0}, ra = {0, 0},
g = {255, 255}, gv = {0, 0}, ga = {0, 0},
b = {255, 255}, bv = {0, 0}, ba = {0, 0},
a = {255, 255}, av = {0, 0}, aa = {0, 0},
}, function(self)
r = 1, rv = 0, ra = 0,
g = 1, gv = 0, ga = 0,
b = 1, bv = 0, ba = 0,
a = 1, av = 0, aa = 0,
}
end }, function(self)
self.ps:emit(1)
end, 1, vortex or "shockbolt/object/artifact/swirl_effect", true
game/modules/tome/data/gfx/shockbolt/terrain/village_01.png

9.42 KiB

......@@ -53,6 +53,7 @@ The Sorcerers seem to have awakened its power.
-- This is not a simple artifact, it is a godslayer, show off!
resolvers.generic(function(e) e:addParticles(engine.Particles.new("godslayer_swirl", 1, {})) end),
moddable_tile_particle = {"godslayer_swirl", {size=64, x=-16}},
max_power = 200, power_regen = 1,
use_power = { name = "absorb energies", power = 200,
......
......@@ -261,12 +261,12 @@ end
newEntity{ base="PLAINS", define_as = "TOWN", notice = true, change_level=1, display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, nice_tiler=false }
newEntity{ base="TOWN", define_as = "TOWN_DERTH",
name = "Derth (Town)", add_mos = {{image="terrain/town1.png"}},
name = "Derth (Town)", add_mos = {{image="terrain/village_01.png"}},
desc = "A quiet town at the crossroads of the north",
change_zone="town-derth",
}
newEntity{ base="TOWN", define_as = "TOWN_LAST_HOPE",
name = "Last Hope (Town)", add_mos = {{image="terrain/town1.png"}},
name = "Last Hope (Town)", add_mos = {{image="terrain/village_01.png"}},
desc = "Capital city of the Allied Kingdoms ruled by King Tolak",
change_zone="town-last-hope",
}
......@@ -276,7 +276,7 @@ newEntity{ base="TOWN", define_as = "TOWN_ANGOLWEN",
change_zone="town-angolwen",
}
newEntity{ base="TOWN", define_as = "TOWN_ANGOLWEN_PORTAL",
name = "Hidden teleportation portal to Angolwen, the hidden city of magic", add_mos = {{image="terrain/town1.png"}},
name = "Hidden teleportation portal to Angolwen, the hidden city of magic",
display='&', color=colors.LIGHT_BLUE, back_color=colors.DARK_GREEN,
image="terrain/grass.png", add_displays = {mod.class.Grid.new{image="terrain/maze_teleport.png"}},
change_level_check = function() local p = game.party:findMember{main=true} if p:attr("forbid_arcane") then game.log("The portal fizzles.") return true end return false end,
......@@ -288,7 +288,7 @@ newEntity{ base="TOWN", define_as = "TOWN_SHATUR",
change_zone="town-shatur",
}
newEntity{ base="TOWN", define_as = "TOWN_ELVALA",
name = "Elvala (Town)", add_mos = {{image="terrain/town1.png"}},
name = "Elvala (Town)", add_mos = {{image="terrain/village_01.png"}},
desc = "Capital city of Shaloren lands, ruled by Aranion Gayaeil",
change_zone="town-elvala",
}
......@@ -299,13 +299,13 @@ newEntity{ base="TOWN", define_as = "TOWN_GATES_OF_MORNING",
change_zone="town-gates-of-morning",
}
newEntity{ base="TOWN", define_as = "TOWN_IRKKK",
name = "Irkkk (Town)", add_mos = {{image="terrain/town1.png"}},
name = "Irkkk (Town)", add_mos = {{image="terrain/village_01.png"}},
desc = "Yeek Wayist capital",
change_level = false,
-- change_zone="town-irrk",
}
newEntity{ base="TOWN", define_as = "TOWN_ZIGUR",
name = "Zigur (Town)", add_mos = {{image="terrain/town1.png"}},
name = "Zigur (Town)", add_mos = {{image="terrain/village_01.png"}},
desc = "Ziguranth main training ground",
change_zone="town-zigur",
}
......
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