From fd3f762a307b7b4db607d235aa9e5e8028c9f607 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 24 Dec 2018 16:33:41 +0100 Subject: [PATCH] westwall:: no West treasures close to the wall --- complex2.cpp | 2 +- game.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/complex2.cpp b/complex2.cpp index 8fcf4686..96fead65 100644 --- a/complex2.cpp +++ b/complex2.cpp @@ -123,7 +123,7 @@ namespace westwall { void switchTreasure(cell *c) { c->item = itNone; if(safety) return; - if(hrand(5000) < PT(100 + 2 * (kills[moAirElemental] + kills[moWindCrow]), 200) && notDippingFor(itWindstone) + if(hrand(5000) < PT(100 + 2 * (kills[moAirElemental] + kills[moWindCrow]), 200) && c->landparam >= 5 + items[itWest] && getGhostcount() < 2) c->item = itWest; else if(hrand(5000) < 20*PRIZEMUL) diff --git a/game.cpp b/game.cpp index 922425db..f84c2687 100644 --- a/game.cpp +++ b/game.cpp @@ -3152,6 +3152,9 @@ void bfs() { if(c2->item == itTrollEgg && c2->cpdist == distlimit && !shmup::on && c2->landparam && turncount-c2->landparam > 650) c2->item = itNone; + + if(c2->item == itWest && c2->cpdist == distlimit && items[itWest] >= c2->landparam + 4) + c2->item = itNone; if(c2->item == itMutant && c2->cpdist == distlimit && items[itMutant] >= c2->landparam) { c2->item = itNone;