Version 13.5

Veracity

Developer
Staff member
The following is an abbreviated version of the Subversion commit message logs. Please keep in mind that these messages are intended for other developers and they take the files which were modified into context in order to limit the amount of verbage. In general, they are not intended for general audiences and should not be treated as "official" documentation -- they are informal and abbreviated, at best.

If you do not understand what something says, try looking at the full version of the revision by following the accompanying link for the revision. The only difference is that the files which were modified will be listed, and sometimes, you can guess what happened from file names (though not always). If you still have no idea what happened, that's okay -- it probably doesn't relate to what you're doing with KoLmafia. ^_~

Furthermore, not everything marked as "fixed" is guaranteed to be fixed, not all changes are guaranteed to have a change. This is due the fact that both time and turns are finite and only a limited number of things can be tested. Some changes go in untested, assuming they would work, when they actually don't due to erroneous assumptions; alpha testers occasionally will be able to give feedback, but it's not always possible.

For example, if you read the revision logs for what changed between 10.2 and 10.3, the plus sign choice adventure was meant to get a use link. Something as seemingly insignificant as KoL using two spaces instead of one space in the sentence "It's actually a book. Read it." would mean the change didn't actually work -- anyone can verify that, in fact, the change didn't work for this very reason. If you ever encounter something like that, a non-accusatory mention of it (non-accusatory meaning anything that neither implies "ZOMG FALSE ADVERTISING" nor "You guys said this was fixed, but...") somewhere will usually result in the problem getting addressed.

Finally, if you've got a bug to report, make sure you read up on how to post a detailed bug report. While the rules outlined apply specifically to bugs related to scripting, many of them are applicable to KoLmafia bug reports in general. Most importantly, I hate the words "annoying" and "frustrating". Never use them when describing a bug/feature. Ever. Thanks. The abridged revision logs follow.

*Note - sourceforge completely changed its admin interface since I uploaded 13.4. I couldn't find a way to create a new "release", as such. Instead, I created a "v13.5" folder and uploaded the four files - .jar, .dmg, .exe, and .tar.gz - to it. Let me know if there is a problem.

Revision: 7460
Initial release of the Modifier Maximizer, a tool for suggesting ways of
boosting an arbitrary numeric modifier (or a weighted sum of multiple
modifiers). It is available from the Tools menu, can be added to your
startup tabs or windows, and can also be invoked via the CLI "maximize"
command (although that's not very useful yet). It is currently mostly
working, for effect-based boosts only; equipment suggestions are planned in
the future. There is a Help button in the interface for more info.
The core change needed to support the Maximizer is the ability to calculate
modifiers on a speculative state, rather than the actual player state. This
is still a work in progress: speculating about equipment changes is made
difficult by the fact that all the equipment accessors are static methods,
which Java provides no way of redirecting.
It is now possible to have string modifiers at the character level. There
are three current instances of this:
* "Equalize" holds the value from the first equalizer potion seen in the
active effects list, which seems to match KoL's behavior in the unusual case
of having more than one of them active. This allows stat calculations to
take equalizers into account without having to do additional searches through
the effects list.
* "Intrinsic Effect" is set to a tab-delimited list of all such values from
current equipment items.
* "Outfit" is a new modifier, set to the name of the standard outfit being
worn, if any. This is determined in the process of calculating modifiers, so
it might as well be made available without having to recalculate it.
"modref" has been updated to display character-level string modifiers, and
ASH function string_modifier(string) has been added to allow script access to
them.

Revision: 7461
The plural of "tasty louse" is now "tasty lice".
Weapons equipped on a Disembodied Hand cannot grant Slime Hates It or
Brimstone bonuses.
Added a new class of modifiers - bitmaps, in which each bit represents a
distinct source of something. This is a generalization of my earlier code
supporting Clownosity, which is exactly what is needed for Brimstone as well
- both only count distinct pieces of equipment. In addition to those two,
two other bitmap modifiers currently exist:
* "Synergetic" indicates items that grant bonuses in conjunction with one or
more otherwise unrelated items. This will allow such synergies to be
efficiently detected without having to be hard-coded in the program, although
the actual detection has not been implemented yet.
* All boolean modifiers now exist as bits within a single bitmap, rather than
an array of individual booleans. This allows an item's booleans to be merged
into the character booleans with a single OR, rather than testing them one by
one. This will become more relevant in the near future, as I'm planning to
add at least 18 new boolean modifiers in support of the Modifier Maximizer.
Bitmap modifiers can be queried from ASH using any of the existing forms of
numeric_modifier() - note that the value will be the count of bits, rather
than the raw bitmap value itself. "modref" has been updated to display
bitmap values, but "modtrace" does not yet support them.

Revision: 7462
Finished implementation of the Synergies feature: modifiers can be triggered
by an arbitrary combination of equipment, effects, passive skills, and your
outfit. They are described entirely in the data file, rather than having to
be hard-coded, and in fact will generally be more efficient than a hard-coded
test since all the work is done as part of the necessary processing of
modifiers for the individual elements.
Three synergies are now implemented, two of them new:
* serpentine sword + snake shield, giving +10 ML (previously hard-coded)
* lupine sword + snarling wolf shield, giving +9 Spooky Damage=
* cardboard katana + cardboard wakizashi, giving +20 Weapon Damage
The Disembodied Hand is assumed to never contribute to synergies.

Revision: 7463
Added 10 boolean modifiers: Hot Immunity, Hot Vulnerability, and so on for
all five basic elements. There aren't many sources of these (elemental
phials, and 5 BM special effects), but having them as modifiers means that
the Modifier Maximizer (and any other code that cares about resistances) can
tell when they're present without having to do ten searches of the active
effects list.
The Maximizer considers these modifiers when maximizing resistance: being
immune to an element is considered equal to 100 levels of resistance, and
being vulnerable subtracts 100 levels. That's not quite right, but it's
close enough to ensure that using phials (or removing existing phial effects)
are listed as suggestions when appropriate.

Revision: 7464
Added some missing plurals

Revision: 7465
Added two new boolean modifiers: "Moxie Controls MP" and "Moxie May Control
MP". They currently have only one source each, but there's no point in
rechecking those equipment slots when the modifier calculations are examining
them anyway.
Added two new numeric modifiers: "Maximum HP Nonmultiplied" and "Maximum MP
Nonmultiplied", for boosts that are applied after the percentage boosts.
Currently only Slimy Sinews and Synapses are in this category - treating them
as normal boosts can mispredict MP by up to about 15 points, which is a quite
significant error at low levels.
With these changes, Modifier Maximizer scores and predictions for HP/MP
appear to be exact (in ordinary cases, at least - I suspect there may be some
problems in unusual situations, like having significantly debuffed muscle).
If the predicted maximum HP or MP doesn't match what's shown on the charpane,
there will be a notice at the top of the modifiers popup, as was previously
done for buffed stat predictions. This should help track down any prediction
inaccuracies that are found.
The prediction of buffed stats, HP, and MP has been moved to a method of
Modifiers, for easier reuse.

Revision: 7466
Fix Meat Drop for Red Tongue

Revision: 7467
Pulverization data update: caustic items -> epic wads.

Revision: 7468
Added basic familiar type for several recent familiars: bandersnatch,
grinning & syncopated turtles, slimeling. Modifier displays should now
include their item drop or stat bonuses.

Revision: 7469
Feed slimeling via familiar binger.
Add "feed slimeling" button to Equipment panel of Item Manager.

Revision: 7470
Remove support for lucreCore leaderboard, since Oxbarn says it is dead.

Revision: 7471
Preliminary implementation of equipment suggestions in the Modifier
Maximizer: at the moment it only considers weapons and accessories, there are
going to have to be some performance improvements before more slots can be
considered.
Changed availableSkills to be a sorted list, so that lookups can be done
faster. Prior to this change, profiling a use of the Maximizer showed
KoLCharacter.hasSkill() as taking 56% of the run time!
I ran a complete check of item & effect modifiers, primarily to make sure
that all relevant accessories have the Single Equip flag set (which is now
much more important to have right), but found & fixed numerous other little
problems.

Revision: 7472
Make wumpus managaer more robust:
Robustness improvements to WUmpus manager:
- when reset wumpus data, also clear room links and initialize all rooms to
indefinite state.
- Don't set an indefinite warning for a room that was already definite

Revision: 7473
DO NOT USE Revision 7471! All skill casts were being treated as maxcasts, ignoring
your requested count.
Gory details: now that availableSkills is a sorted list, an instance of
UseSkillRequest has to be used as a key to see if the list contains that
skill. UseSkillRequest.getInstance() seemed a reasonable way of getting such
a key, but it has side-effects - the target and count of the retrieved cached
instance are cleared. Every cast request calls hasSkill() on itself to
verify that the request is valid, thus turning it into a request for a count
of zero on yourself. Fixed by adding a getUnmodifiedInstance() method.

Revision: 7474
Add seal figurines to default conditions for areas

Revision: 7475
Remove bogus character

Revision: 7476
Give up on trying to store availableSkills as a sorted list - the sort order
for skills depends on their MP cost, so this breaks for libram skills as
their cost changes. Instead, speed up hasSkill() by maintaining a parallel
IdentityHashMap with all the available skills.

Revision: 7477
Add default for new choice adventure. Not configurable; only one choice...

Revision: 7478
Various tweaks for Modifier Maximizer equipment suggestions:
* Outfits are handled more intelligently - if the entire outfit can't be
worn, there's no point in testing combinations of the component items unless
they are individually beneficial.
* Synergies, Brimstone, Hobo Power sources, and sticker weapons now only
receive special consideration when maximizing a stat that is potentially
boosted by the indirect benefits of these classes.
* These changes sped things up enough that hats & pants can now be
considered, without making the process unbearably slow.
Equipment item changes are now made via a magical Ajax request, so that they
don't require loading the whole equipment inventory page each time.

Revision: 7479
Adds "outfit save <name>" CLI command, from a patch by HippoKing.

Revision: 7480
Disambiguate "The Darkness" (a specific NS Tower monster) from "The Darkness"
(any monster, under the effect of Temporary Blindness. In the latter case,
treat the monster's name as "The Darkness (blind)", and record item drops in
the session tally as "unknown item while blind".

Revision: 7481
Add rock snake, floaty sand, 5 Pounds Lighter.

Revision: 7482
When using the "Name click shows mall store" feature in internal chat,
automatically switch to the Purchases tab so that the results can be seen.

Revision: 7483
When performing campground requests, print the "1 of N..." message
immediately, rather than deferring it until the next time
runBetweenBattleChecks() is called (as is done with normal adventure
requests). No BBC is inherently performed by campground requests, so the
message could be delayed by an arbitrary amount of time - and if the BBC that
does finally display it was due to a relay browser adventure, the UI was left
in a disabled state since that call to BBC isn't part of a request sequence.

Revision: 7484
More Modifier Maximizer speed tweaks. Shirts are now being considered.
Equipment maximization can now be interrupted by hitting ESC, or clicking
"stop now" on the Adventure tab. The best combination found so far will be
shown, along with a notice of possible non-optimality, and then effect boosts
will be searched for as normal.

Revision: 7485
Made a necessary change to how non-discardable items are represented. The
Wiki, and previously KoLmafia, used an autosell price of zero to indicate
this, but that is demonstrably not how KoL actually works. For example, a
laser-broiled pear is not discardable, but has a Mall minimum of 310 and a
Chez Snootee price of 465, exactly as if it had an autosell value of 155.
Furthermore, the released screenshot of Jick's item spindler shows
Discardable to be a checkbox, separate from the autosell value field. I'm
now using negative numbers to represent the price of such items, in the 12
cases I could find where a Mall minimum over 100 gives evidence of a nonzero
autosell value. That required the least changes to the code (which was
mostly just checking for values > 0 to determine autosellability), and
Math.abs() could be applied to the value in the cases where needed. These
negative prices for non-discardable items are visible to ASH scripts via
autosell_price().
The price of restaurant items after the 10% LARP discount is rounded up,
rather than to nearest.
Added consumption data for some Sea fruits.

Revision: 7486
Added off-hand suggestions to the Modifier Maximizer. The conditions for
equipping a chefstaff are now respected.
Added lots of Maximizer keywords for fine-tuning equipment suggestions:
+/-<slotname>, +/-empty, 1/2 handed, +/-melee, type <weapon type>, +shield,
-tiebreaker. See the built-in help for details.
Brimstone has been confirmed to give a ML bonus with only one piece equipped.
The Basement helper was using Spirit of Rigatoni, rather than Ravioli, to
predict HP.

Revision: 7487
The "maximize <expr>" CLI command is now actually useful - it will
automatically put on the suggested equipment items (rather than adding them
to the list), then build the list of effect boosts based on your new outfit.
An error will be generated if the equipment changes weren't enough to reach
any specified minimum attribute values. "maximize? <expr>" can be used to
simply build the list of equipment & effects as before - in this case, the
only error possible is a malformed expression.
If a GenericPanel's primary action is invoked by hitting Enter in a text
field or combo box, the action will be run in a new thread, exactly as it
would be if invoked by clicking on the top button. This inconsistency was
keeping the Maximizer's progress messages from being displayed if it was run
via Enter.
The default action field in statuseffects.txt can now contain a note
(starting with "#") for effects that cannot be obtained on demand - those
that require adventuring until you hit a specific encounter, for example.
Notes will be ignored as a possible default for mood triggers, but the
Modifier Maximizer and the CLI "up" command will display them as a suggestion
for how you'd get that effect if you really needed it. The Maximizer won't
show notes containing "BM" if you're not in Bad Moon: the contents of notes
are not otherwise parsed at the moment.
I went through the file and added notes (or in many cases, missing default
actions) for almost every effect that wasn't already extendable.

Revision: 7488
Set the "lastAdventure" preference earlier in the adventuring process, so
that the initial calls to the betweenBattleScript & recoveryScript will
reflect the new location rather than the previous one.

Revision: 7489
When in ronin/hardcore, the Modifier Maximizer will no longer suggest items
that you don't have on hand, and cannot create or buy from a NPC.

Revision: 7490
Updated equip requirements for caustic slime nodule gear.
Updated monster drop data in Hidden City, Airship, Logging Camp.

Revision: 7491
Sombrero-type familiars now add to your Experience modifier based on the
average ML of monsters in the current location (excluding special monsters).

Revision: 7492
Refactored the speculative abilities of the Modifier Maximizer into a public
Speculation class that can be used elsewhere.
Automatic MP cost reduction during spellcasting uses this to avoid any
equipment changes that would reduce your maximum HP or MP below your current
amount. This isn't perfect: it can still botch a healing spell by reducing
your max HP to 1 point above your current HP, for example.
Added a new "Four Songs" boolean modifier, rather than having two copies of
explicit code for determining your song limit - neither of which actually
handled all known sources of a 4th song slot, one of which was missing the
Brimstone Beret.

Revision: 7493
Added CLI "speculate" command, with alias "whatif". This takes a
semicolon-separated list of commands that change the character state, and
displays the modifier changes that would occur due to executing those
commands. The supported commands are:
* MCD <num>
* equip [<slot>] <item>
* unequip <slot>
* familiar <type> - note that this doesn't change the current familiar item,
whether or not the specified familiar can equip it.
* up <effect> - considers you to have 1 turn of that effect.
* uneffect <effect>
* quiet - suppresses the display of changed modifiers, for use in scripts.
Note that speculation about impossible actions is allowed - there's no
checking to verify that you actually have any item, or can equip it. The
predicted modifiers are stored as an object named "_spec", which can be
referenced by any of the ASH modifier query functions.
ASH numeric_modifier() now accepts five new derived modifier names, with
values predicted from your base stats and other modifiers: "Buffed Muscle",
"Buffed Mysticality", "Buffed Moxie", "Buffed HP Maximum", and "Buffed MP
Maximum". They are of little use with the character's current modifiers,
since the actual values of these attributes are available, but are quite
useful with the modifiers resulting from a speculation. Example:
cli_execute("whatif <commands you're considering>; quiet");
if (my_mp() > numeric_modifier("_spec", "Buffed MP Maximum")) {
print("Bad idea - you'd lose MP by doing that.");
}

Revision: 7494
Fixed problem that was causing "whatif" to fail with more than two commands
specified.
Replaced uses of String.replace(String, String) - a Java 1.5 feature - in
MemoriesDecorator and DwarfFactoryRequest.
Modifier Maximizer now supports suggestions of equipment that can be created,
pulled, or bought, controlled by the radio buttons in the GUI. (Scripted
requests do not use these features, as they can be arbitrarily costly).
* Folding of equipment is not yet supported (and may have to be dropped) due
to difficulties in ensuring that all of the suggested items can
simultaneously exist.
* It may suggest multiple created items that are impossible due to a limited
quantity of some shared ingredient - I see no practical way to avoid that.
* It will suggest buying at most one of any item, and only if it is not
otherwise available. This is necessary to prevent useless price lookups,
since the set of items to be considered is decided before it's known how many
of each item might be usable.
The buyable suggestions feature is capable of generating an uncomfortably
large number of Mall price lookups, so I've added a throttling feature. Each
lookup will be delayed by 0.01 second times the number of lookups done (so
the hundredth lookup will have a 1 second delay, for example). This should
hardly be noticeable in normal use.

Revision: 7495
Added rock homonculus, charged magnet.
Updated monster drop data in the Upper Chamber.

Revision: 7496
Adds [wormride] link upon receiving the worm-riding hooks, if a drum machine
is in inventory. It will equip the hooks, use the machine, restore your
previous equipment, then visit the Pyramid.
Dropped accessories now get separate [acc1] [acc2] [acc3] links if you have
no free accessory slots.

Revision: 7497
Added CLI debugging command "backtrace <text>" - when active, the next CLI
message or visited URL that contains the specified text (case sensitive) will
generate a debug log containing a stack trace, allowing the reason why that
particular action was taken to be determined. Specifying text less than 4
characters long ("off", for instance) will deactivate this feature.

Revision: 7498
Watch what happens on the Money Making Game page and track changes to meat in
inventry and storage when you make bets, retract bets, and your offered bets
are taken by others. (We do not track meat changes for taken bets, yet. Soon.)
Provide an ASH interface to the MMG for making and retracting bets.
void mmg_visit();
Visits the bet page and remembers which bets you currently have made and which ones are available to take.
int mmg_make_bet( int amount, boolean storage );
Place a bet of the specified amount using meat from inventory (false) or storage (true). Returns the bet ID # if successful, or 0 if unsuccessful. You will be unsuccessful if you already have 5 bets out or don't have enough meat. Or, presumably, if you don't have a casino pass.
boolean mmg_retract_bet( int bet_id );
Tries to retract the specified bet. Returns true if successful, and false if unsuccessful - presumably because bet was already taken.
int [int] mmg_my_bets();
Returns a map of (index #) to bet ID for your current bets.
int mmg_wait_event( int milliseconds );
Waits for one of your outstanding bets to be taken - and reported by KoL. Returns the bet ID # of the taken bet, or 0 if the call timed out./
string mmg_bet_taker();
The player who took the bet which was just returned by mmg_wait_event().
int mmg_bet_taker_id();
The id # of that player.
int mmg_bet_winnings();
How much money you just won or lost according to that event. ( winnings - amount bet ) is the net change to your purse.
int [int] mmg_offered_bets();
Returns a map of (index #) to bet ID for bets currently offered by other people.
string mmg_bet_owner( int bet_id );
The player name who offered the bet.
string mmg_bet_owner_id( int bet_id );
The player id # who offered the bet.
int mmg_bet_amount( int bet_id );
The amount of the bet.

Revision: 7499
Detect lack of a casino pass. Minor efficiency mods. Minor cleanup.

Revision: 7500
Fix the [wormride] use link: the initial opening of the Pyramid is handled by
beach.php?action=woodencity, not pyramid.php.
Any visit to that URL (via [wormride] or otherwise) will auto-assemble the
Staff of Ed if possible.

Revision: 7501
Add item of month, familiar, familiar item, combat skill

Revision: 7502
Call UseItemRequest.registerRequest() much earlier in the process, so that it
will clear lastItemUsed whenever anything other than an item use is being
done. Otherwise, anything that redirected to inventory.php?action=message
(such as changing outfits from the Equipment page) would cause the last
item's consumption to be processed again. This was fixed in response to a
report of mysteriously reappearing Dance Card counters, but I think it also
explains a lot of other problems involving incorrect inventory counts and
"doesn't make anything interesting" messages.
The "backtrace" command can now trigger on messages printed to the session
log or debug log, not just the gCLI.

Revision: 7503
Although replacing String.replace() with StringUtilities.globalStringReplace
did wonders for compatibility with older versions of Java, it broke the
Dwarf Factory, causing an infinite loop inside globalStringReplace whenever
you identified a new factory item.
- fix globalStringReplace to not loop when the search string is ""
- fix DwarfFactoryRequest to not try deleting an empty rune from a list

Revision: 7504
Call registerRequest() on CreateItemRequest before UseItemRequest, so that
items created by single-/multi-use of another item are properly handled.

Revision: 7505
Fixes to MMG support:
When you place a bet, KoL responds by redirecting you to bet.php. Only after you
follow the redirect do you learn whether you ducceeded in placing the bet and
have the opportunity to find out what the bet id of your new bet was. This extra
request/response creates two race conditions:
1) Between the time KoL sends you the initial response with redirect and the
time it receives your redirected request, somebody can take your bet. If so, KoL
will not include your new bet on your list of pending bets and we cannot learn
the bet ID.
2) Between the time KoL makes the bet page which includes your bet and the time
you receive it, somebody might take your bet, generating a chat event - which
you can receive before the bet response page
Handle both of these by saving the amount we bet before sending off the request.
If we can't find a new bet on the response (race #1), make a generate a dummy
bet with a negative bet ID, to be matched by the chat event.
If we receive a chat event and can't match it with a pending bet, see if we
have an outstanding but not-yet-registered bet for that amount, and save the
chat event to be matched later.
3) If you fail to place a bet (not enough Meat, no casino pass), notice this
and don't assume that just because the bet does not appear in your pending bet
list it must have been taken already.

Revision: 7506
Detect two more failures when submitting a bet: trying to bet less than 1,000
Meat, and trying to submit a bet when you already have five pending.

Revision: 7507
Fix dusty bottle recognition for unascended characters. There were actually
two problems here:
* The item description text was being cached, so once the non-glyphed
versions had been seen, checking again with the spectacles equipped wouldn't
actually do anything.
* The data was being marked as valid even if the glyphs weren't found, so any
problem would persist for the entire ascension.

Revision: 7508
Fix clover handling in the Spooky Forest: in the special adventure there,
your clover disappears "into the leprechaun's pocket", not "in a puff of
smoke" as usual.
Fix estimation of current fullness when a "too full" error is received.

Revision: 7509
Add tracking of whether your guild store has been opened. This is used to
determine availability of store items, and can be queried via ASH boolean
function guild_store_available(). Overhead is at most one server hit per
login prior to the store being opened (which may be satisfied by some other
guild request, such as checking still availability), then no further hits for
the rest of the ascension.

Revision: 7510
Add ash support for searching MMG offered bets:
void mmg_visit();
- gets last 20 bets
void mmg_search( lower, upper);
- gets bets withing specified range
After either function, you can use
int [int] mmg_offered_bets();
- to see the available bets.

Revision: 7511
Added ASH function to determine if a counter will expire in a specified
period of time:
string get_counters(string label, int minTurns, int maxTurns)
label specifies the counters of interest - it is a case-insensitive,
substring match. An empty string matches any counter that is capable of
triggering an action when it expires: purely informational counters
(currently, Communications Windchimes and PADL Phone) are ignored in this
case.
minTurns and maxTurns specify the endpoints (inclusive) of the range to be
checked. Passing the same value for both checks for an expiration on that
specific turn.
The return value is an empty string if there are no matching counters; the
counter name if there is only one; or a tab-delimited list of names if there
were multiple matches. I chose this format, rather than a map or array,
since the majority of callers of this function are likely to only care
whether there was a match or not, or at most only care about a few specific
counters (and would want to treat a multiple match the same as a match of an
unknown counter). As a string, the return value can easily be used in a
switch statment to handle these expected uses.

Revision: 7512
Update FightRequest's combat parsing due to some recent server-side changes:
* The initial page of a fight is now fight.php?ireallymeanit=randomnumber,
not just fight.php.
* The "You gain X meat" message is now in exactly the format we were looking
for to detect a familiar action. KoL is inserting a "--familiarmessage--"
HTML comment in the page in the appropriate places, so use that as the
trigger instead.

Revision: 7513
Fixed "summary" CLI command: it was interpreting any parameter as both a
filename to write to, and a filter for the contents of the session tally, a
combination that was unlikely to produce any useful results.

Revision: 7514
ASH foreach loops can now contain one more variable in the list than the
target map has indices; the additional variable, if present, gets assigned
the current value from the map (saving you the trouble of explicitly looking
it up inside the loop). In the case of multidimensional maps, this is more
than just a convenience, it's a definite performance boost: the internal code
can directly look up the value in the final slice of the map, whereas a
script would have to perform the entire chain of lookups starting from the
top.
This change makes it useful to iterate over arbitrary aggregate values (such
as the return value of a function), not just aggregate variables, so that
change was made as well. Note that this is only useful when the extra value
variable is present, as otherwise you'd have no access to the actual values
in the map. For example, you can now say "foreach itm, count in
get_ingredients(someItem) {...}" - you don't have to assign the map to a
temporary variable and then iterate over that.
This introduces a small backwards compatibility problem: a loop with a body
that's a parenthesized expression (rather than the usual block or simple
statement) would now be parsed as if the target was a function call, with the
body being interpreted as the parameter list. This seems like an extremely
uncommon usage, which can be easily fixed by putting curly braces around the
loop body (or parentheses around the target).

Revision: 7515
Various data file updates courtesy of HippoKing.
Fixed problem with ASH foreach loops with more than two key variables: that
has apparently never worked right.

Revision: 7516
Track meat gained or lost from taking bets in the MMG.
Provide ASH interface to this:
int mmg_take_bet( int bet_id, boolean storage );
- return 0 if failed to take bet
- return -bet if you lost
- return +(winnings - bet) if you won.
I.e., the return value is the net change to your purse

Revision: 7517
Don't parse an Ajax request to charsheet.php (generated by a chat /shrug
command) as if though it contained the full character sheet.
Use the Ajax form of the request when shrugging buffs from mafia, to minimize
the server hit.

Revision: 7518
Adjusted some conditions for adventures. (Battlefield outfits don't actually function properly in the zones they configured for, but can be copy/pasted quickly into the ones mafia redirects to.)
Added funny party hat.
Added a reminder to sell off a quest item that can be auto-sold.

Revision: 7519
Add new rock items and familiar. Consumption data is speculative...

Revision: 7520
Add Three ASH functions:
int my_closet_meat();
boolean put_closet_meat( int meat );
boolean take_closet_meat( int meat );

Revision: 7521
Added the floaty item series to pulverize.txt, and made the necessary changes
to allow them to be upgraded via the pulverization helper, either with the
Malus or by sending them to wadbot.

Revision: 7522
Add clod hopper

Revision: 7523
Add arena parameters for the Rock Lobster

Revision: 7524
Added new ASH feature: plural typed constants.
See http://kolmafia.us/showthread.php?p=15592 for details.

Revision: 7525
Oops, added new file that was missing from previous commit.

Revision: 7526
Fix the clover adventure in the Hippy Camp (In Disguise), which also has a
non-standard clover disappearance message.
Fix Guy Made Of Bees handling:
* the counter wasn't being incremented on the actual fight encounter.
* defeating the GMoB wasn't being detected.
Fix creation of data files from ASH scripts:
* use only the final component of the pathname, even on Windows (only forward
slashes were previously considered, which was a security hole).
* create files in the data directory rather than the script directory.

Revision: 7527
Another tweak to clover adventure recognition: the previous version had
gotten vague enough that it would trigger on loading an inventory or storage
page with both a clover and a pufferfish spine on it.

Revision: 7528
Added "matchable" secondary item attribute, for nontradeables that need to be
considered by the item matcher (despite the normal prohibition) due to having
an ambiguity with a tradeable item's name. Added this attribute to five of
the NS Tower keys - this should put an end to accidental key lime creation.

Revision: 7529
Fix protection against negative item counts in various lists: it was only
preventing an existing value from becoming negative, there was nothing
keeping an item from being added with an initially negative count.

Revision: 7530
Rename a couple of ASH functions: put_closet_meat() is now simply put_closet()
and get+closet_meat() is simply get_closet(). These are distinguishable from
the other versions of the same functions because they take a single integer,
not an integer and an item.
Fix drop rates for clod hopper.
Add conditions to the Battlefield( No Uniform) to get the cola uniform of your
choice.
Move verge-of-war Hippy Camp and Frat House conditions to the correct adventure
location where you can find them, not the pre-war locations.

Revision: 7531
Added persistence of known Mall prices (as returned from ASH mall_price), so
that the program always has at least an approximate idea of how much things
are worth. A starter data file is provided, with prices gathered on August
7-9.
* The decision between buying or creating things you have some of the
ingredients for now values the ingredients you have at this estimated price.
I couldn't justify performing a Mall search on items for which no Mall
transaction was being contemplated, and the previous valuation (the item's
autosell price) was rather inaccurate in cases such as reagents and noodles.
* When the Modifier Maximizer considers buying equipment or potions, it now
ignores anything with an estimated price more than twice your price limit.
No more useless searches for Grimacite gear and ultra-rares when you're
trying to optimize on a 20K budget...
* More uses to come, particularly in the Item Manager.
Added two ASH functions for querying this data:
int historical_price(item) - Returns the most recent known price, or zero for
items that are untradeable, have no data yet, or simply aren't available in
the Mall at any price.
float historical_age(item) - Returns the age of the price data, in days.
Missing data has an infinite age.
Added a CLI command for updating data:
update prices <http://URL> - Merges in newer prices from a copy of
mallprices.txt that has been uploaded somewhere (a pathname can also be used
for a local file). Only one update per URL per session is allowed, to
prevent abusing the bandwidth of anyone who chooses to make their price data
public.
Also, fixed Mall searchability of the Hodgman journals, which was a
combination of two problems:
* The item names actually have two spaces after the colon, but were only
specified with single spaces in mafia's data files.
* StringUtilities.getCanonicalName() was changing all double spaces to
single, so changing the data files alone would have no effect. There was no
comment as to why it was performing that transformation - everything seems to
work without it, so I can only hope it was a work-around for some problem
that has since been fixed.

Revision: 7532
Handle outfit modifiers before the individual equipment modifiers - so that
the Hobo Power from the Regal Frippery actually counts towards the Hodgman
off-hands.
Sped up determination of the current outfit by precalculating a hash value
for each standard outfit - most possibilities can be rejected with a single
bitwise operation, without actually examining any of the outfit pieces. This
makes a noticeable improvement in the Modifier Maximizer's speed.
Corrected fullness of beer nuts.

Revision: 7533
Consider meat paste & stacks to be creatable for the purposes of item
filtering - previously, "make dense meat sta" would match the staff, rather
than giving an ambiguity error with the staff & stack.
Major speedup in the fuzzy string matcher - for each list of names that is
matched against, a corresponding list of hash values is precalculated. The
majority of names that don't contain all of the distinct characters in the
search string can be skipped with a single integer operation, without looking
at the characters at all. This saves about 5 million function calls during
KoLmafia startup.

Revision: 7534
Add "A Contender" effect

Revision: 7535
Accepted subbawt's patch to handle recalled skills in Bad Moon. Not
personally tested, but it can hardly work worse than the current code...
Remove the spooky glove from outfit checkpoints when you lose it during the
Felonia quest.

Revision: 7536
When you place a bet in the MMG, KoLmafia keeps track of it so it can match it
with an event when the bet is taken. When the bet and event are matched, we
keep the event on a "resolved" list so that a script can pick up the event and
do whatever is necessary to deal with the resolved bet.
However, unless you made the bet through ASH, this event is useless, since it
won't match with any bet that a script was tracking.
Therefore, don't bother saving matched events unless the bet originally came
from KoLmafia itself, rather than the Relay Browser.

Revision: 7537
Recent submit introduced an NPE into simple visits of the account page. Fix it.

Revision: 7538
Warning screen in relay browser for expiring fortune cookie counter now gives
location of last semirare found, as from the "counters" command.

Revision: 7539
Fixed parsing of results from chat /outfit command: if a previously equipped
item had special characters in its name, its removal wasn't processed, and
the replacement item might end up in the wrong slot.
Slight speed-up to AdventureResult.compareTo(), one of the most frequently
called methods (can be over a million calls just starting up). It was often
performing two case-insensitive compares on the names, once to check equality
and once to determine inequality.
Slight speed-up to SortedListModel.compare(), also in the million+ call
range. It had a special case that applied only to lists of strings (a
capability of the class that I don't think KoLmafia is even using): it was
avoiding an unnecessary call to String.toString() (which is defined to simply
return the same string), at the cost of two instanceof checks - not a good
bargain.

Revision: 7540
Bump version number to 13.5
 

hallehoopma

New member
*Note - sourceforge completely changed its admin interface since I uploaded 13.4. I couldn't find a way to create a new "release", as such. Instead, I created a "v13.5" folder and uploaded the four files - .jar, .dmg, .exe, and .tar.gz - to it. Let me know if there is a problem.

No real problem at all. The only thing is that for we lazy people who rely on Mafia to tell us about the new official releases, this seemed to not happen this time. It's OK b/c obviously we know to go looking if there isn't one for a while, but maybe sourceforge will change something so the program will be able to tell us when there's a new release. It seems like something they'd be very interested in, if not anything for you to worry about.

Thanks again for ALL your hard work!
 
Top