public void attachCondition(CircleType minimumType, int minimumBackgroundValue) {
   for (CircleType type : CircleType.values()) {
     if (type.compareTo(minimumType) >= 0) {
       typesByMinimumValue.put(type, minimumBackgroundValue);
     }
   }
 }
Exemple #2
0
 private void buildSpell(Element spellElement, List<ISpell> spellList)
     throws PersistenceException {
   String id = spellElement.attributeValue("id");
   String circleId = spellElement.attributeValue("circle");
   ICostList temporaryCost = costListBuilder.buildCostList(spellElement.element("cost"));
   Element targetElement = spellElement.element("target");
   String target = null;
   if (targetElement != null) {
     target = targetElement.attributeValue("target");
   }
   ISourceList sourceList = buildSource(spellElement);
   if (sourceList.isEmpty()) {
     return;
   }
   spellList.add(new Spell(id, CircleType.valueOf(circleId), temporaryCost, sourceList, target));
 }
 private boolean isSpellCircleGreaterThanMaximumCircle(CircleType type) {
   return !ArrayUtilities.containsValue(type.getComparableCircles(), maximumCircle)
       || (maximumCircle.compareTo(type) < 0);
 }