diff --git a/character/clan.js b/character/clan.js index 985ec60c7..1f2dddc05 100644 --- a/character/clan.js +++ b/character/clan.js @@ -831,14 +831,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!event.cards.length) return true; var cards=[]; game.countPlayer(current=>{ - if(!current.hasClan('太原王氏')) return false; + if(!current.hasClan('太原王氏')&¤t!=player) return false; current.getHistory('lose',evt=>{ if(event!=evt.getParent()) return false; cards.addArray(evt.getl(current).hs); }); - }) - if(event.cards.some(card=>!cards.contains(card))) return false; - return true; + }); + return !event.cards.some(card=>cards.contains(card)); }, content:function(){ 'step 0' diff --git a/character/jsrg.js b/character/jsrg.js index 03b69f47a..6f54d0c25 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -1880,8 +1880,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, addVisitors:function(characters,player){ player.addSkillBlocker('sbyingmen'); - game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”') - lib.skill.rehuashen.drawCharacter(player,characters); + game.log(player,'将','#y'+get.translation(characters),'加入了','#g“访客”'); + 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) var storage=player.getStorage('sbyingmen'); var skills=lib.skill.sbyingmen.getSkills(storage,player); diff --git a/character/mobile.js b/character/mobile.js index 0710cc01b..8c3f3ab99 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -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_sunben:["re_sunben"], 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_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"], @@ -22,6 +22,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + re_xiaoqiao:['female','wu',3,['retianxiang','xinhongyan']], shichangshi:['male','qun',1,['mbdanggu','mbmowang']], re_zhangzhang:['male','wu',3,['rezhijian','guzheng']], qianzhao:['male','wei',4,['mbshihe','mbzhenfu']], @@ -13816,6 +13817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ scsanruo_info:'你可以将一张♥牌当【桃】、♦牌当火【杀】、♣牌当【闪】、♠牌当【无懈可击】使用。当你以此法使用或打出【杀】或【闪】时,你可以获得对方的一张牌;当你以此法使用【桃】时,你可以获得一名其他角色的一张牌;当你以此法使用【无懈可击】时,你可以获得此牌响应的普通锦囊牌的使用者的一张牌。', scsmiaoyu:'妙语', scsmiaoyu_info:'你可以将至多两张相同花色的牌按照以下规则使用或打出:♦牌当作火【杀】,♥牌当作【桃】,♣牌当作【闪】,♠牌当作【无懈可击】。若你以此法使用了两张红色牌,则此牌回复值或伤害值+1。若你以此法使用了两张黑色牌,则你弃置当前回合角色一张牌。', + re_xiaoqiao:'手杀小乔', mobile_standard:'手杀异构·标准包', diff --git a/character/old.js b/character/old.js index 2ae282792..7b3ca06e8 100755 --- a/character/old.js +++ b/character/old.js @@ -7,7 +7,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ characterSort:{ old:{ 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_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'], @@ -45,7 +45,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pangde:['male','qun',4,['mashu','mengjin']], ol_huaxiong:["male","qun",6,["new_reyaowu"]], 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']], xiahouyuan:['male','wei',4,['shensu']], old_huangfusong:['male','qun',4,['fenyue']], @@ -971,6 +971,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_zhaoyun:'新杀赵云', old_zhaoyun_ab:'赵云', ol_huaxiong:'旧华雄', + old_xiaoqiao:'旧小乔', old_guhuo:"蛊惑", old_guhuo_info:"你可以扣置一张手牌当做一张基本牌或普通锦囊牌使用或打出,体力值不为0的其他角色依次选择是否质疑。然后,若有质疑的角色,你展示此牌:若为假,此牌作废,这些角色摸一张牌;若为真,这些角色失去1点体力,且若此牌不为♥,此牌作废。", diff --git a/character/shenhua.js b/character/shenhua.js index da831624d..b1955c9d7 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ connect:true, characterSort:{ 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_lin:['caopi','re_xuhuang','menghuo','zhurong','re_lusu','sunjian','dongzhuo','jiaxu'], 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_xiahouyuan:['male','wei',4,['xinshensu']], 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']], re_yuji:["male","qun",3,["xinfu_guhuo"]], // yuji:['male','qun',3,['guhuo']], @@ -8005,12 +8005,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_xiahouyuan:'夏侯渊', re_huangzhong:'黄忠', re_weiyan:'魏延', - re_xiaoqiao:'小乔', gz_xiahouyuan:'夏侯渊', gz_huangzhong:'黄忠', gz_weiyan:'魏延', - gz_xiaoqiao:'小乔', gz_xuhuang:'徐晃', gz_pangde:'庞德', gz_caoren:'曹仁', @@ -8025,7 +8023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huangzhong:'旧黄忠', sp_zhangjiao:'张角', weiyan:'旧魏延', - xiaoqiao:'旧小乔', + xiaoqiao:'小乔', zhoutai:'界周泰', zhangjiao:'旧张角', //yuji:'于吉', diff --git a/character/shiji.js b/character/shiji.js index 17f0102f4..10cbe0a1d 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -4058,22 +4058,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' var list=get.zhinangs(); - player.chooseButton(['是否发动【生息】获得一张智囊?',[list,'vcard']]).set('ai',function(card){ - return (Math.random()+0.5)*get.value({name:card.link[2]},_status.event.player) + player.chooseButton([ + '###'+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' - if(result.bool){ + if(result.bool&&result.links[0]!='取消'){ player.logSkill('mjshengxi'); - var card=get.cardPile2(function(card){ - return card.name==result.links[0][2]; - }); - if(card) player.gain(card,'gain2'); + if(result.links[0]=='摸一张牌') player.draw(); + else{ + var card=get.cardPile2(function(card){ + return card.name==result.links[0][2]; + }); + if(card) player.gain(card,'gain2'); + } } }, group:'mjshengxi_zhunbei', subfrequent:['zhunbei'], subSkill:{ zhunbei:{ + audio:'shengxi', + audioname:['feiyi'], trigger:{player:'phaseZhunbeiBegin'}, frequent:true, prompt2:'从游戏外或牌堆中获得一张【调剂盐梅】', @@ -4118,7 +4134,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' 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){ var evt=_status.event.getParent(); 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:{ + 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', - usable:1, filter:function(event,player){ - return !player.hasSkill('fyjianyu2')&&game.countPlayer(function(current){ - return !current.hasMark('fyjianyux'); + return game.countPlayer(function(current){ + return !current.hasMark('fyjianyu_'+player.playerid); })>1; }, + round:1, filterTarget:function(card,player,target){ - return !target.hasMark('fyjianyux'); + return !target.hasMark('fyjianyu_'+player.playerid); }, selectTarget:2, content:function(){ - player.addTempSkill('fyjianyux',{player:'phaseBegin'}); - target.addMark('fyjianyux',1); + player.addTempSkill('fyjianyu_draw',{player:'phaseBegin'}); + target.addMark('fyjianyu_'+player.playerid,1); }, ai:{ order:0.1, @@ -5411,30 +5441,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - }, - fyjianyux:{ - trigger:{global:'useCardToPlayer'}, - forced:true, - charlotte:true, - filter:function(event,player){ - return event.player!=event.target&&event.player.hasMark('fyjianyux')&& - event.target.hasMark('fyjianyux')&&event.target.isIn(); - }, - logTarget:'target', - content:function(){ - trigger.target.draw(); - }, - onremove:function(){ - game.countPlayer(function(current){ - var num=current.countMark('fyjianyux'); - if(num) current.removeMark('fyjianyux'); - }); - }, - intro:{ - content:'mark', + subSkill:{ + draw:{ + charlotte:true, + trigger:{global:'useCardToPlayer'}, + filter:function(event,player){ + return event.player!=event.target&&event.player.hasMark('fyjianyu_'+player.playerid)&&event.target.hasMark('fyjianyu_'+player.playerid)&&event.target.isIn(); + }, + forced:true, + logTarget:'target', + content:function(){ + trigger.target.draw(); + }, + onremove:function(player){ + game.countPlayer(function(current){ + var num=current.countMark('fyjianyu_'+player.playerid); + if(num) current.removeMark('fyjianyu_'+player.playerid); + }); + }, + }, }, }, - fyjianyu2:{}, spwanwei:{ audio:2, enable:'chooseToUse', @@ -6339,9 +6366,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ reshengxi_info:'结束阶段,若你于本回合内未造成过伤害,则你可摸两张牌。', fyjianyu:'谏喻', fyjianyu_info:'每轮限一次。出牌阶段,你可选择两名角色,令这些角色获得“喻”直到你的下回合开始。当一名有“喻”的角色A使用牌指定另一名有“喻”的角色B为目标时,你令B摸一张牌。', - fyjianyux:'谏喻', mjshengxi:'生息', - mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊。', + mjshengxi_info:'准备阶段,你可以获得一张【调剂盐梅】;结束阶段,若你本回合使用过牌且未造成伤害,则你可以获得一张智囊或摸一张牌。', mjkuanji:'宽济', mjkuanji_info:'每回合限一次。当你因弃置而失去牌后,你可令一名其他角色获得其中的一张牌,然后你摸一张牌。', tiaojiyanmei:'调剂盐梅', diff --git a/character/xianding.js b/character/xianding.js index abc580710..30913db30 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -108,7 +108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 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); for(var target of players){ 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 num=0; player.getHistory('lose',function(evt){ - if(!goon||evt.type!='discard') return false; + if(evt.type!='discard') return false; num+=evt.cards2.length; }); var cards=[]; @@ -5597,52 +5597,148 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' var list=lib.skill.dchuishu.getList(player); - event.initial_list=list.slice(0); - var min=list[0]; + var min=list[0],max=list[0]; for(var i of list){ if(imax) max=i; } var exps=['摸牌数[','弃牌数[','目标牌数[']; - var choices=[]; + var choices_min=[],choices_max=[]; for(var i=0;i'; + 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'; + 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