Fix android research refund refunding "levels" of experience
Fixes #184
This commit is contained in:
parent
4d551a2df9
commit
991972216e
@ -172,7 +172,17 @@ class AndroidResearch(val type: AndroidResearchType, val capability: MatteryPlay
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (type.experienceLevels > 0) {
|
if (type.experienceLevels > 0) {
|
||||||
capability.ply.giveExperienceLevels(type.experienceLevels)
|
var experiencePoints = 0
|
||||||
|
|
||||||
|
for (level in 0 until type.experienceLevels) {
|
||||||
|
experiencePoints += when (level) {
|
||||||
|
in 0 .. 14 -> 7 + level * 2
|
||||||
|
in 15 .. 29 -> 37 + (level - 15) * 5
|
||||||
|
else -> 112 + (level - 30) * 9
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
capability.ply.giveExperiencePoints(experiencePoints)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (item in type.items) {
|
for (item in type.items) {
|
||||||
|
Loading…
Reference in New Issue
Block a user