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

Port over fix for spellcasting monsters and summon spells #1865

Conversation

chaosvolt
Copy link
Member

@chaosvolt chaosvolt commented Sep 18, 2022

Co-Authored-By: I-am-Erk 45136638+I-am-Erk@users.noreply.github.com

Summary

SUMMARY: Bugfixes "Port over minor code fix to monster spellcasting"

Purpose of change

@thelonestander was asking me about a code fix needed for his implementation of flesh raptors in a mod for BN, to fix an issue where monsters casting summoning spells would always magic them right next to the player.

Describe the solution

Ported over update from DDA fixing mon_spellcasting_actor::call in mattack_actors.cpp, to be able to cite the position of themselves as well from what I understand of the change.

Describe alternatives you've considered

  1. Pestering Lone to do it when he finally escapes Florida and can return to making PRs.
  2. Also porting over flesh rapters, dunno how well it'd work nor what niche it'd really fit other than "generic pest creator"

Testing

  1. Compiled and load-tested.
  2. Temporarily added Lone's BN port of flesh raptors from https://github.com/thelonestander/Lones-Tech-and-Weapons-mod
  3. Skipped load errors from Lone accidentally retaining shape in the relevant spells.
  4. Spawned in pupataing zeds.
  5. Confirmed that when they go off the raptors spawn near the corpse instead of being plonked down next to the player.
  6. Added mod to re-test in an existing release (2022-09-18-1931), confirmed that behavior without this PR's change spawns them in your face instead.

image

Additional context

Source PR by Erk: CleverRaven/Cataclysm-DDA#43350

Co-Authored-By: I-am-Erk <45136638+I-am-Erk@users.noreply.github.com>
@Coolthulhu Coolthulhu self-assigned this Sep 22, 2022
@Coolthulhu
Copy link
Member

Compiled and load-tested. I don't know if we have any good examples of a monster to test this with, though I could go grab Lone's implementation of flesh rapters as a BN mod to test with.

You should at least add a test monster for those cases.

@chaosvolt
Copy link
Member Author

chaosvolt commented Sep 22, 2022

You should at least add a test monster for those cases.

Not sure what would fit for this. A whole debug-only test monster written into the JSON for keeps, for a one-line change, would be a bit weird. I can snag Lone's mod and drop it in for a quicktest, though?

EDIT: Went ahead with said test using Lone's flesh raptor portover mod.

@Coolthulhu
Copy link
Member

A whole debug-only test monster written into the JSON for keeps

Those are useful for showing things, yeah. We do have debug_monster, after all. Teleporting debug monster, summoning debug monster (not sure what could it summon - preferably something that dies on its own, so that it can summon more) - those aren't just there for the tests, they are something that you can point at and tell a contributor:

Here's how you use this feature.

@chaosvolt
Copy link
Member Author

True, guess I could mess with it when I get back home. Alternatively, I could mess with rigging the maddened summoners in Arcana to spawn their monsters around them instead of near the player, since it is planned to be an in-repo mod eventually, though that'd run afoul of the mutual-dependency problems holding up #1823 at the moment.

@chaosvolt chaosvolt added the src changes related to source code. label Oct 28, 2022
@Coolthulhu
Copy link
Member

Still needs an example.

@Coolthulhu Coolthulhu merged commit c4d85a0 into cataclysmbnteam:upload Oct 30, 2022
@chaosvolt
Copy link
Member Author

Hecc. Can either follow up on this with an example in a PR or rework maddened summoners into an example that'll be usable when Arcana is PR'd as an in-repo mod.

@chaosvolt chaosvolt deleted the how-to-get-lone-to-stop-being-smol branch October 30, 2022 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants