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

familiar functions changes #317

Merged
merged 9 commits into from
Apr 17, 2020
Merged

familiar functions changes #317

merged 9 commits into from
Apr 17, 2020

Conversation

taltamir
Copy link
Contributor

@taltamir taltamir commented Apr 16, 2020

replaced forbidFamChange() with canChangeFamiliar()
replaced forbidFamChange(familiar target) with canChangeToFamiliar(familiar target)
This is not a rename, but an inversion of the logic from asking a negative to asking a positive.
Adjusted the functions to have inverted logic.
Adjusted all instances in which it is used to invert the logic. (by adding or removing ! as appropriate)

How Has This Been Tested?

Validated autoscend.ash

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.

replaced forbidFamChange() with canChangeFamiliar()
replaced forbidFamChange(familiar target) with canChangeToFamiliar(familiar target)
This is not a rename, but an inversion of the logic from asking a negative to asking a positive. 
Adjusted the functions to have inverted logic.
Adjusted all instances in which it is used to invert the logic. (by adding or removing ! as appropriate)
@taltamir taltamir mentioned this pull request Apr 16, 2020
4 tasks
@taltamir
Copy link
Contributor Author

And just to note. Yes I have seen some places where the code that uses those functions can be improved. at the moment I am just doing a rename and ! flip because this touches too many files and I don't want it to get constantly blocked. not to mention being too big to handle for reviewers.

I had already previously addressed those long ago in my old old pokefam branch. I will reapply improvements as needed in future PRs. each being reasonably sized and easy to review

@Malibu-Stacey
Copy link
Member

And just to note. Yes I have seen some places where the code that uses those functions can be improved. at the moment I am just doing a rename and ! flip because this touches too many files and I don't want it to get constantly blocked. not to mention being too big to handle for reviewers.

I had already previously addressed those long ago in my old old pokefam branch. I will reapply improvements as needed in future PRs. each being reasonably sized and easy to review

I hadn't read this when I started reviewing. The only change I'd request in this case is #317 (comment)

@taltamir taltamir requested a review from Malibu-Stacey April 17, 2020 03:05
@taltamir
Copy link
Contributor Author

taltamir commented Apr 17, 2020

I hadn't read this when I started reviewing. The only change I'd request in this case is #317 (comment)

Change made.
And thank you for the other suggestions. I will make all the other changes you suggested in a future commit after the name change goes through. I had to force myself to NOT start doing them this time around :)

@taltamir taltamir merged commit aaf595f into loathers:beta Apr 17, 2020
@taltamir taltamir deleted the fam6 branch April 17, 2020 08:32
@taltamir
Copy link
Contributor Author

Git is auto hiding this comment so reposting it.
RELEASE/scripts/autoscend/auto_community_service.ash
near line 3334
if(!have_familiar($familiar[Machine Elf]) && canChangeFamiliar())
this needs refactoring. it makes no sense.

  1. it is specifically testing if there is NOT a machine elf. probably an error?
  2. it is a nested if, underneath it is code for handling smithing tome. which has nothing to do with machine elf. why would having machine elf matter to using the smithing tome? I am of the opinion that this line need to be removed entirely and just check the smithing tome directly to see if should be used

@taltamir
Copy link
Contributor Author

taltamir commented Apr 17, 2020

I figured it out. machine elf pet is used as an alternative to louder than bomb. so that one specific line should have been
if(!canChangeToFamiliar($familiar[Machine Elf]))

done @ commit 8ceb0c4

@taltamir taltamir mentioned this pull request Apr 17, 2020
4 tasks
taltamir added a commit to taltamir/autoscend that referenced this pull request Apr 17, 2020
see PR loathers#317 for discussion about it
taltamir added a commit that referenced this pull request Apr 18, 2020
* ed can't funksling
* Issue #194 - Dr. Aquard is a puzzle boss
* Heavy Rains skill Thunder Bird fixed. it would debuff bosses 31 times then lose.
* issue #198 subissue 3
* fix to reserve adventures calculation
* after bear verb orgy is used to get wand of nagamar actually fight sorceress
* Heavy Rains final boss [The Rain King] handling. prep and combat strategy.
* rollover adv maximizer now considers Left-Hand Man
* don't assume success when adventuring in bandit crossroads (fantasy realm IOTM) to prevent infinite loops
* community service. small fix, see PR #317 for discussion about it
* various small fixes
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.

2 participants