mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-26 05:04:20 +00:00
Spawn default monsters with different levels according to data/Spawns.json when worldLevelOverride is not zero.
For example, in world with worldlevel 8, base monster level is 90 according to resources/ExcelBinOutput/WorldLevelExcelConfigData.json, monster level bias in data/Spawns.json belongs to [1,32], so the monster level would belong to [69, 100].
This commit is contained in:
parent
4119f8b787
commit
a19e7c6db6
@ -465,7 +465,11 @@ public class Scene {
|
||||
continue;
|
||||
}
|
||||
|
||||
EntityMonster entity = new EntityMonster(this, data, entry.getPos(), worldLevelOverride > 0 ? worldLevelOverride : entry.getLevel());
|
||||
int level = worldLevelOverride > 0 ? worldLevelOverride + entry.getLevel() - 22 : entry.getLevel();
|
||||
level = level >= 100 ? 100 : level;
|
||||
level = level <= 0 ? 1 : level;
|
||||
|
||||
EntityMonster entity = new EntityMonster(this, data, entry.getPos(), level);
|
||||
entity.getRotation().set(entry.getRot());
|
||||
entity.setGroupId(entry.getGroup().getGroupId());
|
||||
entity.setPoseId(entry.getPoseId());
|
||||
|
Loading…
Reference in New Issue
Block a user