dev menu, buffs

This commit is contained in:
anton.gurov
2019-11-12 15:57:20 +03:00
parent 7837051e80
commit 6197e3be8e
9 changed files with 94 additions and 76 deletions

View File

@ -78,7 +78,7 @@ Pre-Computed Visiblity Trees on RogueBasin
Adam Milazzo's FOV Method Roundup where a similar method described as 'permissive' is detailed
*/
const MIN_LIT_TO_BE_VISIBLE = 0
const MIN_LIT_TO_BE_VISIBLE = 3
const MIN_WALL_LIT_TO_BE_VISIBLE = 4
var errNotFoundCell = errors.New("Cell not found")
@ -264,8 +264,8 @@ func (ps *precomputedShade) ComputeFov(level *gamemap.Level, initCoords types.Co
for _, cell := range ps.CellList {
//fmt.Printf("\n coords: %v, distance: %f, lit: %d", cell.Coords, cell.distance, cell.lit)
cs, err := ps.toLevelCoords(level, initCoords, cell.Coords)
//if cell.lit > 0 && cell.lit > MIN_LIT_TO_BE_VISIBLE {
if cell.lit > 0 && cell.lit / (ps.MaxTorchRadius - int(cell.distance -1)) > MIN_LIT_TO_BE_VISIBLE {
if cell.lit > 0 && cell.lit > MIN_LIT_TO_BE_VISIBLE {
//if cell.lit > 0 && cell.lit / (ps.MaxTorchRadius - int(cell.distance - 0.4) - 1) > MIN_LIT_TO_BE_VISIBLE {
if err != nil {
continue
}