Defence towers: arrow (piercing), cannon (splash + knockback), magic (mana, slow, chain); 3 levels, repair by imps, heroes attack towers; torture/temple room tools prepared
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a1fe02ffa6
commit
903d6fb0f4
10 files changed
+708
-19
No files matched your search
+28
@@ -46,6 +46,8 @@ pub const D_RACK: u32 = 80;
|
||||
pub const I_ARROW: u32 = 81;
|
||||
pub const I_CANNON: u32 = 82;
|
||||
pub const I_MAGIC: u32 = 83;
|
||||
pub const T_TEMPLE: u32 = 84; // 4 variants
|
||||
pub const D_ALTAR: u32 = 88;
|
||||
|
||||
pub struct Gfx {
|
||||
pub atlas: Texture2D,
|
||||
@@ -391,6 +393,31 @@ fn gen_atlas() -> Image {
|
||||
Some(stones(x, y, v + 94, (52, 40, 44), (26, 16, 18), 10))
|
||||
});
|
||||
}
|
||||
// temple: dark marble with a glowing red-gold rune circle
|
||||
for v in 0..4u32 {
|
||||
cv.cell(T_TEMPLE + v, |x, y| {
|
||||
let (dx, dy) = (x as f32 - 7.5, y as f32 - 7.5);
|
||||
let d = (dx * dx + dy * dy).sqrt();
|
||||
if (5.0..6.0).contains(&d) {
|
||||
return Some(c(170, 70, 40));
|
||||
}
|
||||
if d < 1.5 {
|
||||
return Some(c(220, 150, 60));
|
||||
}
|
||||
let vein = ((x as f32 * 0.6 + (y as f32 * 0.7).sin() * 2.0 + v as f32 * 3.0) as i32) % 7 == 0;
|
||||
Some(if vein { c(70, 54, 66) } else { shade((44, 34, 46), (rnd(x, y, v + 95) * 10.0) as i32) })
|
||||
});
|
||||
}
|
||||
// altar with a flame
|
||||
cv.cell(D_ALTAR, |x, y| {
|
||||
if y >= 9 && (3..=12).contains(&x) {
|
||||
Some(if y == 9 { c(150, 140, 150) } else { c(100, 92, 104) })
|
||||
} else if y < 9 && y >= 3 && (x - 7).abs() + (y - 8).abs() / 2 <= 3 {
|
||||
Some(if (x + y) % 3 == 0 { c(255, 220, 80) } else { c(255, 120, 30) })
|
||||
} else {
|
||||
None
|
||||
}
|
||||
});
|
||||
// torture wheel
|
||||
cv.cell(D_RACK, |x, y| {
|
||||
let (dx, dy) = (x as f32 - 7.5, y as f32 - 7.0);
|
||||
@@ -743,6 +770,7 @@ impl Gfx {
|
||||
Kind::Portal => T_PORTALFLOOR + v,
|
||||
Kind::Gate => T_GATEFLOOR + v,
|
||||
Kind::Torture => T_TORTURE + v,
|
||||
Kind::Temple => T_TEMPLE + v,
|
||||
Kind::Tower => T_CLAIM + v,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user