static void FreeForAll(bool toggle) { RunArtifactManager.instance.SetArtifactEnabledServer(ArtifactCatalog.FindArtifactDef("FriendlyFire"), toggle); TeamCatalog.GetTeamDef(TeamIndex.Player).friendlyFireScaling = 1.0f; TeamCatalog.GetTeamDef(TeamIndex.Neutral).friendlyFireScaling = 1.0f; TeamCatalog.GetTeamDef(TeamIndex.Monster).friendlyFireScaling = 1.0f; }
static bool Prefix(MasterSummon __instance) { __instance.ignoreTeamMemberLimit = RAC.RemoveCap.Value; TeamIndex teamIndex; if (__instance.teamIndexOverride != null) { teamIndex = __instance.teamIndexOverride.Value; } else { teamIndex = TeamComponent.GetObjectTeam(__instance.summonerBodyObject); } TeamDef teamDef = TeamCatalog.GetTeamDef(teamIndex); if (teamDef != null) { teamDef.softCharacterLimit = (int)RAC.ConfigToFloat(RAC.AllyCountCap.Value); } return(true); }