Skip to content

Commit

Permalink
improve obscurement rules after second QA round
Browse files Browse the repository at this point in the history
  • Loading branch information
ThyWoof committed Jan 18, 2024
1 parent 9150f91 commit b4f05c7
Show file tree
Hide file tree
Showing 16 changed files with 352 additions and 21 deletions.
1 change: 1 addition & 0 deletions Diagnostics/UnfinishedBusinessBlueprints/Assets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ ConditionBladeDancerDanceOfVictory ConditionDefinition ConditionDefinition a8c93
ConditionBladeWard ConditionDefinition ConditionDefinition 8d3d76d9-b5f0-5d86-9b8e-a06f55ce639d
ConditionBlastBreakthroughRemoveImmunity ConditionDefinition ConditionDefinition 2e87e03f-8ed3-548a-93c3-f3a97c6b37b0
ConditionBlessingOfRime ConditionDefinition ConditionDefinition 5240888b-e719-55b4-8c03-7713d3fc297f
ConditionBlindedByDarkness ConditionDefinition ConditionDefinition 0262e7d0-0f38-5a86-8fc5-4ee1b2888cc1
ConditionBlindingSmite ConditionDefinition ConditionDefinition 2c93801f-485a-5dde-b448-a94fadf31253
ConditionBoomingBlade ConditionDefinition ConditionDefinition b28052a9-3d74-50f4-8363-8b1a2e848289
ConditionBoomingBladeMarked ConditionDefinition ConditionDefinition 69813f6c-ceca-5c5a-a7ef-7975ff227b50
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,294 @@
{
"$type": "ConditionDefinition, Assembly-CSharp",
"inDungeonEditor": false,
"parentCondition": null,
"conditionType": "Detrimental",
"features": [
"Definition:CombatAffinityHeavilyObscured:37285cb4ed0361e45aadf367f6e8c421",
"Definition:CombatAffinityHeavilyObscuredSelf:aae97210db8374b4a989d29458f316ff",
"Definition:PerceptionAffinityConditionBlinded:f393b86164c3026418e191264bcca4d5"
],
"allowMultipleInstances": false,
"silentWhenAdded": false,
"silentWhenRemoved": false,
"silentWhenRefreshed": false,
"terminateWhenRemoved": false,
"specialDuration": false,
"durationType": "Hour",
"durationParameterDie": "D4",
"durationParameter": 1,
"forceTurnOccurence": false,
"turnOccurence": "EndOfTurn",
"specialInterruptions": [],
"interruptionRequiresSavingThrow": false,
"interruptionSavingThrowComputationMethod": "SaveOverride",
"interruptionSavingThrowAbility": "",
"interruptionDamageThreshold": 0,
"keepConditionIfSavingThrowSucceeds": false,
"interruptionSavingThrowAffinity": "None",
"conditionTags": [],
"recurrentEffectForms": [],
"cancellingConditions": [],
"additionalDamageWhenHit": false,
"additionalDamageTypeDetermination": "Specific",
"additionalDamageType": "",
"additionalDamageQuantity": "AbilityBonus",
"additionalDamageDieType": "D1",
"additionalDamageDieNumber": 1,
"additionalConditionWhenHit": false,
"additionalCondition": null,
"additionalConditionDurationType": "Round",
"additionalConditionDurationParameter": 1,
"additionalConditionTurnOccurenceType": "StartOfTurn",
"conditionStartParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "a1709422dd78d964e9dbef20ad79c3d3",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"conditionParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "2fb59c86519dd104a8b75863927aea9a",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"conditionEndParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "48d43d702483f604685b7401f56dc4d7",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"characterShaderReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particlesBasedOnAncestryDamageType": false,
"ancestryType": "Sorcerer",
"acidParticleParameters": {
"$type": "ConditionParticleParameters, Assembly-CSharp",
"startParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"endParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
}
},
"coldParticleParameters": {
"$type": "ConditionParticleParameters, Assembly-CSharp",
"startParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"endParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
}
},
"fireParticleParameters": {
"$type": "ConditionParticleParameters, Assembly-CSharp",
"startParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"endParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
}
},
"lightningParticleParameters": {
"$type": "ConditionParticleParameters, Assembly-CSharp",
"startParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"endParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
}
},
"poisonParticleParameters": {
"$type": "ConditionParticleParameters, Assembly-CSharp",
"startParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"particleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"endParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
},
"recurrentEffectParticleReference": {
"$type": "UnityEngine.AddressableAssets.AssetReference, Unity.Addressables",
"m_AssetGUID": "",
"m_SubObjectName": "",
"m_SubObjectType": ""
}
},
"overrideCharacterShaderColors": false,
"firstCharacterShaderColor": {
"$type": "UnityEngine.Color, UnityEngine.CoreModule",
"r": 0.0,
"g": 0.0,
"b": 0.0,
"a": 0.0
},
"secondCharacterShaderColor": {
"$type": "UnityEngine.Color, UnityEngine.CoreModule",
"r": 0.0,
"g": 0.0,
"b": 0.0,
"a": 0.0
},
"timeToWaitBeforeApplyingShader": 0.5,
"timeToWaitBeforeRemovingShader": 0.5,
"possessive": false,
"amountOrigin": "None",
"baseAmount": 0,
"additiveAmount": false,
"sourceAbilityBonusMinValue": 1,
"subsequentOnRemoval": null,
"subsequentHasSavingThrow": false,
"subsequentSavingThrowAbilityScore": "Constitution",
"subsequentVariableForDC": "FrenzyExhaustionDC",
"subsequentDCIncrease": 5,
"effectFormsOnRemoved": [],
"forceBehavior": false,
"addBehavior": false,
"fearSource": false,
"battlePackage": null,
"explorationPackage": null,
"removedFromTheGame": false,
"permanentlyRemovedIfExtraPlanar": false,
"refundReceivedDamageWhenRemoved": false,
"followSourcePosition": false,
"disolveCharacterOnDeath": false,
"disolveParameters": {
"$type": "GraphicsCharacterDefinitions+DisolveParameters, Assembly-CSharp",
"color": {
"$type": "UnityEngine.Color, UnityEngine.CoreModule",
"r": 0.0,
"g": 0.0,
"b": 0.0,
"a": 0.0
},
"colorWidth": 0.0,
"noiseScale": 5.0,
"hueScale": 0.0,
"vertexOffset": 0.0,
"curve": {
"$type": "UnityEngine.AnimationCurve, UnityEngine.CoreModule"
},
"startAfterDeathAnimation": false,
"duration": 0.0
},
"guiPresentation": {
"$type": "GuiPresentation, Assembly-CSharp",
"hidden": false,
"title": "Condition/&ConditionBlindedByDarknessTitle",
"description": "Condition/&ConditionBlindedByDarknessDescription",
"spriteReference": {
"$type": "UnityEngine.AddressableAssets.AssetReferenceSprite, Unity.Addressables",
"m_AssetGUID": "ea67a592abc14f94bb33fe9919d2652d",
"m_SubObjectName": "ConditionBlinded",
"m_SubObjectType": "UnityEngine.Sprite, UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
},
"color": {
"$type": "UnityEngine.Color, UnityEngine.CoreModule",
"r": 1.0,
"g": 1.0,
"b": 1.0,
"a": 1.0
},
"symbolChar": "221E",
"sortOrder": 0,
"unusedInSolastaCOTM": false,
"usedInValleyDLC": false
},
"contentCopyright": "UserContent",
"guid": "0262e7d0-0f38-5a86-8fc5-4ee1b2888cc1",
"contentPack": 9999,
"name": "ConditionBlindedByDarkness"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using SolastaUnfinishedBusiness.CustomBehaviors;
using SolastaUnfinishedBusiness.Models;
using TA;

namespace SolastaUnfinishedBusiness.Api.GameExtensions;
Expand Down Expand Up @@ -37,9 +38,11 @@ public static bool MyIsCellPerceivedByCharacter(
var inRange = false;
var distance = DistanceCalculation.GetDistanceFromTwoPositions(sensor.LocationPosition, cellPosition);
var lightingState = sensor.ComputeLightingStateOnTargetPosition(cellPosition);
var nonMagicalDarkness = target?.LightingState != LocationDefinitions.LightingState.Darkness;
var selectedSenseType = SenseMode.Type.None;
var selectedSenseRange = 0;
var nonMagicalDarkness =
target != null &&
target.RulesetActor.HasConditionOfType(SrdAndHouseRulesContext.ConditionBlindedByDarkness.Name);

// try to find any sense mode that is valid for the current lighting state and is within range
foreach (var senseMode in sensor.RulesetCharacter.SenseModes
Expand All @@ -49,9 +52,7 @@ public static bool MyIsCellPerceivedByCharacter(

if (selectedSenseType != senseType && senseMode.SenseRange >= selectedSenseRange)
{
if (nonMagicalDarkness &&
lightingState == LocationDefinitions.LightingState.Darkness &&
senseType == SenseMode.Type.Truesight)
if (nonMagicalDarkness && senseType == SenseMode.Type.Truesight)
{
continue;
}
Expand Down
3 changes: 2 additions & 1 deletion SolastaUnfinishedBusiness/Models/FixesContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,11 @@ private static void FixMinorSpellIssues()
InsectPlague.EffectDescription.EffectForms[0].savingThrowAffinity = EffectSavingThrowType.HalfDamage;

//BUGFIX: Ray of Enfeeblement should be recurrent on activation and turn start
RayOfEnfeeblement.EffectDescription.RangeType = RangeType.RangeHit;
RayOfEnfeeblement.EffectDescription.EffectForms[0].canSaveToCancel = true;
RayOfEnfeeblement.EffectDescription.recurrentEffect =
RecurrentEffect.OnActivation | RecurrentEffect.OnTurnStart;

//BUGFIX: Sorcerers should have Insect Plague at level 5
SpellListSorcerer.SpellsByLevel.FirstOrDefault(x => x.Level == 5)!.Spells.Add(InsectPlague);

Expand Down
Loading

0 comments on commit b4f05c7

Please sign in to comment.