Question about custom combat script / banishing

Pazleysox

Member
Ran into this today while working with my free fights script:
Code:
[17077] The Hidden Bowling Alley
Encounter: pygmy janitor
Round 0: pazsox wins initiative!
KoLmafia thinks it is round 2 but KoL thinks it is round 1
Round 1: pazsox casts REFLEX HAMMER!
pygmy janitor banished by Reflex Hammer.
This combat did not cost a turn
[COLOR="#FF0000"]We have no way to banish this beast! Complain to PazSox. [Free Fights script]
You're on your own, partner.[/COLOR]

I have a free fights consult.ash script to handle my banishes for the bowling alley. Here's a piece of the appropriate code:
Code:
if (contains_text(OPPONENT, "pygmy janitor"))
	{if (have_skill($skill[reflex hammer]) && get_property("_reflexHammerUsed") == 0)
		use_skill(1, $skill[reflex hammer]);
	if (have_skill($skill[snokebomb]) && get_property("_snokebombUsed") == 0)
		use_skill(1, $skill[snokebomb]);
	abort("We have no way to banish this beast!  Complain to PazSox.  [Free Fights script]");}
Among a bunch of other banishing items that aren't important to add to this post.

I haven't used this script in a few months, and simply commented out the abort line, and moved the } to the appropriate location.

Is it just a matter of moving the } to the line above, and leaving the abort where it is? I was able to get through the fights with the proper pygmys being banished.
 

Veracity

Developer
Staff member
Your script as coded says to do this:

if it's a pygmy janitor:
if you have reflex hammer, then use it.
then if you have snokebomb, then use it.
then abort

Perhaps you should consider using "else" clauses.
 

Pazleysox

Member
Your script as coded says to do this:

if it's a pygmy janitor:
if you have reflex hammer, then use it.
then if you have snokebomb, then use it.
then abort

Perhaps you should consider using "else" clauses.

AH HA! I'll try this tomorrow. Thank you
 
Top