diff --git a/game/engines/default/engine/Entity.lua b/game/engines/default/engine/Entity.lua index ffbbdd1dda1046800a0f45c3bfe5d81a7ee5bc7b..ee23581045604ae3e82ed5a7713dc8b8d9640ec8 100644 --- a/game/engines/default/engine/Entity.lua +++ b/game/engines/default/engine/Entity.lua @@ -1212,6 +1212,7 @@ function _M:loadList(file, no_default, res, mod, loaded) entity_mod = mod, loading_list = res, ignoreLoaded = function(v) res.ignore_loaded = v end, + applyAll = function(...) local args = {...} return function(e) for _, f in ipairs(args) do f(e) end end end, rarity = function(add, mult) add = add or 0; mult = mult or 1; return function(e) if e.rarity then e.rarity = math.ceil(e.rarity * mult + add) end end end, switchRarity = function(name) return function(e) if e.rarity then e[name], e.rarity = e.rarity, nil end end end, newEntity = function(t) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 6d388ffbe8b0f7316c0963c13c00a177e44736e5..cf77e2fc49fa39b184ac96a0dd14fa512eb85311 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -1597,8 +1597,9 @@ end -- @param y the coord of the teleportation -- @param dist the radius of the random effect, if set to 0 it is a precise teleport -- @param min_dist the minimum radius of of the effect, will never teleport closer. Defaults to 0 if not set +-- @param force_move_anim does a "quick movement" animation -- @return true if the teleport worked -function _M:teleportRandom(x, y, dist, min_dist) +function _M:teleportRandom(x, y, dist, min_dist, force_move_anim) -- can we teleport? if self:attr("encased_in_ice") then return end if self:attr("cant_teleport") then return end @@ -1649,7 +1650,11 @@ function _M:teleportRandom(x, y, dist, min_dist) -- Teleport local pos = poss[rng.range(1, #poss)] - self:move(pos[1], pos[2], true) + if force_move_anim then + self:forceMoveAnim(pos[1], pos[2]) + else + self:move(pos[1], pos[2], true) + end teleported = true if self.runStop then self:runStop(_t"teleported") end diff --git a/game/modules/tome/class/NPC.lua b/game/modules/tome/class/NPC.lua index 24c166e6c7a36176539209eaef76253638286145..b66f7307b0cf2b5b8ce3ee21bc7584071ebd54d9 100644 --- a/game/modules/tome/class/NPC.lua +++ b/game/modules/tome/class/NPC.lua @@ -79,7 +79,7 @@ function _M:act() if self.emote_random and self.x and self.y and game.level.map.seens(self.x, self.y) and rng.range(0, 999) < self.emote_random.chance * 10 then local e = util.getval(rng.table(self.emote_random)) if e then - local dur = util.bound(#e, 45, 90) + local dur = util.bound(#e, 80, 120) self:doEmote(e, dur) end end diff --git a/game/modules/tome/class/NicerTiles.lua b/game/modules/tome/class/NicerTiles.lua index e699dee4e72244dc8c6d8a455de0b5e1bb49f304..ee844edd8069edcbda5b4754143307da6ab7ee15 100644 --- a/game/modules/tome/class/NicerTiles.lua +++ b/game/modules/tome/class/NicerTiles.lua @@ -1261,6 +1261,22 @@ psitechwall = { method="walls", type="psitechwall", forbid={}, use_type=true, ex default4={add_displays={{image="terrain/psicave/psitech_ver_edge_left_01.png", display_x=-1}}, min=1, max=1}, default6={add_displays={{image="terrain/psicave/psitech_ver_edge_right_01.png", display_x=1}}, min=1, max=1}, }, +psitechfloor = { method="borders", type="psitech", forbid={lava=true, rock=true}, + default8={add_mos={{image="terrain/psicave/psitech_floor_trans3_2_%02d.png", display_y=-1}}, min=1, max=1}, + default2={add_mos={{image="terrain/psicave/psitech_floor_trans3_8_%02d.png", display_y=1}}, min=1, max=1}, + default4={add_mos={{image="terrain/psicave/psitech_floor_trans3_6_%02d.png", display_x=-1}}, min=1, max=1}, + default6={add_mos={{image="terrain/psicave/psitech_floor_trans3_4_%02d.png", display_x=1}}, min=1, max=1}, + + default1={z=3,add_mos={{image="terrain/psicave/psitech_floor_trans3_9_%02d.png", display_x=-1, display_y=1}}, min=1, max=1}, + default3={z=3,add_mos={{image="terrain/psicave/psitech_floor_trans3_7_%02d.png", display_x=1, display_y=1}}, min=1, max=1}, + default7={z=3,add_mos={{image="terrain/psicave/psitech_floor_trans3_3_%02d.png", display_x=-1, display_y=-1}}, min=1, max=1}, + default9={z=3,add_mos={{image="terrain/psicave/psitech_floor_trans3_1_%02d.png", display_x=1, display_y=-1}}, min=1, max=1}, + + default1i={add_mos={{image="terrain/psicave/psitech_floor_trans3_inner_1_%02d.png", display_x=-1, display_y=1}}, min=1, max=1}, + default3i={add_mos={{image="terrain/psicave/psitech_floor_trans3_inner_3_%02d.png", display_x=1, display_y=1}}, min=1, max=1}, + default7i={add_mos={{image="terrain/psicave/psitech_floor_trans3_inner_7_%02d.png", display_x=-1, display_y=-1}}, min=1, max=1}, + default9i={add_mos={{image="terrain/psicave/psitech_floor_trans3_inner_9_%02d.png", display_x=1, display_y=-1}}, min=1, max=1}, +}, } _M.generic_borders_defs = defs diff --git a/game/modules/tome/data/general/grids/psicave.lua b/game/modules/tome/data/general/grids/psicave.lua index 33ab12ae327a66df8779e11b35ff4eb468027c8c..a14738740e7bea053b5ca9b4c2f2630c7ea7c0d4 100644 --- a/game/modules/tome/data/general/grids/psicave.lua +++ b/game/modules/tome/data/general/grids/psicave.lua @@ -18,6 +18,7 @@ -- darkgod@te4.org local psitech_wall_editer = { method="sandWalls_def", def="psitechwall"} +local psitech_floor_editer = { method="borders_def", def="psitechfloor"} newEntity{ define_as = "PSYCAVEFLOOR", @@ -26,6 +27,7 @@ newEntity{ display = '.', color=colors.SANDY_BROWN, back_color=colors.DARK_UMBER, grow = "PSYCAVEWALL", nice_tiler = { method="replace", base={"PSYCAVEFLOOR", 100, 1, 5}}, + nice_editer = psitech_floor_editer, } for i = 1, 5 do newEntity{ base = "PSYCAVEFLOOR", define_as = "PSYCAVEFLOOR"..i, image = "terrain/psicave/psitech_floor_"..i.."_01.png"} end @@ -41,6 +43,7 @@ newEntity{ air_level = -10, dig = "PSYCAVEFLOOR", nice_editer = psitech_wall_editer, + nice_editer2 = psitech_floor_editer, nice_tiler = { method="replace", base={"PSYCAVEWALL", 100, 1, 9}}, } for i = 1, 9 do newEntity{ base = "PSYCAVEWALL", define_as = "PSYCAVEWALL"..i, image = "terrain/psicave/psitechwall_5_"..i..".png"} end @@ -61,6 +64,7 @@ newEntity{ is_door = true, door_opened = "PSYCAVE_DOOR_OPEN", dig = "FLOOR", + nice_editer = psitech_floor_editer, } newEntity{ define_as = "PSYCAVE_DOOR_OPEN", @@ -70,6 +74,7 @@ newEntity{ always_remember = true, is_door = true, door_closed = "PSYCAVE_DOOR", + nice_editer = psitech_floor_editer, } newEntity{ base = "PSYCAVE_DOOR", define_as = "PSYCAVE_DOOR_HORIZ", z=3, image = "terrain/psicave/psitech_door1.png", add_displays = {class.new{image="terrain/psicave/psitechwall_8_1.png", z=18, display_y=-1}}, door_opened = "PSYCAVE_DOOR_HORIZ_OPEN"} newEntity{ base = "PSYCAVE_DOOR_OPEN", define_as = "PSYCAVE_DOOR_HORIZ_OPEN", image = "terrain/psicave/psitech_floor_1_01.png", add_mos={{image="terrain/psicave/psitech_door1_open_backg.png"}}, add_displays = {class.new{image="terrain/psicave/psitech_door1_open.png", z=17}, class.new{image="terrain/psicave/psitechwall_8_1.png", z=18, display_y=-1}}, door_closed = "PSYCAVE_DOOR_HORIZ"} @@ -88,6 +93,7 @@ newEntity{ notice = true, always_remember = true, change_level = 1, + nice_editer = psitech_floor_editer, } newEntity{ define_as = "PSYCAVE_LADDER_UP", @@ -97,6 +103,7 @@ newEntity{ notice = true, always_remember = true, change_level = -1, + nice_editer = psitech_floor_editer, } newEntity{ define_as = "PSYCAVE_LADDER_UP_WILDERNESS", @@ -106,4 +113,5 @@ newEntity{ notice = true, change_level = 1, change_zone = "wilderness", + nice_editer = psitech_floor_editer, } diff --git a/game/modules/tome/data/general/npcs/snow-giant.lua b/game/modules/tome/data/general/npcs/snow-giant.lua index c4777779bc383b4f298ce7f8cdda79190462aadb..9bc0fd073e22e76b208758365e208c430afc54c6 100644 --- a/game/modules/tome/data/general/npcs/snow-giant.lua +++ b/game/modules/tome/data/general/npcs/snow-giant.lua @@ -109,7 +109,7 @@ newEntity{ base = "BASE_NPC_SNOW_GIANT", newEntity{ base = "BASE_NPC_SNOW_GIANT", define_as = "BURB_SNOW_GIANT", name = "Burb the snow giant champion", color=colors.VIOLET, unique=true, - resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_snow_giant_chieftain.png", display_h=2, display_y=-1}}}, + resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_ice_burb_the_snow_giant_champion.png", display_h=2, display_y=-1}}}, desc = _t[[A maddened, enraged snow giant that towers over his comrades. You've heard legends mentioning this particular monstrosity; they say that when he's not rampaging around frothing at the mouth, he sits, almost childlike, engraving stories and mysterious patterns on any flat stone surface he can find.]], level_range = {25, nil}, exp_worth = 10, autolevel = "warriormage", diff --git a/game/modules/tome/data/gfx/shockbolt/npc/giant_ice_burb_the_snow_giant_champion.png b/game/modules/tome/data/gfx/shockbolt/npc/giant_ice_burb_the_snow_giant_champion.png new file mode 100644 index 0000000000000000000000000000000000000000..416945976aa50ee0e1455644f59e1380554e4541 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/npc/giant_ice_burb_the_snow_giant_champion.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_1_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_1_01.png new file mode 100644 index 0000000000000000000000000000000000000000..831d05c9f393d609dc2227dd3a9987f0aa46b0e1 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_1_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_2_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_2_01.png new file mode 100644 index 0000000000000000000000000000000000000000..3897617f65b24e33bf23279c004ab0927a1be43e Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_2_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_3_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_3_01.png new file mode 100644 index 0000000000000000000000000000000000000000..6986ecb374226803c697d67d4d0192dbc0407a69 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_3_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_4_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_4_01.png new file mode 100644 index 0000000000000000000000000000000000000000..867a831e1bd8ef750e9f97e30569e3d8c6ce30bf Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_4_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_6_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_6_01.png new file mode 100644 index 0000000000000000000000000000000000000000..32045e1a1ee93bab66f451c70acf49998fdbcfb7 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_6_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_7_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_7_01.png new file mode 100644 index 0000000000000000000000000000000000000000..b6b51f07c8b73e67ee51a1aedd06168075ad6363 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_7_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_8_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_8_01.png new file mode 100644 index 0000000000000000000000000000000000000000..451f4ffc26971121d4c8c94d18156b295ead7967 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_8_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_9_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_9_01.png new file mode 100644 index 0000000000000000000000000000000000000000..94aaefbfcf8d00045e83427cc1f1ef040e03207a Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_9_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_1_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_1_01.png new file mode 100644 index 0000000000000000000000000000000000000000..731efb5a877a0e096a7a7791a669ddcaf0c05937 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_1_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_3_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_3_01.png new file mode 100644 index 0000000000000000000000000000000000000000..a6cef76becf495f45775cc154617bb10f3355836 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_3_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_7_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_7_01.png new file mode 100644 index 0000000000000000000000000000000000000000..4516e13e079d4ec850f08df9c7b9456ae2a7552d Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_7_01.png differ diff --git a/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_9_01.png b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_9_01.png new file mode 100644 index 0000000000000000000000000000000000000000..201ea2e9552dc3928c67e78d127d479c00dbab17 Binary files /dev/null and b/game/modules/tome/data/gfx/shockbolt/terrain/psicave/psitech_floor_trans3_inner_9_01.png differ