Feature - Implemented Mafia not recognizing Black Market shopkeeper was beat up

GValko

Member
In Way of the Surprising Fist, you can beat up the shopkeeper in order to save youirself about 600 turns of farming for enough meat to get the forged identification documents and black paint.

This also shuts down the Black Market for the remainder of your ascension. (Attempting to visit there after attacking him tells you "The Black Market is empty, because you beat up the guy who ran it.")

However, Mafia doesn't know this, and in the case that you try to restore MP and have black cherry soda it will attempt to buy it from there anyway. Post-ronin, it will fail and the n default to some guy in the mall. In-ronin it will just fail completely.

Can there be some way to have Mafia detect that the store just doesn't exist anymore.
 

slyz

Developer
r9796 adds the "lastWuTangDefeated" preference, which is set to "knownAscensions" when you defeat him.

Mafia knows that the Black Market is not available if "lastWuTangDefeated" is equal to "knownAscensions".

The last missing bit is parsing the "The Black Market is empty, because you beat up the guy who ran it." text. When Mafia thinks the Black Market is available, and submits a URL that starts with "store.php?whichstore=l", the text that KoL returns is "You don't belong in this store.". This can happen for reasons other than Wu Tang being defeated.

To see the "The Black Market is empty, because you beat up the guy who ran it." text, you have to visit "woods.php?action=emptybm". I just need to find out where that URL is processed by Mafia so I can add the check and set "lastWuTangDefeated" if needed.

For now, those who have already defeated Wu Tang need to check their number of ascensions ( "get knownAscensions" in the gCLI ) and set "lastWuTangDefeated" to that number ( "set lastWuTangDefeated = XXX" ).
 

slyz

Developer
With r9797, simply visiting the woods will set the lastWuTangDefeated if we notice the link to the empty Black Market.
 
Top