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

Sometimes the trollmire is flooded by the rain, leaving it filled with muddy...

Sometimes the trollmire is flooded by the rain, leaving it filled with muddy water and some aquatic life


git-svn-id: http://svn.net-core.org/repos/t-engine4@6660 51575b47-30f0-44d4-a5cc-537603b46e54
parent b7d6660e
No related branches found
No related tags found
No related merge requests found
......@@ -2036,6 +2036,6 @@ function _M:alternateZone(short_name, ...)
end
function _M:alternateZoneTier1(short_name, ...)
if not game.state:tier1Killed(1) then return "DEFAULT" end
if not game.state:tier1Killed(1) and not config.settings.cheat then return "DEFAULT" end
return self:alternateZone(short_name, ...)
end
\ No newline at end of file
game/modules/tome/data/gfx/shockbolt/npc/giant_troll_shax_the_slimy.png

11.6 KiB

......@@ -23,7 +23,11 @@ desc = function(self, who)
local desc = {}
desc[#desc+1] = "Explore the caves below the ruins of Kor'Pul and the Trollmire in search of treasure and glory!\n"
if self:isCompleted("trollmire") then
desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished Prox the Troll.#WHITE#"
if self:isCompleted("trollmire-flooded") then
desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished Shax the Troll.#WHITE#"
else
desc[#desc+1] = "#LIGHT_GREEN#* You have explored the Trollmire and vanquished Prox the Troll.#WHITE#"
end
else
desc[#desc+1] = "#SLATE#* You must explore the Trollmire and find out what lurks there and what treasures are to be gained!#WHITE#"
end
......
......@@ -38,3 +38,32 @@ newEntity{
pass_projectile = true,
nice_editer = grass_editer,
}
local grass_editer = { method="borders_def", def="grass"}
newEntity{
define_as = "BOGTREE",
type = "wall", subtype = "water",
name = "tree",
image = "terrain/tree.png",
display = '#', color=colors.LIGHT_GREEN, back_color=colors.DARK_BLUE,
always_remember = true,
can_pass = {pass_tree=1},
does_block_move = true,
block_sight = true,
dig = "SHALLOW_WATER",
nice_tiler = { method="replace", base={"BOGTREE", 100, 1, 20}},
}
for i = 1, 20 do newEntity{ base="BOGTREE", define_as = "BOGTREE"..i, image = "terrain/water_grass_5_1.png", add_displays = class:makeTrees("terrain/tree_alpha", 13, 9)} end
newEntity{ base="WATER_BASE",
define_as = "BOGWATER",
name = "bog water",
image="terrain/water_grass_5_1.png",
}
newEntity{ base="BOGWATER",
define_as = "BOGWATER_MISC",
nice_tiler = { method="replace", base={"BOGWATER_MISC", 100, 1, 7}},
}
for i = 1, 7 do newEntity{ base="BOGWATER_MISC", define_as = "BOGWATER_MISC"..i, add_mos={{image="terrain/misc_bog"..i..".png"}}} end
......@@ -17,16 +17,29 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/npcs/rodent.lua", rarity(5))
load("/data/general/npcs/vermin.lua", rarity(2))
load("/data/general/npcs/canine.lua", rarity(0))
load("/data/general/npcs/troll.lua", rarity(0))
load("/data/general/npcs/snake.lua", rarity(3))
load("/data/general/npcs/plant.lua", rarity(0))
load("/data/general/npcs/swarm.lua", rarity(3))
load("/data/general/npcs/bear.lua", rarity(2))
if not currentZone.is_flooded then
load("/data/general/npcs/rodent.lua", rarity(5))
load("/data/general/npcs/vermin.lua", rarity(2))
load("/data/general/npcs/canine.lua", rarity(0))
load("/data/general/npcs/troll.lua", rarity(0))
load("/data/general/npcs/snake.lua", rarity(3))
load("/data/general/npcs/plant.lua", rarity(0))
load("/data/general/npcs/swarm.lua", rarity(3))
load("/data/general/npcs/bear.lua", rarity(2))
load("/data/general/npcs/all.lua", rarity(4, 35))
load("/data/general/npcs/all.lua", rarity(4, 35))
else
load("/data/general/npcs/vermin.lua", rarity(2))
load("/data/general/npcs/troll.lua", rarity(0))
load("/data/general/npcs/snake.lua", rarity(3))
load("/data/general/npcs/plant.lua", rarity(0))
load("/data/general/npcs/swarm.lua", rarity(3))
load("/data/general/npcs/bear.lua", rarity(5))
-- Aquatics but not squids
load("/data/general/npcs/aquatic_critter.lua", function(e) if e.rarity and e.name and e.name:find("squid") then e.rarity=nil end end)
load("/data/general/npcs/all.lua", rarity(4, 35))
end
local Talents = require("engine.interface.ActorTalents")
......@@ -92,6 +105,69 @@ newEntity{ define_as = "TROLL_PROX",
end,
}
newEntity{ define_as = "TROLL_SHAX",
allow_infinite_dungeon = true,
type = "giant", subtype = "troll", unique = true,
name = "Shax the Slimy",
display = "T", color=colors.VIOLET, image="npc/giant_troll_prox_the_mighty.png",
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/giant_troll_shax_the_slimy.png", display_h=2, display_y=-1}}},
desc = [[A huge troll, he seems to be adapted to aquatic life.]],
killer_message = "and eaten raw",
level_range = {7, nil}, exp_worth = 2,
max_life = 150, life_rating = 15, fixed_rating = true,
max_stamina = 85,
stats = { str=20, dex=10, cun=8, mag=25, con=20 },
rank = 4,
size_category = 4,
infravision = 10,
instakill_immune = 1,
tier1 = true,
move_others=true,
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, TOOL=1 },
resolvers.equip{ {type="weapon", subtype="greatmaul", autoreq=true}, },
resolvers.equip{ {type="tool", subtype="misc", defined="LUCKY_FOOT", random_art_replace={chance=70}, autoreq=true}, },
resolvers.drops{chance=100, nb=1, {unique=true, not_properties={"lore"}} },
resolvers.drops{chance=100, nb=3, {tome_drops="boss"} },
resolvers.talents{
[Talents.T_WATER_BOLT]=3,
},
resolvers.inscriptions(1, {"movement infusion"}),
inc_damage = { all = -40 },
autolevel = "warrior",
ai = "tactical", ai_state = { talent_in=3, ai_move="move_astar", },
ai_tactic = resolvers.tactic"melee",
-- Drop the note when near death (but before death, so that Kill bill achievement is possible)
on_takehit = function(self, val)
if self.life - val < self.max_life * 0.4 then
local n = game.zone:makeEntityByName(game.level, "object", "PROX_NOTE")
if n then
self.on_takehit = nil
game.zone:addEntity(game.level, n, "object", self.x, self.y)
game.logSeen(self, "Shax staggers for a moment. A note seems to drop at his feet.")
end
end
return val
end,
on_die = function(self, who)
--force the note to drop if it hasn't dropped already (such as if he died via drowning)
if self.on_takehit then
local n = game.zone:makeEntityByName(game.level, "object", "PROX_NOTE")
if n then
self.on_takehit = nil
game.zone:addEntity(game.level, n, "object", self.x, self.y)
end
end
game.state:activateBackupGuardian("ALUIN", 2, 35, "... and we thought the trollmire was safer now!")
game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire")
game.player:resolveSource():setQuestStatus("start-allied", engine.Quest.COMPLETED, "trollmire-flooded")
end,
}
newEntity{ define_as = "TROLL_BILL",
allow_infinite_dungeon = true,
type = "giant", subtype = "troll", unique = true,
......
......@@ -17,6 +17,137 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local layout = game.state:alternateZoneTier1(short_name, {"FLOODED", 1})
if layout == "FLOODED" then
return {
name = "Trollmire",
level_range = {1, 5},
level_scheme = "player",
max_level = 3,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 65, height = 40,
-- all_remembered = true,
all_lited = true,
day_night = true,
tier1 = true,
tier1_escort = 2,
persistent = "zone",
-- Apply a greenish tint to all the map
color_shown = {0.8, 1, 0.6, 1},
color_obscure = {0.8*0.6, 1*0.6, 0.6*0.6, 0.6},
ambient_music = "Rainy Day.ogg",
min_material_level = function() return game.state:isAdvanced() and 3 or 1 end,
max_material_level = function() return game.state:isAdvanced() and 4 or 2 end,
is_flooded = true,
generator = {
map = {
class = "engine.generator.map.Forest",
edge_entrances = {4,6},
zoom = 7,
sqrt_percent = 30,
sqrt_percent2 = 25,
noise = "fbm_perlin",
floor2 = function() if rng.chance(20) then return "BOGWATER_MISC" else return "BOGWATER" end end,
floor = function() if rng.chance(20) then return "FLOWER" else return "GRASS" end end,
wall = "BOGTREE",
up = "GRASS_UP4",
down = "GRASS_DOWN6",
door = "BOGWATER",
road = "GRASS",
add_road = true,
nb_rooms = {0,0,0,1},
rooms = {"lesser_vault"},
lesser_vaults_list = {"honey_glade", "forest-ruined-building1", "forest-ruined-building2", "forest-ruined-building3", "forest-snake-pit", "mage-hideout"},
lite_room_chance = 100,
},
actor = {
class = "mod.class.generator.actor.OnSpots",
nb_npc = {20, 30},
filters = { {max_ood=2}, },
nb_spots = 2, on_spot_chance = 35,
guardian = "TROLL_SHAX",
guardian_spot = {type="guardian", subtype="guardian"},
},
object = {
class = "engine.generator.object.OnSpots",
nb_object = {6, 9},
nb_spots = 2, on_spot_chance = 80,
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {0, 0},
},
},
levels =
{
[1] = {
generator = { map = {
up = "GRASS_UP_WILDERNESS",
}, },
},
[3] = {
generator = { map = {
end_road = true,
end_road_room = "zones/prox",
force_last_stair = true,
down = "GRASS",
stew = "STEW",
}, },
},
-- Hidden treasure level
[4] = {
ambient_music = {"Rainy Day.ogg", "weather/rain.ogg"},
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/trollmire-treasure",
},
trap = { nb_trap = {0, 0} },
object = { nb_object = {3, 4} },
actor = { nb_npc = {2, 2} },
},
},
},
post_process = function(level)
-- Place a lore note on each level
game:placeRandomLoreObject("NOTE"..level.level)
-- Rain on bill
if level.level == 4 and config.settings.tome.weather_effects then
local Map = require "engine.Map"
level.foreground_particle = require("engine.Particles").new("raindrops", 1, {width=Map.viewport.width, height=Map.viewport.height})
end
-- Some clouds floating happily over the trollmire
game.state:makeWeather(level, 7, {max_nb=1, speed={0.5, 1.6}, shadow=true, alpha={0.23, 0.35}, particle_name="weather/grey_cloud_%02d"})
game.state:makeAmbientSounds(level, {
wind={ chance=120, volume_mod=1.5, pitch=0.9, files={"ambient/forest/wind1","ambient/forest/wind2","ambient/forest/wind3","ambient/forest/wind4"}},
bird={ chance=600, volume_mod=0.75, files={"ambient/forest/bird1","ambient/forest/bird2","ambient/forest/bird3","ambient/forest/bird4","ambient/forest/bird5","ambient/forest/bird6","ambient/forest/bird7"}},
cricket={ chance=1200, volume_mod=0.75, files={"ambient/forest/cricket1","ambient/forest/cricket2"}},
})
end,
foreground = function(level, x, y, nb_keyframes)
if not config.settings.tome.weather_effects or not level.foreground_particle then return end
level.foreground_particle.ps:toScreen(x, y, true, 1)
if nb_keyframes > 10 then return end
if nb_keyframes > 0 and rng.chance(400 / nb_keyframes) then local s = game:playSound("ambient/horror/ambient_horror_sound_0"..rng.range(1, 6)) if s then s:volume(s:volume() * 1.5) end end
end,
on_enter = function(lev, old_lev, newzone)
if lev == 3 and game.player:hasQuest("trollmire-treasure") then
game.player:hasQuest("trollmire-treasure"):enter_level3()
end
end,
}
elseif layout == "DEFAULT" then
return {
name = "Trollmire",
level_range = {1, 5},
......@@ -141,3 +272,5 @@ return {
end
end,
}
end
\ No newline at end of file
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