From 1446ae453066ee94577802c39eff04bccf6d8a05 Mon Sep 17 00:00:00 2001 From: BastLast Date: Mon, 13 Jan 2025 18:49:21 +0100 Subject: [PATCH] remove solofight test command #2276 --- .../Fight/SoloFightTestCommand.ts | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 Core/src/commands/admin/testCommands/Fight/SoloFightTestCommand.ts diff --git a/Core/src/commands/admin/testCommands/Fight/SoloFightTestCommand.ts b/Core/src/commands/admin/testCommands/Fight/SoloFightTestCommand.ts deleted file mode 100644 index 84795b557..000000000 --- a/Core/src/commands/admin/testCommands/Fight/SoloFightTestCommand.ts +++ /dev/null @@ -1,57 +0,0 @@ -import {ExecuteTestCommandLike, ITestCommand, TypeKey} from "../../../../core/CommandsTest"; -import {FightController} from "../../../../core/fights/FightController"; -import {PlayerFighter} from "../../../../core/fights/fighter/PlayerFighter"; -import {FightOvertimeBehavior} from "../../../../core/fights/FightOvertimeBehavior"; -import {FightStatModifierOperation} from "../../../../../../Lib/src/interfaces/FightStatModifierOperation"; -import {ClassDataController} from "../../../../data/Class"; - -export const commandInfo: ITestCommand = { - name: "solofight", - commandFormat: "", - typeWaited: { - instant: TypeKey.INTEGER - }, - description: "Faire un combat contre soi-même" -}; - -/** - * Start a fight against yourself - */ -const soloFightTestCommand: ExecuteTestCommandLike = async (player, args, response) => { - const playerClass = ClassDataController.instance.getById(player.class); - const fighter1 = new PlayerFighter(player, playerClass); - await fighter1.loadStats(false); - const fighter2 = new PlayerFighter(player, playerClass); - await fighter2.loadStats(false); - - if (args[0] === "1") { - fighter1.applyAttackModifier({ - operation: FightStatModifierOperation.ADDITION, - origin: null, - value: 9999 - }); - fighter1.applyDefenseModifier({ - operation: FightStatModifierOperation.MULTIPLIER, - origin: null, - value: 0.01 - }); - fighter2.applyAttackModifier({ - operation: FightStatModifierOperation.ADDITION, - origin: null, - value: 9999 - }); - fighter2.applyDefenseModifier({ - operation: FightStatModifierOperation.MULTIPLIER, - origin: null, - value: 0.01 - }); - } - // TODO: Replace with the right context - new FightController({fighter1, fighter2}, {friendly: false, overtimeBehavior: FightOvertimeBehavior.END_FIGHT_DRAW}, response[0]) - .startFight() - .then(); - - return ""; -}; - -commandInfo.execute = soloFightTestCommand; \ No newline at end of file