Summon fix attempt1 - #274
Open
Geronim053 wants to merge 7 commits into
Open
Conversation
to account for the fact that summons now are(/will be) in .Faction.PlayerAnimals =>they will still count as player controlled for the turnbar =>they will no longer count as bros (e.g. in groupXP-distribution) contrapoint: this might still screw with things, but in theory should be fine for e.g. vanilla-hexe-charm
line 219 might not even be necessary; summon spawn playercontrolled = true anyways. -changing their faction by itself shouldnt do anything to player-control, but would serve us in counting actual bros (e.g. for groupXP-distribution) that is under the assumption, that we change the isPlayerControlled()-function of actor.nut to include the PlayerAnimals-faction -changing the entity.m.IsControlledByPlayer shouldnt interfere with anything in legends or vanilla besides the isPlayerControlled-check
forgot this, good thing I do testing
for better debugging and marginally better functionality
idk what purpose `"addXP" in summoner` served exactly. Perhaps just to avoid errors in case addXP() was called? current solution hopefully fulfills that purpose as well. (it makes sure the actor is a player, which should have that by default) Enemy Necromancers do not have access to this anyways, so it should be fine.
former change now unnecessary. I just add this as commit to my branch. If it would be easier/better to revert it on your end, reject the pull. In that case I would submit another pr without this change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I hope the commits are somewhat self-explanatory.
-summons summoned by legend_summon_skill now belong to faction PlayerAnimals. (so they do not count to brothers for e.g. sharing GroupXP)
-Wrap to actor.nut's "isPlayerControlled()" so it additionally checks for these new playercontrolled summons that belong to the faction PlayerAnimals.
-revert former fix
Additional:
-fix to summoner not gaining share of killerXP
changes tested once; scanned for whether playercontrolled PlayerAnimals could cause problems, but all mentions of the faction PlayerAnimals and all mentions of actor.m.IsControlledByPlayer should work fine for both vanilla and legends.