diff --git a/character/clan.js b/character/clan.js
index 69a0d1bff..61c3cbe2f 100644
--- a/character/clan.js
+++ b/character/clan.js
@@ -39,18 +39,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{player:'useCardAfter'},
filter:function(event,player){
- if(player.getStorage('clanbaichu').contains(event.card.name)) return true;
- if(get.suit(event.card)=='none') return false;
- var str=(get.suit(event.card)+'+'+get.type2(event.card));
- if(!player.getStorage('clanbaichu').contains(str)) return true;
- return !player.hasSkill('qice');
+ const storage=player.storage.clanbaichu||{};
+ if(Object.values(storage).contains(event.card.name)) return true;
+ const suit=get.suit(event.card);
+ if(suit=='none') return false;
+ if(!player.hasSkill('qice')) return true;
+ const key=`${suit}+${get.type2(event.card)}`;
+ return !(key in storage)
},
forced:true,
content:function(){
'step 0'
- if(get.suit(trigger.card)!='none'){
- var str=(get.suit(trigger.card)+'+'+get.type2(trigger.card));
- if(player.getStorage('clanbaichu').contains(str)){
+ var storage=player.storage.clanbaichu||{},suit=get.suit(trigger.card);
+ if(suit!='none'){
+ var key=`${suit}+${get.type2(trigger.card)}`;
+ if(key in storage){
if(!player.hasSkill('qice')){
player.addTempSkill('qice','roundStart');
player.popup('奇策');
@@ -59,10 +62,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.goto(2);
}
else{
- player.markAuto('clanbaichu',[str]);
- var list=lib.inpile.filter(name=>get.type(name)=='trick'&&!player.getStorage('clanbaichu').contains(name));
- if(list.length){
- var dialog=['请选择【百出】记录的普通锦囊牌牌名',[list,'vcard']];
+ var list=lib.inpile.filter(name=>get.type(name)=='trick');
+ list.removeArray(Object.values(storage));
+ if(list.length>0){
+ var dialog=['百出:选择记录一种普通锦囊牌',[list,'vcard']];
player.chooseButton(dialog,true).set('ai',function(button){
var player=_status.event.player,name=button.link[2];
if(name==_status.event.getTrigger().card.name) return 1919810;
@@ -76,39 +79,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else event.goto(2);
'step 1'
if(result.bool){
- var name=result.links[0][2];
- player.markAuto('clanbaichu',[name]);
- player.popup(get.translation(name));
- game.log(player,'记录中了','#y'+get.translation(name));
+ var key=`${get.suit(trigger.card)}+${get.type2(trigger.card)}`,name=result.links[0][2];
+ if(!player.storage.clanbaichu) player.storage.clanbaichu={};
+ player.storage.clanbaichu[key]=name;
+ player.markSkill('clanbaichu');
+ game.log(player,'记录了','#y'+get.translation(name));
game.delayx();
}
'step 2'
- if(player.getStorage('clanbaichu').contains(trigger.card.name)) player.chooseDrawRecover(true);
+ if(Object.values(player.getStorage('clanbaichu')).contains(trigger.card.name)){
+ player.chooseDrawRecover(true);
+ }
},
intro:{
- markcount:()=>0,
+ markcount:(storage)=>{
+ return Object.keys(storage).length;
+ },
content:function(storage){
- var str='';
- var list=storage.filter(str=>str.includes('+'));
- var cards=storage.filter(str=>!list.contains(str));
- if(list.length){
- str+='
';
- str+=get.translation(listx[0]);
- str+='+';
- str+=get.translation(listx[1]);
- });
- }
- if(list.length&&cards.length) str+='
';
- if(cards.length){
- str+='
';
- str+=get.translation(cards);
- }
- str+='