Skip to content

Commit

Permalink
Merge pull request #661 from Loathing-Associates-Scripting-Society/beta
Browse files Browse the repository at this point in the history
push 1.6.0 to master
  • Loading branch information
Malibu-Stacey authored Feb 6, 2021
2 parents e413cbf + 76b37fb commit 6c791c2
Show file tree
Hide file tree
Showing 75 changed files with 3,572 additions and 2,320 deletions.
Binary file removed .github/kolmafia.jar
Binary file not shown.
65 changes: 46 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

name: CI
env:
MAFIA_BUILD: "1902"
MAFIA_VERSION: "20394"
SCRIPT_NAME: "autoscend.ash"
SCRIPT_NAMES: "autoscend.ash auto_pre_adv.ash auto_post_adv.ash auto_choice_adv.ash relay_autoscend.ash autoscend_settings_extra.ash"

on: [push, pull_request]

Expand All @@ -17,16 +15,41 @@ jobs:
- uses: actions/checkout@v2

- name: Setup Java JDK
uses: actions/setup-java@v1.3.0
uses: actions/setup-java@v1.4.3
with:
java-version: 1.8

- name: Prepare KoLmafia
- name: Determine KoLmafia version
id: mafia
run: |
if [[ ! -f ".github/kolmafia.jar" ]]; then
curl "https://ci.kolmafia.us/job/Kolmafia/${MAFIA_BUILD}/artifact/dist/KoLmafia-${MAFIA_VERSION}.jar" --output .github/kolmafia.jar
set -o pipefail
export MAFIA_VERSION=$(head -n1 RELEASE/scripts/autoscend.ash | grep -o '[0-9]\+')
if [[ -z "$MAFIA_VERSION" ]]; then
echo "Couldn't determine required mafia version!"
exit 1
fi
export MAFIA_BUILD=$(curl --fail --silent --globoff 'https://ci.kolmafia.us/job/Kolmafia/api/json?tree=builds[number,artifacts[relativePath]]' | jq '[.builds[]] | map(select(.artifacts[].relativePath | contains(env.MAFIA_VERSION))) | .[] | .number' | head -n1)
if [[ -z "$MAFIA_BUILD" ]]; then
echo "Couldn't determine Jenkins build number!"
exit 1
fi
export JENKINS_URL="https://ci.kolmafia.us/job/Kolmafia/${MAFIA_BUILD}/artifact/dist/KoLmafia-${MAFIA_VERSION}.jar"
echo "::set-output name=jenkins::$JENKINS_URL"
echo "::set-output name=build::$MAFIA_BUILD"
echo "::set-output name=version::$MAFIA_VERSION"
- name: Cache KoLmafia
id: cache
uses: actions/cache@v2
with:
path: .github/kolmafia.jar
key: kolmafia-${{steps.mafia.outputs.build}}-${{steps.mafia.outputs.version}}

- name: Download KoLmafia
if: steps.cache.outputs.cache-hit != 'true'
run: |
curl "${{steps.mafia.outputs.jenkins}}" --output .github/kolmafia.jar
- name: Install and verify
run: |
cd RELEASE
Expand All @@ -43,15 +66,19 @@ jobs:
java -DuseCWDasROOT=true -jar ../.github/kolmafia.jar --CLI _ci_dependencies
fi
# Run the verification
echo "Verifying..."
errors=0
for ashfile in ${SCRIPT_NAMES}; do
# Run the verification
echo "Verifying ${ashfile}..."
echo "try { cli_execute('verify ${SCRIPT_NAME}'); } finally { cli_execute('exit'); }" > scripts/_ci_verify.ash
output=$(java -DuseCWDasROOT=true -jar ../.github/kolmafia.jar --CLI _ci_verify)
if [[ $output == *"Script verification complete." ]]; then
echo "Verified!"
exit 0
else
echo $output
exit 1
fi
echo "try { cli_execute('verify ${ashfile}'); } finally { cli_execute('exit'); }" > scripts/_ci_verify.ash
output=$(java -DuseCWDasROOT=true -jar ../.github/kolmafia.jar --CLI _ci_verify)
if [[ $output == *"Script verification complete." ]]; then
echo "Verified ${ashfile}!"
else
echo $output
errors=$((errors+1))
fi
done
exit ${errors}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.bak
*.sh
.github/kolmafia.jar
4 changes: 2 additions & 2 deletions BUILD/assemble.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
HEADER="# EDITTING THIS FILE DIRECTLY IS NOT RECOMMENDED
# THIS FILE IS GENERATED BY BUILD/assemble.sh
HEADER="# THIS FILE IS GENERATED BY BUILD/assemble.sh
# DO NOT EDIT THIS FILE DIRECTLY. EDIT THE .DAT FILES IN THE /BUILD/ FOLDER THEN RUN assemble.sh
"

for DIR in ./*/; do
Expand Down
4 changes: 2 additions & 2 deletions BUILD/familiars/drop.dat
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Fist Turkey prop:_turkeyMoxie<5;mainstat:Moxie;path:The Source
Cat Burglar prop:_catBurglarCharge<30
#
# Melodramedary generating spit seems good
#Melodramedary prop:camelSpit<100 - Don't uncomment until we actally use it
Melodramedary prop:camelSpit<100
#
# Drops BACON every battle. 100 bacon makes size 15 density 4.83 food. 150 bacon can get you a fat loot token
Intergnat item:BACON<150
Expand All @@ -37,7 +37,7 @@ Intergnat item:BACON<150
# density 1.875 size 4 spleen consumables. boolean autoChooseFamiliar(location place) will already grab the amount needed for spleen
# Here they are only used to grab extras.
Grim Brother prop:_grimFairyTaleDrops<5
Pair of Stomping Boots prop:_bootStomps<7
Pair of Stomping Boots !path:G-Lover;prop:_bootStomps<7
Baby Sandworm prop:_aguaDrops<5
Bloovian Groose prop:_grooseDrops<5
Golden Monkey prop:_powderedGoldDrops<5
Expand Down
5 changes: 3 additions & 2 deletions BUILD/familiars/item.dat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# "Item" is used when we want a familiar that boosts the chance of a monster dropping an item
# We expect that familiars that drop items directly a limited amount of times per day will be used first elsewhere. So do not account for those.
#
# exempt from 10 lbs restriction in KOHLS path
# exempt from 10 lbs restriction in KOLHS path
Steam-Powered Cheerleader path:KOLHS
# Fairies with a multiplier
# 1.4x multiplier fairy
Expand Down Expand Up @@ -45,8 +45,9 @@ Casagnova Gnome
Psychedelic Bear
Piano Cat
# Slightly special fairies
Ghost of Crimbo Carols
Red-Nosed Snapper
Pair of Stomping Boots
Pair of Stomping Boots !path:G-Lover
Gelatinous Cubeling
Steam-Powered Cheerleader
Obtuse Angel
Expand Down
1 change: 1 addition & 0 deletions BUILD/familiars/meat.dat
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Hand Turkey
# Sorry, we don't use him for yellow rays but we can at least use him for meat I guess
He-Boulder
# Marginally special leprechauns
Ghost of Crimbo Commerce
Knob Goblin Organ Grinder
#Mutant Cactus Bud grimdark:2
Urchin Urchin
Expand Down
2 changes: 2 additions & 0 deletions BUILD/familiars/stat.dat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Elf Operative
Optimistic Candle
Rockin' Robin
# Volleychauns
Ghost of Crimbo Commerce
Golden Monkey
Bloovian Groose
Unconscious Collective
Expand All @@ -29,6 +30,7 @@ Melodramedary
# Might as well build up weight for free runs, even though I'm pretty sure we don't use them...
Frumious Bandersnatch
# Slightly special volleyballs
Ghost of Crimbo Cheer
Reanimated Reanimator
God Lobster
Party Mouse
Expand Down
2 changes: 1 addition & 1 deletion BUILD/monsters/sniff.dat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pygmy shaman loc:The Hidden Apartment Building;sgeea:3;!effect:Thrice-Cursed
pygmy shaman loc:The Hidden Apartment Building;!effect:Thrice-Cursed
Gurgle the Turgle
Writing Desk !prop:writingDesksDefeated=5
Smoke Monster item:Pack of Smokes>0
Expand Down
5 changes: 4 additions & 1 deletion BUILD/monsters/yellowray.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Gotta get that wig
Burly Sidekick item:Mohawk Wig<1
Burly Sidekick item:Mohawk Wig<1;!skill:Comprehensive Cartography
# We also want an amulet, but not badly enough to yellow ray it unless we're backtracking to get it
Quiet Healer item:amulet of extreme plot significance<1;quest:questL10Garbage>6
# Dressing up as a harem girl because we have no shame
Expand Down Expand Up @@ -42,3 +42,6 @@ larval filthworm !familiar:XO Skeleton;!class:Ed
filthworm drone !familiar:XO Skeleton;!class:Ed
filthworm royal guard !familiar:XO Skeleton;!class:Ed
Knight (Snake) class:Ed
bearpig topiary animal familiar:Melodramedary
elephant (meatcar?) topiary animal familiar:Melodramedary
spider (duck?) topiary animal familiar:Melodramedary
7 changes: 5 additions & 2 deletions BUILD/settings/action.dat
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
auto_interrupt boolean Cause script to stop before starting next turn action (instead of trying to abort midturn).
auto_debugging boolean Will cause the script to stop after one adventure (by setting auto_interrupt = true).
auto_interrupt boolean Script will abort after the next action is finished (instead of mid turn which can cause problems). Will be reset to false after every time it is used.
auto_debugging boolean Every time you run the script it will perform one adventure and then stop by setting auto_interrupt = true
auto_paranoia integer If quest tracking is broken enable this. It determines how often should we refresh quests. measured in adventures. -1 is never. 1 = every single adventure
auto_inv_paranoia boolean If item drop tracking is broken enable this. It will refresh inventory every loop.
auto_newbieOverride boolean If true will override newbie block once then set itself to false. Newbie block is enabled used when you fight a crate (please report crate fighting) or when you spent too many adventures in a zone
11 changes: 4 additions & 7 deletions BUILD/settings/any.dat
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
auto_skipNEPOverride boolean If true, will not use the Neverending Party even if mafia says it is available.
auto_newbieOverride boolean Did you fight a crate? Ugh... Report it please, but if you want the script to try again, set this to true and it'll override it. Once.
auto_skipNEPOverride boolean If true will not use the Neverending Party even if mafia says it is available.
auto_delayHauntedKitchen boolean Should we delay the Haunted Kitchen until we have 9 resist? (Or in Ed, Even More Elemental Wards)?
auto_dickstab boolean Do you want to let the script potentially spend lots of meat just to shave off a few adventures? You probably don't.
auto_getDinseyGarbageMoney boolean Spend a few turns getting the easy FunBucks during a run?
auto_borrowedTimeOnLiberation boolean Automatically use Borrowed Time when liberating the King? This assumes that you are going to bother to ascend again the same day.
auto_delayTimer integer Sets the delay before each action, default is 1 second(s). It is not recommended to reduce this below 1.
auto_powerLevelTimer integer Sets the delay before each adv spent powerleveling, default is 10 sec. lowest valid value is 1.
auto_powerLevelTimer integer Delay in seconds before each time we spend an adv powerleveling. default is 10 sec. lowest valid value is 1.
auto_kingLiberation boolean Use the CHEDDAH kingLiberation script?
auto_allowSharingData boolean Allow the script to send information about the ascension to a sad, abused database in hopes of great spades? Specifics will appear (at the bottom) once set to true.
auto_stayInRun boolean If true, we stop when the King can be freed but do not free the King. Paths with a choice at liberation time will always stayInRun regardless of this setting.
auto_confidence boolean If true, we'll get the confidence buff instead of breaking the mirror. Good if your combat suite isn't very fleshed out yet, since it makes the Naughty Sorceress dramatically easier.
auto_teaChoice string When using the tea tree, grab this 'tea'. Must use a string that acceptable to Mafia's 'teatree' command (Use ; to separate by daycount, leave blank to skip a day).
Expand Down Expand Up @@ -35,16 +33,15 @@ auto_consultClan string The clan name of the player you want to do Zatara consul
auto_consultChoice string The name of the player you want to do Zatara consults with.
auto_considerGalaktik boolean When true autoscend may automatically enable galaktik quest for this run if it decides it is needed.
auto_slowSteelOrgan boolean When true, don't immediately go for the Steel Organ (assuming we want a steel organ).
auto_skipUnlockGuild boolean When true, don't unlock the guild.
auto_save_adv_override integer Set an override to amount of adv to save at end of day. Set to -1 to handle this automatically.
auto_saveSausage boolean When true, in HCCS, do not eat the Sausage Without A Cause (may cause you to eat nothing on day 2).
auto_saveVintage boolean When true, in HCCS, do not drink the Vintage Smart Drink (will cause +lbs quest to take 4 more adventures).
auto_saveMagicalSausage boolean When true, don't eat magical sausage, so you can save them up for aftercore.
auto_useWishes boolean When true, use the Genie Bottle to go faster in non-Community Service runs.
auto_spoonsign string What sign to change to with the hewn moon-rune spoon after finishing any business in the current sign. If blank or invalid, we won't switch automatically. Can be set to any of the 9 main sign names, or knoll/canadia/gnomad to automatically select the appropriate sign within that zone based on your mainstat. Also some shorthands are allowed in case you forgot which moonsign is which, such as famweight/clover/food/booze. You will be prompted to confirm that you actually do want to change signs automatically once per ascension (although it will automatically assume that you do after 15 seconds of inactivity), so forgetting to change the value in advance should not be a concern.
auto_MLSafetyLimit integer If set this will be the (approximate) cap for +ML. WARNING: Certain conditions may require the script to exceed this by a small margin. For best results set this 10 below the maximum ML you can handle.
auto_disregardInstantKarma boolean When true, the script will not scale back ML after reaching Level 13, if you also set auto_MLSafetyLimit to 999 the script will passively power level. WARNING: You are unlikely to get Instant Karma (This is useful if your run preceeds The Sea, The Basement, or Dungeons)
auto_secondPlaceOrBust boolean When true, abort before each tower test if we can't get to second place.
auto_helpMeMafiaIsSuperBrokenAaah boolean Pretty much just for werebear. If for some reason you find that mafia completely fails to detect item drops occasionally, leading to wasting a ton of adventures continuing to look for an item you already found, try this out.
auto_logLevel string One of: critical, error, warning, info, debug, trace. Sets the level of log output for autoscend gcli and session log output. Critical showing the least detail (only critical messages) and trace showing the most detail (print everything). Defaults to info.
auto_restoreUseBloodBond boolean Whether to use extra hp to cast blood bond. Blood bond has a recurring HP drain, set to false if you are worried about getting killed or wasting resources healing. Defaults to false.
auto_forceFatLootToken boolean force grabbing the fat loot tokens from daily dungeon and fantasy realm every day even if you already have enough for this run. This is mainly for new accounts who want to get the cubeling and/or skillbooks.
auto_pvpEnable boolean Break the hippy stone to unlock PvP?
16 changes: 7 additions & 9 deletions BUILD/settings/post.dat
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
auto_getBeehive boolean Go for the beehive?
auto_getStarKey boolean Get Richard's Star Key?
auto_holeinthesky boolean Do we need to open the Hole in the Sky?
auto_hippyInstead boolean Fight on the side of the hippies instead of the Frat Warriors?
auto_ignoreFlyer boolean Do not do the flyer quest, recommended to set true if fighting for the hippies.
auto_haveoven boolean If you have an oven, this should be true. But we can't always check the campground.
auto_wandOfNagamar boolean Do we need to get a Wand of Nagamar?
auto_doGalaktik boolean Do Galaktik quest this ascension
auto_paranoia integer How often should we refresh quests? -1 is never, lower positive numbers = more often.
auto_getSteelOrgan boolean Get Steel Organ in this ascension?
auto_getBeehive boolean Get Beehive in this ascension?
auto_getStarKey boolean Get Richard's Star Key in this ascension?
auto_holeinthesky boolean Open the Hole in the Sky in this ascension?
auto_hippyInstead boolean Fight on the side of the hippies instead of the Frat Warriors in this ascension?
auto_ignoreFlyer boolean Do not do the flyer quest in this ascension? recommended to set true if fighting for the hippies.
auto_wandOfNagamar boolean Do we need to get a Wand of Nagamar in this ascension?
3 changes: 1 addition & 2 deletions BUILD/settings/pre.dat
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
auto_pvpEnable boolean Automatically participate in PvP?
auto_alwaysGetSteelOrgan boolean If true, get the Steel Organ in the next ascension.
auto_alwaysGetSteelOrgan boolean When we next initialize settings it will be copied to auto_getSteelOrgan
1 change: 1 addition & 0 deletions BUILD/settings/sharing.dat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
auto_allowSharingData boolean Allow the script to send information about the ascension to a sad, abused database in hopes of great spades? Specifics will appear (at the bottom) once set to true.
auto_shareMaximizer boolean Share maximzer data. This includes the maximzer string, class, path, softcore/hardcore and moon sign.
3 changes: 3 additions & 0 deletions BUILD/settings_extra/action.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
auto_disableAdventureHandling boolean When true this prevents preadventure and postadventure scripts from running. resets every loop.
auto_disableFamiliarChanging boolean When true this prevents familiar changes. resets every loop.
auto_combatDirective string An action to execute at the start of next combat. resets every loop.
11 changes: 11 additions & 0 deletions BUILD/settings_extra/any.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
auto_abooclover boolean Are we considering using a clover at A-Boo Peak?
auto_aboopending integer The last turn of a pending A-Boo Clue. 0 if no clue active.
auto_clanstuff string What was the last day we did 'end of day' clan stuff.
auto_noSleepingDog boolean When true do not eat a Sleeping Dog.
auto_saveMargarita boolean Community Service: Do not consume Emergency Margarita
auto_csDoWheel boolean Community Service: Use Wheel of Fortune instead of Myst Stats Deck Cheat
auto_hccsTurnSave boolean Community Service: Should we ignore pixel farming?
auto_maxCandyPrice integer Max allowable price per candy for Rethinking Candy (default 2500)
auto_hccsNoConcludeDay boolean Community Service: When true reduce how many daily end-of-day things we do.
auto_saveSausage boolean When true, in HCCS, do not eat the Sausage Without A Cause (may cause you to eat nothing on day 2).
auto_saveVintage boolean When true, in HCCS, do not drink the Vintage Smart Drink (will cause +lbs quest to take 4 more adventures).
2 changes: 2 additions & 0 deletions BUILD/settings_extra/header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# variable timing, number, variable name, variable type, description

30 changes: 30 additions & 0 deletions BUILD/settings_extra/post.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
auto_chasmBusted boolean Has the orc chasm bridge been 'trolled yet? Ed only.
auto_cookie integer HCCS Only: Tracks fortune cookie.
auto_crackpotjar string Status of Crackpot Mystic Jar of Psychoses
auto_day1_dna string 'finished' if we have hybridized ourselves at the start of Ascension.
auto_day_init string Current daycount if we finished initializing today.
auto_getBoningKnife boolean Do we want Boning Knife this ascension?
auto_gnasirUnlocked boolean Have we found gnasir in the Desert?
auto_grimstoneFancyOilPainting boolean do grimstone for fancy oil painting this ascension?
auto_grimstoneOrnateDowsingRod boolean do grimstone for ornate dowsing rod this ascension?
auto_hedge string 'fast' or 'slow', determining how quickly we want to finish the Hedge Maze.
auto_powerLevelLastLevel string Last Level that we had nothing to do.
auto_powerLevelAdvCount string Adventures count of times we had nothing to do.
auto_powerLevelLastAttempted string Last adventure that we did nothing on.
auto_skipNuns boolean Skip nuns quest this ascension?
auto_waitingArrowAlcove integer If we arrowed a modern zmobie, this tells us when to return to the Alcove (cyrptAlcoveEvilness value).
auto_100familiar string If a familiar type, do not allow familiar switching (for 100% runs). Otherwise, can be none or blank.
auto_beatenUpCount integer How many times were we beaten up this ascension. Affects ML and whether we try to heal or abort when we get beaten up.
auto_doneInitialize integer Indicates last ascension that we initialized with the script.
auto_noSnakeOil integer Last day that we could no longer Extract Oil.
auto_renenutetBought integer Number of Talisman of Renenutet's bought on last tracking.
auto_batoomerangDay integer Part of Replica Bat-oomerang Tracker
auto_batoomerangUse integer Part of Replica Bat-oomerang Tracker
_auto_lastABooConsider integer Last turn that we considered doing A-Boo Peak
_auto_lastABooCycleFix integer Tracker to prevent us infinitely looping on A-Boo Peak
_auto_witchessBattles integer Tracker for Witchess Combats (yes, this is actually needed).
auto_needLegs boolean In Ed, do we require getting legs before trying to Ka farm?
auto_haveoven boolean Track oven status. If you have an oven this should be true. But we can't always check the campground.
auto_doGalaktik boolean Do Galaktik optional sidequest this ascension?
auto_L8_ninjaAssassinFail boolean True means we think we cannot defeat ninja snowmen assassins and are thus avoiding them this ascension. We will not copy them nor adventure in the lair of the ninja snowmen
auto_L8_extremeInstead boolean True means we want to adventure in the extreme slope path instead of the ninja snowmen lair this ascension.
1 change: 1 addition & 0 deletions BUILD/settings_extra/pre.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#
1 change: 1 addition & 0 deletions BUILD/settings_extra/sharing.dat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#
Loading

0 comments on commit 6c791c2

Please sign in to comment.