Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# 2.23.5
- Fixed cards appearing as blank outside Act 1
- Added extension methods for FullAbility that mirror AbilityInfo extension methods

# 2.23.4
- Fixed GemsDraw only considering the player's slots when determining how many cards to draw
- Fixed Act 2 Tutor sequence softlocking when there are no cards to display
- Fixed Act 2 Tutor sequence not displaying cards when you have less than 7 cards remaining in your deck
- Fixed Gemify affecting Blood cost when it shouldn't
- Fixed Gemify reducing multiple card costs at once for multicost cards - now only affects 1 as intended
- Fixed emission textures appearing stretched on Giant cards
- Added Gems Cost support for ExtendedActivatedAbilityBehaviour class
- Added extension AbilityManager.FullAbility.FlipYIfOpponent
- Add config option to prevent Act 1 card emissions from rendering above the play costs
- Added config option to prevent Act 1 card emissions from rendering above the play costs

# 2.23.3
- Fixed custom deck exhaust sequence not performing the requisite checks
Expand Down
361 changes: 241 additions & 120 deletions InscryptionAPI/Card/AbilityExtensions.cs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions InscryptionAPI/Card/AbilityManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public class FullAbility
/// <value></value>
public Texture CustomFlippedTexture { get; internal set; }

/// <summary>
/// The original rulebook description for the ability, before any modifications.
/// </summary>
public string BaseRulebookDescription { get; internal set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion InscryptionAPI/InscryptionAPI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<DebugType>full</DebugType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Version>2.23.4</Version>
<Version>2.23.5</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion InscryptionAPI/InscryptionAPIPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class InscryptionAPIPlugin : BaseUnityPlugin
{
public const string ModGUID = "cyantist.inscryption.api";
public const string ModName = "InscryptionAPI";
public const string ModVer = "2.23.4";
public const string ModVer = "2.23.5";

public static string Directory = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class GiantCardEmissionAspectFix {
/// </summary>
[HarmonyPostfix, HarmonyPatch(typeof(CardRenderCamera), nameof(CardRenderCamera.TryCreateCameraForLiveRender))]
private static void FixGiantEmissionCameraAspectRatio(CardRenderCamera __instance, RenderStatsLayer layer) {
if (!__instance.liveRenderCameras.ContainsKey(layer) || layer is not RenderLiveStatsLayer live || !live.Giant) {
if (!SaveManager.SaveFile.IsPart1 || !__instance.liveRenderCameras.ContainsKey(layer) || layer is not RenderLiveStatsLayer live || !live.Giant) {
return;
}
Transform emissionRenderCam = __instance.liveRenderCameras[layer].transform.Find("EmissionRenderCamera");
Expand Down
14 changes: 9 additions & 5 deletions InscryptionCommunityPatch/Card/Part1CostEmissionMaskRender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ public static SpriteRenderer Verify3DCostEmissionMaskRenderer(CardDisplayer3D ca

[HarmonyPrefix, HarmonyPatch(typeof(CardDisplayer3D), nameof(CardDisplayer3D.Awake))]
private static void AddCostEmissionMaskOnAwake(CardDisplayer3D __instance) {
Verify3DCostEmissionMaskRenderer(__instance, false);
if (SaveManager.SaveFile.IsPart1) {
Verify3DCostEmissionMaskRenderer(__instance, false);
}
}

[HarmonyPriority(Priority.Last), HarmonyPostfix, HarmonyPatch(typeof(CardDisplayer3D), nameof(CardDisplayer3D.DisplayInfo))]
private static void UpdateCostEmissionMask(CardDisplayer3D __instance) {
SpriteRenderer rend = Verify3DCostEmissionMaskRenderer(__instance, __instance.emissivePortraitRenderer.gameObject.activeSelf);
if (rend != null) {
//PatchPlugin.Logger.LogDebug("[UpdateCostEmissionMask] Update Cost emission mask");
rend.sprite = __instance.costRenderer.sprite;
if (SaveManager.SaveFile.IsPart1) {
SpriteRenderer rend = Verify3DCostEmissionMaskRenderer(__instance, __instance.emissivePortraitRenderer.gameObject.activeSelf);
if (rend != null) {
//PatchPlugin.Logger.LogDebug("[UpdateCostEmissionMask] Update Cost emission mask");
rend.sprite = __instance.costRenderer.sprite;
}
}
}
}
Loading