From fe45a009ae24536877c3b6b7188544b7e5281617 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Fri, 1 Sep 2023 08:45:46 -0700 Subject: [PATCH] Fix the CSS, and remove the trigger limitations of lib.element.player.changeHp and game.chooseCharacter. --- game/game.js | 4 ++-- layout/default/layout.css | 2 +- mode/boss.js | 2 +- mode/brawl.js | 10 +++++----- mode/chess.js | 2 +- mode/doudizhu.js | 20 ++++++++++---------- mode/guozhan.js | 4 ++-- mode/identity.js | 8 ++++---- mode/single.js | 8 ++++---- mode/stone.js | 2 +- mode/versus.js | 26 +++++++++++++------------- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/game/game.js b/game/game.js index bf6256bc6..a1d656136 100644 --- a/game/game.js +++ b/game/game.js @@ -23050,7 +23050,7 @@ return next; }, changeHp:function(num,popup){ - var next=game.createEvent('changeHp',false); + var next=game.createEvent('changeHp'); next.num=num; if(popup!=undefined) next.popup=popup; next.player=this; @@ -37446,7 +37446,7 @@ return next; }, chooseCharacterDouble:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); var config,width,num,ratio,func,update,list,first; for(var i=0;i.card>.info>span, .linked>.count { right: 154px; } -.acted>.identity { +.acted>.identity>div { transform: rotate(180deg); } diff --git a/mode/boss.js b/mode/boss.js index e8773a99d..342d85cbd 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -1127,7 +1127,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, chooseCharacter:function(func){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.customreplacetarget=func; next.ai=function(player,list){ diff --git a/mode/brawl.js b/mode/brawl.js index 7b6ee0095..2c1ad3334 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -1005,7 +1005,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return dialog; }, chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ 'step 0' @@ -1221,7 +1221,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ content:{ chooseCharacterBefore:function(){ game.chooseCharacter=function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.addPlayer=true; next.ai=function(player,list,back){ @@ -2798,7 +2798,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, game.addGlobalSkill('_changeCharacter'); game.chooseCharacterTwo=function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ 'step 0' ui.arena.classList.add('choose-character'); @@ -3263,7 +3263,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.identityVideoName='千里单骑'; game.saveConfig('player_number',_status.qianlidanji.player_number,'identity'); game.chooseCharacter=function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" @@ -3775,7 +3775,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ] game.liangjunduilei=list; game.chooseCharacterTwo=function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ 'step 0' for(var i in lib.skill){ diff --git a/mode/chess.js b/mode/chess.js index 09b20b985..7910d0442 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -3634,7 +3634,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ui.money.childNodes[1].innerHTML=game.data.dust; }, chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.ai=function(player,list){ if(get.config('double_character')){ diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 15f76becf..7c6e1280d 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -298,7 +298,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ else return player.identity=='fan'; }, chooseCharacterZhidou:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" game.no_continue_game=true; @@ -405,7 +405,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterBinglin:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" game.no_continue_game=true; @@ -501,7 +501,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterHuanle:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -588,7 +588,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, chooseCharacterKaihei:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -681,7 +681,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterBinglin(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.addPlayer=function(player){ var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0); @@ -1107,7 +1107,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, chooseCharacterKaiheiOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -1224,7 +1224,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterHuanleOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -1353,7 +1353,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterBinglinOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -1497,7 +1497,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterZhidouOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -1652,7 +1652,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterBinglinOL(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); diff --git a/mode/guozhan.js b/mode/guozhan.js index 5c5093212..aaeaf90e2 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -13653,7 +13653,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return winner&&winner.isFriendOf(game.me); }, chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.addPlayer=true; next.ai=function(player,list,back){ @@ -14006,7 +14006,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ 'step 0' game.broadcastAll(function(){ diff --git a/mode/identity.js b/mode/identity.js index 1bedb6dfe..a75337e14 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -648,7 +648,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, chooseCharacterPurpleOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -833,7 +833,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterPurple:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); @@ -970,7 +970,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterPurple(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.addPlayer=function(player){ var list=lib.config.mode_config.identity.identity[game.players.length-3].slice(0); @@ -1747,7 +1747,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterPurpleOL(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); diff --git a/mode/single.js b/mode/single.js index 628aabfed..2fcb745c0 100644 --- a/mode/single.js +++ b/mode/single.js @@ -322,7 +322,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return player.isAlive(); }, chooseCharacterDianjiang:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" @@ -376,7 +376,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterDianjiang(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" @@ -547,7 +547,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterDianjiangOL:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" @@ -613,7 +613,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.chooseCharacterDianjiangOL(); return; } - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); diff --git a/mode/stone.js b/mode/stone.js index c03fd8282..c802ce002 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -1450,7 +1450,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.additionaldead=[]; }, chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" diff --git a/mode/versus.js b/mode/versus.js index 2f5364cd4..67ab52cec 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -650,7 +650,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, chooseCharacterJiange:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ 'step 0' @@ -853,7 +853,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterSiguo:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ 'step 0' @@ -1130,7 +1130,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterTwo:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ 'step 0' @@ -1439,7 +1439,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterEndless:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ 'step 0' @@ -1586,7 +1586,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterFour:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.ai=function(player,list,list2){ if(player.identity=='zhu'){ @@ -1932,7 +1932,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterThree:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ 'step 0' if(lib.config.continue_name_versus_three){ @@ -2041,7 +2041,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacter:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.showConfig=true; next.setContent(function(){ "step 0" @@ -2546,7 +2546,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }, chooseCharacterOLGuandu:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" var list=[ @@ -2686,7 +2686,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterGuandu:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ 'step 0' lib.init.onfree(); @@ -2738,7 +2738,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterOL4:function(){ - var next=game.createEvent('chooseCharacter',false); + var next=game.createEvent('chooseCharacter'); next.setContent(function(){ "step 0" var list=[ @@ -2937,7 +2937,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterOL3:function(){ - var next=game.createEvent('chooseCharacterOL',false); + var next=game.createEvent('chooseCharacterOL'); next.setContent(function(){ 'step 0' game.additionaldead=[]; @@ -3054,7 +3054,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterOL2:function(){ - var next=game.createEvent('chooseCharacterOL',false); + var next=game.createEvent('chooseCharacterOL'); next.setContent(function(){ 'step 0' var ref=game.players[0]; @@ -3387,7 +3387,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }); }, chooseCharacterOL1:function(){ - var next=game.createEvent('chooseCharacterOL',false); + var next=game.createEvent('chooseCharacterOL'); next.setContent(function(){ 'step 0' game.removeCard('shengdong');