-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more minigame hacks
- Loading branch information
Showing
10 changed files
with
307 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System.Linq; | ||
using System.Reflection; | ||
using SchummelPartie.setting.settings; | ||
|
||
namespace SchummelPartie.module.modules; | ||
|
||
public class ModuleCrownCapture : ModuleMinigame<BombKingController> | ||
{ | ||
|
||
public SettingSwitch NoStun; | ||
public SettingSwitch AlwaysCrown; | ||
|
||
public ModuleCrownCapture() : base("Crown Capture", "No Punch Interval, No Stun, Always Crown") | ||
{ | ||
NoStun = new(Name, "No Stun", false); | ||
AlwaysCrown = new(Name, "Always Crown", false); | ||
} | ||
|
||
public override void OnUpdate() | ||
{ | ||
if (Enabled) | ||
{ | ||
if (GameManager.Minigame is BombKingController bombKingController) | ||
{ | ||
foreach (var player in bombKingController.players) | ||
{ | ||
if (player is BombKingPlayer bombKingPlayer) | ||
{ | ||
if (player.IsMe()) | ||
{ | ||
if ((bool) NoStun.GetValue()) | ||
{ | ||
bombKingPlayer.Stunned = false; | ||
} | ||
if ((bool) AlwaysCrown.GetValue()) | ||
{ | ||
if (!bombKingPlayer.HoldingCrown) | ||
{ | ||
foreach (var p in bombKingController.players) | ||
{ | ||
if (p is BombKingPlayer enemy && enemy.HoldingCrown) | ||
{ | ||
enemy.HoldingCrown = false; | ||
} | ||
} | ||
bombKingPlayer.HoldingCrown = true; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
using System; | ||
using System.Linq; | ||
using System.Reflection; | ||
using MelonLoader; | ||
using SchummelPartie.render; | ||
using SchummelPartie.setting.settings; | ||
using UnityEngine; | ||
|
||
namespace SchummelPartie.module.modules; | ||
|
||
public class ModuleDaringDogfight : ModuleMinigame<PlanesController> | ||
{ | ||
public SettingSwitch GodMode; | ||
public SettingSwitch KillAll; | ||
public SettingSwitch BurstShot; | ||
public SettingSwitch ESP; | ||
|
||
public ModuleDaringDogfight() : base("Daring Dogfight", "God Mode, Kill All, Burst Shot, ESP.") | ||
{ | ||
GodMode = new(Name, "God Mode", false); | ||
KillAll = new(Name, "Kill All", false); | ||
BurstShot = new(Name, "Burst Shot", false); | ||
ESP = new(Name, "Extra Sensory Perception", false); | ||
} | ||
|
||
public override void OnUpdate() | ||
{ | ||
if (Enabled && ((bool) GodMode.GetValue() || (bool) KillAll.GetValue())) | ||
{ | ||
if (GameManager.Minigame is PlanesController planesController) | ||
{ | ||
foreach (var player in planesController.players) | ||
{ | ||
if (player is PlanesPlayer planesPlayer) | ||
{ | ||
if (player.IsMe()) | ||
{ | ||
if ((bool) GodMode.GetValue()) | ||
{ | ||
planesPlayer.Health = 5; | ||
} | ||
|
||
if ((bool) KillAll.GetValue()) | ||
{ | ||
foreach (var enemy in planesController.players) | ||
{ | ||
if (enemy is PlanesPlayer planesEnemy && !enemy.IsDead && !enemy.IsMe()) | ||
{ | ||
planesController.TryDamagePlayer(planesPlayer, planesEnemy, enemy.GetPlayerPosition()); | ||
} | ||
} | ||
} | ||
|
||
if ((bool) BurstShot.GetValue()) | ||
{ | ||
typeof(PlanesPlayer).GetField("m_fireCooldown", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(planesPlayer, 0f); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
public override void OnGUI() | ||
{ | ||
base.OnGUI(); | ||
if (Enabled && (bool) ESP.GetValue()) | ||
{ | ||
try | ||
{ | ||
if (GameManager.Minigame is PlanesController planesController && GameManager.Minigame.Playable) | ||
{ | ||
var me = planesController.players.First(player => player.IsMe()); | ||
if (Camera.current != null && me.transform != null) | ||
{ | ||
Vector3 mePos = Camera.current.WorldToScreenPoint(me.transform.position); | ||
if (planesController.players is { Count: > 0 }) | ||
{ | ||
foreach (var player in planesController.players) | ||
{ | ||
if (player is PlanesPlayer && player.transform != null) | ||
{ | ||
if (!player.IsDead && (!player.IsOwner || player.GamePlayer.IsAI)) | ||
{ | ||
Vector3 playerPos = | ||
Camera.current.WorldToScreenPoint(player.transform.position); | ||
Render.DrawESP(playerPos, 50f, 100f, Color.red, me: mePos, | ||
name: $"[{player.GamePlayer.Name}]"); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
catch (Exception e) | ||
{ | ||
MelonLogger.Error(e.ToString()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
using System; | ||
using System.Reflection; | ||
using MelonLoader; | ||
using SchummelPartie.setting.settings; | ||
|
||
namespace SchummelPartie.module.modules; | ||
|
||
public class ModuleElementalMages : ModuleMinigame<ElementalMagesController> | ||
{ | ||
public SettingSwitch InstantPickupCrystal; | ||
public SettingSwitch NoCameraShake; | ||
|
||
public ModuleElementalMages() : base("Elemental Mages", "Instantly pick up crystals and disable camera shake.") | ||
{ | ||
InstantPickupCrystal = new(Name, "Instant Pickup Crystal", false); | ||
NoCameraShake = new(Name, "No Camera Shake", false); | ||
} | ||
|
||
public override void OnUpdate() | ||
{ | ||
if (Enabled && ((bool) InstantPickupCrystal.GetValue() || (bool) NoCameraShake.GetValue())) | ||
{ | ||
if (GameManager.Minigame is ElementalMagesController elementalMagesController) | ||
{ | ||
foreach (var player in elementalMagesController.players) | ||
{ | ||
if (player is ElementalMagesPlayer elementalMagesPlayer) | ||
{ | ||
if (player.IsMe()) | ||
{ | ||
if ((bool) InstantPickupCrystal.GetValue()) | ||
{ | ||
try | ||
{ | ||
foreach (var crystal in elementalMagesController.crystals) | ||
{ | ||
elementalMagesController.RPCDespawnCrystal(null, crystal.id, (byte) player.OwnerSlot); | ||
} | ||
} | ||
catch (Exception) | ||
{ | ||
// ignored | ||
} | ||
} | ||
|
||
if ((bool) NoCameraShake.GetValue()) | ||
{ | ||
FieldInfo cameraShakeField = elementalMagesPlayer.GetType().GetField("cameraShake", | ||
BindingFlags.NonPublic | BindingFlags.Instance); | ||
if (cameraShakeField != null) | ||
{ | ||
CameraShake cameraShake = (CameraShake)cameraShakeField.GetValue(elementalMagesPlayer); | ||
if (cameraShake != null) | ||
{ | ||
cameraShake.enabled = false; | ||
} | ||
} | ||
else | ||
{ | ||
MelonLogger.Error( | ||
$"[{Name}] Could not find field cameraShake in BarnBrawlPlayer."); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
using System.Linq; | ||
using System.Reflection; | ||
using SchummelPartie.setting.settings; | ||
|
||
namespace SchummelPartie.module.modules; | ||
|
||
public class ModuleExplosiveExchange : ModuleMinigame<PassTheBombController> | ||
{ | ||
|
||
public SettingSwitch NoStun; | ||
public SettingSwitch NoBomb; | ||
|
||
public ModuleExplosiveExchange() : base("Explosive Exchange", "No Punch Interval, No Stun, Always Crown") | ||
{ | ||
NoStun = new(Name, "No Stun", false); | ||
NoBomb = new(Name, "No Bomb", false); | ||
} | ||
|
||
public override void OnUpdate() | ||
{ | ||
if (Enabled) | ||
{ | ||
if (GameManager.Minigame is PassTheBombController passTheBombController) | ||
{ | ||
foreach (var player in passTheBombController.players) | ||
{ | ||
if (player is PassTheBombPlayer passTheBombPlayer) | ||
{ | ||
if (player.IsMe()) | ||
{ | ||
if ((bool) NoStun.GetValue()) | ||
{ | ||
passTheBombPlayer.Stunned = false; | ||
} | ||
if ((bool) NoBomb.GetValue()) | ||
{ | ||
PassTheBombPlayer enemy = (PassTheBombPlayer) passTheBombController.players.FirstOrDefault(p => !p.IsMe() && !p.IsDead); | ||
if (enemy != null) | ||
{ | ||
enemy.HoldingBomb = true; | ||
} | ||
passTheBombPlayer.HoldingBomb = false; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,6 @@ internal static bool Prefix(RhythmPlayer __instance) | |
{ | ||
MelonLogger.Error(e.ToString()); | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
Oops, something went wrong.