MCPcopy Create free account
hub / github.com/PCGen/pcgen / makeSkill

Method makeSkill

code/src/test/pcgen/util/TestHelper.java:230–247  ·  view source on GitHub ↗

Set the important info about a Skill @param name The skill name @param type The type info ("." separated) @param stat The key stat @param untrained Can this be used untrained @param armorCheck should an armor check penalty be applied

(
			final String name,
			final String type,
			final PCStat stat,
			final boolean untrained,
			final SkillArmorCheck armorCheck)

Source from the content-addressed store, hash-verified

228 * @param armorCheck should an armor check penalty be applied
229 */
230 public static Skill makeSkill(
231 final String name,
232 final String type,
233 final PCStat stat,
234 final boolean untrained,
235 final SkillArmorCheck armorCheck)
236 {
237 final Skill aSkill = new Skill();
238 aSkill.setName(name);
239 aSkill.put(StringKey.KEY_NAME, ("KEY_" + name));
240 addType(aSkill, type);
241 CDOMDirectSingleRef<PCStat> statRef = CDOMDirectSingleRef.getRef(stat);
242 aSkill.put(ObjectKey.KEY_STAT, statRef);
243 aSkill.put(ObjectKey.USE_UNTRAINED, untrained);
244 aSkill.put(ObjectKey.ARMOR_CHECK, armorCheck);
245 Globals.getContext().getReferenceContext().importObject(aSkill);
246 return aSkill;
247 }
248
249 /**
250 * Set the important info about a Skill

Callers 5

setUpMethod · 0.95
additionalSetUpMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95
setUpMethod · 0.95

Calls 7

addTypeMethod · 0.95
getRefMethod · 0.95
getContextMethod · 0.95
importObjectMethod · 0.80
setNameMethod · 0.65
putMethod · 0.65
getReferenceContextMethod · 0.65

Tested by

no test coverage detected