Added configs for items and enemies
Critical damage renamed to marked for death and all share the same mechanic now Revelant now slows down to speed over a fixed short amount instead the nonworking jank before Moved item/enemy injection to DunGenPlus
This commit is contained in:
parent
e38be14578
commit
fd731baf2f
33 changed files with 551 additions and 470 deletions
37
CoronerPatch/ScarletMansionCoronerPatch/Patch.cs
Normal file
37
CoronerPatch/ScarletMansionCoronerPatch/Patch.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using Coroner;
|
||||
using GameNetcodeStuff;
|
||||
using ScarletMansion.ModPatch;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ScarletMansionCoronerPatch {
|
||||
public class Patch {
|
||||
|
||||
public static Dictionary<CoronerDeathEnum, object> causesOfDeath;
|
||||
|
||||
public static void Activate() {
|
||||
causesOfDeath = new Dictionary<CoronerDeathEnum, object>();
|
||||
|
||||
causesOfDeath.Add(CoronerDeathEnum.Knight, AdvancedCauseOfDeath.Build("DeathEnemyKnight"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.Maid, AdvancedCauseOfDeath.Build("DeathEnemyMaid"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.Void, AdvancedCauseOfDeath.Build("DeathPitVoid"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.GhostKnight, AdvancedCauseOfDeath.Build("DeathEnemyGhostKnight"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.Knife, AdvancedCauseOfDeath.Build("DeathPlayerMaidKnife"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.KnifeFeed, AdvancedCauseOfDeath.Build("DeathPlayerMaidKnifeFeed"));
|
||||
causesOfDeath.Add(CoronerDeathEnum.KnifeFriendlyFire, AdvancedCauseOfDeath.Build("DeathPlayerMaidKnifeFriendlyFire"));
|
||||
|
||||
ScarletMansion.Assets.onPlayerDeath.AddEvent("CoronerPatch", ProcessCauseOfDeath);
|
||||
}
|
||||
|
||||
public static void ProcessCauseOfDeath(CoronerParameters parameters) {
|
||||
if (causesOfDeath.TryGetValue(parameters.death, out var value)) {
|
||||
Coroner.API.SetCauseOfDeath(parameters.player, (AdvancedCauseOfDeath)value);
|
||||
Plugin.logger.LogInfo(parameters.death);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
54
CoronerPatch/ScarletMansionCoronerPatch/Plugin.cs
Normal file
54
CoronerPatch/ScarletMansionCoronerPatch/Plugin.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using BepInEx.Bootstrap;
|
||||
using BepInEx.Logging;
|
||||
using BepInEx;
|
||||
using HarmonyLib;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ScarletMansionCoronerPatch {
|
||||
[BepInPlugin(modGUID, modName, modVersion)]
|
||||
|
||||
[BepInDependency("dev.ladyalice.scarletmansion", "1.3.27")]
|
||||
[BepInDependency(targetModGUID, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
|
||||
public class Plugin : BaseUnityPlugin {
|
||||
|
||||
public const string modGUID = "dev.ladyalice.scarletmansion.coronerpatch";
|
||||
private const string modName = "Scarlet Mansion Coroner Patch";
|
||||
private const string modVersion = "1.0.0";
|
||||
|
||||
public const string targetModGUID = "com.elitemastereric.coroner";
|
||||
public const string targetModVersion = "2.1.0";
|
||||
|
||||
public readonly Harmony harmony = new Harmony(modGUID);
|
||||
public static Plugin Instance {get; private set;}
|
||||
public static ManualLogSource logger { get; internal set; }
|
||||
|
||||
void Awake(){
|
||||
if (Instance == null) Instance = this;
|
||||
|
||||
logger = BepInEx.Logging.Logger.CreateLogSource(modGUID);
|
||||
|
||||
var modLoaded = Chainloader.PluginInfos.ContainsKey(targetModGUID);
|
||||
if (!modLoaded) return;
|
||||
|
||||
bool validVersion;
|
||||
var pluginInfo = Chainloader.PluginInfos[targetModGUID];
|
||||
var loadedVersion = pluginInfo.Metadata.Version;
|
||||
if (string.IsNullOrWhiteSpace(targetModVersion)){
|
||||
validVersion = true;
|
||||
} else {
|
||||
var requiredVersion = new Version(targetModVersion);
|
||||
validVersion = loadedVersion >= requiredVersion;
|
||||
}
|
||||
|
||||
if (validVersion){
|
||||
logger.LogInfo($"Plugin {modName} has been added!");
|
||||
Patch.Activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// アセンブリに関する一般情報は以下を通して制御されます
|
||||
// 制御されます。アセンブリに関連付けられている情報を変更するには、
|
||||
// これらの属性値を変更してください。
|
||||
[assembly: AssemblyTitle("ScarletMansionCoronerPatch")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("ScarletMansionCoronerPatch")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
|
||||
// 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
|
||||
// その型の ComVisible 属性を true に設定してください。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
|
||||
[assembly: Guid("cb30b9c8-2679-4c65-86a3-b4680b73da4f")]
|
||||
|
||||
// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
|
||||
//
|
||||
// メジャー バージョン
|
||||
// マイナー バージョン
|
||||
// ビルド番号
|
||||
// リビジョン
|
||||
//
|
||||
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
|
||||
// 既定値にすることができます:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CB30B9C8-2679-4C65-86A3-B4680B73DA4F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ScarletMansionCoronerPatch</RootNamespace>
|
||||
<AssemblyName>ScarletMansionCoronerPatch</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\..\Libraries\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-firstpass">
|
||||
<HintPath>..\..\..\Libraries\Assembly-CSharp-firstpass.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp-publicized">
|
||||
<HintPath>..\..\..\Libraries\Assembly-CSharp-publicized.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\..\..\Libraries\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx.Harmony">
|
||||
<HintPath>..\..\..\Libraries\BepInEx.Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Coroner">
|
||||
<HintPath>..\..\..\Libraries\Coroner.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ScarletMansion">
|
||||
<HintPath>..\..\..\Libraries\ScarletMansion.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Unity.Netcode.Components">
|
||||
<HintPath>..\..\..\Libraries\Unity.Netcode.Components.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Unity.Netcode.Runtime">
|
||||
<HintPath>..\..\..\Libraries\Unity.Netcode.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\..\..\Libraries\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\..\..\Libraries\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Patch.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue