OK. I have no idea why my patch program doesn't work well, but I manually applied the patch and examined everything.
A few comments:
1) The comment in coinmasters.txt in front of the fudge concoctions says "Things you can buy with A. W. O. L. commendations". I can see where you cut and pasted from.
However, it should be fudgecules...
2) FudgeWandRequest.accessible() has an error message: "You don't have any fugecules". That should be "fudgecules"
3) in CoinMasterRequest.buyStuff, there is no need to move
Code:
int itemId = StringUtilities.parseInt( itemMatcher.group( 1 ) );
up in the routine. Leave it where you need it, not in a place where it might get discarded unused.
Code:
int itemId = StringUtilities.parseInt( itemMatcher.group(1) );
String storageAction = data.getStorageAction();
boolean storage = storageAction != null && urlString.indexOf( storageAction ) != -1;
CoinMasterRequest.buyStuff( data, itemId, count, storage );
}
4) In CoinMasterRequest.completePurchase, do not insert an extra blank line in front of
Code:
AdventureResult tokenItem = data.getItem();
String tradeAll = data.getTradeAllAction();
I am not completely happy that we have duplicated code in CoinMasterRequest.completePurchase( final CoinmasterData data, final String urlString ) and CoinMasterRequest.completePurchase( final CoinmasterData data, final int itemId, final int count, final boolean storage ). In particular, we have to get tokenItem, property, items, item, name, prices, and price in both places, since the first one needs them to calculate the count, and the second one needs them to actually manipulate the property and storage and inventory lists. But, I don't see an easy solution. So, fine.
I tested by buying 1 fudge bunny and 1 fudge cube through the Coinmasters Frame. It worked fine. But, the session log says:
use 1 wand of fudge control
trading 1000 fudgecules for 1 fudge bunny
You acquire an item: fudge bunny
use 1 wand of fudge control
trading 343 fudgecules for 1 fudge cube
You acquire an item: fudge cube
Can we suppress the "use 1 wand of fudge control" messages?
Overall, nice job!