/// <summary> /// 战斗必胜修改 /// </summary> /// <param name="__instance"></param> private static void BattleSystem_Update_Postfix(BattleSystem __instance) { if (!TaiwuEditor.enabled || !TaiwuEditor.settings.BattleMustWin.Value) { return; } if (TaiwuEditor.settings.Hotkey.BattleMustWin.Value.IsDown()) { __instance.SetRealDamage(isActor: false, 0, 15, 1000000, __instance.ActorId(isActor: false), __instance.largeSize, getWin: true); } }
private static void BattleSystem_GetEnemy_Postfix(BattleSystem __instance, bool newBattle) { if (newBattle) { BattleSystem_GetEnemy__thisBattleAlreadySet = false; } else if (BattleSystem_GetEnemy__thisBattleAlreadySet) { return; } int nEnemyId = __instance.ActorId(false, false); int nPlayerId = __instance.ActorId(true, false); int enemyJingCunPoint = int.Parse(DateFile.instance.GetActorDate(nEnemyId, 901, false)); int playerJingCunPoint = int.Parse(DateFile.instance.GetActorDate(nPlayerId, 901, false)); // Main.Logger.Log("New Enemy Entered " + nEnemyId + " " + enemyJingCunPoint); if (God.Core.God.Setting.stopOnHiJingcunEnemy.Value && enemyJingCunPoint - playerJingCunPoint >= God.Core.God.Setting.minJingcunExc.Value) { BattleSystem_GetEnemy__thisBattleAlreadySet = true; GameSpeeder.ApplyTimeScale(false); } }
private static void Postfix(BattleSystem __instance, bool newBattle) { if (newBattle) { _thisBattleAlreadySet = false; } else if (_thisBattleAlreadySet) { return; } int nEnemyId = __instance.ActorId(false, false); int nPlayerId = __instance.ActorId(true, false); int enemyJingCunPoint = int.Parse(DateFile.instance.GetActorDate(nEnemyId, 901, false)); int playerJingCunPoint = int.Parse(DateFile.instance.GetActorDate(nPlayerId, 901, false)); // Main.Logger.Log("New Enemy Entered " + nEnemyId + " " + enemyJingCunPoint); if (Main.settings.stopOnHiJingcunEnemy && enemyJingCunPoint - playerJingCunPoint >= Main.settings.minJingcunExc) { _thisBattleAlreadySet = true; Main.ApplyTimeScale(false); } }