Merge pull request #229 from mengxinzxz/PR-Branch

bugfix and Xiao Qiao's move
This commit is contained in:
Spmario233 2023-08-24 21:58:47 +08:00 committed by GitHub
commit fad5a7d857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 222 additions and 90 deletions

View File

@ -831,14 +831,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!event.cards.length) return true; if(!event.cards.length) return true;
var cards=[]; var cards=[];
game.countPlayer(current=>{ game.countPlayer(current=>{
if(!current.hasClan('太原王氏')) return false; if(!current.hasClan('太原王氏')&&current!=player) return false;
current.getHistory('lose',evt=>{ current.getHistory('lose',evt=>{
if(event!=evt.getParent()) return false; if(event!=evt.getParent()) return false;
cards.addArray(evt.getl(current).hs); cards.addArray(evt.getl(current).hs);
}); });
}) });
if(event.cards.some(card=>!cards.contains(card))) return false; return !event.cards.some(card=>cards.contains(card));
return true;
}, },
content:function(){ content:function(){
'step 0' 'step 0'

View File

@ -1880,8 +1880,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
addVisitors:function(characters,player){ addVisitors:function(characters,player){
player.addSkillBlocker('sbyingmen'); player.addSkillBlocker('sbyingmen');
game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”') game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”');
lib.skill.rehuashen.drawCharacter(player,characters); game.broadcastAll(function(player,characters){
player.$draw(characters.map(function(name){
var cardname='huashen_card_'+name;
lib.card[cardname]={
fullimage:true,
image:'character:'+name
};
lib.translate[cardname]=get.rawName2(name);
return game.createCard(cardname,' ',' ');
}),'nobroadcast');
},player,characters);
player.markAuto('sbyingmen',characters) player.markAuto('sbyingmen',characters)
var storage=player.getStorage('sbyingmen'); var storage=player.getStorage('sbyingmen');
var skills=lib.skill.sbyingmen.getSkills(storage,player); var skills=lib.skill.sbyingmen.getSkills(storage,player);

View File

@ -10,7 +10,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan'], mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning",'yj_huangzhong','yj_weiyan'],
mobile_sunben:["re_sunben"], mobile_sunben:["re_sunben"],
mobile_standard:["xin_xiahoudun","xin_zhangfei"], mobile_standard:["xin_xiahoudun","xin_zhangfei"],
mobile_shenhua:["re_pangtong","re_guanqiujian","xin_yuanshao","re_liushan","re_dongzhuo","re_sp_zhugeliang","re_sunjian","re_dengai","re_jiangwei","re_zhurong","re_caiwenji","re_xunyu","re_dianwei","xin_zhoutai","re_yanwen",'re_zhangzhang'], mobile_shenhua:["re_pangtong","re_guanqiujian","xin_yuanshao","re_liushan","re_dongzhuo","re_sp_zhugeliang","re_sunjian","re_dengai","re_jiangwei","re_zhurong","re_caiwenji","re_xunyu","re_dianwei","xin_zhoutai","re_yanwen",'re_zhangzhang','re_xiaoqiao'],
mobile_yijiang1:["re_xusheng","re_lingtong","ol_yujin","re_wuguotai","re_gaoshun",'re_caozhi'], mobile_yijiang1:["re_xusheng","re_lingtong","ol_yujin","re_wuguotai","re_gaoshun",'re_caozhi'],
mobile_yijiang2:["xin_liaohua","xin_caozhang","re_liubiao","re_handang","xin_chengpu","xin_gongsunzan","re_zhonghui","re_bulianshi"], mobile_yijiang2:["xin_liaohua","xin_caozhang","re_liubiao","re_handang","xin_chengpu","xin_gongsunzan","re_zhonghui","re_bulianshi"],
mobile_yijiang3:["re_liru","xin_jianyong","xin_zhuran","xin_guohuai","xin_panzhangmazhong","xin_fuhuanghou","re_yufan"], mobile_yijiang3:["re_liru","xin_jianyong","xin_zhuran","xin_guohuai","xin_panzhangmazhong","xin_fuhuanghou","re_yufan"],
@ -22,6 +22,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
character:{ character:{
re_xiaoqiao:['female','wu',3,['retianxiang','xinhongyan']],
shichangshi:['male','qun',1,['mbdanggu','mbmowang']], shichangshi:['male','qun',1,['mbdanggu','mbmowang']],
re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], re_zhangzhang:['male','wu',3,['rezhijian','guzheng']],
qianzhao:['male','wei',4,['mbshihe','mbzhenfu']], qianzhao:['male','wei',4,['mbshihe','mbzhenfu']],
@ -13816,6 +13817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
scsanruo_info:'你可以将一张♥牌当【桃】、♦牌当火【杀】、♣牌当【闪】、♠牌当【无懈可击】使用。当你以此法使用或打出【杀】或【闪】时,你可以获得对方的一张牌;当你以此法使用【桃】时,你可以获得一名其他角色的一张牌;当你以此法使用【无懈可击】时,你可以获得此牌响应的普通锦囊牌的使用者的一张牌。', scsanruo_info:'你可以将一张♥牌当【桃】、♦牌当火【杀】、♣牌当【闪】、♠牌当【无懈可击】使用。当你以此法使用或打出【杀】或【闪】时,你可以获得对方的一张牌;当你以此法使用【桃】时,你可以获得一名其他角色的一张牌;当你以此法使用【无懈可击】时,你可以获得此牌响应的普通锦囊牌的使用者的一张牌。',
scsmiaoyu:'妙语', scsmiaoyu:'妙语',
scsmiaoyu_info:'你可以将至多两张相同花色的牌按照以下规则使用或打出:♦牌当作火【杀】,♥牌当作【桃】,♣牌当作【闪】,♠牌当作【无懈可击】。若你以此法使用了两张红色牌,则此牌回复值或伤害值+1。若你以此法使用了两张黑色牌则你弃置当前回合角色一张牌。', scsmiaoyu_info:'你可以将至多两张相同花色的牌按照以下规则使用或打出:♦牌当作火【杀】,♥牌当作【桃】,♣牌当作【闪】,♠牌当作【无懈可击】。若你以此法使用了两张红色牌,则此牌回复值或伤害值+1。若你以此法使用了两张黑色牌则你弃置当前回合角色一张牌。',
re_xiaoqiao:'手杀小乔',
mobile_standard:'手杀异构·标准包', mobile_standard:'手杀异构·标准包',

View File

@ -7,7 +7,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
characterSort:{ characterSort:{
old:{ old:{
old_standard:['ol_yuanshu'], old_standard:['ol_yuanshu'],
old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren",'old_chendao'], old_shenhua:["yuji","zhangjiao","old_zhugezhan","old_guanqiujian","xiahouyuan","weiyan","old_xiaoqiao","pangde","xuhuang",'junk_sunquan',"huangzhong","new_caoren",'old_chendao'],
old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong",'old_re_lidian'], old_refresh:["old_zhangfei","old_huatuo","old_zhaoyun","ol_huaxiong",'old_re_lidian'],
old_yijiang1:["masu","xushu","xin_yujin","old_xusheng","old_lingtong","fazheng",'old_gaoshun'], old_yijiang1:["masu","xushu","xin_yujin","old_xusheng","old_lingtong","fazheng",'old_gaoshun'],
old_yijiang2:["old_zhonghui","madai",'old_handang','old_liubiao','oldre_liubiao','old_guanzhang'], old_yijiang2:["old_zhonghui","madai",'old_handang','old_liubiao','oldre_liubiao','old_guanzhang'],
@ -45,7 +45,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pangde:['male','qun',4,['mashu','mengjin']], pangde:['male','qun',4,['mashu','mengjin']],
ol_huaxiong:["male","qun",6,["new_reyaowu"]], ol_huaxiong:["male","qun",6,["new_reyaowu"]],
old_wangyun:['male','qun',4,['wylianji','moucheng'],['clan:太原王氏']], old_wangyun:['male','qun',4,['wylianji','moucheng'],['clan:太原王氏']],
xiaoqiao:['female','wu',3,['tianxiang','hongyan']], old_xiaoqiao:['female','wu',3,['tianxiang','hongyan']],
weiyan:['male','shu',4,['kuanggu']], weiyan:['male','shu',4,['kuanggu']],
xiahouyuan:['male','wei',4,['shensu']], xiahouyuan:['male','wei',4,['shensu']],
old_huangfusong:['male','qun',4,['fenyue']], old_huangfusong:['male','qun',4,['fenyue']],
@ -971,6 +971,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
old_zhaoyun:'新杀赵云', old_zhaoyun:'新杀赵云',
old_zhaoyun_ab:'赵云', old_zhaoyun_ab:'赵云',
ol_huaxiong:'旧华雄', ol_huaxiong:'旧华雄',
old_xiaoqiao:'旧小乔',
old_guhuo:"蛊惑", old_guhuo:"蛊惑",
old_guhuo_info:"你可以扣置一张手牌当做一张基本牌或普通锦囊牌使用或打出体力值不为0的其他角色依次选择是否质疑。然后若有质疑的角色你展示此牌若为假此牌作废这些角色摸一张牌若为真这些角色失去1点体力且若此牌不为♥此牌作废。", old_guhuo_info:"你可以扣置一张手牌当做一张基本牌或普通锦囊牌使用或打出体力值不为0的其他角色依次选择是否质疑。然后若有质疑的角色你展示此牌若为假此牌作废这些角色摸一张牌若为真这些角色失去1点体力且若此牌不为♥此牌作废。",

View File

@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
connect:true, connect:true,
characterSort:{ characterSort:{
shenhua:{ shenhua:{
shenhua_feng:["sp_zhangjiao","re_yuji","old_zhoutai","old_caoren","re_xiahouyuan","re_xiaoqiao","re_huangzhong","re_weiyan"], shenhua_feng:["sp_zhangjiao","re_yuji","old_zhoutai","old_caoren","re_xiahouyuan","xiaoqiao","re_huangzhong","re_weiyan"],
shenhua_huo:['dianwei','xunyu','pangtong','sp_zhugeliang','taishici','yanwen','re_yuanshao','re_pangde'], shenhua_huo:['dianwei','xunyu','pangtong','sp_zhugeliang','taishici','yanwen','re_yuanshao','re_pangde'],
shenhua_lin:['caopi','re_xuhuang','menghuo','zhurong','re_lusu','sunjian','dongzhuo','jiaxu'], shenhua_lin:['caopi','re_xuhuang','menghuo','zhurong','re_lusu','sunjian','dongzhuo','jiaxu'],
shenhua_shan:['dengai','zhanghe','liushan','jiangwei','zhangzhang','sunce','caiwenji','zuoci'], shenhua_shan:['dengai','zhanghe','liushan','jiangwei','zhangzhang','sunce','caiwenji','zuoci'],
@ -21,7 +21,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_pangde:['male','qun',4,['mashu','jianchu']], re_pangde:['male','qun',4,['mashu','jianchu']],
re_xiahouyuan:['male','wei',4,['xinshensu']], re_xiahouyuan:['male','wei',4,['xinshensu']],
re_weiyan:['male','shu',4,['xinkuanggu','qimou']], re_weiyan:['male','shu',4,['xinkuanggu','qimou']],
re_xiaoqiao:['female','wu',3,['retianxiang','xinhongyan']], xiaoqiao:['female','wu',3,['retianxiang','hongyan']],
sp_zhangjiao:['male','qun',3,['releiji','guidao','huangtian'],['zhu']], sp_zhangjiao:['male','qun',3,['releiji','guidao','huangtian'],['zhu']],
re_yuji:["male","qun",3,["xinfu_guhuo"]], re_yuji:["male","qun",3,["xinfu_guhuo"]],
// yuji:['male','qun',3,['guhuo']], // yuji:['male','qun',3,['guhuo']],
@ -8005,12 +8005,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_xiahouyuan:'夏侯渊', re_xiahouyuan:'夏侯渊',
re_huangzhong:'黄忠', re_huangzhong:'黄忠',
re_weiyan:'魏延', re_weiyan:'魏延',
re_xiaoqiao:'小乔',
gz_xiahouyuan:'夏侯渊', gz_xiahouyuan:'夏侯渊',
gz_huangzhong:'黄忠', gz_huangzhong:'黄忠',
gz_weiyan:'魏延', gz_weiyan:'魏延',
gz_xiaoqiao:'小乔',
gz_xuhuang:'徐晃', gz_xuhuang:'徐晃',
gz_pangde:'庞德', gz_pangde:'庞德',
gz_caoren:'曹仁', gz_caoren:'曹仁',
@ -8025,7 +8023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
huangzhong:'旧黄忠', huangzhong:'旧黄忠',
sp_zhangjiao:'张角', sp_zhangjiao:'张角',
weiyan:'旧魏延', weiyan:'旧魏延',
xiaoqiao:'小乔', xiaoqiao:'小乔',
zhoutai:'界周泰', zhoutai:'界周泰',
zhangjiao:'旧张角', zhangjiao:'旧张角',
//yuji:'于吉', //yuji:'于吉',

View File

@ -4058,22 +4058,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
'step 0' 'step 0'
var list=get.zhinangs(); var list=get.zhinangs();
player.chooseButton(['是否发动【生息】获得一张智囊?',[list,'vcard']]).set('ai',function(card){ player.chooseButton([
return (Math.random()+0.5)*get.value({name:card.link[2]},_status.event.player) '###'+get.prompt('mjshengxi')+'###获得一张智囊或摸一张牌',
[list,'vcard'],
[['摸一张牌','取消'],'tdnodes'],
],true).set('ai',function(card){
if(card.link[2]){
if(!get.cardPile2(function(cardx){
return cardx.name==card.link[2];
})) return 0;
return (Math.random()+1.5)*get.value({name:card.link[2]},_status.event.player);
}
if(card.link=='摸一张牌') return 1;
return 0;
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool&&result.links[0]!='取消'){
player.logSkill('mjshengxi'); player.logSkill('mjshengxi');
var card=get.cardPile2(function(card){ if(result.links[0]=='摸一张牌') player.draw();
return card.name==result.links[0][2]; else{
}); var card=get.cardPile2(function(card){
if(card) player.gain(card,'gain2'); return card.name==result.links[0][2];
});
if(card) player.gain(card,'gain2');
}
} }
}, },
group:'mjshengxi_zhunbei', group:'mjshengxi_zhunbei',
subfrequent:['zhunbei'], subfrequent:['zhunbei'],
subSkill:{ subSkill:{
zhunbei:{ zhunbei:{
audio:'shengxi',
audioname:['feiyi'],
trigger:{player:'phaseZhunbeiBegin'}, trigger:{player:'phaseZhunbeiBegin'},
frequent:true, frequent:true,
prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】', prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】',
@ -4118,7 +4134,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
'step 1' 'step 1'
if(result.bool){ if(result.bool){
event.card=result.links[0]; var card=result.links[0];
event.card=card;
player.chooseTarget('将'+get.translation(card)+'交给一名其他角色并摸一张牌',lib.filter.notMe,true).set('ai',function(target){ player.chooseTarget('将'+get.translation(card)+'交给一名其他角色并摸一张牌',lib.filter.notMe,true).set('ai',function(target){
var evt=_status.event.getParent(); var evt=_status.event.getParent();
return get.attitude(evt.player,target)*get.value(evt.card,target)*(target.hasSkillTag('nogain')?0.1:1); return get.attitude(evt.player,target)*get.value(evt.card,target)*(target.hasSkillTag('nogain')?0.1:1);
@ -5382,20 +5399,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
fyjianyu:{ fyjianyu:{
init:function(player){
if(!lib.skill['fyjianyu_'+player.playerid]){
lib.skill['fyjianyu_'+player.playerid]={
intro:{
markcount:()=>1,
name2:'喻',
content:'指定另一名有“喻”的角色为目标时,其摸一张牌',
},
};
lib.translate['fyjianyu_'+player.playerid]='谏喻';
}
},
audio:2,
enable:'phaseUse', enable:'phaseUse',
usable:1,
filter:function(event,player){ filter:function(event,player){
return !player.hasSkill('fyjianyu2')&&game.countPlayer(function(current){ return game.countPlayer(function(current){
return !current.hasMark('fyjianyux'); return !current.hasMark('fyjianyu_'+player.playerid);
})>1; })>1;
}, },
round:1,
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return !target.hasMark('fyjianyux'); return !target.hasMark('fyjianyu_'+player.playerid);
}, },
selectTarget:2, selectTarget:2,
content:function(){ content:function(){
player.addTempSkill('fyjianyux',{player:'phaseBegin'}); player.addTempSkill('fyjianyu_draw',{player:'phaseBegin'});
target.addMark('fyjianyux',1); target.addMark('fyjianyu_'+player.playerid,1);
}, },
ai:{ ai:{
order:0.1, order:0.1,
@ -5411,30 +5441,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
}, },
}, },
}, subSkill:{
fyjianyux:{ draw:{
trigger:{global:'useCardToPlayer'}, charlotte:true,
forced:true, trigger:{global:'useCardToPlayer'},
charlotte:true, filter:function(event,player){
filter:function(event,player){ return event.player!=event.target&&event.player.hasMark('fyjianyu_'+player.playerid)&&event.target.hasMark('fyjianyu_'+player.playerid)&&event.target.isIn();
return event.player!=event.target&&event.player.hasMark('fyjianyux')&& },
event.target.hasMark('fyjianyux')&&event.target.isIn(); forced:true,
}, logTarget:'target',
logTarget:'target', content:function(){
content:function(){ trigger.target.draw();
trigger.target.draw(); },
}, onremove:function(player){
onremove:function(){ game.countPlayer(function(current){
game.countPlayer(function(current){ var num=current.countMark('fyjianyu_'+player.playerid);
var num=current.countMark('fyjianyux'); if(num) current.removeMark('fyjianyu_'+player.playerid);
if(num) current.removeMark('fyjianyux'); });
}); },
}, },
intro:{
content:'mark',
}, },
}, },
fyjianyu2:{},
spwanwei:{ spwanwei:{
audio:2, audio:2,
enable:'chooseToUse', enable:'chooseToUse',
@ -6339,9 +6366,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
reshengxi_info:'结束阶段,若你于本回合内未造成过伤害,则你可摸两张牌。', reshengxi_info:'结束阶段,若你于本回合内未造成过伤害,则你可摸两张牌。',
fyjianyu:'谏喻', fyjianyu:'谏喻',
fyjianyu_info:'每轮限一次。出牌阶段你可选择两名角色令这些角色获得“喻”直到你的下回合开始。当一名有“喻”的角色A使用牌指定另一名有“喻”的角色B为目标时你令B摸一张牌。', fyjianyu_info:'每轮限一次。出牌阶段你可选择两名角色令这些角色获得“喻”直到你的下回合开始。当一名有“喻”的角色A使用牌指定另一名有“喻”的角色B为目标时你令B摸一张牌。',
fyjianyux:'谏喻',
mjshengxi:'生息', mjshengxi:'生息',
mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊。', mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊或摸一张牌。',
mjkuanji:'宽济', mjkuanji:'宽济',
mjkuanji_info:'每回合限一次。当你因弃置而失去牌后,你可令一名其他角色获得其中的一张牌,然后你摸一张牌。', mjkuanji_info:'每回合限一次。当你因弃置而失去牌后,你可令一名其他角色获得其中的一张牌,然后你摸一张牌。',
tiaojiyanmei:'调剂盐梅', tiaojiyanmei:'调剂盐梅',

View File

@ -108,7 +108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
var num=1,current=_status.currentPhase; var num=1,current=_status.currentPhase;
if(current&&trigger.player!=current){ if(current&&trigger.source!=current){
var num=0,players=game.players.slice(0).concat(game.dead); var num=0,players=game.players.slice(0).concat(game.dead);
for(var target of players){ for(var target of players){
target.getHistory('sourceDamage',function(evt){ target.getHistory('sourceDamage',function(evt){
@ -5566,7 +5566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var evt=trigger.getl(player); var evt=trigger.getl(player);
var num=0; var num=0;
player.getHistory('lose',function(evt){ player.getHistory('lose',function(evt){
if(!goon||evt.type!='discard') return false; if(evt.type!='discard') return false;
num+=evt.cards2.length; num+=evt.cards2.length;
}); });
var cards=[]; var cards=[];
@ -5597,52 +5597,148 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){ content:function(){
'step 0' 'step 0'
var list=lib.skill.dchuishu.getList(player); var list=lib.skill.dchuishu.getList(player);
event.initial_list=list.slice(0); var min=list[0],max=list[0];
var min=list[0];
for(var i of list){ for(var i of list){
if(i<min) min=i; if(i<min) min=i;
if(i>max) max=i;
} }
var exps=['摸牌数[','弃牌数[','目标牌数[']; var exps=['摸牌数[','弃牌数[','目标牌数['];
var choices=[]; var choices_min=[],choices_max=[];
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
if(list[i]==min) choices.push(exps[i]+min+']'); if(list[i]==min) choices_min.push(exps[i]+min+']');
if(list[i]==max) choices_max.push(exps[i]+max+']');
}
if(choices_min.length==1&&choices_max.length==1){
event._result={bool:true,min:choices_min[0],max:choices_max[0]};
}
else{
if(player.isUnderControl()) game.swapPlayerAuto(player);
var switchToAuto=function(){
_status.imchoosing=false;
event._result={
bool:true,
min:choices_min[0],
max:choices_max[0],
};
if(event.dialog) event.dialog.close();
if(event.control) event.control.close();
};
var chooseButton=function(player,min,max){
var event=_status.event;
player=player||event.player;
var list=lib.skill.dchuishu.getList(player);
if(!event._result) event._result={};
var dialog=ui.create.dialog('###易数:请选择更改的数值###令〖慧淑〗的一个最小数值+2并令一个最大数值-1','forcebutton','hidden');
event.dialog=dialog;
dialog.addText('最小值+2');
var table=document.createElement('div');
table.classList.add('add-setting');
table.style.margin='0';
table.style.width='100%';
table.style.position='relative';
for(var i=0;i<min.length;i++){
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode');
td.link=min[i];
table.appendChild(td);
td.innerHTML='<span>'+min[i]+'</span>';
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return;
if(_status.justdragged) return;
_status.tempNoButton=true;
setTimeout(function(){
_status.tempNoButton=false;
},500);
var link=this.link;
var current=this.parentNode.querySelector('.bluebg');
if(current) current.classList.remove('bluebg');
this.classList.add('bluebg');
event._result.min=link;
});
}
dialog.content.appendChild(table);
dialog.addText('最大值-1');
var table2=document.createElement('div');
table2.classList.add('add-setting');
table2.style.margin='0';
table2.style.width='100%';
table2.style.position='relative';
for(var i=0;i<max.length;i++){
var td=ui.create.div('.shadowed.reduce_radius.pointerdiv.tdnode');
td.link=max[i];
table2.appendChild(td);
td.innerHTML='<span>'+max[i]+'</span>';
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return;
if(_status.justdragged) return;
_status.tempNoButton=true;
setTimeout(function(){
_status.tempNoButton=false;
},500);
var link=this.link;
var current=this.parentNode.querySelector('.bluebg');
if(current) current.classList.remove('bluebg');
this.classList.add('bluebg');
event._result.max=link;
});
}
dialog.content.appendChild(table2);
dialog.add('  ');
event.dialog.open();
event.switchToAuto=function(){
event._result={
bool:true,
min:min[0],
max:max[0],
};
event.dialog.close();
event.control.close();
game.resume();
_status.imchoosing=false;
};
event.control=ui.create.control('ok',function(link){
var result=event._result;
if(!result.min||!result.max) return;
result.bool=true;
event.dialog.close();
event.control.close();
game.resume();
_status.imchoosing=false;
});
for(var i=0;i<event.dialog.buttons.length;i++){
event.dialog.buttons[i].classList.add('selectable');
}
game.pause();
game.countChoose();
};
if(event.isMine()) chooseButton(player,choices_min,choices_max);
else if(event.isOnline()){
event.player.send(chooseButton,event.player,choices_min,choices_max);
event.player.wait();
game.pause();
}
else switchToAuto();
} }
if(choices.length==1) event._result={control:choices[0]};
else player.chooseControl(choices).set('prompt','易数:令〖慧淑〗的一个数值+2').set('prompt2','摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做,你弃置['+list[1]+']张手牌;且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中获得等同于本回合弃牌数的锦囊牌。');
'step 1' 'step 1'
var result=result.control.slice(0,result.control.indexOf('[')); var map=event.result||result;
var exps=['摸牌数','弃牌数','目标牌数']; if(map.bool){
var index=exps.indexOf(result),list=lib.skill.dchuishu.getList(player); var min=map.min,max=map.max;
list[index]+=2; min=min.slice(0,min.indexOf('['));
game.log(player,'令','#g【慧淑】','中的','#y'+result,'+2'); max=max.slice(0,max.indexOf('['));
player.storage.dchuishu=list; var exps=['摸牌数','弃牌数','目标牌数'];
var list=lib.skill.dchuishu.getList(player);
list[exps.indexOf(min)]+=2;
list[exps.indexOf(max)]--;
game.log(player,'令','#g【慧淑】','中的','#y'+min,'+2');
game.log(player,'令','#g【慧淑】','中的','#y'+max,'-1');
player.storage.dchuishu=list;
}
else event.finish();
'step 2' 'step 2'
var list=lib.skill.dchuishu.getList(player);
var max=event.initial_list[0];
for(var i of event.initial_list){
if(i<max) max=i;
}
var exps=['摸牌数[','弃牌数[','目标牌数['];
var choices=[];
for(var i=0;i<list.length;i++){
if(event.initial_list[i]==max) choices.push(exps[i]+list[i]+']');
}
if(choices.length==1) event._result={control:choices[0]};
else player.chooseControl(choices).set('prompt','易数:令〖慧淑〗的一个数值-1').set('prompt2','摸牌阶段结束时,你可以摸['+list[0]+']张牌。若如此做,你弃置['+list[1]+']张手牌;且当你于本回合内弃置第['+list[2]+']+1张牌后你从弃牌堆中获得等同于本回合弃牌数的锦囊牌。');
'step 3'
var result=result.control.slice(0,result.control.indexOf('['));
var exps=['摸牌数','弃牌数','目标牌数'];
var index=exps.indexOf(result),list=lib.skill.dchuishu.getList(player);
list[index]--;
game.log(player,'令','#g【慧淑】','中的','#y'+result,'-1');
player.storage.dchuishu=list;
'step 4'
player.markSkill('dchuishu'); player.markSkill('dchuishu');
game.delayx(); game.delayx();
}, },
ai:{ ai:{combo:'dchuishu'},
combo:'dchuishu',
},
}, },
dcligong:{ dcligong:{
audio:2, audio:2,
@ -11547,7 +11643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dchuishu:'慧淑', dchuishu:'慧淑',
dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后你从弃牌堆中随机获得等同于本回合弃牌数的锦囊牌。', dchuishu_info:'摸牌阶段结束时,你可以摸[3]张牌。若如此做:你弃置[1]张手牌,且当你于本回合内弃置第[2]+1张牌后你从弃牌堆中随机获得等同于本回合弃牌数的锦囊牌。',
dcyishu:'易数', dcyishu:'易数',
dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你令A={〖慧淑〗的中括号内最小的数字}B={〖慧淑〗的中括号内最大的数字}。然后你令A中的一个数字+2且B中的一个数字-1。', dcyishu_info:'锁定技。当你不因出牌阶段而失去牌后,你同时令{〖慧淑〗的中括号内最小的一个数字+2}且{〖慧淑〗的中括号内最大的一个数字-1}。',
dcligong:'离宫', dcligong:'离宫',
dcligong_info:'觉醒技。准备阶段若〖慧淑〗的中括号内有不小于5的数字则你加1点体力上限回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌然后你选择一项⒈摸三张牌。⒉失去〖慧淑〗然后获得这些武将牌上的任意两个非Charlotte技能。', dcligong_info:'觉醒技。准备阶段若〖慧淑〗的中括号内有不小于5的数字则你加1点体力上限回复1点体力并失去〖易数〗。系统随机检索四张吴势力的女性武将牌然后你选择一项⒈摸三张牌。⒉失去〖慧淑〗然后获得这些武将牌上的任意两个非Charlotte技能。',
dingshangwan:'丁尚涴', dingshangwan:'丁尚涴',

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB