MCPcopy Create free account
hub / github.com/esengine/esengine / getStacks

Method getStacks

packages/effect/src/core/EffectContainer.ts:368–371  ·  view source on GitHub ↗

* @zh 获取指定类型的叠加层数 * @en Get stack count for specified type

(typeId: string)

Source from the content-addressed store, hash-verified

366 * @en Get stack count for specified type
367 */
368 getStacks(typeId: string): number {
369 const effects = this.getByType(typeId);
370 return effects.reduce((sum, e) => sum + e.stacks, 0);
371 }
372
373 /**
374 * @zh 获取所有效果

Callers 1

executeMethod · 0.80

Calls 1

getByTypeMethod · 0.95

Tested by

no test coverage detected