Bug - Fixed No navigation link for Holy MacGuffin

Veracity

Developer
Staff member
There are now two Holy MacGuffins: the original, and Ed's. When we find one, the UseLink decorator uses the following pattern to detect it:

Code:
	private static final Pattern ACQUIRE_PATTERN =
		Pattern.compile( "(You acquire|O hai, I made dis)([^<]*?)<b>(.*?)</b>(.*?)</td>", Pattern.DOTALL );
It then uses

Code:
				int itemId = ItemDatabase.getItemId( itemName, itemCount, false );
to translate between the name and the item.

That fails, since there are two Holy MacGuffins, and it finds the second one - Ed's.

I saved the HTML. Unsurprisingly, the acquisition is wrapped in a table with a "rel" string:

Code:
<table class="item" style="float: none" rel="id=2334&s=0&q=1&d=0&g=0&t=0&n=1&m=0&p=0&u=."><tr><td><img src="http://images.kingdomofloathing.com/itemimages/macguffin.gif" alt="Holy MacGuffin" title="Holy MacGuffin" class=hand onClick='descitem(302128482)'></td><td valign=center class=effect>You acquire an item: <b>Holy MacGuffin</b></td></tr></table>
We should use that to pick up the item id and count, much as we do when parsing results.

Use Links have the wrinkle that we want to detect bounty items - which I bet do not have rel strings.
 

Darzil

Developer
You are right on bounty items:

Code:
<tr><table><tr><td><img src=/images/itemimages/petridish.gif width=30 height=30></td><td align=center>You acquire a bounty item: <b>broken petri dish</b></td></table></tr>
 

Veracity

Developer
Staff member
Revision 15634 now finds items via "rel" string (if present) and effects via descid, just as in item/effect acquisition. This means that in a non-Ed run, we should recognize the old MacGuffin and generate the navigation link again. I'll test it when I get back to Standard runs, after I have done "enough" Ed runs.

I did not (yet) add a navigation link for the NEW MacGuffin in an Ed run. Should that go to Amun or to the Altar in the pyramid?

For that matter, shouldn't [council] links be [Amun] links if you are in an Ed run?
 

Darzil

Developer
[council] links should be [Amun] ones once you've visited him once, for ultimate style and points (questL02Larva = unstarted for the first visit)

I think the MacGuffin could link straight to Altar, but Amun gets you some more text, so maybe I'd be tempted to [Amun]

Good work on finding things by rel string, and the reordering of finding items/effects. Should be more robust for the future!
 
Top