diff --git a/card/gwent.js b/card/gwent.js index 6402e877d..612723b0a 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -520,7 +520,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }); player.line(list1); for(var i=0;i=0) return 0; diff --git a/character/refresh.js b/character/refresh.js index a4afec844..ff4dd5a06 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -6779,7 +6779,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(event.players.length){ event.current=event.players.shift(); - event.current.animate('target'); + event.current.addTempClass('target'); player.line(event.current,'green'); if(event.current.countCards('he')&&target.isIn()){ event.current.chooseToDiscard({subtype:'equip1'},'he','弃置一张武器牌或让'+ @@ -8790,7 +8790,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event=_status.event; } if(game.chess){ - event.node=card.copy('thrown','center',ui.arena).animate('start'); + event.node=card.copy('thrown','center',ui.arena).addTempClass('start'); } else{ event.node=player.$throwordered(card.copy(),true); @@ -13446,9 +13446,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.card=get.cards()[0]; game.broadcast(function(card){ ui.arena.classList.add('thrownhighlight'); - card.copy('thrown','center','thrownhighlight',ui.arena).animate('start'); + card.copy('thrown','center','thrownhighlight',ui.arena).addTempClass('start'); },event.card); - event.node=event.card.copy('thrown','center','thrownhighlight',ui.arena).animate('start'); + event.node=event.card.copy('thrown','center','thrownhighlight',ui.arena).addTempClass('start'); ui.arena.classList.add('thrownhighlight'); game.addVideo('thrownhighlight1'); game.addVideo('centernode',null,get.cardInfo(event.card)); diff --git a/character/shenhua.js b/character/shenhua.js index 984080f88..da2d446ad 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -5278,7 +5278,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.currented=[]; "step 1" event.currented.push(event.current); - event.current.animate('target'); + event.current.addTempClass('target'); event.current.chooseToUse('乱武:使用一张杀或失去1点体力',function(card){ if(get.name(card)!='sha') return false; return lib.filter.cardEnabled.apply(this,arguments) diff --git a/character/sp.js b/character/sp.js index 907475367..72cfeddcf 100755 --- a/character/sp.js +++ b/character/sp.js @@ -3333,7 +3333,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event=_status.event; } if(game.chess){ - event.node=card.copy('thrown','center',ui.arena).animate('start'); + event.node=card.copy('thrown','center',ui.arena).addTempClass('start'); } else{ event.node=player.$throwordered(card.copy(),true); diff --git a/character/tw.js b/character/tw.js index 20a28e814..94501ee07 100644 --- a/character/tw.js +++ b/character/tw.js @@ -5472,7 +5472,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(event.players.length){ event.current=event.players.shift(); - event.current.animate('target'); + event.current.addTempClass('target'); player.line(event.current,'green'); if(!event.current.countCards('he')||!target.isIn()) event._result={bool:false}; else{ diff --git a/character/yijiang.js b/character/yijiang.js index 3a54d326b..f9db8e5d5 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -9792,7 +9792,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(event.players.length){ event.current=event.players.shift(); - event.current.animate('target'); + event.current.addTempClass('target'); player.line(event.current,'green'); if(event.current.countCards('he')&&target.isIn()){ event.current.chooseToDiscard({subtype:'equip1'},'he','弃置一张武器牌或让'+ diff --git a/mode/boss.js b/mode/boss.js index 8ac2e7a0a..74b54043f 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -226,14 +226,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ boss.side=true; if(!event.noslide){ var rect=event.current.getBoundingClientRect(); - boss.animate('bossing'); - boss.node.hp.animate('start'); + boss.addTempClass('bossing'); + boss.node.hp.addTempClass('start'); boss.bossinginfo=[rect.left+rect.width/2,rect.top+rect.height/2]; boss.style.transition='all 0s'; boss.node.equips.style.opacity='0'; } else{ - boss.animate('start'); + boss.addTempClass('start'); } boss.setIdentity('zhu'); boss.identity='zhu'; @@ -244,7 +244,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i=0;i0?player.node.handcards1:player.node.handcards2; card.fix(); - card.animate('start'); + card.addTempClass('start'); position.insertBefore(card,position.firstChild); } player.update(); @@ -1184,7 +1184,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var node=_status.event.dialog.buttons[0].parentNode; _status.event.dialog.buttons=ui.create.buttons(list.slice(0,20),'character',buttons); _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); + buttons.addTempClass('start'); node.remove(); game.uncheck(); @@ -1201,7 +1201,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.dialogxx.classList.add('withbg'); event.dialogxx.classList.add('fixed'); if(ui.cheat2){ - ui.cheat2.animate('controlpressdownx',500); + ui.cheat2.addTempClass('controlpressdownx',500); ui.cheat2.classList.remove('disabled'); } }; @@ -1225,11 +1225,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.animate('controlpressdownx',500); + ui.cheat.addTempClass('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } if(_status.bosschoice){ - _status.bosschoice.animate('controlpressdownx',500); + _status.bosschoice.addTempClass('controlpressdownx',500); _status.bosschoice.classList.remove('disabled'); } } @@ -6462,10 +6462,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); for(var i=0;i3&&selected.character.length){ - event.removeCharacter.animate('controlpressdownx',500); + event.removeCharacter.addTempClass('controlpressdownx',500); event.removeCharacter.classList.remove('disabled'); } if(game.data.money<150&&!game.data._arena){ event.enterArena.classList.add('disabled'); } else{ - event.enterArena.animate('controlpressdownx',500); + event.enterArena.addTempClass('controlpressdownx',500); event.enterArena.classList.remove('disabled'); } if(game.data.money<100){ event.addCharacter.classList.add('disabled'); } else{ - event.addCharacter.animate('controlpressdownx',500); + event.addCharacter.addTempClass('controlpressdownx',500); event.addCharacter.classList.remove('disabled'); } initcapt(); @@ -2713,11 +2713,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.data.character.remove(node.link); game.saveData(); if(game.data.money>=100){ - event.addCharacter.animate('controlpressdownx',500); + event.addCharacter.addTempClass('controlpressdownx',500); event.addCharacter.classList.remove('disabled'); } if(game.data.money>=150){ - event.enterArena.animate('controlpressdownx',500); + event.enterArena.addTempClass('controlpressdownx',500); event.enterArena.classList.remove('disabled'); } node.delete(); @@ -2952,7 +2952,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } if(selected.character.length&&game.data.character.length>3){ - event.removeCharacter.animate('controlpressdownx',500); + event.removeCharacter.addTempClass('controlpressdownx',500); event.removeCharacter.classList.remove('disabled'); } else{ @@ -2990,14 +2990,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ _status.qianfan=false; event.removeCharacter.replace('遣返',qianfan); if(game.data.money>=100){ - event.addCharacter.animate('controlpressdownx',500); + event.addCharacter.addTempClass('controlpressdownx',500); event.addCharacter.classList.remove('disabled'); } else{ event.addCharacter.classList.add('disabled'); } if(game.data.money>=150||game.data._arena){ - event.enterArena.animate('controlpressdownx',500); + event.enterArena.addTempClass('controlpressdownx',500); event.enterArena.classList.remove('disabled'); } else{ @@ -3885,7 +3885,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } else if(dialog.buttons.length=0) return 0; @@ -13913,7 +13913,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } },get.config('onlyguozhanexpand')?'expandall':undefined,get.config('onlyguozhan')?'onlypack:mode_guozhan':undefined); if(ui.cheat2){ - ui.cheat2.animate('controlpressdownx',500); + ui.cheat2.addTempClass('controlpressdownx',500); ui.cheat2.classList.remove('disabled'); } }; @@ -13936,7 +13936,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.animate('controlpressdownx',500); + ui.cheat.addTempClass('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } } @@ -13977,7 +13977,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var node=_status.event.dialog.buttons[0].parentNode; _status.event.dialog.buttons=ui.create.buttons(list,'character',buttons); _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); + buttons.addTempClass('start'); node.remove(); game.uncheck(); game.check(); diff --git a/mode/identity.js b/mode/identity.js index 390a9a451..c6807ea05 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -1582,7 +1582,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var node=dialog.buttons[0].parentNode; dialog.buttons=ui.create.buttons(list,'characterx',buttons); dialog.content.insertBefore(buttons,node); - buttons.animate('start'); + buttons.addTempClass('start'); node.remove(); game.uncheck(); game.check(); @@ -1992,7 +1992,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var node=_status.event.dialog.buttons[0].parentNode; _status.event.dialog.buttons=ui.create.buttons(list,'characterx',buttons); _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); + buttons.addTempClass('start'); node.remove(); game.uncheck(); game.check(); @@ -2003,7 +2003,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.onfree.push(function(){ event.dialogxx=ui.create.characterDialog('heightset'); if(ui.cheat2){ - ui.cheat2.animate('controlpressdownx',500); + ui.cheat2.addTempClass('controlpressdownx',500); ui.cheat2.classList.remove('disabled'); } }); @@ -2025,7 +2025,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.animate('controlpressdownx',500); + ui.cheat.addTempClass('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } } diff --git a/mode/stone.js b/mode/stone.js index a8ae716ef..f6c1b09a9 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -934,7 +934,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.dataset.position=dead.dataset.position; player.side=dead.side; player.actcharacterlist=dead.actcharacterlist; - player.animate('replaceme'); + player.addTempClass('replaceme'); player.actcount=game.enemy.actcount; player.actcount=dead.actcount; if(_status.double_character){ @@ -994,7 +994,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.dataset.position=dead.dataset.position; player.side=dead.side; player.actcharacterlist=dead.actcharacterlist; - player.animate('replaceenemy'); + player.addTempClass('replaceenemy'); player.actcount=dead.actcount; if(_status.double_character){ player.init(_status.enemylist.shift(),_status.enemylist.shift()); @@ -1495,7 +1495,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var node=_status.event.dialog.buttons[0].parentNode; _status.event.dialog.buttons=ui.create.buttons(list.slice(0,get.config('battle_number')*2+5),'character',buttons); _status.event.dialog.content.insertBefore(buttons,node); - buttons.animate('start'); + buttons.addTempClass('start'); node.remove(); game.uncheck(); @@ -1510,7 +1510,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.onfree.push(function(){ event.dialogxx=ui.create.characterDialog('heightset'); if(ui.cheat2){ - ui.cheat2.animate('controlpressdownx',500); + ui.cheat2.addTempClass('controlpressdownx',500); ui.cheat2.classList.remove('disabled'); } event.dialogxx.style.height=(game.layout=='newlayout'?350:410)+'px'; @@ -1533,7 +1533,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.uncheck(); game.check(); if(ui.cheat){ - ui.cheat.animate('controlpressdownx',500); + ui.cheat.addTempClass('controlpressdownx',500); ui.cheat.classList.remove('disabled'); } } diff --git a/mode/tafang.js b/mode/tafang.js index a20887631..695be18ed 100644 --- a/mode/tafang.js +++ b/mode/tafang.js @@ -616,8 +616,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ui.me.querySelector('.fakeme.avatar').show(); ui.me.querySelector('.fakeme.player').show(); ui.create.fakeme(); - ui.handcards1=player.node.handcards1.animate('start').fix(); - ui.handcards2=player.node.handcards2.animate('start').fix(); + ui.handcards1=player.node.handcards1.addTempClass('start').fix(); + ui.handcards2=player.node.handcards2.addTempClass('start').fix(); ui.handcards1Container.appendChild(ui.handcards1); ui.handcards2Container.appendChild(ui.handcards2); ui.updatehl(); @@ -633,7 +633,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ for(var i=ui.chesswidth;i { if (parseInt(value.dataset.position) >= position) value.dataset.position = parseInt(value.dataset.position) + 1; }); - const player = ui.create.player(ui.arena).animate('start'); + const player = ui.create.player(ui.arena).addTempClass('start'); if (character) player.init(character, character2); game.players.push(player); player.dataset.position = position; @@ -8445,7 +8445,7 @@ export class Game extends Uninstantable { */ static addFellow(position, character, animation) { game.addVideo('addFellow', null, [position, character, animation]); - const player = ui.create.player(ui.arena).animate(animation || 'start'); + const player = ui.create.player(ui.arena).addTempClass(animation || 'start'); player.dataset.position = position || game.players.length + game.dead.length; player.getId(); if (character) player.init(character); @@ -8479,7 +8479,7 @@ export class Game extends Uninstantable { game.players.push(player); delete player.removed; player.removeAttribute('style'); - player.animate('start'); + player.addTempClass('start'); ui.arena.appendChild(player); game.arrangePlayers(); return player; @@ -8527,7 +8527,7 @@ export class Game extends Uninstantable { game.players.remove(player); game.dead.remove(player); player.delete(); - const player2 = ui.create.player(ui.arena).animate('start'); + const player2 = ui.create.player(ui.arena).addTempClass('start'); if (character) player2.init(character, character2); game.players.push(player2); player2.dataset.position = position; diff --git a/noname/init/polyfill.js b/noname/init/polyfill.js index 0dfc548a2..34cab532b 100644 --- a/noname/init/polyfill.js +++ b/noname/init/polyfill.js @@ -5,22 +5,22 @@ import { Game as game } from '../game/index.js'; import { status as _status } from '../status/index.js'; import { UI as ui } from '../ui/index.js'; -HTMLDivElement.prototype.animate = function (name, time) { - // 兼容原先的Div.animate - if (Array.isArray(name) || get.objtype(name) == 'object') { - return Element.prototype.animate.call(this, name, time); - } - var that; - if (get.is.mobileMe(this) && name == 'target') { - that = ui.mebg; - } - else { - that = this; +// 废弃覆盖原型的HTMLDivElement.prototype.animate +// 改为HTMLDivElement.prototype.addTempClass +HTMLDivElement.prototype.animate = function (keyframes, options) { + if (typeof keyframes == 'string') { + console.warn(this, '无名杀开发者修改的animate方法已废弃,请改为使用addTempClass方法'); + return HTMLDivElement.prototype.addTempClass.call(this, keyframes, options); } + else return HTMLElement.prototype.animate.call(this, keyframes, options); +}; + +HTMLDivElement.prototype.addTempClass = function (name, time = 1000) { + let that = get.is.mobileMe(this) && name == 'target' ? ui.mebg : this; that.classList.add(name); - setTimeout(function () { + setTimeout(() => { that.classList.remove(name); - }, time || 1000); + }, time); return this; }; HTMLDivElement.prototype.hide = function () { diff --git a/noname/library/element/content.js b/noname/library/element/content.js index f65eb8d87..95007a4ce 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -3036,7 +3036,7 @@ export const Content = { } } else { - ui.control.animate('nozoom', 100); + ui.control.addTempClass('nozoom', 100); event._aiexclude.add(event.buttoned); } event.goto(0); @@ -3230,7 +3230,7 @@ export const Content = { } } else { - ui.control.animate('nozoom', 100); + ui.control.addTempClass('nozoom', 100); event._aiexclude.add(event.buttoned); } event.goto(0); @@ -3834,7 +3834,7 @@ export const Content = { event.cardlist.forEach((card, index) => { game.log(targets[index], '的拼点牌为', card); }); - player.animate('target'); + player.addTempClass('target'); game.delay(0, 1000); 'step 5'; event.target = null; @@ -3842,7 +3842,7 @@ export const Content = { 'step 6'; if (event.iwhile < targets.length) { event.target = targets[event.iwhile]; - event.target.animate('target'); + event.target.addTempClass('target'); event.card2 = event.cardlist[event.iwhile]; event.num2 = event.getNum(event.card2); //event.tempplayer.line(event.target); @@ -3996,8 +3996,8 @@ export const Content = { "step 5"; if (event.iwhile < targets.length) { event.target = targets[event.iwhile]; - event.target.animate('target'); - player.animate('target'); + event.target.addTempClass('target'); + player.addTempClass('target'); event.card2 = event.cardlist[event.iwhile]; event.num2 = event.getNum(event.card2); game.log(event.target, '的拼点牌为', event.card2); @@ -4746,7 +4746,7 @@ export const Content = { } if (event.result.bool && event.animate !== false) { for (var i = 0; i < event.result.targets.length; i++) { - event.result.targets[i].animate('target'); + event.result.targets[i].addTempClass('target'); } } if (event.dialog) event.dialog.close(); @@ -4806,7 +4806,7 @@ export const Content = { event.resume(); if (event.result.bool && event.animate !== false) { for (var i = 0; i < event.result.targets.length; i++) { - event.result.targets[i].animate('target'); + event.result.targets[i].addTempClass('target'); } } if (event.dialog) event.dialog.close(); @@ -6105,12 +6105,12 @@ export const Content = { targets.sortBySeat((_status.currentPhase || player)); } if (animate) for (var i = 0; i < targets.length; i++) { - targets[i].animate('target'); + targets[i].addTempClass('target'); } } else if (animate) { for (var i = 0; i < targets.length; i++) { - targets[i].animate('target'); + targets[i].addTempClass('target'); } } } @@ -6329,10 +6329,10 @@ export const Content = { if (next.target && !info.multitarget) { if (num == 0 && targets.length > 1) { // var ttt=next.target; - // setTimeout(function(){ttt.animate('target');},0.5*lib.config.duration); + // setTimeout(function(){ttt.addTempClass('target');},0.5*lib.config.duration); } else { - next.target.animate('target'); + next.target.addTempClass('target'); } } if (!info.nodelay && num > 0) { @@ -6608,7 +6608,7 @@ export const Content = { delete lib.tempSortSeat; } for (var i = 0; i < targets.length; i++) { - targets[i].animate('target'); + targets[i].addTempClass('target'); } } next.target = targets[num]; @@ -6617,10 +6617,10 @@ export const Content = { if (next.target && !info.multitarget) { if (num == 0 && targets.length > 1) { // var ttt=next.target; - // setTimeout(function(){ttt.animate('target');},0.5*lib.config.duration); + // setTimeout(function(){ttt.addTempClass('target');},0.5*lib.config.duration); } else { - next.target.animate('target'); + next.target.addTempClass('target'); } } if (num == 0) { @@ -8131,7 +8131,7 @@ export const Content = { event = _status.event; } if (game.chess) { - event.node = card.copy('thrown', 'center', ui.arena).animate('start'); + event.node = card.copy('thrown', 'center', ui.arena).addTempClass('start'); } else { event.node = player.$throwordered(card.copy(), true); diff --git a/noname/library/element/control.js b/noname/library/element/control.js index b3d4252dd..561f73da0 100644 --- a/noname/library/element/control.js +++ b/noname/library/element/control.js @@ -28,10 +28,10 @@ export class Control extends HTMLDivElement { else control.add(argument); }); ui.controls.unshift(control); - if (nc) ui.control.animate('nozoom', 100); + if (nc) ui.control.addTempClass('nozoom', 100); if (control.childNodes.length) { control.style.transition = 'opacity 0.5s'; - control.animate('controlpressdownx', 500); + control.addTempClass('controlpressdownx', 500); ui.refresh(control); if (!control.stayleft) control.style.transform = `translateX(-${control.offsetWidth / 2}px)`; control.style.opacity = 1; @@ -68,7 +68,7 @@ export class Control extends HTMLDivElement { this.style.transition = ''; } else { - this.animate('controlpressdownx', 500); + this.addTempClass('controlpressdownx', 500); } ui.updatec(); return this; @@ -81,7 +81,7 @@ export class Control extends HTMLDivElement { node.addEventListener(lib.config.touchscreen ? 'touchend' : 'click', ui.click.control); } close() { - this.animate('controlpressdownx', 500); + this.addTempClass('controlpressdownx', 500); ui.controls.remove(this); this.delete(); @@ -95,7 +95,7 @@ export class Control extends HTMLDivElement { if (ui.skills3 == this) delete ui.skills3; } replace() { - // this.animate('controlpressdownx',500); + // this.addTempClass('controlpressdownx',500); if (this.replaceTransition === false) { this.style.transitionProperty = 'none'; ui.refresh(this); diff --git a/noname/library/index.js b/noname/library/index.js index 659af65bd..3703c1ef8 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -3680,7 +3680,7 @@ export class Library extends Uninstantable { right: '靠右', }, onclick: function (bool) { - if (lib.config.show_history == 'right') ui.window.animate('rightbar2'); + if (lib.config.show_history == 'right') ui.window.addTempClass('rightbar2'); game.saveConfig('show_history', bool); if (_status.video || !_status.prepareArena) return; if (bool == 'left') { @@ -12444,7 +12444,7 @@ export class Library extends Uninstantable { var pos = state.players[observe || game.onlineID].position; for (var i in state.players) { var info = state.players[i]; - var player = ui.create.player(ui.arena).animate('start'); + var player = ui.create.player(ui.arena).addTempClass('start'); player.dataset.position = (info.position < pos) ? info.position - pos + parseInt(state.number) : info.position - pos; if (i == observe || i == game.onlineID) { game.me = player; diff --git a/noname/ui/index.js b/noname/ui/index.js index 422ac9bdc..6baaad5cb 100644 --- a/noname/ui/index.js +++ b/noname/ui/index.js @@ -9295,7 +9295,7 @@ class Create extends Uninstantable { if (!lib.config.show_replay) { ui.replay.style.display = 'none'; } - ui.control = ui.create.div('#control', ui.arena).animate('nozoom'); + ui.control = ui.create.div('#control', ui.arena).addTempClass('nozoom'); ui.cardPile = ui.create.div('#cardPile'); ui.discardPile = ui.create.div('#discardPile'); ui.special = ui.create.div('#special'); @@ -9504,7 +9504,7 @@ class Create extends Uninstantable { _status.auto = true; ui.auto.classList.add('glow'); setTimeout(function () { - var node = ui.create.pause().animate('start'); + var node = ui.create.pause().addTempClass('start'); node.appendChild(ui.sidebar); node.firstChild.innerHTML = '正在测试'; node.removeEventListener('click', ui.click.resume); @@ -9985,7 +9985,7 @@ class Create extends Uninstantable { } if (!numberOfPlayers) numberOfPlayers = 5; for (let ordinal = 0; ordinal < numberOfPlayers; ordinal++) { - const player = ui.create.player().animate('start'); + const player = ui.create.player().addTempClass('start'); game.players.push(player); player.dataset.position = ordinal; } @@ -10010,7 +10010,7 @@ class Create extends Uninstantable { } static me(hasme) { ui.mebg = ui.create.div('#mebg', ui.arena); - ui.me = ui.create.div('#me', ui.arena).animate('start'); + ui.me = ui.create.div('#me', ui.arena).addTempClass('start'); ui.handcards1Container = ui.create.div('#handcards1', ui.me); ui.handcards2Container = ui.create.div('#handcards2', ui.me); ui.arena.classList.remove('nome'); @@ -12527,7 +12527,7 @@ class Click extends Uninstantable { _status.clicked = true; _status.tempunpop = true; this.previousSibling.hide(); - var node = ui.create.div('.switcher', this.parentNode).animate('start'); + var node = ui.create.div('.switcher', this.parentNode).addTempClass('start'); for (var i = 0; i < this.choice.length; i++) { var choice = ui.create.div('.pointerdiv', node); choice.innerHTML = get.translation(this.choice[i]); @@ -13020,7 +13020,7 @@ class Click extends Uninstantable { if (_status.event.type == 'phase' && ui.confirm) { ui.confirm.classList.add('removing'); } - // ui.control.animate('nozoom',100); + // ui.control.addTempClass('nozoom',100); event.restore(); var cards = event.player.getCards('hej'); for (var i = 0; i < cards.length; i++) { @@ -13801,7 +13801,7 @@ class Click extends Uninstantable { game.pause2(); var node = ui.create.pause(); if (!node) return; - node.animate('start'); + node.addTempClass('start'); ui.sidebar3.innerHTML = ''; if (lib.config.show_discardpile) { for (var i = 0; i < ui.discardPile.childNodes.length; i++) { @@ -14141,7 +14141,7 @@ export class UI extends Uninstantable { stayleft._offset += stayleft.currentLeft; if (current_offset != stayleft._offset) { - stayleft.animate('controlpressdownx', 500); + stayleft.addTempClass('controlpressdownx', 500); stayleft.style.transform = 'translateX(' + stayleft._offset + 'px)'; } } @@ -14159,7 +14159,7 @@ export class UI extends Uninstantable { if (minoffset > offset) offset = minoffset; var control = controls.shift(); if (control._offset != offset) { - control.animate('controlpressdownx', 500); + control.addTempClass('controlpressdownx', 500); control.style.transform = 'translateX(' + offset + 'px)'; control._offset = offset; } @@ -14171,7 +14171,7 @@ export class UI extends Uninstantable { offset += 6; } if (control._offset != offset) { - control.animate('controlpressdownx', 500); + control.addTempClass('controlpressdownx', 500); control.style.transform = 'translateX(' + offset + 'px)'; control._offset = offset; }