Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Item Provider #1331

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7c0c0d7
created provideItem functions based on init, wip
Alium58 Jul 11, 2023
84af6bf
Merge branch 'Loathing-Associates-Scripting-Society:main' into item-p…
Alium58 Jul 11, 2023
d6482ac
fleshed out provideItem. Still need to update where it is called
Alium58 Jul 11, 2023
19f7abb
make speculate work for fams and make provideItem validate
Alium58 Jul 13, 2023
4daa645
use new provideItem function
Alium58 Jul 13, 2023
e642a87
Typo fix and use squint
Alium58 Jul 13, 2023
1e7df1b
improve familiar handling
Alium58 Jul 13, 2023
9349a33
log familiar benefit
Alium58 Jul 15, 2023
396d6f1
Merge branch 'main' into item-provider
Alium58 Oct 11, 2023
b0f8e98
Merge branch 'master' of https://github.com/Alium58/autoscend into it…
Alium58 Jun 7, 2024
add6ecc
correct hero's field
Alium58 Jun 7, 2024
55c9e60
syntax fix
Alium58 Jun 7, 2024
845e6ee
remove dickstabbing
Alium58 Jun 7, 2024
33e752d
moved making gear to end of provider
Alium58 Jun 7, 2024
0df1bee
help assessing if working right
Alium58 Jun 7, 2024
c5987f2
change doEquip to doEverything
Alium58 Jun 7, 2024
d459ae4
change doEquip to doEverything
Alium58 Jun 7, 2024
e95db67
typo
Alium58 Jun 7, 2024
30855ce
clarify filth worms
Alium58 Jun 7, 2024
fb8b7a0
syntax fix
Alium58 Jun 7, 2024
f942743
improve message
Alium58 Jun 8, 2024
ef8640d
improved debugging
Alium58 Jun 8, 2024
a342ba9
remove debugging code
Alium58 Jun 8, 2024
8946c3c
Merge branch 'main' into item-provider
Alium58 Jul 26, 2024
29d26e0
no frosty for wereprof
Alium58 Jul 26, 2024
4d2b1b5
merge latest updates and resolve conflicts
Alium58 Oct 8, 2024
90230d5
add dance of sugar fairy
Alium58 Oct 8, 2024
e805e83
add glowing hands buff
Alium58 Oct 8, 2024
975a674
new function auto_totalEffectWishesAvailable()
Alium58 Oct 8, 2024
7d87dc5
comment +item, add more item buff sources, and wishes
Alium58 Oct 8, 2024
1072ddb
syntax fix
Alium58 Oct 9, 2024
91ed511
was too agressive with using limited resources
Alium58 Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
} break;
case $effect[The Glistening]: useItem = $item[Vial of the Glistening]; break;
case $effect[Glittering Eyelashes]: useItem = $item[Glittery Mascara]; break;
case $effect[Glowing Hands]: useItem = $item[emergency glowstick]; break;
case $effect[Go Get \'Em\, Tiger!]: useItem = $item[Ben-gal™ Balm]; break;
case $effect[Good Things Are Coming, You Can Smell It]: useItem = $item[Smoldering Clover™ candle];break;
case $effect[Got Milk]: useItem = $item[Milk of Magnesium]; break;
Expand Down
60 changes: 3 additions & 57 deletions RELEASE/scripts/autoscend/auto_pre_adv.ash
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ void print_footer()
}
}
auto_log_info(next_line, "blue");

}

void auto_ghost_prep(location place)
Expand Down Expand Up @@ -274,8 +275,7 @@ boolean auto_pre_adventure()
}
if(place == $location[Hero\'s Field])
{
buffMaintain($effect[Fat Leon\'s Phat Loot Lyric], 30, 1, 1);
buffMaintain($effect[Singer\'s Faithful Ocelot], 30, 1, 1);
provideItem(400, $location[Hero\'s Field], true);
addToMaximize("200item 500max");
}

Expand Down Expand Up @@ -668,61 +668,7 @@ boolean auto_pre_adventure()
generic_t itemNeed = zone_needItem(place);
if(mayNeedItem && itemNeed._boolean)
{
addToMaximize("50item " + (ceil(itemNeed._float) + 100.0) + "max"); // maximizer treats item drop as 100 higher than it actually is for some reason.
simMaximize();
float itemDrop = simValue("Item Drop");
if(itemDrop < itemNeed._float)
{
if (buffMaintain($effect[Fat Leon\'s Phat Loot Lyric], 20, 1, 10))
{
itemDrop += 20.0;
}
if (buffMaintain($effect[Singer\'s Faithful Ocelot], 35, 1, 10))
{
itemDrop += 10.0;
}
}
if(itemDrop < itemNeed._float && !haveAsdonBuff())
{
asdonAutoFeed(37);
if(asdonBuff($effect[Driving Observantly]))
{
itemDrop += 50.0;
}
}
if(itemDrop < itemNeed._float)
{
//if general item modifier isn't enough check specific item drop bonus
generic_t itemFoodNeed = zone_needItemFood(place);
generic_t itemBoozeNeed = zone_needItemBooze(place);
float itemDropFood = itemDrop + simValue("Food Drop");
float itemDropBooze = itemDrop + simValue("Booze Drop");
if(itemFoodNeed._boolean && itemDropFood < itemFoodNeed._float)
{
auto_log_debug("Trying food drop supplements");
//max at start of an expression with item and food drop is ineffective in combining them, have to let the maximizer try to add on top
addToMaximize("49food drop " + ceil(itemFoodNeed._float) + "max");
simMaximize();
itemDropFood = simValue("Item Drop") + simValue("Food Drop");
}
if(itemBoozeNeed._boolean && itemDropBooze < itemBoozeNeed._float)
{
auto_log_debug("Trying booze drop supplements");
addToMaximize("49booze drop " + ceil(itemBoozeNeed._float) + "max");
simMaximize();
itemDropBooze = simValue("Item Drop") + simValue("Booze Drop");
//no zone item yet needs both food and booze, bottle of Chateau de Vinegar exception is a cooking ingredient but doesn't use food drop bonus
}
if((itemFoodNeed._boolean && itemDropFood >= itemFoodNeed._float) ||
(itemBoozeNeed._boolean && itemDropBooze >= itemBoozeNeed._float))
{
//the needed item was Food/Booze and need has been met with specific bonus
}
else
{
auto_log_debug("We can't cap this drop bear!", "purple");
}
}
provideItem(ceil(itemNeed._float),place,false);
}


Expand Down
Loading
Loading