|
@@ -1,5 +1,7 @@
|
|
|
package org.leumasjaffe.charsheet.model.magic.dimension;
|
|
package org.leumasjaffe.charsheet.model.magic.dimension;
|
|
|
|
|
|
|
|
|
|
+import java.util.Map;
|
|
|
|
|
+
|
|
|
import org.leumasjaffe.format.Named;
|
|
import org.leumasjaffe.format.Named;
|
|
|
import org.leumasjaffe.format.StringHelper;
|
|
import org.leumasjaffe.format.StringHelper;
|
|
|
|
|
|
|
@@ -19,8 +21,8 @@ public class Effect {
|
|
|
int count, per, beyond;
|
|
int count, per, beyond;
|
|
|
@NonFinal @Setter(AccessLevel.PRIVATE) @Getter(AccessLevel.PRIVATE) int step = 1, upto = Integer.MAX_VALUE;
|
|
@NonFinal @Setter(AccessLevel.PRIVATE) @Getter(AccessLevel.PRIVATE) int step = 1, upto = Integer.MAX_VALUE;
|
|
|
|
|
|
|
|
- public String getResolved(int level) {
|
|
|
|
|
- final int result = count + per * ((Math.min(level, upto)-beyond) / step);
|
|
|
|
|
|
|
+ public String getResolved(int level, Map<String, Integer> map) {
|
|
|
|
|
+ final int result = map.getOrDefault("value", 0) + count + per * ((Math.min(level, upto)-beyond) / step);
|
|
|
return resolved == null ? toString() :
|
|
return resolved == null ? toString() :
|
|
|
StringHelper.format(resolved, new Named("atlevel", result));
|
|
StringHelper.format(resolved, new Named("atlevel", result));
|
|
|
}
|
|
}
|