blindness improves telepathy, and reduces to-hit
This commit is contained in:
parent
0208dcac4c
commit
1714b94397
5 changed files with 45 additions and 15 deletions
|
|
@ -63,7 +63,7 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
|
|||
if pos.x < max_x && pos.y < max_y && pos.x >= min_x && pos.y >= min_y {
|
||||
let mut draw = false;
|
||||
let mut fg = render.fg;
|
||||
let bg = if render.bg == (RGB { r: 0.0, g: 0.0, b: 0.0 }) {
|
||||
let mut bg = if render.bg == (RGB { r: 0.0, g: 0.0, b: 0.0 }) {
|
||||
crate::map::themes::get_tile_renderables_for_id(idx, &*map).2
|
||||
} else {
|
||||
render.bg
|
||||
|
|
@ -76,10 +76,15 @@ pub fn render_camera(ecs: &World, ctx: &mut Rltk) {
|
|||
// We don't darken BG, because get_tile_renderables_for_id handles this.
|
||||
}
|
||||
// Draw entities with minds within telepath range
|
||||
if map.telepath_tiles[idx] {
|
||||
let has_mind = minds.get(*ent);
|
||||
if let Some(_) = has_mind {
|
||||
draw = true;
|
||||
if !draw {
|
||||
if map.telepath_tiles[idx] {
|
||||
let has_mind = minds.get(*ent);
|
||||
if let Some(_) = has_mind {
|
||||
draw = true;
|
||||
if !map.revealed_tiles[idx] {
|
||||
bg = RGB::named(BLACK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Draw all props
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue