Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
3.7.2
  • Loading branch information
KiraYamato94 authored Mar 6, 2024
1 parent 1f5746f commit b9b7295
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
15 changes: 11 additions & 4 deletions LasMonjas/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4167,7 +4167,7 @@ public static void Postfix(HudManager __instance) {
}

foreach (PlayerControl player in PlayerInCache.AllPlayers) {
if (player != Kid.kid && player != Exiler.exiler) {
if (player != Kid.kid && player != Exiler.exiler && Exiler.possibleTargets.Count == 0) {
Exiler.possibleTargets.Add(player);
}
}
Expand Down Expand Up @@ -4221,7 +4221,13 @@ public static void Postfix(HudManager __instance) {
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.amnesiacReportAndTakeRole(playerInfo.PlayerId);

SoundManager.Instance.PlaySound(CustomMain.customAssets.mimicPuppeteerTransform, false, 100f);
SoundManager.Instance.PlaySound(CustomMain.customAssets.mimicPuppeteerTransform, false, 100f);

HudManager.Instance.StartCoroutine(Effects.Lerp(0.1f, new Action<float>((p) => { // Delayed action
if (p == 1f) {
PlayerInCache.LocalPlayer.PlayerControl.CmdReportDeadBody(playerInfo);
}
})));
break;
}
}
Expand Down Expand Up @@ -5654,13 +5660,14 @@ public static void Postfix(HudManager __instance) {
foreach (Collider2D collider2D in Physics2D.OverlapCircleAll(PlayerInCache.LocalPlayer.PlayerControl.GetTruePosition(), 1f, Constants.PlayersOnlyMask))
if (collider2D.tag == "DeadBody")
Spiritualist.canRevive = true;
return Spiritualist.canRevive && Spiritualist.revivedPlayer == null && PlayerInCache.LocalPlayer.PlayerControl.CanMove && !Challenger.isDueling && !Monja.awakened && !Seeker.isMinigaming;
return Spiritualist.canRevive && Spiritualist.revivePerRound && Spiritualist.revivedPlayer == null && PlayerInCache.LocalPlayer.PlayerControl.CanMove && !Challenger.isDueling && !Monja.awakened && !Seeker.isMinigaming;
},
() => {
spiritualistReviveButton.Timer = spiritualistReviveButton.MaxTimer;
spiritualistReviveButton.isEffectActive = false;
Spiritualist.revivedPlayer = null;
Spiritualist.revivedPlayerKiller = null;
Spiritualist.revivePerRound = true;
},
Spiritualist.getButtonSprite(),
CustomButton.ButtonPositions.lowerRowRight,
Expand Down Expand Up @@ -5698,7 +5705,7 @@ public static void Postfix(HudManager __instance) {
RPCProcedure.spiritualistRevive(playerInfo.PlayerId, Spiritualist.spiritualist.PlayerId);

spiritualistReviveButton.Timer = spiritualistReviveButton.MaxTimer;

Spiritualist.revivePerRound = false;
break;
}
}
Expand Down
2 changes: 2 additions & 0 deletions LasMonjas/LasMonjas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,7 @@ public static class Spiritualist
public static PlayerControl revivedPlayer = null;
public static PlayerControl revivedPlayerTarget = null;
public static PlayerControl revivedPlayerKiller = null;
public static bool revivePerRound = true;

public static Sprite getRevivedPlayerRevengeButtonSprite() {
if (revivedPlayerKillButtonSprite) return revivedPlayerKillButtonSprite;
Expand All @@ -3050,6 +3051,7 @@ public static void clearAndReload() {
revivedPlayerTarget = null;
revivedPlayerKiller = null;
revivedPlayerTimer = 21;
revivePerRound = true;
}
}

Expand Down
4 changes: 2 additions & 2 deletions LasMonjas/LasMonjas.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>3.7.1</Version>
<Version>3.7.2</Version>
<Description>Las Monjas</Description>
<Authors>Allul</Authors>
</PropertyGroup>

<PropertyGroup>
<GameVersion>2023.10.24</GameVersion>
<GameVersion>2024.3.5</GameVersion>
<DefineConstants>$(DefineConstants);STEAM</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LasMonjas/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class LasMonjasPlugin : BasePlugin
{
public const string Id = "me.allul.lasmonjas";

public const string VersionString = "3.7.1";
public const string VersionString = "3.7.2";

public static System.Version Version = System.Version.Parse(VersionString);
internal static BepInEx.Logging.ManualLogSource Logger;
Expand Down
19 changes: 10 additions & 9 deletions LasMonjas/RPC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ enum CustomRPC
{
// Main Controls

ResetVaribles = 60,
ResetVaribles = 70,
ShareOptions,
SetRole,
SetModifier,
Expand All @@ -282,7 +282,7 @@ enum CustomRPC

// Role functionality

MimicTransform = 70,
MimicTransform = 80,
PainterPaint,
DemonSetBitten,
PlaceNun,
Expand Down Expand Up @@ -1568,6 +1568,11 @@ public static void gamblerShoot(byte playerId) {
target.Exiled();
PlayerControl partner = target.getPartner(); // Lover check
byte partnerId = partner != null ? partner.PlayerId : playerId;
if (Exiler.exiler != null && Exiler.target != null && Exiler.target == target) {
Exiler.targetNameButtonText.text = "";
Exiler.target = null;
Exiler.usedTarget = false;
}
if (Constants.ShouldPlaySfx()) SoundManager.Instance.PlaySound(target.KillSfx, false, 0.8f);
if (MeetingHud.Instance) {
foreach (PlayerVoteArea pva in MeetingHud.Instance.playerStates) {
Expand Down Expand Up @@ -3274,6 +3279,7 @@ public static void amnesiacReportAndTakeRole(byte targetId) {
break;
}


// Bomberman bomb reset when report the chosen one
if (Bomberman.bomberman != null && Bomberman.activeBomb == true) {
fixBomb();
Expand All @@ -3284,12 +3290,7 @@ public static void amnesiacReportAndTakeRole(byte targetId) {
// Manually murder the Spiritualist's revived player
if (Spiritualist.revivedPlayer != null && !Spiritualist.revivedPlayer.Data.IsDead) {
murderSpiritualistRevivedPlayer();
}
HudManager.Instance.StartCoroutine(Effects.Lerp(0.1f, new Action<float>((p) => { // Delayed action
if (p == 1f) {
oldAmnesiac.CmdReportDeadBody(playerInfo);
}
})));
}
changeMusic(1);
}

Expand Down Expand Up @@ -3935,7 +3936,7 @@ public static void spiritualistPinkScreen(byte playerId) {

public static void murderSpiritualistRevivedPlayer() {
Spiritualist.revivedPlayer.MurderPlayer(Spiritualist.revivedPlayer, MurderResultFlags.Succeeded | MurderResultFlags.DecisionByHost);
HudManager.Instance.StartCoroutine(Effects.Lerp(0.1f, new Action<float>((p) => { // Delayed action
HudManager.Instance.StartCoroutine(Effects.Lerp(0.25f, new Action<float>((p) => { // Delayed action
if (p == 1f && !MeetingHud.Instance) {
removeBody(Spiritualist.revivedPlayer.PlayerId);
Spiritualist.revivedPlayerKiller = null;
Expand Down

0 comments on commit b9b7295

Please sign in to comment.