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

Newpix Number used in ONGBase calculations is the wrong one: SBTF is borked, Log names are wrong, etc. #1539

Open
Eregrith opened this issue Sep 21, 2024 · 0 comments

Comments

@Eregrith
Copy link

Because of the refactoring done on the Molpy.ONG separating it into ONGBase and sub-ONGs functions, the order of newpixNumber incrementation and ONG operations has been wrong for 9 years.

Here is the code:
https://github.com/eternaldensity/Sandcastle-Builder/blame/4ecf1f261420ef0836264910b90f4a37ebdb300b/castle.js#L3729

I noticed it when Swim Between The Flags did not work properly, giving me a boost to wave castle prod on ONGs reaching odd newpix despite what it should be.
The logs names "Notification log for Newpix {...}" are also wrong because of that.

You can try it yourself:

  • Load the game on NP x
  • Check the log name: "Notification log for Newpix x"
  • wait for the ONG
  • New log name is ALSO "Notification log for Newpix x" despite the real newpix number being now x+1

Proposed fix:
Put the call to Molpy.ONGBase(); below the lines 'todo' instead:

	var todo=Molpy.ONGs[type];
	if(todo==undefined){todo=Molpy.ONGs[0]}
	todo();
	Molpy.ONGBase();

Disclaimer: I'm not sure when should the second part of the ONGs functions be processed, like these:

	Molpy.Boosts['Controlled Hysteresis'].power=-1;
	Molpy.Boosts['Signpost'].power = 0;
	Molpy.Boosts['Signpost'].Refresh();
	Molpy.Boosts['PG'].Refresh();
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

No branches or pull requests

1 participant