update spirit
This commit is contained in:
@@ -197,6 +197,19 @@ export class ConfigMgr {
|
||||
throw new Error(`ConfigMgr: level "${lv.id}" spawn references unknown enemy "${sp.type}"`);
|
||||
}
|
||||
}
|
||||
if (lv.reinforcements) {
|
||||
for (const rule of lv.reinforcements) {
|
||||
if (!enemyIds.has(rule.type)) {
|
||||
throw new Error(`ConfigMgr: level "${lv.id}" reinforcement references unknown enemy "${rule.type}"`);
|
||||
}
|
||||
if (rule.intervalSec <= 0) {
|
||||
throw new Error(`ConfigMgr: level "${lv.id}" reinforcement intervalSec must be positive`);
|
||||
}
|
||||
if (rule.count <= 0) {
|
||||
throw new Error(`ConfigMgr: level "${lv.id}" reinforcement count must be positive`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user