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

Magic bionics #39940

Merged
merged 3 commits into from
May 3, 2020
Merged

Magic bionics #39940

merged 3 commits into from
May 3, 2020

Conversation

KorGgenT
Copy link
Member

@KorGgenT KorGgenT commented Apr 26, 2020

Summary

SUMMARY: Features "Add the ability for bionics to teach spells"

Purpose of change

The Technomander in Magiclysm is suppose to be a class that is a hybrid of using CBMs and magic, but there was quite a lack of ability to do that in a lot of ways.

Describe the solution

Add a std::map<spell_id, int> to bionic_data and appropriate logic in Character::add_bionic and Character::remove_bionic that allow you to learn (and then forget) spells attached to a CBM. Spells that have a spell class will override any spell class you currently have, making you forget any spell learned from that spell class. Hopefully those who mod via json don't write conflicting CBMs or they might end up with some weird circumstances, though i wouldn't exactly consider that a bug, more "not using this right".

Testing

Loaded a world with magiclysm, learned all spells, gave the character EARTHSHAPER (which conflicts with technomancer). debug installed the optical sneeze beam cbm and lost the earthhshaper trait and all associated spells, gained technomancer and learned optical sneeze beam at level 4. Uninstalled the CBM and lost optical sneeze beam (technomancer stays). installed while already knowing optical sneeze beam at level 1, and it sets it to level 4.

Additional context

I considered adding an activation to bionics that would activate a spell, but i think that it could be a separate pr, and not necessary for magiclysm right now.

Relies on #39938

@KorGgenT KorGgenT added [JSON] Changes (can be) made in JSON Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` Mods: Magiclysm Anything to do with the Magiclysm mod labels Apr 26, 2020
created a couple new functions in `spell` to facilitate setting spell levels
spells you learn from a CBM make you gain the class trait
added documentation for usage
adjusted scroll drop to be CBM drop instead, and removed scroll from the drop list. additionally renamed the scroll for easier search in debug wish.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) [C++] Changes (can be) made in C++. Previously named `Code` [JSON] Changes (can be) made in JSON Mods: Magiclysm Anything to do with the Magiclysm mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants