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

Method getCostDouble

code/src/java/pcgen/core/analysis/EqModCost.java:96–127  ·  view source on GitHub ↗
(EquipmentModifier eqMod)

Source from the content-addressed store, hash-verified

94 }
95
96 public static boolean getCostDouble(EquipmentModifier eqMod)
97 {
98 //
99 // Uninitialized?
100 //
101 Boolean costdouble = eqMod.get(ObjectKey.COST_DOUBLE);
102 if (costdouble == null)
103 {
104 if (eqMod.isType("MagicalEnhancement") || eqMod.isType("BaseMaterial"))
105 {
106 return false;
107 }
108
109 if (eqMod.isIType(Type.MAGIC))
110 {
111 return true;
112 }
113
114 for (Prerequisite preReq : eqMod.getPrerequisiteList())
115 {
116 if ("TYPE".equalsIgnoreCase(preReq.getKind())
117 && ((preReq.getKey().equalsIgnoreCase("EQMODTYPE=MagicalEnhancement"))
118 || (preReq.getKey().equalsIgnoreCase("EQMODTYPE.MagicalEnhancement"))))
119 {
120 return true;
121 }
122 }
123 return false;
124 }
125
126 return costdouble;
127 }
128
129 public static String getCost(EquipmentModifier eqMod, final String listEntry)
130 {

Callers 1

Calls 7

isITypeMethod · 0.80
equalsIgnoreCaseMethod · 0.80
getKindMethod · 0.80
getMethod · 0.65
isTypeMethod · 0.65
getPrerequisiteListMethod · 0.65
getKeyMethod · 0.65

Tested by

no test coverage detected