chore: 添加必要注释

This commit is contained in:
AncTe committed 2026-04-16 13:30:52 +08:00
1 parent 39e91b241f
commit 89936416e1
4 files changed
+96 -11

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ export class CoreState implements ICoreState {
loadState(data: IStateSaveData): void {
this.hero.removeAllFollowers();
data?.followers.forEach(v => {
data.followers.forEach(v => {
this.hero.addFollower(v.num, v.identifier);
});
}
+6 -6
View File
@@ -11,16 +11,16 @@ export class MainEnemyFinalEffect implements IEnemyFinalEffect<IEnemyAttributes>
readonly priority: number = 0;
apply(enemy: IEnemy<IEnemyAttributes>, _locator: ITileLocator): void {
// 3-坚固
if (enemy.hasSpecial(3)) {
enemy.setAttribute(
'def',
Math.max(
enemy.getAttribute('def'),
HERO_STATUS_PLACEHOLDER.atk - 1
)
const target = Math.max(
enemy.getAttribute('def'),
HERO_STATUS_PLACEHOLDER.atk - 1
);
enemy.setAttribute('def', target);
}
// 10-模仿
if (enemy.hasSpecial(10)) {
enemy.setAttribute('atk', HERO_STATUS_PLACEHOLDER.atk);
enemy.setAttribute('def', HERO_STATUS_PLACEHOLDER.def);