diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index a596d94825bd467554715b38afd2cc20fdc4d584..6591643230a6fa524c832e380c83711f348c5a3a 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -235,6 +235,10 @@ local fovdist = {} for i = 0, 30 * 30 do fovdist[i] = math.max((20 - math.sqrt(i)) / 14, 0.6) end +local wild_fovdist = {} +for i = 0, 10 * 10 do + wild_fovdist[i] = math.max((5 - math.sqrt(i)) / 1.4, 0.6) +end function _M:playerFOV() -- Clean FOV before computing it @@ -245,10 +249,7 @@ function _M:playerFOV() if not self:attr("blind") then -- Compute both the normal and the lite FOV, using cache if game.zone.wilderness_see_radius then - self:computeFOV(self.sight or 20, "block_sight", function(x, y, dx, dy, sqdist) - game.level.map:apply(x, y, fovdist[sqdist]) - end, true, false, true) - self:computeFOV(game.zone.wilderness_see_radius, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:applyLite(x, y) end, true, true, true) + self:computeFOV(game.zone.wilderness_see_radius, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:applyLite(x, y, wild_fovdist[sqdist]) end, true, true, true) else self:computeFOV(self.sight or 20, "block_sight", function(x, y, dx, dy, sqdist) game.level.map:apply(x, y, fovdist[sqdist]) diff --git a/game/modules/tome/data/maps/wilderness/maj-eyal.lua b/game/modules/tome/data/maps/wilderness/maj-eyal.lua index d4e6d1330f817503707a2491955cf1ef4d8a254b..502d02b70ddd8e908e8562b56cfdddbe85e8f688 100644 --- a/game/modules/tome/data/maps/wilderness/maj-eyal.lua +++ b/game/modules/tome/data/maps/wilderness/maj-eyal.lua @@ -19,51 +19,51 @@ -- Maj'Eyal, the main continent -quickEntity('~', {show_tooltip=true, name='the sea of Maj', display='~', color=colors.DARK_BLUE, back_color=colors.BLUE, image="terrain/river.png", block_move=true, shader = "water", textures = { function() return _3DNoise, true end }, }) -quickEntity('-', {show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10, shader = "water", textures = { function() return _3DNoise, true end }, }) -quickEntity('*', {show_tooltip=true, name='lake of Nur', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10, shader = "water", textures = { function() return _3DNoise, true end }, }) +quickEntity('~', {always_remember = true, show_tooltip=true, name='the sea of Maj', display='~', color=colors.DARK_BLUE, back_color=colors.BLUE, image="terrain/river.png", block_move=true, shader = "water", textures = { function() return _3DNoise, true end }, }) +quickEntity('-', {always_remember = true, show_tooltip=true, name='river', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10, shader = "water", textures = { function() return _3DNoise, true end }, }) +quickEntity('*', {always_remember = true, show_tooltip=true, name='lake of Nur', display='~', color={r=0, g=80, b=255}, back_color=colors.BLUE, image="terrain/river.png", can_encounter=true, equilibrium_level=-10, shader = "water", textures = { function() return _3DNoise, true end }, }) -quickEntity('^', {show_tooltip=true, name='mountains', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true}) -quickEntity('m', {show_tooltip=true, name='Daikara', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/rocky_mountain.png", block_move=true}) -quickEntity('#', {show_tooltip=true, name='Iron Throne', display='^', color=colors.SLATE, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true}) +quickEntity('^', {always_remember = true, show_tooltip=true, name='mountains', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true}) +quickEntity('m', {always_remember = true, show_tooltip=true, name='Daikara', display='^', color=colors.LIGHT_UMBER, back_color=colors.UMBER, image="terrain/rocky_mountain.png", block_move=true}) +quickEntity('#', {always_remember = true, show_tooltip=true, name='Iron Throne', display='^', color=colors.SLATE, back_color=colors.UMBER, image="terrain/mountain.png", block_move=true}) -quickEntity('T', {show_tooltip=true, name='forest', force_clone=true, display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", resolvers.generic(function(e) e.add_displays = e:makeTrees("terrain/tree_alpha") end), block_move=true}) -quickEntity('t', {show_tooltip=true, name='cold forest', display='#', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/rocky_snowy_tree.png", block_move=true}) -quickEntity('_', {show_tooltip=true, name='burnt forest', display='#', color=colors.UMBER, back_color=colors.DARK_GREY, image="terrain/burnt-tree.png", block_move=true}) -quickEntity('v', {show_tooltip=true, name='old forest', force_clone=true, display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/grass_dark1.png", resolvers.generic(function(e) e.add_displays = e:makeTrees("terrain/tree_alpha") end), block_move=true}) +quickEntity('T', {always_remember = true, show_tooltip=true, name='forest', force_clone=true, display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", resolvers.generic(function(e) e.add_displays = e:makeTrees("terrain/tree_alpha") end), block_move=true}) +quickEntity('t', {always_remember = true, show_tooltip=true, name='cold forest', display='#', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/rocky_snowy_tree.png", block_move=true}) +quickEntity('_', {always_remember = true, show_tooltip=true, name='burnt forest', display='#', color=colors.UMBER, back_color=colors.DARK_GREY, image="terrain/burnt-tree.png", block_move=true}) +quickEntity('v', {always_remember = true, show_tooltip=true, name='old forest', force_clone=true, display='#', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/grass_dark1.png", resolvers.generic(function(e) e.add_displays = e:makeTrees("terrain/tree_alpha") end), block_move=true}) -quickEntity('.', {show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10}) -quickEntity('|', {show_tooltip=true, name='desert', display='.', color={r=203,g=189,b=72}, back_color={r=163,g=149,b=42}, image="terrain/sand.png", can_encounter="desert", equilibrium_level=-10}) +quickEntity('.', {always_remember = true, show_tooltip=true, name='plains', display='.', color=colors.LIGHT_GREEN, back_color=colors.DARK_GREEN, image="terrain/grass.png", can_encounter=true, equilibrium_level=-10}) +quickEntity('|', {always_remember = true, show_tooltip=true, name='desert', display='.', color={r=203,g=189,b=72}, back_color={r=163,g=149,b=42}, image="terrain/sand.png", can_encounter="desert", equilibrium_level=-10}) -quickEntity('"', {show_tooltip=true, name='polar cap', display='.', color=colors.LIGHT_BLUE, back_color=colors.WHITE, can_encounter=true, image="terrain/frozen_ground.png", equilibrium_level=-10}) -quickEntity('=', {show_tooltip=true, name='frozen sea', display=';', color=colors.LIGHT_BLUE, back_color=colors.WHITE, can_encounter=true, image="terrain/ice_shelf.png", equilibrium_level=-10}) +quickEntity('"', {always_remember = true, show_tooltip=true, name='polar cap', display='.', color=colors.LIGHT_BLUE, back_color=colors.WHITE, can_encounter=true, image="terrain/frozen_ground.png", equilibrium_level=-10}) +quickEntity('=', {always_remember = true, show_tooltip=true, name='frozen sea', display=';', color=colors.LIGHT_BLUE, back_color=colors.WHITE, can_encounter=true, image="terrain/ice_shelf.png", equilibrium_level=-10}) -quickEntity('{', {show_tooltip=true, name='the Charred Scar', display='.', color=colors.WHITE, back_color=colors.LIGHT_DARK, image="terrain/lava_floor.png", shader = "lava", can_encounter=true}) +quickEntity('{', {always_remember = true, show_tooltip=true, name='the Charred Scar', display='.', color=colors.WHITE, back_color=colors.LIGHT_DARK, image="terrain/lava_floor.png", shader = "lava", can_encounter=true}) -quickEntity('!', {show_tooltip=true, name='hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10}) -quickEntity('h', {show_tooltip=true, name='low hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10}) +quickEntity('!', {always_remember = true, show_tooltip=true, name='hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10}) +quickEntity('h', {always_remember = true, show_tooltip=true, name='low hills', display='^', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/hills.png", can_encounter=true, equilibrium_level=-10}) -quickEntity('&', {show_tooltip=true, name='cultivated fields', display=';', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/cultivation.png", can_encounter=true, equilibrium_level=-10}) +quickEntity('&', {always_remember = true, show_tooltip=true, name='cultivated fields', display=';', color=colors.GREEN, back_color=colors.DARK_GREEN, image="terrain/cultivation.png", can_encounter=true, equilibrium_level=-10}) -quickEntity('A', {show_tooltip=true, name="Ruins of Kor'Pul", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="ruins-kor-pul"}) -quickEntity('B', {show_tooltip=true, name="Passageway into the Trollshaws", display='>', color={r=0, g=255, b=0}, notice = true, change_level=1, change_zone="trollshaws"}) -quickEntity('C', {show_tooltip=true, name="A gate into a maze", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="maze"}) -quickEntity('D', {show_tooltip=true, name="A path into the Old Forest", display='>', color={r=0, g=255, b=155}, notice = true, change_level=1, change_zone="old-forest"}) -quickEntity('E', {show_tooltip=true, name="A mysterious hole in the beach", display='>', color={r=200, g=255, b=55}, notice = true, change_level=1, change_zone="sandworm-lair"}) -quickEntity('F', {show_tooltip=true, name="The entry to the old tower of Tol Falas",display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tol-falas"}) -quickEntity('G', {show_tooltip=true, name="Passageway into Daikara",display='>', color=colors.UMBER, notice = true, change_level=1, change_zone="daikara"}) -quickEntity('H', {show_tooltip=true, name='Charred Scar', display='>', color=colors.RED, back_color=colors.LIGHT_DARK, image="terrain/volcano1.png", notice = true, change_level=1, change_zone="mount-doom"}) +quickEntity('A', {always_remember = true, show_tooltip=true, name="Ruins of Kor'Pul", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="ruins-kor-pul"}) +quickEntity('B', {always_remember = true, show_tooltip=true, name="Passageway into the Trollshaws", display='>', color={r=0, g=255, b=0}, notice = true, change_level=1, change_zone="trollshaws"}) +quickEntity('C', {always_remember = true, show_tooltip=true, name="A gate into a maze", display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="maze"}) +quickEntity('D', {always_remember = true, show_tooltip=true, name="A path into the Old Forest", display='>', color={r=0, g=255, b=155}, notice = true, change_level=1, change_zone="old-forest"}) +quickEntity('E', {always_remember = true, show_tooltip=true, name="A mysterious hole in the beach", display='>', color={r=200, g=255, b=55}, notice = true, change_level=1, change_zone="sandworm-lair"}) +quickEntity('F', {always_remember = true, show_tooltip=true, name="The entry to the old tower of Tol Falas",display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tol-falas"}) +quickEntity('G', {always_remember = true, show_tooltip=true, name="Passageway into Daikara",display='>', color=colors.UMBER, notice = true, change_level=1, change_zone="daikara"}) +quickEntity('H', {always_remember = true, show_tooltip=true, name='Charred Scar', display='>', color=colors.RED, back_color=colors.LIGHT_DARK, image="terrain/volcano1.png", notice = true, change_level=1, change_zone="mount-doom"}) -quickEntity('1', {show_tooltip=true, name="Derth (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-derth"}) -quickEntity('2', {show_tooltip=true, name="Last Hope (Town)", desc="Capital city of the Allied Kingdoms ruled by King Tolak", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-last-hope"}) -quickEntity('4', {show_tooltip=true, name="Shatur (Town)", desc="Capital city of Thaloren lands, ruled by Nessilla Tantaelen", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true}) -quickEntity('5', {show_tooltip=true, name="Elvala (Town)", desc="Capital city of Shaloren lands, ruled by Aranion Gayaeil", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true}) +quickEntity('1', {always_remember = true, show_tooltip=true, name="Derth (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-derth"}) +quickEntity('2', {always_remember = true, show_tooltip=true, name="Last Hope (Town)", desc="Capital city of the Allied Kingdoms ruled by King Tolak", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-last-hope"}) +quickEntity('4', {always_remember = true, show_tooltip=true, name="Shatur (Town)", desc="Capital city of Thaloren lands, ruled by Nessilla Tantaelen", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true}) +quickEntity('5', {always_remember = true, show_tooltip=true, name="Elvala (Town)", desc="Capital city of Shaloren lands, ruled by Aranion Gayaeil", display='*', color={r=255, g=255, b=255}, back_color=colors.DARK_GREEN, image="terrain/town1.png", notice = true}) -- Angolwen is only know from the start to mages if game.player:knowTalent(game.player.T_TELEPORT_ANGOLWEN) then - quickEntity('3', {show_tooltip=true, name="Angolwen, the hidden city of magic", desc="Secret place of magic, set apart from the world to protect it.", display='*', color=colors.WHITE, back_color=colors.UMBER, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-angolwen"}) + quickEntity('3', {always_remember = true, show_tooltip=true, name="Angolwen, the hidden city of magic", desc="Secret place of magic, set apart from the world to protect it.", display='*', color=colors.WHITE, back_color=colors.UMBER, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-angolwen"}) else - quickEntity('3', 'b') + quickEntity('3', '^') end -- Load encounters for this map diff --git a/game/modules/tome/data/zones/wilderness-arda-fareast/zone.lua b/game/modules/tome/data/zones/wilderness-arda-fareast/zone.lua index b86b5d73a71af8200661c78caf271ff53cb24476..9b92c82a16f48a938c48bafdc1629781666abae4 100644 --- a/game/modules/tome/data/zones/wilderness-arda-fareast/zone.lua +++ b/game/modules/tome/data/zones/wilderness-arda-fareast/zone.lua @@ -23,10 +23,10 @@ return { max_level = 1, width = 100, height = 100, -- all_remembered = true, - all_lited = true, +-- all_lited = true, persistant = "memory", wilderness = true, --- wilderness_see_radius = 3, + wilderness_see_radius = 4, ambiant_music = "Far away.ogg", generator = { map = { diff --git a/game/modules/tome/data/zones/wilderness/zone.lua b/game/modules/tome/data/zones/wilderness/zone.lua index 9a83cde36e0e274d8ea97ad90e7540a1e33930c1..c0f316e0b52cdb0ae22e10747ecd40b4b3e9a1ad 100644 --- a/game/modules/tome/data/zones/wilderness/zone.lua +++ b/game/modules/tome/data/zones/wilderness/zone.lua @@ -22,11 +22,12 @@ return { level_range = {1, 1}, max_level = 1, width = 200, height = 130, - all_remembered = true, - all_lited = true, +-- all_remembered = true, +-- all_lited = true, persistant = "memory", ambiant_music = "Remembrance.ogg", wilderness = true, + wilderness_see_radius = 4, generator = { map = { class = "engine.generator.map.Static",