New Content - Implemented New path "Actually Ed the Undying"

heeheehee

Developer
Staff member
I'm not sure if it actually IS an "issue".

As Ed, I can get 3 pirate insults or 3 flyers per monster. Used to be, those were "one per encounter". Now, true - damage and deleveling you do to the monster during each fight persists, so they are not quite like brand-new encounters.

I could argue that you actually ARE having 3 encounters with the same monster, separated by sidetrips into the underworld.

You say that the current behavior is "incorrect". I'd be interested in understanding why you believe that. How is the current behavior making your life more difficult? (Or, alternatively, if incrementing the counter just once, regardless of how many trips to the underworld you take, is more "accurate", how would counting it the way you propose improve your life?)

Perhaps a stronger argument is that Pantsgiving charges on these separate fights, which points to how they work internally.

(If it's not clear, I am agreeing with you. This does potentially reduce the utility of the Encounter Listings for me, though.)
 

Darzil

Developer
Sounds like it's counting fights perfectly, but you were after how many fights you'd won, which it doesn't help with.
 
feature request:

A preference that indicates whether Lash of the Cobra has been used in this "set" of fights yet. False by default, set true when Lash is used, persists through Underworld visits, reset to false at the same time that _edDefeats is reset to 0.

(I haven't come up with a different way to tell whether I've Lashed, since the skill becomes available again after passing through the Underworld.)
 

Magus_Prime

Well-known member
With r15635 KoLmafia, when gaining "Gift of the Cat" after a combat, isn't recognizing that until I visit the character sheet.
 

Ensiferum

Member
Did Kolmafia actually register acquiring the skills in combat at any point?

It never has for me, so whenever I get Gift of the Cat I've been using "refresh session" and only after that it starts showing the bonus.
 

Veracity

Developer
Staff member
Did Kolmafia actually register acquiring the skills in combat at any point?

It never has for me, so whenever I get Gift of the Cat I've been using "refresh session" and only after that it starts showing the bonus.
This is from parsing the fight response:

Code:
				if ( text.startsWith( "You acquire a skill" ) )
				{
					TagNode bnode = node.findElementByName( "b", true );
					if ( bnode != null )
					{
						String skill = bnode.getText().toString();
						ResponseTextParser.learnSkill( skill );
					}
					continue;
				}
So, something is different than we expect.

Ah. That went right by me. I'll take a look at it.

Edit: Unfortunately, Bale did not give the whole page; he just provided the WINWINWIN section. If it were something other than a fight, that would be enough, but, as you can see from the code I cited, we do fights differently.

I'll see if I can graft it into the saved HTML for another fight and debug it...
 
Last edited:

Crowther

Active member
Edit: Unfortunately, Bale did not give the whole page; he just provided the WINWINWIN section. If it were something other than a fight, that would be enough, but, as you can see from the code I cited, we do fights differently.

I'll see if I can graft it into the saved HTML for another fight and debug it...
Hopefully I did this right. Here's the full HTML source for the frame were I gain the cat's gift.
Code:
<html><head>
<script language=Javascript>
<!--
if (parent.frames.length == -1) location.href="game.php";
top.charpane.location.href="charpane.php";
//-->
</script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/keybinds.min.2.js"></script>
<script language=Javascript src="//images.kingdomofloathing.com/scripts/window.20111231.js"></script>
<script language="javascript">function chatFocus(){if(top.chatpane.document.chatform.graf) top.chatpane.document.chatform.graf.focus();}
if (typeof defaultBind != 'undefined') { defaultBind(47, 2, chatFocus); defaultBind(190, 2, chatFocus);defaultBind(191, 2, chatFocus); defaultBind(47, 8, chatFocus);defaultBind(190, 8, chatFocus); defaultBind(191, 8, chatFocus); }</script><script language=Javascript src="//images.kingdomofloathing.com/scripts/jquery-1.3.1.min.js"></script>
<script type="text/javascript">
jQuery(function ($) {
	$(document).ready(function() {
		throb_out();
	});
});
function throb_out() {
	jQuery(function ($) {
		$('.throbtext').fadeTo(Math.random()*400,.5);
	})
	setTimeout(throb_in,400+Math.random()*200);	
}
function throb_in() {
	jQuery(function ($) {
		$('.throbtext').fadeTo(Math.random()*400,Math.min(.95,Math.random()+.5));
		setTimeout(throb_out,400+Math.random()*200);	
		//setTimeout(throb_out,1200);	
	})
}
</script><script language="javascript" src="/images/scripts/core.js"></script><script>
var onturn = 8;
function newpic(pic, name, width, height)
{
   var h = height || 100;
   var w = width || 100;
   mpic = getObj('monpic');
   mnam = getObj('monname');
   mpic.src=pic;
   mpic.width=w;
   mpic.height=h;
   mnam.innerHTML=name;
}

var waking = false;

function killforms(sub) {
	sub.disabled = true;
	var is = document.getElementsByTagName("input");
	for (i=0; i < is.length; i++) {
		if (is[i].getAttribute('type') == 'submit') { is[i].disabled = true; }
	}

	if (waking) { clearTimeout(waking); }
	waking = setTimeout(function () {
		for (i=0; i < is.length; i++) {
			if (is[i].getAttribute('type') == 'submit') { is[i].disabled = false; }
		}
	}, 3000);

	sub.form.submit();

	return true;
}


</script>
<link rel="stylesheet" type="text/css" href="//images.kingdomofloathing.com/styles.20150113.css">
<style type='text/css'>
.faded {
	zoom: 1;
	filter: alpha(opacity=35);
	opacity: 0.35;
	-khtml-opacity: 0.35; 
    -moz-opacity: 0.35;
}
</style>

<script src="http://code.jquery.com/jquery-1.9.1.js"></script><script src="/stationarybuttons.1.js"></script><link rel="stylesheet" type="text/css" href="/stationarybuttons.1.css"><script src="/hotkeys.js"></script><script language="Javascript" src="/basics.js"></script><link rel="stylesheet" href="/basics.1.css" /></head>

<body onkeyup="handleCombatHotkey(event,false);" onkeydown="handleCombatHotkey(event,true);" ><div id="page"><div id="mafiabuttons"><center><table width="95%"><tr><td align=left><div id="btnwrap"><input type="button" onClick="document.location.href='adventure.php?snarfblat=132';void(0);" value="again" id="defaultButton"> </div></td><td align=right valign=top><select id="hotkeyViewer" onchange="updateCombatHotkey();"><option>- update hotkeys -</option><option>0: </option><option>1: </option><option>2: </option><option>3: </option><option>4: </option><option>5: </option><option>6: </option><option>7: </option><option>8: </option><option>9: </option></select></td></tr></table></center></div><div class='content' id='content_'><div id='effdiv' style='display: none;'></div><div>
<center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Combat: Round 8, Fight 0!</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td><center><table><tr><td><div id=monsterpic style='position: relative;'>	<img id='monpic' src="/images/adventureimages/warhipc.gif" width=100 height=100></div></td><td valign=center>You're fighting <span class="elementstench" id='monname'>a War Hippy Rigger</span><font size=2 color=gray><br />HP: 222, Atk: 212, Def: 194, Type: hippy<br />Drops: bullet-proof corduroys (10), hippy protest button (10), lead pipe (10), reinforced beaded headband (10), round purple sunglasses (10), water pipe bomb (5), wicker shield (5)</font></td><td width=30></td><td><table><tr><td width=30><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Enemy's Attack Power" title="Enemy's Attack Power"></td><td width=50 valign=center align=left><b><font size=+2>121</font></b></td><td><img src=/images/itemimages/hippyflavor.gif alt="This monster is a Hippy" title="This monster is a Hippy"></td></tr><tr><td width=30><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Enemy's Defense" title="Enemy's Defense"></td><td width=50 valign=center align=left><b><font size=+2>103</font></b></td><td><img src=/images/itemimages/stench.gif width=30 height=30 alt="This monster is Stinky.  Stench is weak against Cold and Sleaze." title="This monster is Stinky.  Stench is weak against Cold and Sleaze."></td></tr><tr><td width=30><img src=/images/itemimages/hp.gif width=30 height=30 alt="Enemy's Hit Points" title="Enemy's Hit Points"></td><td width=50 valign=center align=left><b><font size=+2>0</font></b></td><td><img src=/images/itemimages/watch.gif alt="Initiative +40%" title="Initiative +40%"></td></tr></table></td><td width=50></td><td valign=center><img src=/images/otherimages/friarplants/plant2.gif alt="Rutabeggar (+25% Item drops)" title="Rutabeggar (+25% Item drops)"></td><td valign=center><img src=/images/otherimages/friarplants/plant9.gif alt="Lettuce Spray (Restores HP after combat)" title="Lettuce Spray (Restores HP after combat)"></td><td valign=center><img src=/images/otherimages/friarplants/plant10.gif alt="Seltzer Watercress (Restores MP after combat)" title="Seltzer Watercress (Restores MP after combat)"></td></tr></table><br><script type="text/javascript">var monsterstats = {"hp":"0","def":"103","off":"121"};</script><p>You demonstrate the horrors of nature to your opponent by summoning it -- in the form of a massive swarm of scarab beetles -- to do various horrible (but natural) things to him. Which they do, for <font color=red><b>121</b></font> (<font color=blue><b>+252</b></font>) (<font color=green><b>+1</b></font>) (<font color=gray><b>+123</b></font>) (<font color=blueviolet><b>+246</b></font>) damage.<!--familiarmessage--><center><table><tr><td align=center valign=center><img src="/images/itemimages/edserv1.gif" width=30 height=30></td><td valign=center>Essebaten claws at your opponent's trouser cuffs in a distracting way.</td></tr></table></center><center><table><tr><td><img src=/images/itemimages/nicesword.gif width=30 height=30 alt="Monster Attack" title="Monster Attack"></td><td valign=center>Monster attack power reduced by <b>13</td></tr></table></center><center><table><tr><td><img src=/images/itemimages/whiteshield.gif width=30 height=30 alt="Monster Defense" title="Monster Defense"></td><td valign=center>Monster defense reduced by <b>13</td></tr></table></center><p>Your love stinkbug simultaneously bites and disgusts your opponent, dealing 8 (<font color=green><b>+1</b></font>) damage.<p><center>You win the fight!<p><center>16 hippies defeated; 560 down, 440 left.<br></center><!--WINWINWIN--><p>A streaking frat boy runs past a nearby funk of hippies. One look at him makes the hippies have to go ponder their previous belief that the naked human body is a beautiful, wholesome thing.<p>The Rutabeggar holds up a sign that says, "Family Boiled in Stew. Please Help," and waits for a handout.<p>The Lettuce Spray bows its head and chants, "<i>Sola est leuis vulnus</i>," and you feel better.<center><table><tr><td><img src="/images/itemimages/hp.gif" height=30 width=30></td><td valign=center class=effect>You gain no hit points.</td></tr></table></center><p>The Seltzer Watercress burbles up some bubbly water and gives it to you. Who knew plant spit could be so refreshing?<center><Table><tr><td><img src="/images/itemimages/mp.gif" height=30 width=30></td><td valign=center class=effect>You gain 5 Mana Points.</td></tr></table></center><table><tr><td valign=center>You acquire a skill:  </td><td><img src="/images/itemimages/edserv1.gif" onClick='javascript:poop("desc_skill.php?whichskill=17021&self=true","skill", 350, 300)' width=30 height=30></td><td><b><a onClick='javascript:poop("desc_skill.php?whichskill=17021&self=true","skill", 350, 300)'>Gift of the Cat</a></b></td></tr></table><!--familiarmessage--><center><table><tr><td align=center valign=center><img src="/images/itemimages/edserv1.gif" width=30 height=30></td><td valign=center>Essebaten helps you search the area by rubbing against your legs and nearly making you trip.</td></tr></table></center>A couple of jackal demons appear from the shadows, and give you two gold coins before taking away your fallen opponent's soul.<center><table class="item" style="float: none" rel="id=7966&s=0&q=1&d=0&g=0&t=0&n=2&m=0&p=0&u=."><tr><td><img src="/images/itemimages/kacoin.gif" alt="Ka coin" title="Ka coin" class=hand onClick='descitem(826932303)'></td><td valign=center class=effect>You acquire <b>2 Ka coins</b></td></tr></table></center><p>You gain 13 Strengthliness.<bR>You gain 41 Mysteriousness.<bR>You gain 15 Chutzpah.<bR><p><a name="end"></a><p><a href="adventure.php?snarfblat=132">Adventure Again (The Battlefield (Frat Uniform))</a><p><a href="bigisland.php">Go back to The Mysterious Island of Mystery</a></center><script>parent.charpane.location.href="charpane.php";</script></td></tr></table></center></td></tr><tr><td height=4></td></tr></table><table><tr><td>[<a href="/account_combatmacros.php">edit macros</a>]</td></tr></table></center></div></div></div></body><script src="/combatfilter.1.js"></script></html>
 

Veracity

Developer
Staff member
That's good. Thanks.

OK, we had code to detect skills in combat, which used to work: KoL would say "You acquire a skill" and follow it if the skill name in bold tags. At some point, they changed that so that you could click on the skill name to pull up the description. No problem; we were still able to extract the skill name. But then, when they decided to include the skill image, they changed the structure of the HTML: the "You acquire" message, the image, and the skill name are now elements in a table row.

Code:
                  <tr>
                    <td valign=center>
                      You acquire a skill:  
                    </td>
                    <td>
                      <img src="/images/itemimages/edserv1.gif" onClick='javascript:poop("desc_skill.php?whichskill=17021&self=true","skill", 350, 300)' width=30 height=30>
                    </td>
                    <td>
                      <b>
                        <a onClick='javascript:poop("desc_skill.php?whichskill=17021&self=true","skill", 350, 300)'>Gift of the Cat</a>
                      </b>
                    </td>
                  </tr>
I'll fix it, by and by.
 

Veracity

Developer
Staff member
Revision 15636 should detect learning skills in battle again.

> test load gift.html

Read 9,792 bytes into a 9,792 character string

> test fight 7

Round 8: takes 743 damage.
Round 8: Essebaten claws at your opponent's trouser cuffs in a distracting way.
Round 8: drops 13 attack power.
Round 8: drops 13 defense.
Round 8: takes 9 damage.
Round 8: wins the fight!
You gain no hit points
You gain 5 Mana Points
You learned a new skill: Gift of the Cat
After Battle: Essebaten helps you search the area by rubbing against your legs and nearly making you trip.
You acquire an item: Ka coin (2)
You gain 13 Strengthliness
You gain 41 Mysteriousness
You gain 15 Chutzpah
That's why I need the HTML of the entire fight; I can use "test fight" to debug and fix issues with fight response parsing, whereas it is a heck of a lot harder with only a fragment of the page.

Edit: that command works not logged in; it doesn't know the monster your are fighting (although it could extract it from the page) or your character name, but everything else logs just fine.
 
Last edited:

Bobson

New member
We're going to have to handle making the mistake of logging off in the Underworld, as logging on in it isn't handled well (got stuck in a loop repeating "Seeing what's still unrestricted today..." in CLI)

So that's why it's happening!

I ran into this today. Easy enough to fix once I knew what the problem was. But boy was it frustrating.
 

Bale

Minion
Sadly this does nothing for CAB users and consult scripts have no way to access this information.

Help?
 
Top