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

Fixes for the myriad of auto_hippyInstead = true issues. #265

Merged
merged 4 commits into from
Apr 1, 2020

Conversation

taltamir
Copy link
Contributor

@taltamir taltamir commented Mar 28, 2020

Description

Lots of issues with the island war when fighting for the hippies.
worse offenders are:

  1. it pulls frat outfit
  2. if you manually pulled hippy outfit, it wears it then adventures in hippy camp to start the war for 52 turns before realizing something is wrong.

Fixes #167
probably fixes a few other open issues too

How Has This Been Tested?

all testing thus far was in mafia r19898, which predates the NC handling change by mafia.

main account = has tons of IOTMs and all skills permed.
side account = has very few permed skills and zero IOTMs

So far I have tested:

main account, softcore plumber on hippies side, I manually fought all the way until the arena and got the hippy band fliers before deciding to start writing this update.
It successfully flyered for the hippies and then fought until the man. Did not actually start combat with the man but that is a bug that predates my patch. I am not too sure how to fix it actually since that code is weird.

main account, hardcore pathless turtle tamer, fighting for frat, I ran a full ascension (2 day). Carefully monitoring this quest. No issues at all were noticed, showing I didn't break anything on the already working frat side for hardcore. (unless I maybe softcore or heavy rains, future things to test)

main account, hardcore pathless, seal clubber, fighting for hippies.

side accounts. casual pathless sauceror fighting for hippies... with almost no skills and 0 IOTMs.

main account, hardcore pathless, seal clubber, fighting for fratboys

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have based by pull request against the beta branch or have a good reason not to.

@taltamir
Copy link
Contributor Author

autoscend.ash
I removed a check that set auto_ignoreFlyer = true if you were doing hippies.
Hippies save 8 turns if doing flyer and there was already lots of (unreachable) code to handle flyering as a hippy, said code worked perfectly fine after I removed that if function
(softcore plumber run on main account)

auto_tower.ash
during initiative buffing, autoscend gets aborted by mafia when it uses CLI to try and get white-boy angst.
this line assumed that:

  1. you actually did the arena
  2. that you did it for the fratboy side

added a simple check to verify both assumptions by checking that get_property("sidequestArenaCompleted") == "fratboy"
already tested this change (softcore plumber run on main account) and it worked.

auto_island_war.ash
many changes to fix myriad issues when fighting for hippies. will explain reasoning for any suspect looking one if anyone asks.

@taltamir
Copy link
Contributor Author

taltamir commented Mar 28, 2020

TODO

  1. [DONE] fighting for hippies, it does not engage the man. old existing bug not one i introduced. code baffles me.

rest of the list is at the bottom of pull request with extra

@Malibu-Stacey
Copy link
Member

Malibu-Stacey commented Mar 28, 2020

3 of your 4 commits are merges. As @jeparo said in Discord, you need to learn how to rebase your fork from autoscend instead of merging all the time.
See https://gist.github.com/ravibhure/a7e0918ff4937c9ea1c456698dcd58aa as an example (replace master with beta)
Then once you've done that, create a new branch with your changes on it & submit that branch for PR. It should only have your actual commits in it not a bunch of merges as well.

@Malibu-Stacey
Copy link
Member

Malibu-Stacey commented Mar 28, 2020

  1. fighting for hippies, it does not engage the man. old existing bug not one i introduced. code baffles me.

In L12_finalizeWar() the line
if (get_property("hippiesDefeated").to_int() < 1000 && get_property("fratsDefeated").to_int() < 1000)
should be "fratboysDefeated" not "fratsDefeated".
That call to get_property will always return 0 (since it's an empty string and to_int() of an empty string becomes 0) so it's always returning false from that if statement.

@taltamir
Copy link
Contributor Author

3 of your 4 commits are merges. As @jeparo said in Discord, you need to learn how to rebase your fork from autoscend instead of merging all the time.
See https://gist.github.com/ravibhure/a7e0918ff4937c9ea1c456698dcd58aa as an example (replace master with beta)
Then once you've done that, create a new branch with your changes on it & submit that branch for PR. It should only have your actual commits in it not a bunch of merges as well.

alright, ill get on it.

  1. fighting for hippies, it does not engage the man. old existing bug not one i introduced. code baffles me.

In L12_finalizeWar() the line
if (get_property("hippiesDefeated").to_int() < 1000 && get_property("fratsDefeated").to_int() < 1000)
should be "fratboysDefeated" not "fratsDefeated".
That call to get_property will always return 0 (since it's an empty string and to_int() of an empty string becomes 0) so it's always returning false from that if statement.

oh, thank you. I missed that and was looking at different parts and saying to myself "why doesn't it work, the code looks right!"

@taltamir
Copy link
Contributor Author

taltamir commented Mar 29, 2020

commits 86a7d6c and 0779fbc tested immediately before committing them.
first one fixed infinite loop with hippies in filthworm sidequest. second one fixed hippies not grabbing the magnet at junkyard sidequest

@taltamir
Copy link
Contributor Author

note that hippies still don't even bother to grab the flyers. they will flyer if you manually grabbed them though. no point in really adding such code yet since the war is the last quest done, it will need to be reshuffled to be done much sooner to make that worthwhile.

additionally, there is no code at all for doing the dooks. which is helpful for hippies.

Rinn
Rinn previously approved these changes Mar 29, 2020
Copy link
Member

@Malibu-Stacey Malibu-Stacey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good overall, few small changes.
I would also recommend adding a guard in LX_universeFrat() when auto_hippyInstead = true so we don't unnecessarily summon the War Frat 151st Infantryman.

BTW good use of comments, especially on the setting of choiceAdventure's.

@Malibu-Stacey Malibu-Stacey changed the title War2 Fixes for the myriad of auto_hippyInstead = true issues. Mar 31, 2020
it prevented fighting the man for the hippies
@taltamir
Copy link
Contributor Author

@Malibu-Stacey applied all changes you suggested. thank you for looking over this code.

@taltamir
Copy link
Contributor Author

taltamir commented Mar 31, 2020

TODO list for either this pull or its successor:

  1. Flyer sidequest is currently only being accepted for fratboys, and it is only touched once, immediately after the war is started by the fratboys.
    For current code search auto_island_war.ash for
    visit_url("bigisland.php?place=concert&pwd");

  2. war quest is done last, which is a bit of a mistake since it gives you access to a bunch of useful tools via the sidequests which you miss out on by doing it last in a run. furthermore, because its done last by the time hippies get to the arena quest they are out of places to distribute flyers. I think it should be one of the first quests being done. nuns, organic orchard, and arena all offer wonderful rewards with potential turn and meat savings or generation.

  3. I did not comb through all the functions for stuff that should differentiate hippies, only a few of the core functions and those functions I saw them calling.

  4. Need to change NC handling to ensure it works with new mafia versions.

  5. Write handling for dooks sidequest. gausie added chaos butterfly tracking to mafia just for this.

@taltamir
Copy link
Contributor Author

taltamir commented Mar 31, 2020

added rainman support for hippies.
I have not tested it in a rainman run yet. but in a regular run there was no obvious errors introduced by it.

@taltamir taltamir requested a review from Malibu-Stacey March 31, 2020 20:09
Copy link
Member

@Malibu-Stacey Malibu-Stacey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Malibu-Stacey Malibu-Stacey merged commit 24d7770 into loathers:beta Apr 1, 2020
@taltamir taltamir deleted the war2 branch April 1, 2020 01:42
@taltamir
Copy link
Contributor Author

taltamir commented Apr 1, 2020

So, a bunch of commits disappeared into thin air due to rebase. will have to find and reapply them

@taltamir taltamir restored the war2 branch April 1, 2020 07:00
@taltamir
Copy link
Contributor Author

taltamir commented Apr 1, 2020

looking at the hippy commit. it actually tells us which commits went through. the last 4.
this pull request overall looks like

rebase 1
rebase 2
commit that went through = doing the island war as hippy 4102aa1
commit that went through = property was mispelled 18c3b00
rebase 3
commit that went through = assorted fixes e87c547
commit that went through = rainman hippy support 8169349

so. everything before rebase 2 was lost
I will try to recover them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pulling Frat Warrior Fatigues when auto_hippyInstead is set to true
3 participants