Destroy All Monsters

Bale

Minion
I just made a quick fix for the problem and ensured it won't happen again simply by refusing to use a non-reusable item unless you have 2 of them when you are in ronin/hardcore. This will stop DAM from using your last item of a type, even when you don't need them for the telescope, but that might not be a bad thing.

First post updated with the new version.


Or can DAM and/or BatBrain be aware of the telescope1-7 values?

This is only my todo list, but it is troublesome so it might not happen any time soon.
 
Last edited:

Bale

Minion
Typo prevents the prior fix from working properly. (I forgot a space.)

Fixed it. Updated version number. Updated first post.
 

Theraze

Active member
This is only my todo list, but it is troublesome so it might not happen any time soon.

Shouldn't be too troublesome... whipped this up in a few minutes. Should work, but then again, not having gotten any telescopes yet, I have no good way to test it. :) Anyways, this goes into the boolean ok section, in aid.find, just before the switch. I included both the find and switch to give it boundaries. Just says that if an available item is a telescope item and you only have 1 left, skip it.
Code:
	if(aid.find())
		if (get_property("telescopeUpgrades").to_int() > 0) {
			for tUpgrades from 1 to get_property("telescopeUpgrades").to_int() if (aid.group(1).equals("use") && aid.group(2) == get_property("telescope"+tUpgrades).to_int() && available_amount(aid.group(2).to_item()) == 1)
				return false
		}
		switch(aid.group(1)+aid.group(2)) {
 

Bale

Minion
Thank you.


Shouldn't be too troublesome... whipped this up in a few minutes.

You are confused. That will not work at all. If you had a telescope you'd know that the value of telescope3 is not "fancy bath salts", but "see a slimy eyestalk" so I'd need to write a lookup function to convert the later into the former. That's the troublesome part, though I can crib that from my campground.ash so it wouldn't be too hard.

Anyway, it might be for the best to stop the script from automatically expending anything you only have 1 of, so I'm not likely to "fix" this.
 

Theraze

Active member
Ah... sorry. Yeah, not having a telescope, I have no clue what mafia saves to its preferences. I suppose I should probably have ripped into the code, but... meh. Found out I didn't get a job I wanted today, so I'm feeling lazy-ish. :)

Looked and TelescopeCommand is where all that lives. Is it worth requesting that SorceressLairManager.findGateByDescription, SorceressLairManager.gateName, SorceressLairManager.gateEffect, SorceressLairManager.findGuardianByDescription, and SorceressLairManager.guardianItem actually get exposed so we don't need to keep static lists, or... are static lists good enough?
 
Last edited:

Catch-22

Active member
Code:
Function 'group( int )' undefined. This script may require a more recent version of KoLmafia and/or its supporting scripts. (DestroyAllMonsters.ash, line 71)
Consult script 'DestroyAllMonsters.ash' not found.
You're on your own, partner.

Using r10482.
 

chown

Member
I've been getting lots of the following with the past few versions. Any idea what's up? Do other folks get this?

Request 1 of 142 (Pyramid: The Middle Chamber) in progress...

[867] The Middle Chamber
Encounter: Iiti Kitty
Strategy: /media/0928-5C4C/kol/kolmafia/ccs/fight_optimizer.ccs [default]
Round 0: chown wins initiative!
You have the latest batfactors.txt. Will not check again today.
Checking for updates (running BatBrain ver. 1.16)...
Running BatBrain version: 1.16 (current)
Checking for updates (running SmartStasis ver. 3.11)...
Running SmartStasis version: 3.11 (current)
Checking for updates (running Destroy All Monsters ver. 0.3.3.4)...
Running Destroy All Monsters version: 0.3.3.4 (current)
You have the latest pluralMonsters.txt. Will not check again today.
Run SmartStasis! (25 profit to stasis with Suckerpunch -- good enough)
You have the latest use_for_items.txt. Will not check again today.
Round 1: chown executes a macro!
Round 1: chown tries to steal an item!
Round 2: chown executes a macro!
Round 2: chown casts SUCKERPUNCH!
Round 3: iiti kitty takes 1 damage.
Round 3: iiti kitty drops 1 attack power.
Round 3: iiti kitty drops 1 defense.
Round 3: gcc paws at the ground for a second, and then charges your opponent, bashing her for 20 damage.
Round 3: iiti kitty takes 20 damage.
Round 3: chown executes a macro!
[... SUCKERPUNCH! xN ...]
Round 23: chown casts SUCKERPUNCH!
Round 24: iiti kitty takes 1 damage.
Round 24: iiti kitty drops 1 attack power.
Round 24: iiti kitty drops 1 defense.
Round 24: gcc coos softly, and nuzzles you with his beak.
You gain 25 hit points
You gain 25 Mojo Points
DestroyAllMonsters starts now! (0mp option attack -- killrounds: 3, dierounds: 356)
Round 24: chown executes a macro!
Round 24: chown casts ENTANGLING NOODLES!
Round 25: gcc squawks loudly and runs in a circle around your opponent. She looks a little bit confused.
Round 25: iiti kitty drops 6 attack power.
Round 25: iiti kitty drops 6 defense.
Round 25: chown executes a macro!
KoLmafia thinks it is round 26 but KoL thinks it is round 25
DestroyAllMonsters was unable to figure out a useful combat strategy
You're on your own, partner.
Click here to continue in the relay browser.
 

Theraze

Active member
Yeah... it means that SmartStasis tried to stasis for too long for DAM to come up with a guaranteed safe solution. Unfortunately. The only real fix, currently, is to manually edit your SmartStasis script to abort and hand control back to DAM sooner, but...

Often, it's related to the bug where, despite reaching full health/mana and being beyond round 10 so that the only benefit to stasis is a minor damaging of the enemy, SmartStasis likes to continue onwards. All of this is, however, related to SS, not DAM. So you're likely to get better results on that thread... :)
 

Valliant

Member
I'm having a similar issue, but it's happening when the monster only has a few HP left... perhaps something to do with the expected vs. encountered monster HP?

[514] F'c'le
Encounter: cleanly pirate
Strategy: F:\Games\KoL\KoLmafia\ccs\default.ccs [default]
Round 0: ililili wins initiative!
Run SmartStasis! (-2 profit to stasis with Suckerpunch -- low)
DestroyAllMonsters starts now! (0mp option attack -- killrounds: 4, dierounds: 29)
Destroy with: attack
Destroy with: attack
Destroy with: attack
Destroy with: attack
Round 1: ililili executes a macro!
Round 1: ililili attacks!
Round 2: cleanly pirate takes 37 damage.
You lose 16 hit points
Destroy with: attack
Destroy with: attack
Round 2: ililili executes a macro!
Round 2: ililili attacks!
Round 3: cleanly pirate takes 26 damage.
Round 3: ililili attacks!
Round 4: cleanly pirate takes 35 damage.
Round 4: ililili executes a macro!
KoLmafia thinks it is round 5 but KoL thinks it is round 4
DestroyAllMonsters was unable to figure out a useful combat strategy
You're on your own, partner.
Click here to continue in the relay browser.
 

Bale

Minion
I'm aware of the problem and you're correct about the cause. I've been giving the solution some thought, but so far I haven't come up with any potential answers other than asking zarqon for new BatBrain features or working outside of BatBrain since it won't do much if it is convinced the monsters has no HP.
 

Theraze

Active member
Since someone said the maximum swing is +-5, any chance DAM can try to overkill all monsters to -5 hp?
 

chown

Member
Hmm. That explanation sounds good, but I'm not 100% convinced. It looks like I neglected to copy the last bit of the battle, but all I had to do to finish the battle was attack a single time! Other cases aren't always that extreme, but generally the combat can be completed with a small number of attack-with-weapons. So, although I can definitely believe that SS ought to have stopped earlier, I'm still surprised that DAM was unable to figure out how to finish the battle in 5 rounds.
 

Bale

Minion
Since someone said the maximum swing is +-5, any chance DAM can try to overkill all monsters to -5 hp?

BatBrain actually makes that hard for me to do. You could say it is too helpful so I'd need to work with less help from it.
 

Winterbay

Active member
You could loop until you have a win I guess because if the monster is still alive after the run it probably have quite little health left and as such a small trivial skill may be able to kill it (WHAM usually finishes the monster off in such cases by toss or salsaball or something similar).
 

Theraze

Active member
Yeah... my only request there is that hopefully DAM would request something that actually overkills, because especially in the case of casters, I've repeatedly died when it thought it could finish things off using spaghetti spear because it was free and would just finish things off, and it ends up being JUST a tiny bit too little. I'd much rather have ravioli and stream as the go-to spells over spaghetti and salsaball, if I'm not in any sort of meatflow/manaflow problem.
 
Top