Imps reinforce walls next to claimed ground (heroes avoid them, ~10x slower to break)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c508e232b0
commit
a1fe02ffa6
8 files changed
+197
-13
No files matched your search
+6
-3
@@ -14,7 +14,7 @@ pub const WALL_H: f32 = 0.95;
|
||||
const CHUNK: i32 = 16;
|
||||
pub const MAX_LIGHTS: usize = 24;
|
||||
const ATLAS_W: f32 = 256.0;
|
||||
const ATLAS_H: f32 = 80.0;
|
||||
const ATLAS_H: f32 = 96.0;
|
||||
const DISP_AMP: f32 = 0.11; // wall surface irregularity
|
||||
|
||||
// ------------------------------------------------------------------ camera
|
||||
@@ -482,7 +482,7 @@ fn build_chunk(map: &Map, amb: &[f32], cx: i32, cz: i32, gold_fill: f32, atlas:
|
||||
for z in cz * CHUNK..((cz + 1) * CHUNK).min(mh() as i32) {
|
||||
for x in cx * CHUNK..((cx + 1) * CHUNK).min(mw() as i32) {
|
||||
let t = map.t[idx(x, z)];
|
||||
let tex = Gfx::tile_tex(t.kind, t.owner == Owner::Player, t.owner == Owner::Hero, t.var);
|
||||
let tex = Gfx::tile_tex(t.kind, t.owner == Owner::Player, t.owner == Owner::Hero, t.var, t.reinforced);
|
||||
let (ua, ub) = cell_uv(tex);
|
||||
let (xf, zf) = (x as f32, z as f32);
|
||||
if !t.solid() {
|
||||
@@ -694,7 +694,7 @@ fn chunk_sig(map: &Map, cx: i32, cz: i32, fill_bucket: u8) -> u64 {
|
||||
Kind::Treasury => fill_bucket as u64,
|
||||
_ => 0,
|
||||
};
|
||||
(t.kind as u64) | (t.owner as u64) << 4 | (t.marked as u64) << 6 | extra << 8
|
||||
(t.kind as u64) | (t.owner as u64) << 5 | (t.marked as u64) << 7 | (t.reinforced as u64) << 8 | extra << 9
|
||||
}
|
||||
None => 0xff,
|
||||
};
|
||||
@@ -1268,6 +1268,7 @@ fn draw_overlay(map: &Map, ov: &Overlay, n: usize) {
|
||||
pub fn minimap_color(tile: &Tile) -> [u8; 4] {
|
||||
match tile.kind {
|
||||
Kind::Rock => [40, 40, 48, 255],
|
||||
Kind::Earth if tile.reinforced => [120, 70, 70, 255],
|
||||
Kind::Earth => [86, 60, 40, 255],
|
||||
Kind::Gold => [220, 180, 50, 255],
|
||||
Kind::Floor => match tile.owner {
|
||||
@@ -1283,5 +1284,7 @@ pub fn minimap_color(tile: &Tile) -> [u8; 4] {
|
||||
Kind::Core => [255, 60, 60, 255],
|
||||
Kind::Portal => [190, 90, 240, 255],
|
||||
Kind::Gate => [230, 230, 255, 255],
|
||||
Kind::Torture => [120, 40, 40, 255],
|
||||
Kind::Tower => [255, 140, 60, 255],
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user