From c386a0e94bf49e86b30cdcb0d8aaa3a5f775441f Mon Sep 17 00:00:00 2001 From: IllianiCBT Date: Sat, 28 Sep 2024 19:06:42 -0500 Subject: [PATCH] Deleted `StratConSkillGenerator.java` Removed `StratConSkillGenerator.java` as it is no longer needed. This file contained methods for generating random skills. I found I could achieve the same goal better using `ModifiedConstantSkillGenerator.java`. --- .../StratConSkillGenerator.java | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 megamek/src/megamek/client/generator/skillGenerators/StratConSkillGenerator.java diff --git a/megamek/src/megamek/client/generator/skillGenerators/StratConSkillGenerator.java b/megamek/src/megamek/client/generator/skillGenerators/StratConSkillGenerator.java deleted file mode 100644 index 69a088dbb44..00000000000 --- a/megamek/src/megamek/client/generator/skillGenerators/StratConSkillGenerator.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2024 - The MegaMek Team. All Rights Reserved. - * - * This file is part of MegaMek. - * - * MegaMek is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * MegaMek is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with MegaMek. If not, see . - */ -package megamek.client.generator.skillGenerators; - -import megamek.common.Compute; -import megamek.common.Entity; -import megamek.common.LandAirMek; - -public class StratConSkillGenerator extends TotalWarfareSkillGenerator { - /** - * Generates random skills based on the given entity and parameters. - * - * @param entity The entity for which skills need to be generated. - * @param clanPilot Determines if the entity is a clan pilot. - * @param forceClan Determines if the force is clan. - * @return An array of randomly generated skills based on the entity and parameters. - */ - @Override - public int[] generateRandomSkills(final Entity entity, final boolean clanPilot, final boolean forceClan) { - int skillLevel = switch (getLevel()) { - case ULTRA_GREEN -> 2; - case GREEN -> 3; - case VETERAN -> 5; - case ELITE -> 6; - case HEROIC -> 7; - case LEGENDARY -> 8; - default -> 4; // Regular - }; - - if (entity instanceof LandAirMek) { - skillLevel += 1; - } - - int roll = Compute.d6(1); - - if (roll == 1) { - skillLevel--; - } else if (roll == 6) { - skillLevel++; - } - - skillLevel += determineBonus(entity, clanPilot, forceClan); - - return cleanReturn(entity, - SKILL_LEVELS[0][Math.min(skillLevel, SKILL_LEVELS[0].length)], - SKILL_LEVELS[1][Math.min(skillLevel, SKILL_LEVELS[1].length)]); - } -}