()
| 46 | Ability lockedBonus; |
| 47 | |
| 48 | @BeforeEach |
| 49 | @Override |
| 50 | public void setUp() throws Exception |
| 51 | { |
| 52 | super.setUp(); |
| 53 | PlayerCharacter pc = getCharacter(); |
| 54 | LoadContext context = Globals.getContext(); |
| 55 | |
| 56 | locker = new PCTemplate(); |
| 57 | locker.setName("locker"); |
| 58 | CDOMDirectSingleRef<PCStat> strRef = CDOMDirectSingleRef.getRef(str); |
| 59 | locker.addToListFor(ListKey.STAT_LOCKS, new StatLock(strRef, FormulaFactory.getFormulaFor(12))); |
| 60 | unlocker = new PCTemplate(); |
| 61 | unlocker.setName("unlocker"); |
| 62 | unlocker.addToListFor(ListKey.UNLOCKED_STATS, strRef); |
| 63 | bonus = TestHelper.makeAbility("Bonus", BuildUtilities.getFeatCat(), "General.Fighter"); |
| 64 | BonusObj aBonus = Bonus.newBonus(context, "STAT|STR|7|TYPE=Enhancement"); |
| 65 | if (aBonus != null) |
| 66 | { |
| 67 | bonus.addToListFor(ListKey.BONUS, aBonus); |
| 68 | } |
| 69 | lockedBonus = TestHelper.makeAbility("LockedBonus", BuildUtilities.getFeatCat(), "General.Fighter"); |
| 70 | aBonus = Bonus.newBonus(context, "LOCKEDSTAT|STR|3|TYPE=Morale"); |
| 71 | if (aBonus != null) |
| 72 | { |
| 73 | lockedBonus.addToListFor(ListKey.BONUS, aBonus); |
| 74 | } |
| 75 | |
| 76 | setPCStat(pc, str, 6); |
| 77 | } |
| 78 | |
| 79 | /** |
| 80 | * Test method for {@link pcgen.core.PlayerCharacter#getBaseStatFor(PCStat)}. |
nothing calls this directly
no test coverage detected