diff --git a/card/extra.js b/card/extra.js index 12f570962..d7178ff78 100644 --- a/card/extra.js +++ b/card/extra.js @@ -281,7 +281,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ content:function(){ target.link(); }, - chongzhu:true, + recastable:true, ai:{ wuxie:function(target,card,player,viewer){ if(_status.event.getRand()<0.5) return 0; diff --git a/card/guozhan.js b/card/guozhan.js index f3deb0b68..9c848a017 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -556,7 +556,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, mode:['guozhan','versus'], filterTarget:true, - chongzhu:true, + recastable:true, changeTarget:function(player,targets){ var target=targets[0]; game.filterPlayer(function(current){ @@ -921,7 +921,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'trick', enable:true, - chongzhu:true, + recastable:true, filterTarget:function(card,player,target){ if(player==target) return false; return (target.countCards('h')||target.isUnseen(2)); diff --git a/card/hearth.js b/card/hearth.js index a754f5e61..9ed1320c9 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -447,7 +447,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'trick', enable:true, - // chongzhu:true, + // recastable:true, filterTarget:function(card,player,target){ return target==player; }, diff --git a/card/sp.js b/card/sp.js index 7aa5a6957..fc62bb820 100644 --- a/card/sp.js +++ b/card/sp.js @@ -259,7 +259,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ enable:function(){ return game.countPlayer()>2; }, - chongzhu:function(){ + recastable:function(){ return game.countPlayer()<=2; }, singleCard:true, diff --git a/card/swd.js b/card/swd.js index a53f57e00..3be817223 100644 --- a/card/swd.js +++ b/card/swd.js @@ -266,7 +266,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ fullskin:true, type:'trick', nodelay:true, - // chongzhu:true, + // recastable:true, global:'g_shencaojie', content:function(){ var evt=event.getParent('g_shencaojie')._trigger; diff --git a/card/yingbian.js b/card/yingbian.js index 6a5225cb3..bf232d866 100644 --- a/card/yingbian.js +++ b/card/yingbian.js @@ -399,10 +399,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.logSkill('taigongyinfu_skill'); - player.lose(result.cards,ui.discardPile,'visible'); - player.$throw(result.cards,1000); - game.log(player,'将',result.cards,'置入了弃牌堆'); - player.draw(); + player.recast(result.cards); } }, }, diff --git a/card/yongjian.js b/card/yongjian.js index e054d12ac..31702afed 100644 --- a/card/yongjian.js +++ b/card/yongjian.js @@ -613,10 +613,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, ai:{expose:0.1}, }, - _yongjian_zengyu:{ + _gifting:{ enable:'phaseUse', forceLoad:true, - filter:(event,player)=>player.hasCard(card=>lib.skill._yongjian_zengyu.filterCard(card,player),lib.skill._yongjian_zengyu.position), + filter:(event,player)=>player.hasCard(card=>lib.skill._gifting.filterCard(card,player),lib.skill._gifting.position), filterCard:(card,player)=>game.hasPlayer(current=>player.canGift(card,current,true)), filterTarget:(card,player,target)=>ui.selected.cards.every(value=>player.canGift(value,target,true)), position:'he', @@ -677,8 +677,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ xinge_info:'出牌阶段限一次。你可以将一张手牌交给一名其他角色。', xinge_append:'咕咕咕。', - _yongjian_zengyu:'赠予', - _yongjian_zengyu_info:'出牌阶段,你可将一张拥有“赠”标签的手牌区装备牌置于一名其他角色的装备区内,或将一张拥有“赠”标签的手牌区非装备牌正面朝上交给一名其他角色。', + _gifting:'赠予', + _gifting_info:'出牌阶段,你可将一张拥有“赠”标签的手牌区装备牌置于一名其他角色的装备区内,或将一张拥有“赠”标签的手牌区非装备牌正面朝上交给一名其他角色。', }, list:[ ['spade',1,'guaguliaodu'], diff --git a/card/yunchou.js b/card/yunchou.js index cf71b6945..ca76a5e3c 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -276,7 +276,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ enable:function(){ return game.countPlayer()>2; }, - chongzhu:function(){ + recastable:function(){ return game.countPlayer()<=2; }, multicheck:function(card,player){ diff --git a/card/zhenfa.js b/card/zhenfa.js index 501d878ac..3a363ddc2 100644 --- a/card/zhenfa.js +++ b/card/zhenfa.js @@ -5,7 +5,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ card:{ pozhenjue:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:true, notarget:true, content:function(){ @@ -25,7 +25,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, changshezhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(card,player){ if(player.inline()) return true; if(player.identity=='unknown'||player.identity=='ye') return false; @@ -68,7 +68,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, tianfuzhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(){ return game.hasPlayer(function(current){ return current.isMajor(); @@ -94,7 +94,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, dizaizhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(){ return game.hasPlayer(function(current){ return current.isNotMajor(); @@ -121,7 +121,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, fengyangzhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:true, filterTarget:function(card,player,target){ return target.sieged(); @@ -142,7 +142,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, yunchuizhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:true, filterTarget:function(card,player,target){ return target.siege(); @@ -163,7 +163,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, qixingzhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(card,player){ return player.siege()||player.sieged(); }, @@ -202,7 +202,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, shepanzhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(card,player){ if(player.identity=='unknown'||player.identity=='ye') return false; if(get.population(player.identity)<=1) return false; @@ -231,7 +231,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, longfeizhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(card,player){ return player.next.siege(player); }, @@ -261,7 +261,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, huyizhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:function(card,player){ return player.siege(player.next)||player.siege(player.previous); }, @@ -309,7 +309,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, niaoxiangzhen:{ type:'zhenfa', - chongzhu:true, + recastable:true, enable:true, filterTarget:function(card,player,target){ if(player.identity==target.identity) return false; diff --git a/character/offline.js b/character/offline.js index ae53a698b..14311104a 100644 --- a/character/offline.js +++ b/character/offline.js @@ -3647,7 +3647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ result:{player:1}, effect:{ target:function(card,player,target){ - if(card&&get.type(card)=='equip'&&_status.event.skill=='_yongjian_zengyu') return 0; + if(card&&get.type(card)=='equip'&&_status.event.skill=='_gifting') return 0; }, }, }, diff --git a/character/shiji.js b/character/shiji.js index fdba6b25c..7bdca8b68 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -6147,7 +6147,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return true; }, - chongzhu:true, + recastable:true, selectTarget:2, postAi:()=>true, contentBefore:function(){ diff --git a/game/game.js b/game/game.js index 7dade1113..0941a5712 100644 --- a/game/game.js +++ b/game/game.js @@ -10783,7 +10783,7 @@ eight:'八', nine:'九', ten:'十', - _chongzhu:'重铸', + _recasting:'重铸', _lianhuan:'连环', _lianhuan2:'连环', _kamisha:'神杀', @@ -28649,8 +28649,8 @@ if(!mod) return false; if(strict&&mod=='unchanged'){ if(get.position(card)!='h') return false; - const info=get.info(card); - return typeof info.chongzhu=='function'?info.chongzhu(_status.event,player):info.chongzhu; + const info=get.info(card),recastable=info.recastable||info.chongzhu; + return Boolean(typeof recastable=='function'?recastable(_status.event,player):recastable); } return true; }, @@ -30274,18 +30274,17 @@ } } }, - _chongzhu:{ + _recasting:{ enable:'phaseUse', logv:false, - visible:true, prompt:'将要重铸的牌置入弃牌堆并摸一张牌', - filter:(event,player)=>player.hasCard(card=>lib.skill._chongzhu.filterCard(card,player),'he'), + filter:(event,player)=>player.hasCard(card=>lib.skill._recasting.filterCard(card,player),lib.skill._recasting.position), position:'he', filterCard:(card,player)=>player.canRecast(card,null,true), discard:false, lose:false, delay:false, - content:function(){ + content:()=>{ player.recast(cards,null,(player,cards)=>{ var numberOfCardsToDraw=cards.length; cards.forEach(value=>{ @@ -30369,6 +30368,71 @@ player.link(); if(trigger.getParent().notLink()) trigger.getParent().lianhuanable=true; } + }, + //Deprecated skills + _chongzhu:{ + get filter(){ + return lib.skill._recasting.filter; + }, + set filter(filter){ + lib.skill._recasting.filter=filter; + }, + get filterCard(){ + return lib.skill._recasting.filterCard; + }, + set filterCard(filterCard){ + lib.skill._recasting.filterCard=filterCard; + }, + get content(){ + return lib.skill._recasting.content; + }, + set content(content){ + lib.skill._recasting.content=content; + }, + get ai(){ + return lib.skill._recasting.ai; + }, + set ai(ai){ + lib.skill._recasting.ai=ai; + } + }, + _yongjian_zengyu:{ + get filter(){ + return lib.skill._gifting.filter; + }, + set filter(filter){ + lib.skill._gifting.filter=filter; + }, + get filterCard(){ + return lib.skill._gifting.filterCard; + }, + set filterCard(filterCard){ + lib.skill._gifting.filterCard=filterCard; + }, + get filterTarget(){ + return lib.skill._gifting.filterTarget; + }, + set filterTarget(filterTarget){ + lib.skill._gifting.filterTarget=filterTarget; + }, + get check(){ + return lib.skill._gifting.check; + }, + set check(check){ + lib.skill._gifting.check=check; + }, + get content(){ + return lib.skill._gifting.content; + }, + set content(content){ + lib.skill._gifting.content=content; + }, + get ai(){ + return lib.skill._gifting.ai; + }, + set ai(ai){ + lib.skill._gifting.ai=ai; + } } }, character:{}, diff --git a/layout/default/layout.css b/layout/default/layout.css index 999b9abe5..fdbc3e9fb 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -4536,11 +4536,13 @@ div[data-decoration="bronze"]::after{ right: 6px; } .card .tempname { - top: 6px; - left: 6px; - font-size: 22px; color: white !important; + font-size: 22px; + left: 8px; pointer-events: none; + top: 4px; + writing-mode: vertical-rl; + -webkit-writing-mode: vertical-rl; } /*.card.equip1 .wunature, .card.equip3 .wunature, diff --git a/mode/boss.js b/mode/boss.js index 9f7dd71b9..e8773a99d 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -8359,7 +8359,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } }); for(var i in lib.card){ - if(lib.card[i].subtype=='equip1') lib.card[i].chongzhu=true; + if(lib.card[i].subtype=='equip1') lib.card[i].recastable=true; } } }, diff --git a/mode/brawl.js b/mode/brawl.js index 0676f7851..7b6ee0095 100644 --- a/mode/brawl.js +++ b/mode/brawl.js @@ -480,7 +480,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ hhzz_toulianghuanzhu:{ enable:true, cardimage:"toulianghuanzhu", - chongzhu:true, + recastable:true, type:'trick', filterTarget:function(card,player,target){ return target.skillH.length>0; diff --git a/mode/stone.js b/mode/stone.js index 59b79537b..c03fd8282 100644 --- a/mode/stone.js +++ b/mode/stone.js @@ -583,7 +583,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ enable:function(event,player){ return player.canAddFellow(); }, - chongzhu:function(event,player){ + recastable:function(event,player){ return !player.isMin()&&!player.canAddFellow(); }, notarget:true, @@ -1424,7 +1424,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.card.list.randomSort(); } - lib.skill._chongzhu.usable=3; + lib.skill._recasting.usable=3; for(i in lib.skill){ if(lib.skill[i].changeSeat){ lib.skill[i]={}; @@ -2366,7 +2366,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ type:'stonecard', stoneact:2, career:'priest', - chongzhu:true, + recastable:true, enable:function(event,player){ if(player.career!='priest') return false; return !player.storage.anyingxingtai||player.storage.anyingxingtai<2;