diff --git a/extension.js b/extension.js index 15aa1a2..73ccc21 100644 --- a/extension.js +++ b/extension.js @@ -393,7 +393,9 @@ game.import('extension', async function(lib, game, ui, get, ai, _status){ } if (event.result.bool && event.animate !== false) { for (var i = 0; i < event.result.targets.length; i++) { - event.result.targets[i].animate('target'); + // animate已被废弃 -miao + // event.result.targets[i].animate('target'); + event.result.targets[i].addTempClass('target'); } } if (event.dialog) event.dialog.close(); @@ -4986,12 +4988,12 @@ game.import('extension', async function(lib, game, ui, get, ai, _status){ }, this, num, nature, font); } - var node; - if (this.popupNodeCache && this.popupNodeCache.length) { - node = this.popupNodeCache.shift(); - } else { - node = decadeUI.element.create('damage'); - } + // let node; + // if (this.popupNodeCache && this.popupNodeCache.length) { + // node = this.popupNodeCache.shift(); + // } else { + let node = decadeUI.element.create('damage'); + // } if (font) { node.classList.add('normal-font'); @@ -5020,7 +5022,7 @@ game.import('extension', async function(lib, game, ui, get, ai, _status){ } if (this.damagepopups.length && !this.damagepopLocked) { - var node = this.damagepopups.shift(); + let node = this.damagepopups.shift(); this.damagepopLocked = true; if (this != node.parentNode) this.appendChild(node); @@ -5062,9 +5064,12 @@ game.import('extension', async function(lib, game, ui, get, ai, _status){ node.style.animation = 'open-fade-in-out 1.2s'; setTimeout(function (player, node) { - if (!player.popupNodeCache) player.popupNodeCache = []; - node.style.animation = ''; - player.popupNodeCache.push(node); + // if (!player.popupNodeCache) player.popupNodeCache = []; + // node.style.animation = ''; + // 释放播放完成动画后的node + node.remove() + // player.popupNodeCache.push(node); + // console.log(player.popupNodeCache.length) }, 1210, player, node); setTimeout(function (player) {