Five new rooms: prison, graveyard, guard post, arena, sacrifice altar; new creature: the revenant
- prison: captured heroes sit in cells apart from the torture chamber, do not defect and starve in time; the hand can move prisoners between cells and torture - graveyard: the fallen are buried there; after a while some rise as revenants (undead: no food, no sleep, life drain from level 5) - guard post: creatures hold the position and attack whatever comes into view - arena: creatures spar in pairs for fast, free experience, at the cost of bruises - sacrifice altar: creatures dropped on it are sacrificed; certain pairs bring a rare creature, otherwise a blessing (mood and mana) - researched in the library, campaign unlocks, textures, furniture, texts EN/DE, bestiary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2c8db33a69
commit
a58497e3a9
14 files changed
+606
-28
No files matched your search
@@ -143,11 +143,26 @@ pub fn draw_props_solid(g: &Game, cam: &Cam, t: f32) {
|
||||
Kind::ManaSpring => spring_basin(c, l),
|
||||
Kind::RuneChest => rune_chest(c, l),
|
||||
Kind::Forge if (x + z) % 2 == 0 => anvil(c, h, l),
|
||||
Kind::Prison => prison_bars(g, x, z, c, l),
|
||||
Kind::Graveyard if h % 4 == 0 => tombstone(c + vec3(0.25, 0.0, -0.25), h, l, 0.6),
|
||||
Kind::GuardPost if x % 2 == 0 && z % 2 == 0 => guard_brazier(c, l),
|
||||
Kind::Arena if h % 5 == 0 => arena_post(c, h, l),
|
||||
Kind::Altar if x % 3 == 1 && z % 3 == 1 => altar(c, l),
|
||||
Kind::Forge if h % 4 == 1 => furnace(c, l),
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
// graves: a mound and a stone, the fresher the darker the earth
|
||||
for gr in &g.graves {
|
||||
let (gx, gz) = xy(gr.tile);
|
||||
if gx < x0 || gx > x1 || gz < z0 || gz > z1 {
|
||||
continue;
|
||||
}
|
||||
let c = vec3(gx as f32 + 0.5, 0.0, gz as f32 + 0.5);
|
||||
cube(c + vec3(0.0, 0.05, 0.08), vec3(0.34, 0.1, 0.6), rgb(70, 52, 40, 0.7));
|
||||
tombstone(c + vec3(0.0, 0.0, -0.28), gr.tile as u32, 0.8, 1.0);
|
||||
}
|
||||
// creatures in chains: an iron post with chains to the creature
|
||||
for e in g.ents.iter().filter(|e| e.alive && e.chained) {
|
||||
if (e.x as i32) < x0 || (e.x as i32) > x1 || (e.y as i32) < z0 || (e.y as i32) > z1 {
|
||||
@@ -174,6 +189,59 @@ fn rune_chest(c: Vec3, l: f32) {
|
||||
cube(c + vec3(0.0, 0.22, 0.18), vec3(0.08, 0.1, 0.03), rgb(200, 170, 80, l));
|
||||
}
|
||||
|
||||
// prison: iron bars along the edges of the room (cell walls)
|
||||
fn prison_bars(g: &Game, x: i32, z: i32, c: Vec3, l: f32) {
|
||||
let iron = rgb(70, 70, 78, l);
|
||||
for (dx, dz) in [(0i32, -1i32), (1, 0), (0, 1), (-1, 0)] {
|
||||
let open = g.map.get(x + dx, z + dz).map_or(false, |t| t.kind != Kind::Prison && t.walkable());
|
||||
if !open {
|
||||
continue;
|
||||
}
|
||||
let edge = c + vec3(dx as f32 * 0.46, 0.0, dz as f32 * 0.46);
|
||||
let side = vec3(dz as f32, 0.0, dx as f32);
|
||||
for k in 0..5 {
|
||||
let o = (k as f32 - 2.0) * 0.2;
|
||||
cube(edge + side * o + vec3(0.0, 0.4, 0.0), vec3(0.04, 0.8, 0.04), iron);
|
||||
}
|
||||
cube(edge + vec3(0.0, 0.78, 0.0), side * 1.0 + vec3(0.05, 0.04, 0.05), iron);
|
||||
}
|
||||
}
|
||||
|
||||
fn tombstone(c: Vec3, h: u32, l: f32, size: f32) {
|
||||
let tilt = ((h >> 3) % 3) as f32 * 0.04 - 0.04;
|
||||
cube(c + vec3(tilt, 0.2 * size, 0.0), vec3(0.24, 0.4, 0.08) * size, rgb(110, 108, 112, l));
|
||||
cube(c + vec3(tilt, 0.42 * size, 0.0), vec3(0.16, 0.06, 0.08) * size, rgb(120, 118, 122, l));
|
||||
cube(c + vec3(tilt, 0.28 * size, 0.045), vec3(0.06, 0.16, 0.01) * size, rgb(60, 58, 62, l));
|
||||
}
|
||||
|
||||
// guard post: a brazier on a tripod (its fire glows in the glow pass) and a small banner
|
||||
fn guard_brazier(c: Vec3, l: f32) {
|
||||
for k in 0..3 {
|
||||
let a = k as f32 * 2.1;
|
||||
cube(c + vec3(a.cos() * 0.12, 0.2, a.sin() * 0.12), vec3(0.04, 0.4, 0.04), rgb(60, 60, 66, l));
|
||||
}
|
||||
cube(c + vec3(0.0, 0.44, 0.0), vec3(0.3, 0.08, 0.3), rgb(70, 66, 70, l));
|
||||
cube(c + vec3(0.35, 0.5, 0.0), vec3(0.03, 1.0, 0.03), rgb(90, 64, 40, l));
|
||||
cube(c + vec3(0.45, 0.82, 0.0), vec3(0.2, 0.28, 0.02), rgb(150, 24, 30, l));
|
||||
}
|
||||
|
||||
// arena: a wooden post with a training weapon leaning against it
|
||||
fn arena_post(c: Vec3, h: u32, l: f32) {
|
||||
let o = vec3(((h >> 4) % 3) as f32 * 0.2 - 0.2, 0.0, ((h >> 6) % 3) as f32 * 0.2 - 0.2);
|
||||
cube(c + o + vec3(0.0, 0.35, 0.0), vec3(0.1, 0.7, 0.1), rgb(110, 76, 44, l));
|
||||
cube(c + o + vec3(0.12, 0.35, 0.0), vec3(0.03, 0.6, 0.03), rgb(150, 150, 160, l));
|
||||
}
|
||||
|
||||
// sacrifice altar: a black block with a channel, candles at the corners (they glow)
|
||||
fn altar(c: Vec3, l: f32) {
|
||||
cube(c + vec3(0.0, 0.08, 0.0), vec3(1.6, 0.16, 1.2), rgb(36, 30, 38, l));
|
||||
cube(c + vec3(0.0, 0.32, 0.0), vec3(1.0, 0.32, 0.6), rgb(28, 24, 30, l));
|
||||
cube(c + vec3(0.0, 0.49, 0.0), vec3(0.8, 0.02, 0.1), rgb(90, 10, 20, l));
|
||||
for (dx, dz) in [(-0.7f32, -0.5f32), (0.7, -0.5), (0.7, 0.5), (-0.7, 0.5)] {
|
||||
cube(c + vec3(dx, 0.25, dz), vec3(0.06, 0.18, 0.06), rgb(220, 210, 190, l));
|
||||
}
|
||||
}
|
||||
|
||||
// forge: an anvil on a block, a hammer leaning against it
|
||||
fn anvil(c: Vec3, h: u32, l: f32) {
|
||||
let o = vec3(((h >> 3) % 3) as f32 * 0.08 - 0.08, 0.0, ((h >> 5) % 3) as f32 * 0.08 - 0.08);
|
||||
@@ -258,6 +326,18 @@ pub fn draw_props_glow(g: &Game, cam: &Cam, t: f32) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Kind::GuardPost if x % 2 == 0 && z % 2 == 0 => {
|
||||
let f = 0.8 + 0.2 * (t * 8.0 + k).sin();
|
||||
draw_sphere(c + vec3(0.0, 0.55, 0.0), 0.11 * f, None, Color::new(1.0, 0.55, 0.1, 0.95));
|
||||
draw_sphere(c + vec3(0.0, 0.6, 0.0), 0.25 * f, None, Color::new(1.0, 0.35, 0.05, 0.2));
|
||||
}
|
||||
Kind::Altar if x % 3 == 1 && z % 3 == 1 => {
|
||||
for (dx, dz) in [(-0.7f32, -0.5f32), (0.7, -0.5), (0.7, 0.5), (-0.7, 0.5)] {
|
||||
flame(c + vec3(dx, 0.38, dz), t, k + dx);
|
||||
}
|
||||
let p = 0.5 + 0.5 * (t * 1.5 + k).sin();
|
||||
draw_cube(c + vec3(0.0, 0.5, 0.0), vec3(0.8, 0.02, 0.1), None, Color::new(1.0, 0.1, 0.15, 0.4 + 0.5 * p));
|
||||
}
|
||||
Kind::Forge if h % 4 == 1 && (x + z) % 2 != 0 => {
|
||||
// furnace fire
|
||||
let f = 0.7 + 0.3 * (t * 9.0 + k).sin();
|
||||
|
||||
Reference in new issue
Block a user