From f1c82a5939f29accb542ca30fbc3a2638c26369d Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 15 May 2019 17:34:34 -0600 Subject: Fixed an off-by-one error in lightning mode. Actual range was 2 to 143, but should have been 2 to 150. --- spaghetti-monster/anduril/anduril.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c index 88aafbb..362dbeb 100644 --- a/spaghetti-monster/anduril/anduril.c +++ b/spaghetti-monster/anduril/anduril.c @@ -1005,7 +1005,7 @@ inline void lightning_storm_iter() { //rand_time = 1 << (pseudo_rand() % 7); rand_time = pseudo_rand() & 63; brightness = 1 << (pseudo_rand() % 7); // 1, 2, 4, 8, 16, 32, 64 - brightness += 1 << (pseudo_rand() & 0x03); // 2 to 80 now + brightness += 1 << (pseudo_rand() % 5); // 2 to 80 now brightness += pseudo_rand() % brightness; // 2 to 159 now (w/ low bias) if (brightness > MAX_LEVEL) brightness = MAX_LEVEL; set_level(brightness); -- cgit v1.2.3