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

fix: buffMaintain should return true if it tried to do something #1513

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Changes from all commits
Commits
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
33 changes: 27 additions & 6 deletions RELEASE/scripts/autoscend/auto_buff.ash
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
return false;
}

boolean ret = false;
switch(buff)
{
#Jalapeno Saucesphere
Expand All @@ -168,9 +169,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Amazing]: useItem = $item[Pocket Maze]; break;
case $effect[Angry]: useSkill = $skill[Anger Glands]; break;
case $effect[Angry like the Wolf]:
if(auto_have_familiar($familiar[Grim Brother]))
if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean())
{
if(speculative)
{
return true;
}
visit_url("choice.php?pwd&whichchoice=835&option=2", true);
ret = true;
} break;
case $effect[Antibiotic Saucesphere]: useSkill = $skill[Antibiotic Saucesphere]; break;
case $effect[Arched Eyebrow of the Archmage]:useSkill = $skill[Arched Eyebrow of the Archmage];break;
Expand Down Expand Up @@ -423,9 +429,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Gristlesphere]: useSkill = $skill[Gristlesphere]; break;
case $effect[Gritty]: useItem = $item[pile of gritty sand]; break;
case $effect[Grumpy and Ornery]:
if(auto_have_familiar($familiar[Grim Brother]))
if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean())
{
if(speculative)
{
return true;
}
visit_url("choice.php?pwd&whichchoice=835&option=3", true);
ret = true;
} break;
case $effect[Gummed Shoes]: useItem = $item[Shoe Gum]; break;
case $effect[Gummi-Grin]: useItem = $item[Gummi Turtle]; break;
Expand Down Expand Up @@ -620,6 +631,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
return true;
}
cli_execute("loathingidol pop");
ret = true;
} break;
case $effect[Power\, Man]: useItem = $item[Power-Guy 2000 Holo-Record]; break;
case $effect[Power Ballad of the Arrowsmith]:useSkill = $skill[The Power Ballad of the Arrowsmith];break;
Expand Down Expand Up @@ -674,6 +686,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
return true;
}
cli_execute("loathingidol ballad");
ret = true;
} break;
case $effect[A Rose by Any Other Material]: useItem = $item[Squeaky Toy Rose]; break;
case $effect[Rosewater Mark]: useItem = $item[Old Rosewater Cream]; break;
Expand Down Expand Up @@ -714,14 +727,15 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
{
return true;
}
// lodestene will be consumed for a free NC to get this buff
// save and restore our location as shadow rights has a large item penalty
// lodestone will be consumed for a free NC to get this buff
// save and restore our location as shadow rifts have a 80% item drop penalty
// don't want it unless actually going to a shadow rift
location savedLoc = my_location();
set_property("auto_disableAdventureHandling", true);
autoAdv(auto_availableBrickRift());
set_property("auto_disableAdventureHandling", false);
set_location(savedLoc);
ret = true;
}
break;
case $effect[Shells of the Damned]: useItem = $item[cyan seashell]; break;
Expand Down Expand Up @@ -755,9 +769,14 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
case $effect[Snow Shoes]: useItem = $item[Snow Cleats]; break;
case $effect[So You Can Work More...]: useItem = $item[Baggie of powdered sugar]; break;
case $effect[Soles of Glass]:
if(auto_have_familiar($familiar[Grim Brother]))
if(auto_have_familiar($familiar[Grim Brother]) && !get_property("_grimBuff").to_boolean())
{
if(speculative)
{
return true;
}
visit_url("choice.php?pwd&whichchoice=835&option=1", true);
ret = true;
} break;
case $effect[Somewhat Poisoned]: useSkill = $skill[Disco Nap]; break;
case $effect[Song of Accompaniment]: useSkill = $skill[Song of Accompaniment]; break;
Expand Down Expand Up @@ -800,6 +819,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
return true;
}
cli_execute("loathingidol rhyme");
ret = true;
} break;
case $effect[Spooky Hands]: useItem = $item[Lotion of Spookiness]; break;
case $effect[Spooky Weapon]: useItem = $item[Spooky Nuggets]; break;
Expand Down Expand Up @@ -866,6 +886,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
return true;
}
cli_execute("loathingidol country");
ret = true;
} break;
case $effect[Twen Tea]: useItem = $item[cuppa Twen tea]; break;
case $effect[Twinkly Weapon]: useItem = $item[Twinkly Nuggets]; break;
Expand Down Expand Up @@ -1092,7 +1113,7 @@ boolean buffMaintain(effect buff, int mp_min, int casts, int turns, boolean spec
{
return buffMaintain(useSkill, buff, mustEquip, mp_min, casts, turns, speculative);
}
return false;
return ret;
}

boolean buffMaintain(effect buff, int mp_min, int casts, int turns)
Expand Down
Loading