diff --git a/game/engines/default/engine/Map.lua b/game/engines/default/engine/Map.lua index 2c174c25db13365add3b388496f379e6881e832c..790357e699747ce0ba3ea9ce77e5f7c65b2787ef 100644 --- a/game/engines/default/engine/Map.lua +++ b/game/engines/default/engine/Map.lua @@ -28,7 +28,7 @@ local DamageType = require "engine.DamageType" module(..., package.seeall, class.make) --- The map vertical depth storage -zdepth = 18 +zdepth = 20 --- The place of a terrain entity in a map grid TERRAIN = 1 diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index 7edaac4724f359cefc6dd1587718ff2c2a49063c..38dccecc30fe2e1076670e467ae05357ac99af61 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -1112,8 +1112,8 @@ function _M:setupCommands() end end end end, [{"_g","ctrl"}] = function() if config.settings.cheat then - self.zone:addEntity(self.level, self.zone:makeEntityByName(self.level, "terrain", 'PORTAL'), "terrain", game.player.x,game.player.y-1) --- game:changeLevel(1,"town-irkkk") +-- self.zone:addEntity(self.level, self.zone:makeEntityByName(self.level, "terrain", 'PORTAL'), "terrain", game.player.x,game.player.y-1) + game:changeLevel(1,"town-irkkk") -- SET ui.Inventory into ShowStore & ShowInventory -- FINISH IRKKK & HUTS end end, diff --git a/game/modules/tome/data/general/grids/jungle_hut.lua b/game/modules/tome/data/general/grids/jungle_hut.lua index 932525e1fdba30f2c8503cb9434f6a72a4fd89d1..3ae8f594825824f29abdf08dc1e3d69e24595055 100644 --- a/game/modules/tome/data/general/grids/jungle_hut.lua +++ b/game/modules/tome/data/general/grids/jungle_hut.lua @@ -57,25 +57,25 @@ newEntity{ }, } -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_V_FULL1", add_displays={class.new{image="terrain/bamboo/hut_wall_full_hor_01.png"}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_V_FULL1", add_displays={class.new{z=16, image="terrain/bamboo/hut_wall_full_hor_01.png"}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_H_FULL", add_displays={class.new{image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1, z=16}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_H_FULL", add_displays={class.new{z=16, image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1, z=17}}} local decors = {"wall_decor_skin_b_01","wall_decor_skin_a_01","wall_decor_spears_01","wall_decor_sticks_01","wall_decor_mask_c_01","wall_decor_mask_b_01","wall_decor_mask_a_01","wall_decor_3_masks_01"} for i = 1, 8 do - newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_H_FULL"..i, add_displays={class.new{image="terrain/bamboo/hut_wall_bottom_hor_01.png", add_mos={{image="terrain/bamboo/"..decors[i]..".png"}}}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1, z=16}}} + newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_H_FULL"..i, add_displays={class.new{z=16, image="terrain/bamboo/hut_wall_bottom_hor_01.png", add_mos={{image="terrain/bamboo/"..decors[i]..".png"}}}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1, z=17}}} end -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_N_CROSS1", add_displays={class.new{image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_corner_vert_south_4_1_2_top_01.png", display_y=-1, z=16, add_mos={{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1}}}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_S_CROSS1", add_displays={class.new{image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_wall_full_hor_01.png", z=16, add_mos={{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1},{image="terrain/bamboo/hut_corner_vert_4_7_8_top_01.png", display_y=-1}}}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_N_CROSS1", add_displays={class.new{z=16, image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{z=17, image="terrain/bamboo/hut_corner_vert_south_4_1_2_top_01.png", display_y=-1, add_mos={{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1}}}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_S_CROSS1", add_displays={class.new{z=16, image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{z=17, image="terrain/bamboo/hut_wall_full_hor_01.png", add_mos={{image="terrain/bamboo/hut_wall_top_hor_01.png", display_y=-1},{image="terrain/bamboo/hut_corner_vert_4_7_8_top_01.png", display_y=-1}}}}} newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_E_CROSS1", add_displays={class.new{z=17, image="terrain/bamboo/hut_wall_full_hor_01.png"}, class.new{image="terrain/bamboo/wall_hor_divider_left_bottom_01.png", z=16, add_mos={{image="terrain/bamboo/wall_hor_divider_left_top_01.png", display_y=-1}}}}} newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_W_CROSS1", add_displays={class.new{z=17, image="terrain/bamboo/hut_wall_full_hor_01.png"}, class.new{image="terrain/bamboo/wall_hor_divider_right_bottom_01.png", z=16, add_mos={{image="terrain/bamboo/wall_hor_divider_right_top_01.png", display_y=-1}}}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_CROSS1", add_displays={class.new{image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", z=16, display_y=-1, add_mos={{image="terrain/bamboo/hut_wall_full_hor_01.png"},{image="terrain/bamboo/hut_corner_vert_4_7_8_top_01.png", display_y=-1}}}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_CROSS1", add_displays={class.new{z=17, image="terrain/bamboo/hut_wall_bottom_hor_01.png"}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", z=16, display_y=-1, add_mos={{image="terrain/bamboo/hut_wall_full_hor_01.png"},{image="terrain/bamboo/hut_corner_vert_4_7_8_top_01.png", display_y=-1}}}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_NE1", add_displays={class.new{image="terrain/bamboo/hut_corner_4_1_2_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_4_1_2_top_01.png", display_y=-1, z=16}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_NW1", add_displays={class.new{image="terrain/bamboo/hut_corner_6_3_2_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_6_3_2_top_01.png", display_y=-1, z=16}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_SE1", add_displays={class.new{image="terrain/bamboo/hut_corner_4_7_8_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_4_7_8_top_01.png", display_y=-1, z=16}}} -newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_SW1", add_displays={class.new{image="terrain/bamboo/hut_corner_8_9_6_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_8_9_6_top_01.png", display_y=-1, z=16}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_NE1", add_displays={class.new{z=17, image="terrain/bamboo/hut_corner_4_1_2_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_4_1_2_top_01.png", display_y=-1, z=16}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_NW1", add_displays={class.new{z=17, image="terrain/bamboo/hut_corner_6_3_2_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_6_3_2_top_01.png", display_y=-1, z=16}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_SE1", add_displays={class.new{z=17, image="terrain/bamboo/hut_corner_4_7_8_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_4_7_8_top_01.png", display_y=-1, z=16}}} +newEntity{base="BAMBOO_HUT_WALL", define_as="BHW_SW1", add_displays={class.new{z=17, image="terrain/bamboo/hut_corner_8_9_6_bottom_01.png"}, class.new{image="terrain/bamboo/hut_corner_8_9_6_top_01.png", display_y=-1, z=16}}} ----------------------------------------- -- Doors @@ -103,6 +103,6 @@ newEntity{ door_closed = "BAMBOO_HUT_DOOR", } newEntity{ base = "BAMBOO_HUT_DOOR", define_as = "BAMBOO_HUT_DOOR_HORIZ", add_displays = {class.new{image="terrain/bamboo/hut_wall_door_closed_hor_01.png", z=17}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", z=18, display_y=-1}}, door_opened = "BAMBOO_HUT_DOOR_HORIZ_OPEN"} -newEntity{ base = "BAMBOO_HUT_DOOR_OPEN", define_as = "BAMBOO_HUT_DOOR_HORIZ_OPEN", add_displays = {class.new{image="terrain/bamboo/hut_wall_door_open_hor_01.png", z=17}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", z=18, display_y=-1}}, door_closed = "BAMBOO_HUT_DOOR_HORIZ"} +newEntity{ base = "BAMBOO_HUT_DOOR_OPEN", define_as = "BAMBOO_HUT_DOOR_HORIZ_OPEN", add_displays = {class.new{image="terrain/bamboo/hut_door_hor_open_door_palm_leaves_01.png"}, class.new{image="terrain/bamboo/hut_door_hor_open_door_01.png", z=17}, class.new{image="terrain/bamboo/hut_wall_top_hor_01.png", z=18, display_y=-1}}, door_closed = "BAMBOO_HUT_DOOR_HORIZ"} newEntity{ base = "BAMBOO_HUT_DOOR", define_as = "BAMBOO_HUT_DOOR_VERT", add_displays = {class.new{image="terrain/bamboo/palm_door_closed_ver_01.png"}, class.new{image="terrain/bamboo/hut_wall_full_hor_01.png", z=18}}, door_opened = "BAMBOO_HUT_DOOR_OPEN_VERT", dig = "BAMBOO_HUT_DOOR_OPEN_VERT"} -newEntity{ base = "BAMBOO_HUT_DOOR_OPEN", define_as = "BAMBOO_HUT_DOOR_OPEN_VERT", add_displays = {class.new{image="terrain/bamboo/palm_door_open_bottom_ver_01.png"}, class.new{image="terrain/bamboo/palm_door_open_top_ver_01.png", z=18, display_y=-1, add_mos={{image="terrain/bamboo/hut_wall_full_hor_01.png"}}}}, door_closed = "BAMBOO_HUT_DOOR_VERT"} +newEntity{ base = "BAMBOO_HUT_DOOR_OPEN", define_as = "BAMBOO_HUT_DOOR_OPEN_VERT", add_displays = {class.new{image="terrain/bamboo/palm_door_open_bottom_ver_01.png"}, class.new{image="terrain/bamboo/palm_door_open_top_ver_01.png", z=18, display_y=-1, add_mos={{image="terrain/bamboo/hut_wall_full_hor_01.png"}, {image="terrain/bamboo/palm_door_open_bottom_ver_door_01.png"}}}}, door_closed = "BAMBOO_HUT_DOOR_VERT"} diff --git a/game/modules/tome/data/gfx/particles/eagle.lua b/game/modules/tome/data/gfx/particles/eagle.lua index 5e799163a6249c56533b5ddf1c1ff38ef15ebbd5..bcd52ef42349870ff6155c6ef37b4bedb4839df7 100644 --- a/game/modules/tome/data/gfx/particles/eagle.lua +++ b/game/modules/tome/data/gfx/particles/eagle.lua @@ -24,17 +24,24 @@ local g = 1 local b = 1 local a = 1 +local img +if not image then img = shadow and "shockbolt/npc/birds_eagle_shadow_01" or "shockbolt/npc/birds_eagle01" +else img = image end + +size = size or 64 +if type(size) == "table" then size = rng.range(size[1], size[2]) end + local first = true return { generator = function() return { trail = 0, - life = 300, - size = shadow and 32 or 64, sizev = 0, sizea = 0, + life = life or 300, + size = shadow and size / 2 or size, sizev = 0, sizea = 0, x = x, xv = 0, xa = 0, y = y, yv = 0, ya = 0, dir = dir, dirv = dirv, dira = 0, - vel = 20, velv = 0.02, vela = 0, + vel = vel or 5, velv = 0.02, vela = 0, r = r, rv = 0, ra = 0, g = g, gv = 0, ga = 0, @@ -49,4 +56,4 @@ function(self) end end, nil, -shadow and "shockbolt/npc/birds_eagle_shadow_01" or "shockbolt/npc/birds_eagle01" +img diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_01.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_01.png new file mode 100644 index 0000000000000000000000000000000000000000..4514bf79ad796ab0073b085ab9b0670a08941a5e Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_01.png differ diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_02.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_02.png new file mode 100644 index 0000000000000000000000000000000000000000..c039e802e4e706d13a4f51ca10bd9b8b72d1dcec Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_02.png differ diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_03.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_03.png new file mode 100644 index 0000000000000000000000000000000000000000..560846cf4a6bad6b3dc6fa9fbd51a0b7edd3929d Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_03.png differ diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_01.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_01.png new file mode 100644 index 0000000000000000000000000000000000000000..a33a054fa9c56e64c8e41b5a762be256fe50d2af Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_01.png differ diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_02.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_02.png new file mode 100644 index 0000000000000000000000000000000000000000..4cfd0b820b4682214a459e10a0b4f31f1ab096f5 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_02.png differ diff --git a/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_03.png b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_03.png new file mode 100644 index 0000000000000000000000000000000000000000..c03a7b7d84f312429d9881b8b8dba82915eeea89 Binary files /dev/null and b/game/modules/tome/data/gfx/particles_images/birds_tropical_shadow_03.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_01.png new file mode 100644 index 0000000000000000000000000000000000000000..ebb7e33987165cca3f3789a3714bb16a1674edc2 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_palm_leaves_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_palm_leaves_01.png new file mode 100644 index 0000000000000000000000000000000000000000..3ad1782ec0f3d5e5c855083a2ed6f7307c571e68 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/hut_door_hor_open_door_palm_leaves_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_01.png index b43270571a9fe247101854dbc5884079607571d1..8baa40523ecda4096e7f28cdcbb655ae09410050 100644 Binary files a/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_01.png and b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_door_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_door_01.png new file mode 100644 index 0000000000000000000000000000000000000000..76499e52356b301043e2f8921db16ac017308729 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/bamboo/palm_door_open_bottom_ver_door_01.png differ diff --git a/game/modules/tome/data/zones/town-irkkk/zone.lua b/game/modules/tome/data/zones/town-irkkk/zone.lua index d466741b7c4ab344879da8f750bb0e2b429edb73..75fcf62b0597c831df6c73b005d11623e38597ab 100644 --- a/game/modules/tome/data/zones/town-irkkk/zone.lua +++ b/game/modules/tome/data/zones/town-irkkk/zone.lua @@ -48,4 +48,26 @@ return { nb_object = {0, 0}, }, }, + + foreground = function(level, x, y, nb_keyframes) + -- Make cosmetic birds fly over + if nb_keyframes > 10 then return end + local Map = require "engine.Map" + if not level.bird then + if nb_keyframes > 0 and rng.chance(500 / nb_keyframes) then + local dir = -math.rad(rng.float(310, 340)) + local dirv = math.rad(rng.float(-0.1, 0.1)) + local y = rng.range(0, level.map.w / 2 * Map.tile_w) + local size = rng.range(32, 64) + level.bird = require("engine.Particles").new("eagle", 1, {x=0, y=y, dir=dir, dirv=dirv, size=size, life=800, vel=7, image="particles_images/birds_tropical_01"}) + level.bird_s = require("engine.Particles").new("eagle", 1, {x=0, y=y, shadow=true, dir=dir, dirv=dirv, size=size, life=800, vel=7, image="particles_images/birds_tropical_shadow_01"}) + end + else + local dx, dy = level.map:getScreenUpperCorner() -- Display at map border, always, so it scrolls with the map + if level.bird then level.bird.ps:toScreen(dx, dy, true, 1) end + if level.bird_s then level.bird_s.ps:toScreen(dx + 100, dy + 120, true, 1) end + if level.bird and not level.bird.ps:isAlive() then level.bird = nil end + if level.bird_s and not level.bird_s.ps:isAlive() then level.bird_s = nil end + end + end, }