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

Faction camp takeovers #74604

Merged
merged 5 commits into from
Jun 22, 2024
Merged

Conversation

RenechCDDA
Copy link
Member

@RenechCDDA RenechCDDA commented Jun 16, 2024

Summary

Features "(Currently player only) Factions can take over and loot camps they don't own"

Purpose of change

Further expansion of basecamp support. Now that NPCs have camps, I'd like the player to be able to interact with them (and eventually, but not yet, vice versa).

Also address some outstanding issues.
-Address #73372 (comment) (z-level doesn't prevent Luliya/etc from eating from food supply, was much easier than I thought).
-Remove isherwoods' 4th camp. I did not realize that the cabin ends up being a gift to the player. Kind of a jerk of a gift if their name is all over it, you know? But with this PR you can - peacefully(or not) - put your name on it even if it's already got theirs on it.
-Closed up a dialogue talk function which let you inappropriately access camp functions by speaking to a follower that was located at a camp you didn't own

Describe the solution

Add the function for handling camp takeovers. Is currently only accessed through a bulletin board at a camp you don't own, and requires there to be no nearby NPCs of the owning faction in the bubble.

For the player, it gives the option of looting the camp of anything of value. Doing so will of course make the previous owner hate you if they didn't already, but also transfer food supply in proportion to their total camp holdings (e.g. a single-camp faction has its entire stockpile plundered, a 10-camp faction has 10% stolen).

Add an event bus pulse that triggers when a camp is taken over

Make a little EOC which uses the event bus pulse, to light the way for other contributors.

Fix my bad math and misplaced cabin camp from the previous PR

Describe alternatives you've considered

Testing

2024-06-16.14-20-31.mp4

Additional context

@github-actions github-actions bot added <Documentation> Design documents, internal info, guides and help. NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Map / Mapgen Overmap, Mapgen, Map extras, Map display [C++] Changes (can be) made in C++. Previously named `Code` [Markdown] Markdown issues and PRs Player Faction Base / Camp All about the player faction base/camp/site EOC: Effects On Condition Anything concerning Effects On Condition <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Jun 16, 2024
No sneaky dialogue access of camps you're not allowed at
Remove isherwoods' cabin camp
Pass dummy event for camp_taken_over to memorial logger
Clang funny stuff
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 16, 2024
@Maleclypse Maleclypse merged commit 64852a6 into CleverRaven:master Jun 22, 2024
23 of 27 checks passed
@RenechCDDA RenechCDDA deleted the camp_takeover branch June 22, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` <Documentation> Design documents, internal info, guides and help. <Enhancement / Feature> New features, or enhancements on existing EOC: Effects On Condition Anything concerning Effects On Condition [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display [Markdown] Markdown issues and PRs NPC / Factions NPCs, AI, Speech, Factions, Ownership Player Faction Base / Camp All about the player faction base/camp/site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants