()
| 1015 | } |
| 1016 | |
| 1017 | @BeforeEach |
| 1018 | @Override |
| 1019 | public void setUp() throws Exception |
| 1020 | { |
| 1021 | super.setUp(); |
| 1022 | |
| 1023 | Campaign customCampaign = new Campaign(); |
| 1024 | customCampaign.setName("Unit Test"); |
| 1025 | customCampaign.setName("KEY_Unit Test"); |
| 1026 | customCampaign.addToListFor(ListKey.DESCRIPTION, new Description("Unit Test data")); |
| 1027 | CampaignSourceEntry source; |
| 1028 | try |
| 1029 | { |
| 1030 | source = new CampaignSourceEntry(customCampaign, |
| 1031 | new URI("file:/" + getClass().getName() + ".java")); |
| 1032 | } |
| 1033 | catch (URISyntaxException e) |
| 1034 | { |
| 1035 | throw new UnreachableError(e); |
| 1036 | } |
| 1037 | |
| 1038 | // Create the monster class type |
| 1039 | GameMode gamemode = SettingsHandler.getGameAsProperty().get(); |
| 1040 | SimpleLoader<ClassType> methodLoader = new SimpleLoader<>(ClassType.class); |
| 1041 | methodLoader.parseLine(gamemode.getModeContext(), |
| 1042 | "Monster CRFORMULA:0 ISMONSTER:YES XPPENALTY:NO", |
| 1043 | TestURI.getURI()); |
| 1044 | gamemode.removeSkillMultiplierLevels(); |
| 1045 | gamemode.addSkillMultiplierLevel("4"); |
| 1046 | |
| 1047 | // Create the humanoid class |
| 1048 | String classDef = |
| 1049 | "CLASS:Humanoid KEY:KEY_Humanoid HD:8 TYPE:Monster STARTSKILLPTS:1 " |
| 1050 | + "MODTOSKILLS:NO MONSKILL:6+INT MONNONSKILLHD:1|PRESIZELTEQ:M " |
| 1051 | + "MONNONSKILLHD:2|PRESIZEEQ:L"; |
| 1052 | PCClassLoader classLoader = new PCClassLoader(); |
| 1053 | LoadContext context = Globals.getContext(); |
| 1054 | humanoidClass = classLoader.parseLine(context, null, classDef, source); |
| 1055 | |
| 1056 | classDef = |
| 1057 | "CLASS:Nymph KEY:KEY_Nymph TYPE:Monster HD:6 STARTSKILLPTS:6 MODTOSKILLS:YES "; |
| 1058 | classLoader = new PCClassLoader(); |
| 1059 | nymphClass = classLoader.parseLine(context, null, classDef, source); |
| 1060 | |
| 1061 | CDOMDirectSingleRef<SizeAdjustment> mediumRef = CDOMDirectSingleRef.getRef(medium); |
| 1062 | CDOMDirectSingleRef<SizeAdjustment> largeRef = CDOMDirectSingleRef.getRef(large); |
| 1063 | // Create the large size mod |
| 1064 | // Create the BugBear race |
| 1065 | bugbearRace = new Race(); |
| 1066 | bugbearRace.setName("Bugbear"); |
| 1067 | bugbearRace.put(StringKey.KEY_NAME, "KEY_Bugbear"); |
| 1068 | bugbearRace.put(FormulaKey.SIZE, new FixedSizeFormula(mediumRef)); |
| 1069 | bugbearRace.addToListFor(ListKey.HITDICE_ADVANCEMENT, Integer.MAX_VALUE); |
| 1070 | bugbearRace.put(IntegerKey.INITIAL_SKILL_MULT, 1); |
| 1071 | Globals.getContext().getReferenceContext().importObject(bugbearRace); |
| 1072 | |
| 1073 | bigBugbearRace = new Race(); |
| 1074 | bigBugbearRace.setName("BigBugbear"); |
nothing calls this directly
no test coverage detected