From 70448dccf3626174ddedaf6df15ddde76435b0c5 Mon Sep 17 00:00:00 2001 From: Tipx-L <138244655+Tipx-L@users.noreply.github.com> Date: Wed, 27 Sep 2023 07:20:59 -0700 Subject: [PATCH] Change group_unknown.png. --- game/game.js | 87 ++++++++++++++++++++++------------- image/card/group_unknown.png | Bin 6035 -> 1883 bytes 2 files changed, 54 insertions(+), 33 deletions(-) diff --git a/game/game.js b/game/game.js index 68586be25..1efbb45f4 100644 --- a/game/game.js +++ b/game/game.js @@ -8219,7 +8219,7 @@ var natures=get.natureList(this,player); if(!nature) return natures.length>0; if(nature=='linked') return natures.some(n=>lib.linked.includes(n)); - return get.is.sameNature(natures,nature,true); + return get.is.sameNature(natures,nature); } }); if (!('includes' in Array.prototype)) { @@ -24448,7 +24448,7 @@ if(!nature) return Boolean(this.nature&&this.nature.length>0); let natures=get.natureList(nature),naturesx=get.natureList(this.nature); if(nature=='linked') return naturesx.some(n=>lib.linked.includes(n)); - return get.is.sameNature(natures,naturesx,true); + return get.is.sameNature(natures,naturesx); }; if(next.hasNature('poison')) delete next._triggered; next.setContent('damage'); @@ -28804,7 +28804,7 @@ var natures=get.natureList(this,player); if(!nature) return natures.length>0; if(nature=='linked') return natures.some(n=>lib.linked.includes(n)); - return get.is.sameNature(natures,nature,true); + return get.is.sameNature(natures,nature); }, //只针对【杀】起效果 addNature:function(nature){ @@ -45614,7 +45614,7 @@ fakeme.appendChild(input); fakeme.imagenode=ui.create.div('.image',fakeme); - ui.create.div('.name','选


景',fakeme); + ui.create.div('.name','选择背景',fakeme); ui.create.div('.indent','名称:',newCard).style.paddingTop='8px'; ui.create.div('.indent','描述:',newCard).style.paddingTop='6px'; @@ -55407,41 +55407,62 @@ /** * 判断传入的参数的属性是否相同(参数可以为卡牌、卡牌信息、属性等) * @param ...infos 要判断的属性列表 - * @param partly {boolean} 是否判断每一个传入的属性是否存在部分相同而不是完全相同 + * @param every {boolean} 是否判断每一个传入的属性是否完全相同而不是存在部分相同 */ sameNature:function(){ - var _args=Array.from(arguments); - var args=[],partly=false; - for(const arg of _args){ - if(typeof arg=='boolean') partly=arg; - else{ - if(arg) args.push(arg); - } + let processedArguments=[],every=false; + Array.from(arguments).forEach(argument=>{ + if(typeof argument=='boolean') every=argument; + else if(argument) processedArguments.push(argument); + }); + if(!processedArguments.length) return true; + if(processedArguments.length==1){ + const argument=processedArguments[0]; + if(!Array.isArray(argument)||argument.length==1) return false; + processedArguments=argument; } - if(!args.length) return true; - if(args.length==1){ - if(Array.isArray(args[0])) args=args[0]; - else return false; + const naturesList=processedArguments.map(card=>{ + if(typeof card=='string') return card.split(lib.natureSeparator); + else if(Array.isArray(card)) return card; + return get.natureList(card||{}); + }); + if(naturesList.some(natures=>natures.length)) for(const nature of new Set(naturesList.flat())){ + if(!nature) continue; + const lengths=Array.from(new Set(naturesList.map(natures=>natures.filter(n=>n===nature).length))); + if(!every&&lengths.length==1) return true; + if(every&&lengths.length!=1) return false; } - var naturesList=[]; - const getN=(cardx)=>{ - if(typeof cardx=='string') return cardx.split(lib.natureSeparator); - else if(Array.isArray(cardx)) return cardx; - return get.natureList(cardx||{}); + return !every; + }, + /** + * 判断传入的参数的属性是否不同(参数可以为卡牌、卡牌信息、属性等) + * @param ...infos 要判断的属性列表 + * @param every {boolean} 是否判断每一个传入的属性是否完全不同而不是存在部分不同 + */ + differentNature:function(){ + let processedArguments=[],every=false; + Array.from(arguments).forEach(argument=>{ + if(typeof argument=='boolean') every=argument; + else if(argument) processedArguments.push(argument); + }); + if(!processedArguments.length) return false; + if(processedArguments.length==1){ + const argument=processedArguments[0]; + if(!Array.isArray(argument)||argument.length==1) return true; + processedArguments=argument; } - naturesList=args.map(getN); - if(naturesList.length==1) return false; - if(naturesList.some(natures=>Array.isArray(natures)&&natures.length)){ - var uniqueNatures=new Set(naturesList.flat()); - for(var nature of uniqueNatures){ - if(!nature) continue; - var lens=naturesList.map(natures=>natures.filter(n=>n===nature).length); - var lensx=Array.from(new Set(lens)); - if(partly&&lensx.length==1) return true; - if(!partly&&lensx.length!=1) return false; - } + const naturesList=processedArguments.map(card=>{ + if(typeof card=='string') return card.split(lib.natureSeparator); + else if(Array.isArray(card)) return card; + return get.natureList(card||{}); + }); + if(naturesList.some(natures=>natures.length)) for(const nature of new Set(naturesList.flat())){ + if(!nature) continue; + const lengths=Array.from(new Set(naturesList.map(natures=>natures.filter(n=>n!==nature).length))); + if(!every&&lengths.length==2) return true; + if(every&&lengths.length!=2) return false; } - return !Boolean(partly); + return !every; }, //判断一张牌是否为明置手牌 shownCard:function(card){ diff --git a/image/card/group_unknown.png b/image/card/group_unknown.png index 845bac1f5bded3a77c60966f0c4fe22df30cc6ae..6fb4bafb2167174abfff2fe0da09b0a49580e346 100644 GIT binary patch literal 1883 zcmV-h2c-CkP)QPJnUN5<<=`>?wf#Xu_jDJ49j= zUnxXvaeYKwY2)|cz*7W(5|<%}ou}L&0LBv2Gfkw>;Rf-M2gpPSTfwD^)v~DAmkuze z*gO>9VOu0CZM=_?$Gyq>$aTHgytWz_o_8hf5Ap&O#?=tmqiP(>-7lRy{G~u7l+_Kv zOB+^!6V0w<{Q!JHa+ht2FyX@1fFK?(^3-{r5tb=GmRQu}XiH|#xwz$i{%`-QcJ5MGDU;;ISE z4ohz@)cu|#1h%`H5NIwXAs5_I~DVkIuQ-@`RMlIYojgVWyP1w<95 zJ)aY%Ik+UmHUJFeqNiDf0+g0^!xs14-w(QVMY)JjnlBhvi+(3D-J3Fs+&67oU#L-W?4G#XG*GhTfA!4d?(U0kwcQKM?fuE%cdb zwD?P37rK)YK$KOnWqdjES5A1oQw>6|s&Fj_*B+)wKUqO;t~WqQwRn~!7qiJW8g5DH z0>Uc?XizFGN>Z|t=e+?*XT-IVkDP(Q(hD;Im#EvpE)l;bO^3<*7DL%?lep!Y#Pfto>e z=%kaM5i!cbD$ZJ2`E!CoKHb}O6H}s;*ye&j<AyoH_j9Rl!zSPk+A*#~1LQEX>dTqTFxq9ujAf#i(H84iw^dJEz$HGt>xCaDkB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