From 9f14886753b367a715c3ee1aba9a6f219f81fb11 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 17 Feb 2024 00:45:52 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=B7=A6=E6=85=88/=E7=95=8C=E5=B7=A6?= =?UTF-8?q?=E6=85=88=E3=80=90=E5=8C=96=E8=BA=AB=E3=80=91=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=96=B0=E6=9C=BA=E5=88=B6+dieBegin=E5=B0=86=E5=8A=BF=E5=8A=9B?= =?UTF-8?q?=E5=92=8C=E6=80=A7=E5=88=AB=E6=8D=A2=E5=9B=9E=E5=8E=9F=E6=AD=A6?= =?UTF-8?q?=E5=B0=86=E7=89=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/refresh.js | 18 +++++++++++++++--- character/shenhua.js | 18 +++++++++++++++--- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index 02b4ef19f..498a65866 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -10589,10 +10589,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var link=result.control; player.storage.rehuashen.current2=link; if(!player.additionalSkills.rehuashen||!player.additionalSkills.rehuashen.includes(link)){ - player.addAdditionalSkill('rehuashen',link); + player.addAdditionalSkills('rehuashen',link); player.flashAvatar('rehuashen',event.card); - game.log(player,'获得了技能','#g【'+get.translation(link)+'】'); - player.popup(link); player.syncStorage('rehuashen'); player.updateMarks('rehuashen'); // lib.skill.rehuashen.createAudio(event.card,link,'re_zuoci'); @@ -10603,6 +10601,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ character:[], map:{}, } + player.when('dieBegin').then(()=>{ + const name=player.name?player.name:player.name1; + if(name){ + const sex=get.character(name,0); + const group=get.character(name,1); + if(player.sex!=sex){ + game.broadcastAll((player,sex)=>{ + player.sex=sex; + },player,sex); + game.log(player,'将性别变为了','#y'+get.translation(sex)+'性'); + } + if(player.group!=group) player.changeGroup(group); + } + }); }, banned:['lisu','sp_xiahoudun','xushao','jsrg_xushao','zhoutai','old_zhoutai','shixie','xin_zhoutai','dc_shixie','old_shixie'], bannedType:['Charlotte','主公技','觉醒技','限定技','隐匿技','使命技'], diff --git a/character/shenhua.js b/character/shenhua.js index ce419f547..6d3d50e85 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -4180,6 +4180,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ owned:{} }; } + player.when('dieBegin').then(()=>{ + const name=player.name?player.name:player.name1; + if(name){ + const sex=get.character(name,0); + const group=get.character(name,1); + if(player.sex!=sex){ + game.broadcastAll((player,sex)=>{ + player.sex=sex; + },player,sex); + game.log(player,'将性别变为了','#y'+get.translation(sex)+'性'); + } + if(player.group!=group) player.changeGroup(group); + } + }); }, intro:{ content:function(storage,player){ @@ -4455,10 +4469,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } player.storage.huashen.current2=skill; if(!player.additionalSkills.huashen||!player.additionalSkills.huashen.includes(skill)){ - player.addAdditionalSkill('huashen',skill); + player.addAdditionalSkills('huashen',skill); player.flashAvatar('huashen',character); - game.log(player,'获得了技能','#g【'+get.translation(skill)+'】'); - player.popup(skill); player.syncStorage('huashen'); player.updateMarks('huashen'); // lib.skill.rehuashen.createAudio(character,skill,'zuoci'); From 3fcac6a68355db4e49aa1c99173edec27ea8e337 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 17 Feb 2024 00:53:19 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E8=AE=B8=E5=8A=AD=E3=80=90=E8=AF=84?= =?UTF-8?q?=E9=89=B4=E3=80=91=E4=BF=AE=E6=94=B9=E6=96=B0=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/character/sp2.js b/character/sp2.js index c2c617482..49da64d3a 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -8737,7 +8737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 1' player.markAuto('pingjian',[result.control]); - player.addTempSkill(result.control); + player.addTempSkills(result.control); player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu'); var name=event.list.find(name=>lib.character[name][3].includes(result.control)); // if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao'); @@ -8826,7 +8826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 1' player.markAuto('pingjian',[result.control]); - player.addTempSkill(result.control); + player.addTempSkills(result.control); player.storage.pingjian_check[result.control]='phaseUse'; var name=event.list.find(name=>lib.character[name][3].includes(result.control)); // if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao'); @@ -8848,7 +8848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ priority:Infinity, content:function(){ var skill=trigger.sourceSkill||trigger.skill; - player.removeSkill(skill); + player.removeSkills(skill); const names=player.tempname&&player.tempname.filter(i=>lib.character[i][3].includes(skill)); if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names); delete player.storage.pingjian_check[skill]; @@ -8872,7 +8872,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(trigger.name!='damage') return player.storage.pingjian_check[skill]==trigger.name; return player.storage.pingjian_check[skill]==trigger; }); - player.removeSkill(skills); + player.removeSkills(skills); const names=player.tempname&&player.tempname.filter(i=>skills.some(skill=>lib.character[i][3].includes(skill))); if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names); for(var skill of skills) delete player.storage.pingjian_check[skill]; From a897045a8e21256d1768f1ef7f17fafb921ca24c Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 17 Feb 2024 11:30:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?Revert=20"=E8=AE=B8=E5=8A=AD=E3=80=90?= =?UTF-8?q?=E8=AF=84=E9=89=B4=E3=80=91=E4=BF=AE=E6=94=B9=E6=96=B0=E5=87=BD?= =?UTF-8?q?=E6=95=B0"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 3fcac6a68355db4e49aa1c99173edec27ea8e337. --- character/sp2.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/character/sp2.js b/character/sp2.js index 49da64d3a..c2c617482 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -8737,7 +8737,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 1' player.markAuto('pingjian',[result.control]); - player.addTempSkills(result.control); + player.addTempSkill(result.control); player.storage.pingjian_check[result.control]=(trigger.name=='damage'?trigger:'phaseJieshu'); var name=event.list.find(name=>lib.character[name][3].includes(result.control)); // if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao'); @@ -8826,7 +8826,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else event.finish(); 'step 1' player.markAuto('pingjian',[result.control]); - player.addTempSkills(result.control); + player.addTempSkill(result.control); player.storage.pingjian_check[result.control]='phaseUse'; var name=event.list.find(name=>lib.character[name][3].includes(result.control)); // if(name) lib.skill.rehuashen.createAudio(name,result.control,'xushao'); @@ -8848,7 +8848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ priority:Infinity, content:function(){ var skill=trigger.sourceSkill||trigger.skill; - player.removeSkills(skill); + player.removeSkill(skill); const names=player.tempname&&player.tempname.filter(i=>lib.character[i][3].includes(skill)); if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names); delete player.storage.pingjian_check[skill]; @@ -8872,7 +8872,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(trigger.name!='damage') return player.storage.pingjian_check[skill]==trigger.name; return player.storage.pingjian_check[skill]==trigger; }); - player.removeSkills(skills); + player.removeSkill(skills); const names=player.tempname&&player.tempname.filter(i=>skills.some(skill=>lib.character[i][3].includes(skill))); if(names) game.broadcastAll((player,names)=>player.tempname.removeArray(names),player,names); for(var skill of skills) delete player.storage.pingjian_check[skill]; From 6c29435e2da55bb7644ad0fdfbe4115d4fbf0c6e Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 17 Feb 2024 13:46:17 +0800 Subject: [PATCH 4/5] =?UTF-8?q?yigui=5Fgzwuxie=E5=86=99=E6=B3=95=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/guozhan.js | 76 ++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index d94814f30..11f1ee0f5 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -7661,7 +7661,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, check:function(button){ return 1/(1+game.countPlayer(function(current){ - return current.identity==button.link; + return current.identity==lib.character[button.link][1]; })); }, backup:function(links,player){ @@ -7692,57 +7692,62 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, ai:{ respondShan:true, - skillTagFilter:function(player){ + skillTagFilter:function(player,tag,arg){ + if(arg=='respond'||!lib.inpile.includes('shan')) return false; var storage=player.storage.yigui; - if(!storage||!storage.character.length||storage.used.includes('shan')||!lib.inpile.includes('shan')) return false; + if(!storage||!storage.character.length||storage.used.includes('shan')) return false; }, order:0.1, result:{player:1}, }, }, yigui_gzwuxie:{ - hiddenCard:function(player,name){ - var storage=player.storage.yigui; - if(name!='wuxie'||!storage||!storage.character.length||storage.used.includes(name)||!lib.inpile.includes(name)) return false; - return true; - }, - enable:'chooseToUse', - filter:function(event,player){ - if(event.type!='wuxie'||!event.filterCard({name:'wuxie'},player,event)||!lib.inpile.includes('wuxie')) return false; - var storage=player.storage.yigui,target=event.getParent(2).player; - if(!storage||!target||!storage.character.length||storage.used.includes('wuxie')) return false; - var identity=target.identity; + hiddenWuxie(player,info){ + if(!lib.inpile.includes('wuxie')) return false; + const storage=player.storage.yigui; + if(!storage||!storage.character||!storage.character.length||(storage.used&&storage.used.includes('wuxie'))) return false; + if(_status.connectMode) return true; + const target=info.target; + if(!target) return false; + const identity=target.identity; return ['unknown','ye'].includes(identity)||storage.character.some(function(i){ if(lib.character[i][1]=='ye') return true; - var double=get.is.double(i,true); - var groups=(double?double:[lib.character[i][1]]); - return groups.includes(identity); + const double=get.is.double(i,true); + return (double?double:[lib.character[i][1]]).includes(identity); + }); + }, + enable:'chooseToUse', + filter(event,player){ + if(event.type!='wuxie'||!lib.inpile.includes('wuxie')) return false; + const storage=player.storage.yigui; + if(!storage||!storage.character||!storage.character.length||(storage.used&&storage.used.includes('wuxie'))) return false; + const info=event.info_map,target=info.target,identity=target.identity; + return ['unknown','ye'].includes(identity)||storage.character.some(function(i){ + if(lib.character[i][1]=='ye') return true; + const double=get.is.double(i,true); + return (double?double:[lib.character[i][1]]).includes(identity); }); }, chooseButton:{ - dialog:function(event,player){ - var dialog=ui.create.dialog('役鬼','hidden'); + dialog(event,player){ + let dialog=ui.create.dialog('役鬼','hidden'); dialog.add([player.storage.yigui.character,'character']); return dialog; }, - filter:function(button,player){ - var evt=_status.event.getParent('chooseToUse'); - var target=evt.getParent(2).player,identity=target.identity; + filter(button,player){ + const evt=get.event().getParent('chooseToUse'); + const info=evt.info_map,target=info.target,identity=target.identity; if(['unknown','ye'].includes(identity)) return true; if(lib.character[button.link][1]=='ye') return true; - var double=get.is.double(button.link,true); - var groups=(double?double:[lib.character[button.link][1]]); - return groups.includes(identity); + const double=get.is.double(button.link,true); + return (double?double:[lib.character[button.link][1]]).includes(identity); }, - check:function(button){ - return 1/(1+game.countPlayer(function(current){ - return current.identity==button.link; - })); + check(button){ + return 1+Math.random(); }, - backup:function(links,player){ - var character=links[0]; - var next={ - character:character, + backup(links,player){ + return { + character:links[0], filterCard:()=>false, selectCard:-1, complexCard:true, @@ -7750,9 +7755,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ popname:true, audio:'yigui', viewAs:{name:'wuxie',isCard:true}, - onuse:function(result,player){ + onuse(result,player){ player.logSkill('yigui'); - var character=lib.skill.yigui_gzwuxie_backup.character; + const character=lib.skill.yigui_gzwuxie_backup.character; player.flashAvatar('yigui',character); player.storage.yigui.character.remove(character); _status.characterlist.add(character); @@ -7762,7 +7767,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.storage.yigui.used.add(result.card.name); }, }; - return next; }, }, ai:{ From f11cff8825083dac7ce857baa911c13189e64197 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sat, 17 Feb 2024 15:16:36 +0800 Subject: [PATCH 5/5] =?UTF-8?q?onlyOl=5Fsb=E7=BF=BB=E8=AF=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/onlyOL.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/character/onlyOL.js b/character/onlyOL.js index 65a2856f0..4f4e7e6ba 100644 --- a/character/onlyOL.js +++ b/character/onlyOL.js @@ -774,7 +774,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ onlyOL_yijiang1:'OL专属·将1', onlyOL_yijiang2:'OL专属·将2', - onlyOL_sb:'OL专属·上兵伐谋', + onlyOL_sb:'OL专属·谋武将', }, }; });