mirror of
https://github.com/motajs/template.git
synced 2026-11-02 15:04:30 +08:00
chore: 添加必要注释
This commit is contained in:
1 parent
39e91b241f
commit
89936416e1
4 files changed
+96
-11
No files matched your search
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user