Bug - Fixed [Patch] mmg_take_bet cannot recognize wins

Saklad5

Member
Due to a change in the win message for the MMG, mmg_take_bet currently interprets all results as a loss. This is because it determines the outcome of a taken bet by doing a regex search for a substring (previously) specific to winning, and assumes a loss if it cannot find it. The current win message does not match the regex pattern used, so every outcome is thought to be a loss.

I’ve fixed this by changing the regex pattern to recognize the new result text. I’ve tested it on both macOS and Ubuntu, and it works flawlessly. If this could be merged soon, I’d appreciate it.

View attachment MMG_take.patch
 
Last edited:

Darzil

Developer
Um, just took one of your bets (as it was lowest one to test), and got text recognised by the old regex but not yours:
Code:
<center><table><tr><td>You take the 200,000 bet from Saklad5.<center><table><tr><td><img src="/images/itemimages/meat.gif" height=30 width=30 alt="Meat"></td><td valign=center>You bet 200,000 Meat.</td></tr></table></center><br>You wipe cold sweat from your brow.  Nausea twists in your guts.  The game begins. "The coin doesn't matter," says the old man. "your stupid lizard brain will do what it has been programmed by evolution to do."<p>The coin is nonsense.  Fake, meaningless nonsense.  Stop doing this.<br><br>MEANINGLESS<center><table><tr><td><img src="/images/itemimages/meat.gif" height=30 width=30 alt="Meat"></td><td valign=center>You gain 399,600 Meat.</td></tr></table></center>

That was out of Ronin, in Ronin I got:
Code:
<center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You take the 400,000 bet from Saklad5. You look nervously at the wrinkled, decrepit old man, and he nods at you, indicating that Hagnk's has cleared you for an expenditure of 400,000 Meat.<br><br>You wipe cold sweat from your brow.  Nausea twists in your guts.  The game begins. "The coin doesn't matter," says the old man. "your stupid lizard brain will do what it has been programmed by evolution to do."<p>The coin is nonsense.  Fake, meaningless nonsense.  Stop doing this.<br><br>MEANINGLESS<br><br>"Congratulations," says the old man. "I'll pretend that this 799,200 Meat is worth being happy about."</td></tr></table></center>

So perhaps only the In-Ronin message has changed.
 
Last edited:

Darzil

Developer
r18735 adds the new message for in Ronin, without removing the old. I really want to test to see if message is different when betting In Ronin with money in Ronin, but no one is better low enough for that.

Ironically, as I never play the MMG, in my 8 tests, I only saw the win message !
 
Top