diff --git a/audio/die/ol_dengai.mp3 b/audio/die/ol_dengai.mp3 new file mode 100644 index 000000000..2d534883a Binary files /dev/null and b/audio/die/ol_dengai.mp3 differ diff --git a/audio/skill/jixi_ol_dengai1.mp3 b/audio/skill/jixi_ol_dengai1.mp3 new file mode 100644 index 000000000..3180b92a7 Binary files /dev/null and b/audio/skill/jixi_ol_dengai1.mp3 differ diff --git a/audio/skill/jixi_ol_dengai2.mp3 b/audio/skill/jixi_ol_dengai2.mp3 new file mode 100644 index 000000000..ca34e4b32 Binary files /dev/null and b/audio/skill/jixi_ol_dengai2.mp3 differ diff --git a/audio/skill/oltuntian1.mp3 b/audio/skill/oltuntian1.mp3 new file mode 100644 index 000000000..a9cc71b7f Binary files /dev/null and b/audio/skill/oltuntian1.mp3 differ diff --git a/audio/skill/oltuntian2.mp3 b/audio/skill/oltuntian2.mp3 new file mode 100644 index 000000000..c994a32f3 Binary files /dev/null and b/audio/skill/oltuntian2.mp3 differ diff --git a/audio/skill/olzaoxian1.mp3 b/audio/skill/olzaoxian1.mp3 new file mode 100644 index 000000000..aecc20025 Binary files /dev/null and b/audio/skill/olzaoxian1.mp3 differ diff --git a/audio/skill/olzaoxian2.mp3 b/audio/skill/olzaoxian2.mp3 new file mode 100644 index 000000000..a6175b79a Binary files /dev/null and b/audio/skill/olzaoxian2.mp3 differ diff --git a/card/guozhan.js b/card/guozhan.js index 046bd4f5d..507d2341d 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -208,9 +208,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){ yingbian_prompt:'此牌的效果改为依次执行所有选项', content:function(){ 'step 0' - if((get.mode()!='guozhan'||_status.mode=='yingbian'||_status.mode=='free')&&!get.is.single()) event.goto(2); + if(event.card.yingbian){ + target.discard(target.getCards('e',function(card){ + return lib.filter.cardDiscardable(card,target,'shuiyanqijunx'); + })); + target.damage('thunder'); + event.finish(); + } else if(!target.countCards('e',function(card){ - return lib.filter.cardDiscardable(card,target); + return lib.filter.cardDiscardable(card,target,'shuiyanqijunx'); })){ var next=target.damage(); if(!get.is.single()) next.nature='thunder'; @@ -228,28 +234,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.control=='discard_card'){ - target.discard(target.getCards('e')); + target.discard(target.getCards('e',function(card){ + return lib.filter.cardDiscardable(card,target,'shuiyanqijunx'); + })); } else{ var next=target.damage(); if(!get.is.single()) next.nature='thunder' } event.finish(); - 'step 2' - var next=target.chooseToDiscard(2,'e').set('ai',function(card){ - var player=_status.event.player; - var source=_status.event.getParent().player; - if(get.damageEffect(player,source,player,'thunder')>=0){ - return 0; - } - if(player.hp>=3){ - return 4-get.value(card); - } - return 8-get.value(card); - }); - if(card.yingbian) next.set('forced',true); - 'step 3' - if(card.yingbian||!result.bool) target.damage('thunder'); }, ai:{ order:6, @@ -274,14 +267,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, result:{ target:function(player,target){ - if(!get.is.single()&&(get.mode()!='guozhan'||_status.mode=='yingbian'||_status.mode=='free')){ - if(target.countCards('e',function(card){ - return get.value(card,target)<=0; - })>1) return 1; - var es=target.countCards('e'); - if(es<2) return -1.5; - return -3/es; - } return -1-target.countCards('e'); } } @@ -1422,8 +1407,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ xietianzi_info:'出牌阶段,对自己使用。你结束出牌阶段,若如此做,弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合', xietianzi_info_guozhan:'出牌阶段,对为大势力角色的你使用。你结束出牌阶段,若如此做,弃牌阶段结束时,你可以弃置一张手牌,获得一个额外的回合', shuiyanqijunx:'水淹七军', + shuiyanqijunx_info:'出牌阶段,对一名其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌(至少一张);2、受到你造成的1点雷电伤害', shuiyanqijunx_info_guozhan:'出牌阶段,对一名装备区里有牌的其他角色使用。目标角色选择一项:1、弃置装备区里的所有牌;2、受到你造成的1点雷电伤害', - shuiyanqijunx_info:'出牌阶段,对一名其他角色使用。目标角色选择一项:1、弃置装备区内的两张牌;2、受到你造成的1点雷电伤害', lulitongxin:'勠力同心', lulitongxin_info:'出牌阶段,对所有大势力角色或所有小势力角色使用。若目标角色:不处于“连环状态”,其横置;处于“连环状态”,其摸一张牌', lulitongxin_info_versus:'出牌阶段,对所有敌方角色或所有己方角色使用。若目标角色:为敌方角色且不处于“连环状态”,其横置;为己方角色且处于“连环状态”,其摸一张牌。', diff --git a/card/yingbian.js b/card/yingbian.js index 0fcf6fe01..c4c9ecbb9 100644 --- a/card/yingbian.js +++ b/card/yingbian.js @@ -749,7 +749,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ['spade',10,'sha',null,['yingbian_canqu']], ['spade',10,'bingliang'], ['spade',11,'wuxie'], - ['spade',11,'shuiyanqijunx'], + ['spade',11,'shunshou'], ['spade',11,'tiesuo'], ['spade',12,'zhujinqiyuan',null,['yingbian_zhuzhan']], ['spade',12,'tiesuo'], @@ -763,13 +763,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ['heart',1,'wuxie'], ['heart',2,'shan',null,['yingbian_kongchao']], ['heart',2,'shan',null,['yingbian_kongchao']], - ['heart',2,'chuqibuyi',null,['yingbian_zhuzhan']], + ['heart',2,'guohe'], ['heart',3,'wugu'], ['heart',3,'tao'], ['heart',3,'chuqibuyi',null,['yingbian_zhuzhan']], ['heart',4,'sha','fire'], ['heart',4,'tao'], - ['heart',4,'suijiyingbian'], + ['heart',4,'wugu'], ['heart',5,'chitu'], ['heart',5,'tao'], ['heart',5,'qilin'], diff --git a/card/zhulu.js b/card/zhulu.js index 53c16dfdf..b3b7fffbb 100644 --- a/card/zhulu.js +++ b/card/zhulu.js @@ -273,7 +273,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ order:10, tag:{ gain:1, - loseCard:1, + //loseCard:1, }, basic:{ useful:0.5, diff --git a/character/diy.js b/character/diy.js index 815dda81c..dc7a10af6 100755 --- a/character/diy.js +++ b/character/diy.js @@ -1935,7 +1935,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, abyusa_jueqing:{ - audio:'jueqing', trigger:{source:'damageBegin2'}, skillAnimation:true, animationColor:'water', @@ -1964,7 +1963,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{source:'damageBefore'}, forced:true, charlotte:true, - audio:'jueqing', filter:function(event,player){ return player.hasSkill('abyusa_jueqing'); }, diff --git a/character/extra.js b/character/extra.js index bb2f42caa..3390d75af 100755 --- a/character/extra.js +++ b/character/extra.js @@ -14,7 +14,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ extra_lei:['shen_ganning','shen_zhangliao'], extra_key:['key_kagari','key_shiki','key_hina'], extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji'], - extra_offline:['shen_diaochan'], + extra_offline:['shen_diaochan','boss_zhaoyun'], extra_mini:['mini_zhugeliang','mini_lvbu','mini_lvmeng'], }, }, @@ -40,6 +40,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ol_zhangliao:['male','shen',4,['olduorui','olzhiti'],['wei']], shen_caopi:['male','shen',5,['chuyuan','dengji'],['wei']], shen_zhenji:['female','shen',4,['shenfu','qixian'],['wei']], + boss_zhaoyun:['male','shen',1,['boss_juejing','xinlonghun','zhanjiang'],['shu']], mini_zhugeliang:['male','shen',3,['qixing','minikuangfeng','minidawu'],['shu']], mini_lvbu:['male','shen',6,['miniwuqian','minishenfen']], @@ -59,6 +60,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_zhugeliang:['shen_zhugeliang','mini_zhugeliang'], shen_lvbu:['shen_lvbu','mini_lvbu'], shen_lvmeng:['shen_lvmeng','mini_lvmeng'], + shen_zhaoyun:['shen_zhaoyun','boss_zhaoyun'], }, characterFilter:{ shen_diaochan:function(mode){ @@ -226,6 +228,64 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.turnOver(); }, }, + zhanjiang:{ + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + var players=game.filterPlayer(); + for(var i=0;i4; + var evt=event.getl(player); + if(!evt||!evt.hs||evt.hs.length==0||player.countCards('h')>=4) return false; + var evt=event; + for(var i=0;i<4;i++){ + evt=evt.getParent('boss_juejing2'); + if(evt.name!='boss_juejing2') return true; + } + return false; + }, + content:function(){ + var num=4-player.countCards('h'); + if(num>0) player.draw(num); + else player.chooseToDiscard('h',true,-num); + }, + }, miniwuqian:{ audio:'wuqian', trigger:{ @@ -2837,31 +2897,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name=='wuxie') return player.countCards('he',{suit:'spade'})>0; if(name=='tao') return player.countCards('he',{suit:'heart'})>0; }, - group:['xinlonghun_num','xinlonghun_discard'], - }, - xinlonghun:{ - group:['xinlonghun1','xinlonghun2','xinlonghun3','xinlonghun4','xinlonghun_num','xinlonghun_discard'], - ai:{ - skillTagFilter:function(player,tag){ - switch(tag){ - case 'respondSha':{ - if(player.countCards('he',{suit:'diamond'})==0) return false; - break; - } - case 'respondShan':{ - if(player.countCards('he',{suit:'club'})==0) return false; - break; - } - case 'save':{ - if(player.countCards('he',{suit:'heart'})==0) return false; - break; - } - } - }, - respondSha:true, - respondShan:true, - threaten:1.8 - }, + group:['relonghun_num','relonghun_discard'], subSkill:{ num:{ trigger:{player:'useCard'}, @@ -2869,7 +2905,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ popup:false, filter:function(event){ var evt=event; - return (evt.skill=='xinlonghun1'||evt.skill=='xinlonghun2'||(['sha','tao'].contains(evt.card.name)&&evt.skill=='relonghun'))&&evt.cards&&evt.cards.length==2; + return ['sha','tao'].contains(evt.card.name)&&evt.skill=='relonghun'&&evt.cards&&evt.cards.length==2; }, content:function(){ trigger.baseDamage++; @@ -2886,7 +2922,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.name=='respond'?0.5:false; }, filter:function(evt,player){ - return (evt.skill=='xinlonghun3'||evt.skill=='xinlonghun4'||(['shan','wuxie'].contains(evt.card.name)&&evt.skill=='relonghun'))&& + return ['shan','wuxie'].contains(evt.card.name)&&evt.skill=='relonghun'&& evt.cards&&evt.cards.length==2&&_status.currentPhase&&_status.currentPhase!=player&&_status.currentPhase.countDiscardableCards(player,'he'); }, content:function(){ @@ -2896,85 +2932,102 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - xinlonghun1:{ - audio:'longhun1', + xinlonghun:{ + audio:'longhun', enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将至多两张红桃牌当作桃使用'; + prompt:'将♦牌当做杀,♥牌当做桃,♣牌当做闪,♠牌当做无懈可击使用或打出', + viewAs:function(cards,player){ + var name=false; + var nature=null; + switch(get.suit(cards[0],player)){ + case 'club':name='shan';break; + case 'diamond':name='sha';nature='fire';break; + case 'spade':name='wuxie';break; + case 'heart':name='tao';break; + } + if(name) return {name:name,nature:nature}; + return null; }, - position:'he', - check:function(card,event){ - if(ui.selected.cards.length) return 0; - return 10-get.value(card); + check:function(card){ + var player=_status.event.player; + if(_status.event.type=='phase'){ + var max=0; + var name2; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'fire':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'fire':null}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.suit(card,player)) return (name2=='diamond'?(5-get.value(card)):20-get.value(card)); + return 0; + } + return 1; + }, + position:'h', + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.suit(card,player); + if(name=='club'&&filter({name:'shan',cards:[card]},player,event)) return true; + if(name=='diamond'&&filter({name:'sha',cards:[card],nature:'fire'},player,event)) return true; + if(name=='spade'&&filter({name:'wuxie',cards:[card]},player,event)) return true; + if(name=='heart'&&filter({name:'tao',cards:[card]},player,event)) return true; + return false; }, - selectCard:[1,2], - viewAs:{name:'tao'}, filter:function(event,player){ - return player.countCards('he',{suit:'heart'})>0; + var filter=event.filterCard; + if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('h',{suit:'diamond'})) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h',{suit:'club'})) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h',{suit:'heart'})) return true; + if(filter({name:'wuxie'},player,event)&&player.countCards('h',{suit:'spade'})) return true; + return false; }, - filterCard:function(card){ - return get.suit(card)=='heart'; - } - }, - xinlonghun2:{ - audio:'longhun2', - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将至多两张方片牌当作火杀使用或打出'; + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + var name; + switch(tag){ + case 'respondSha':name='diamond';break; + case 'respondShan':name='club';break; + case 'save':name='heart';break; + } + if(!player.countCards('h',{suit:name})) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'fire':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'fire':null}); + if(temp>max) max=temp; + } + } + max/=1.1; + return max; + } + return 2; + }, }, - position:'he', - check:function(card,event){ - if(ui.selected.cards.length) return 0; - return 10-get.value(card); + hiddenCard:function(player,name){ + if(name=='wuxie'&&_status.connectMode&&player.countCards('h')>0) return true; + if(name=='wuxie') return player.countCards('h',{suit:'spade'})>0; + if(name=='tao') return player.countCards('h',{suit:'heart'})>0; }, - selectCard:[1,2], - viewAs:{name:'sha',nature:'fire'}, - filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; - }, - filterCard:function(card){ - return get.suit(card)=='diamond'; - } - }, - xinlonghun3:{ - audio:'longhun3', - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将至多两张黑桃牌当作无懈可击使用'; - }, - position:'he', - check:function(card,event){ - if(ui.selected.cards.length) return 0; - return 7-get.value(card); - }, - selectCard:[1,2], - viewAs:{name:'wuxie'}, - viewAsFilter:function(player){ - return player.countCards('he',{suit:'spade'})>0; - }, - filterCard:function(card){ - return get.suit(card)=='spade'; - } - }, - xinlonghun4:{ - audio:'longhun4', - enable:['chooseToUse','chooseToRespond'], - prompt:function(){ - return '将至多两张梅花牌当作闪使用或打出'; - }, - position:'he', - check:function(card,event){ - if(ui.selected.cards.length) return 0; - return 10-get.value(card); - }, - selectCard:[1,2], - viewAs:{name:'shan'}, - filter:function(event,player){ - return player.countCards('he',{suit:'club'})>0; - }, - filterCard:function(card){ - return get.suit(card)=='club'; - } }, xinjuejing:{ mod:{ @@ -3587,10 +3640,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - "drlt_zhiti":{ - audio:2, - locked:true, + drlt_zhiti:{ + audio:2, + locked:true, group:["drlt_zhiti_1","drlt_zhiti_2","drlt_zhiti_3","drlt_zhiti_4","drlt_zhiti_5"], + global:'g_drlt_zhiti', subSkill:{ '1':{ audio:"drlt_zhiti", @@ -3660,7 +3714,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - "_drlt_zhiti":{ + g_drlt_zhiti:{ mod:{ maxHandcard:function (player,num){ if(player.maxHp>player.hp&&game.countPlayer(function(current){ @@ -3951,11 +4005,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ relonghun:'龙魂', relonghun_info:'你可以将同花色的一至两张牌按下列规则使用或打出:红桃当【桃】,方块当火【杀】,梅花当【闪】,黑桃当普【无懈可击】。若你以此法使用了两张红色牌,则此牌回复值或伤害值+1。若你以此法使用了两张黑色牌,则你弃置当前回合角色一张牌。', xinlonghun:'龙魂', - xinlonghun1:'龙魂♥︎', - xinlonghun2:'龙魂♦︎', - xinlonghun3:'龙魂♠︎', - xinlonghun4:'龙魂♣︎', - xinlonghun_info:'你可以将同花色的一至两张牌按下列规则使用或打出:红桃当【桃】,方块当火【杀】,梅花当【闪】,黑桃当普【无懈可击】。若你以此法使用了两张红色牌,则此牌回复值或伤害值+1。若你以此法使用了两张黑色牌,则你弃置当前回合角色一张牌。', + xinlonghun_info:'你可以将你的手牌按下列规则使用或打出:红桃当【桃】,方块当火【杀】,梅花当【闪】,黑桃当普【无懈可击】。', longhun:'龙魂', longhun1:'龙魂♥︎', longhun2:'龙魂♦︎', @@ -4077,6 +4127,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mini_lvmeng:'SP神吕蒙', minigongxin:'攻心', minigongxin_info:'每回合限一次,当你使用牌指定其他角色为唯一目标后,或成为其他角色使用牌的唯一目标后,你可观看对方的手牌。然后你可以展示其中的一张红色牌并选择一项:①获得此牌。②将此牌置于牌堆顶。', + boss_zhaoyun:'高达一号', + boss_zhaoyun_ab:'神赵云', + boss_juejing:'绝境', + boss_juejing2:'绝境', + boss_juejing_info:'锁定技,摸牌阶段开始前,你跳过此阶段。当你获得牌/失去手牌后,若你的手牌数大于4/小于4,则你将手牌摸至4张/弃置至4张。', + zhanjiang:'斩将', + zhanjiang_info:'准备阶段开始时,如果其他角色的装备区内有【青釭剑】,你可以获得之', key_kagari:'篝', kagari_zongsi:'纵丝', @@ -4093,6 +4150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hina_mashu_info:'锁定技,你计算于其他角色的距离时始终-1。', hina_tieji:'铁骑', hina_tieji_info:'当你使用【杀】指定目标后,你可进行判定。你令目标角色的所有非锁定技失效直到回合结束。除非其弃置一张与判定结果花色相同的牌,则其不能响应此【杀】。若判定结果为♠,则此【杀】对其的伤害+1。', + hina_tieji_append:'她成为神明的那一天,世界走向毁灭。', hina_shenji:'神机', hina_shenji_info:'若你拥有技能〖神现〗,则你可以于准备阶段发动〖归心〗,并可于结束阶段发动〖神愤〗。', diff --git a/character/gwent.js b/character/gwent.js index 162ba1ca0..0a347d00e 100644 --- a/character/gwent.js +++ b/character/gwent.js @@ -896,8 +896,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gwjingshi:{ enable:'phaseUse', usable:1, - direct:true, - delay:0, + //direct:true, + //delay:0, filter:function(event,player){ return game.hasPlayer(function(current){ return current.countCards('h'); @@ -942,7 +942,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(event.targets.contains(result.targets[0])){ player.popup('成功'); - game.log(player,'发动','【镜师】','成功'); + game.log(player,'发动','【血契】','成功'); var dialog=ui.create.dialog('hidden'); dialog.add('获得任意一名角色的一张手牌'); var list=game.filterPlayer(function(current){ @@ -959,7 +959,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else{ player.popup('失败'); - game.log(player,'发动','【镜师】','失败'); + game.log(player,'发动','【血契】','失败'); event.finish(); } 'step 2' diff --git a/character/hearth.js b/character/hearth.js index 266d9d295..e1c47ceda 100644 --- a/character/hearth.js +++ b/character/hearth.js @@ -8025,6 +8025,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, position:'he', filter:function(event,player){ + if(player.storage.tuteng_awake) return true; var rand=['tuteng1','tuteng2','tuteng3','tuteng4']; for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseCard('he',get.prompt('residi'),'将一张非基本牌置于武将牌上作为“司”',function(card,player){ + return get.type(card)!='basic'; + }).set('ai',function(card){ + if(get.position(card)=='e') return 5+player.hp-get.value(card); + return 7-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('residi'); + var cards=result.cards; + player.markAuto('residi',cards); + game.log(player,'将',cards[0],'放在了武将牌上'); + player.lose(cards,ui.special,'toStorage'); + } + }, + intro:{ + content:'cards', + onunmark:true, + }, + group:'residi_push', + }, + residi_push:{ + trigger:{global:'phaseUseBegin'}, + direct:true, + filter:function(event,player){ + return event.player!=player&&player.getStorage('residi').length>0; + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('residi',trigger.player),player.getStorage('residi')]).set('ai',function(button){ + var player=_status.event.player; + var target=_status.event.getTrigger().player; + if(get.attitude(player,target)>-1) return 0; + var card=button.link; + var color=get.color(button.link,false); + var eff=target.countCards('h',function(card){ + return get.color(card,target)==color&&target.hasValueTarget(card); + }); + if(!target.countCards('h',function(card){ + return get.color(card,target)==color&&get.name(card,target)=='sha'&&target.hasValueTarget(card); + })) eff+=1.5; + if(!target.countCards('h',function(card){ + return get.color(card,target)==color&&get.type2(card,target)=='trick'&&target.hasValueTarget(card); + })) eff+=1.5; + return eff-1; + }); + 'step 1' + if(result.bool){ + if(!trigger.residi) trigger.residi=[]; + trigger.residi.push(player); + var card=result.links[0]; + var target=trigger.player; + player.logSkill('residi',target); + player.unmarkAuto('residi',result.links); + player.$throw(card,1000); + game.log(player,'将',card,'置入了弃牌堆'); + game.cardsDiscard(card); + var color=get.color(card,false); + if(!target.storage.residi2) target.storage.residi2=[]; + target.storage.residi2.add(color); + target.addTempSkill('residi2','phaseUseAfter'); + target.markSkill('residi2'); + player.addTempSkill('residi3','phaseUseAfter'); + } + }, + }, + residi2:{ + onremove:true, + mod:{ + cardEnabled2:function(card,player){ + if(player.getStorage('residi2').contains(get.color(card,player))) return false; + }, + }, + intro:{ + content:'不能使用$的牌', + }, + marktext:'敌', + }, + residi3:{ + audio:'residi', + trigger:{global:'phaseUseEnd'}, + forced:true, + filter:function(event,player){ + if(!event.residi||!event.residi.contains(player)) return false; + var sha=(player.canUse('sha',event.player,false)),trick=true; + event.player.getHistory('useCard',function(evt){ + if(evt.getParent('phaseUse')!=event) return false; + if(sha&&evt.card.name=='sha') sha=false; + if(trick&&get.type2(evt.card,false)=='trick') trick=false; + }); + return sha||trick; + }, + content:function(){ + var sha=(player.canUse('sha',trigger.player,false)),trick=true; + trigger.player.getHistory('useCard',function(evt){ + if(evt.getParent('phaseUse')!=trigger) return false; + if(sha&&evt.card.name=='sha') sha=false; + if(trick&&get.type2(evt.card,false)=='trick') trick=false; + }); + if(sha) player.useCard({name:'sha',isCard:true},trigger.player); + if(trick) player.draw(2); + }, + }, + rehuaiyi:{ + audio:2, + enable:'phaseUse', + usable:2, + delay:false, + filter:function(event,player){ + return player.countCards('h')>0&&(!player.getStat('skill').rehuaiyi||player.hasSkill('rehuaiyi2')); + }, + content:function(){ + 'step 0' + player.showHandcards(); + if(get.color(player.getCards('h'))!='none'){ + player.draw(); + player.addTempSkill('rehuaiyi2','phaseUseEnd'); + event.finish(); + } + 'step 1' + player.chooseControl('红色','黑色').set('ai',function(){ + var player=_status.event.player; + if(player.countCards('h',{color:'red'})==1&& + player.countCards('h',{color:'black'})>1) return '红色'; + return '黑色'; + }); + 'step 2' + event.control=result.control; + var cards; + if(event.control=='红色'){ + cards=player.getCards('h',{color:'red'}); + } + else{ + cards=player.getCards('h',{color:'black'}); + } + player.discard(cards); + event.num=cards.length; + 'step 3' + player.chooseTarget('请选择至多'+get.cnNumber(event.num)+'名有牌的其他角色,获得这些角色的各一张牌。',[1,event.num],function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target)+0.5; + }); + 'step 4' + if(result.bool&&result.targets){ + player.line(result.targets,'green'); + event.targets=result.targets; + event.targets.sort(lib.sort.seat); + event.gained=0; + } + else{ + event.finish(); + } + 'step 5' + if(player.isAlive()&&event.targets.length){ + player.gainPlayerCard(event.targets.shift(),'he',true); + } + else event.finish(); + 'step 6' + if(result.bool){ + event.gained+=result.cards.length; + } + if(event.targets.length) event.goto(5); + 'step 7' + if(event.gained>1) player.loseHp(); + }, + ai:{ + order:function(item,player){ + if(player.countCards('h',{color:'red'})==0) return 10; + if(player.countCards('h',{color:'black'})==0) return 10; + return 1; + }, + result:{ + player:1 + } + } + }, + rehuaiyi2:{}, rezhuikong:{ audio:2, trigger:{global:'phaseZhunbeiBegin'}, @@ -766,8 +957,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inherit:'tuntian', filter:function(event,player){ if(player==_status.currentPhase){ - return event.name=='lose'&&event.type=='discard'&&event.getParent('phaseDiscard').player==player&& - event.cards2.filter(function(card){ + return event.name=='lose'&&event.type=='discard'&&event.cards2.filter(function(card){ return get.name(card,event.hs.contains(card)?player:false)=='sha'; }).length>0; }; @@ -8453,7 +8643,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ relieren_info:'当你使用【杀】指定目标后,你可以和目标角色进行拼点。若你赢,你获得其一张牌。若你没赢,你获得对方的拼点牌,其获得你的拼点牌。', rezaiqi:'再起', rezaiqi_info:'弃牌阶段结束时,你可以令至多X名角色选择一项:1.摸一张牌,2.令你回复1点体力(X为本回合进入弃牌堆的红色牌数)', - re_dengai:'界邓艾', re_jiangwei:'界姜维', re_caiwenji:'界蔡文姬', re_baosanniang:'手杀鲍三娘', @@ -8568,7 +8757,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ guanzhang:'界关兴张苞', rezishou:'自守', rezishou2:'自守', - //rezishou_info:'摸牌阶段,你可以多摸X张牌。若如此做,本回合你对其他角色造成伤害时,防止此伤害,且结束阶段,若你本回合没有使用牌指定其他角色为目标,则你可以将场上的一张装备牌移动到自己的装备区。(X为场上势力数)', rezishou_info:'摸牌阶段,你可以多摸X张牌。若如此做,本回合你对其他角色造成伤害时,防止此伤害。', rezongshi:'宗室', rezongshi_info:'锁定技,你的手牌上限+X(X为势力数)。准备阶段,若你的手牌数大于体力值,则你本回合内使用【杀】无次数限制。', @@ -8613,7 +8801,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ol_dengai:'界邓艾', oltuntian:'屯田', olzaoxian:'凿险', - oltuntian_info:'当你于回合外失去牌后,或于弃牌阶段因弃置而失去【杀】后,你可以进行判定。若判定结果不为♥,则你将此牌置于你的武将牌上,称之为【田】。锁定技,你计算与其他角色的距离时-X(X为你武将牌上【田】的数目)', + oltuntian_info:'当你于回合外失去牌后,或于回合内因弃置而失去【杀】后,你可以进行判定。若判定结果不为♥,则你将此牌置于你的武将牌上,称之为【田】。锁定技,你计算与其他角色的距离时-X(X为你武将牌上【田】的数目)', olzaoxian_info:'觉醒技,准备阶段,若你武将牌上【田】的数量达到3张或更多,则你减1点体力上限,并获得技能〖急袭〗。你于当前回合结束后进行一个额外的回合。', re_sunxiu:'界孙休', re_caoxiu:'界曹休', @@ -8628,9 +8816,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ decadezishou_info:'摸牌阶段,你可以多摸X张牌,然后本回合你对其他角色造成伤害时,防止此伤害。结束阶段,若你本回合没有使用牌指定其他角色为目标,你可以弃置任意张花色不同的手牌,然后摸等量的牌。', decadezongshi:'宗室', decadezongshi_info:'锁定技,你的手牌上限+X(X为现存势力数)。你的回合外,若你的手牌数大于等于手牌上限,则当你成为延时类锦囊牌或无颜色的牌的目标后,你令此牌对你无效。', - re_caozhen:'界曹真', - residi:'司敌', - residi_info:'结束阶段,你可以摸一张牌,并将一张牌置于你的武将牌上,称为“司”。其他角色的出牌阶段开始时,你可以移去任意张“司”。若如此做,其本阶段内不能使用或打出与这些“司”颜色相同的牌,且此阶段结束时,若X:不大于2,你视为对其使用【杀】;不大于1,你摸两张牌;不大于0,你将牌堆顶的一张牌置于你的武将牌上,称为“司”。(X为该角色本阶段内使用过牌的类型数)', re_fazheng:'界法正', reenyuan:'恩怨', reenyuan1:'恩怨', @@ -8643,6 +8828,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ reqiuyuan_info:'当你成为【杀】的目标时,你可选择另一名其他角色。除非该角色交给你一张除【杀】以外的基本牌,否则其也成为此【杀】的目标且该角色不能响应此【杀】。', rezhuikong:'惴恐', rezhuikong_info:'其他角色的回合开始时,若你已受伤,你可与其拼点:若你赢,本回合该角色只能对自己使用牌;若你没赢,你获得其拼点的牌,然后其视为对你使用一张【杀】。', + re_gongsunyuan:'界公孙渊', + rehuaiyi:'怀异', + tehuaiyi_info:'出牌阶段限一次,你可以展示所有手牌,若这些牌的颜色:全部相同,你摸一张牌,并将此技能于本阶段内改为“限两次”,然后终止此技能的结算流程;不全部相同,则你选择一种颜色并弃置该颜色的所有手牌,然后你可以获得至多X名角色的各一张牌(X为你以此法弃置的手牌数)。若你以此法获得的牌不少于两张,则你失去1点体力。', + re_caozhen:'界曹真', + residi:'司敌', + residi_push:'司敌', + residi2:'司敌', + residi3:'司敌', + residi_info:'结束阶段,你可以将一张非基本牌置于武将牌上,称为“司”。其他角色的出牌阶段开始时,你可以移去一张“司”。若如此做,其本阶段内不能使用或打出与“司”颜色相同的牌。此阶段结束时,若其于此阶段内未使用过:【杀】,你视为对其使用一张【杀】。锦囊牌,你摸两张牌。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/shenhua.js b/character/shenhua.js index 0d3de6bfc..45fecbef6 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1661,7 +1661,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ if(event.card.name!='sha') return false; - if(player.hasSkill('nzry_lijun2')) return false; + //if(player.hasSkill('nzry_lijun2')) return false; if(player.group!='wu') return false; if(_status.currentPhase!=player) return false; if(!game.hasPlayer(function(target){ @@ -1688,7 +1688,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(!result.bool) event.finish(); else{ - player.addTempSkill('nzry_lijun2','phaseUseEnd'); + //player.addTempSkill('nzry_lijun2','phaseUseEnd'); var zhu=result.targets[0]; player.line(zhu,'green'); zhu.logSkill('nzry_lijun'); @@ -7394,7 +7394,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_zhizheng_info":"锁定技,你的出牌阶段内,攻击范围内不包含你的其他角色不能成为你使用牌的目标。出牌阶段结束时,若你本阶段内使用的牌数小于这些角色的数量,则你弃置其中一名角色的一张牌。", "nzry_lijun1":"立军", "nzry_lijun":"立军", - "nzry_lijun_info":"主公技,其他吴势力角色的回合限一次,其使用的【杀】结算后,可以将此【杀】交给你,然后你可以令其摸一张牌", + "nzry_lijun_info":"主公技,其他吴势力角色于回合内使用的【杀】结算后,可以将此【杀】对应的实体牌交给你,然后你可以令其摸一张牌。", "nzry_huaiju":"怀橘", "nzry_huaiju_info":"锁定技,游戏开始时,你获得3个“橘”标记。(有“橘”的角色受到伤害时,防止此伤害,然后移去一个“橘”;有“橘”的角色摸牌阶段额外摸一张牌)", "tachibana_effect":"怀橘", diff --git a/character/sp.js b/character/sp.js index 5bb7c9380..61cdc92ee 100755 --- a/character/sp.js +++ b/character/sp.js @@ -9632,16 +9632,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ player.loseHp(player.countMark('ranshang')); + if(player.countMark('ranshang')>=2){ + player.loseMaxHp(2); + player.draw(2); + } } }, hanyong:{ trigger:{player:'useCard'}, filter:function(event,player){ - return game.roundNumber>player.hp&&event.card&& - (event.card.name=='nanman'||event.card.name=='wanjian'); + return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'||(event.card.name=='sha'&&get.color(event.card)=='black')); }, content:function(){ trigger.baseDamage++; + if(game.roundNumber<=player.hp) player.addMark('ranshang',1); }, }, hanyong3:{ @@ -15745,9 +15749,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mozhi_info:'结束阶段开始时,你可以将一张手牌当作你本回合出牌阶段内使用的第一张基本或普通锦囊牌使用。然后,你可以将一张手牌当做你本回合出牌阶段内使用的第二张基本或普通锦囊牌使用。(你不能通过此技能使用【酒】)', ranshang:'燃殇', ranshang2:'燃殇', - ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力(X为“燃”标记的数量)', + ranshang_info:'锁定技,当你受到1点火焰伤害后,你获得1枚“燃”标记;结束阶段开始时,你失去X点体力。若X不小于2,则你减2点体力上限并摸两张牌。(X为“燃”标记的数量)', hanyong:'悍勇', - hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】时,若你的体力值小于游戏轮数,你可以令此牌的伤害值基数+1。', + hanyong_info:'当你使用【南蛮入侵】或【万箭齐发】或黑色【杀】时,若你的体力值小于游戏轮数,你可以令此牌的伤害值基数+1。然后若你的体力值不小于游戏轮数,则你获得一枚“燃”标记。', yicong:'义从', yongsi:'庸肆', diff --git a/character/sp2.js b/character/sp2.js index fd43359cf..55592bf8b 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -4,6 +4,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'sp2', connect:true, character:{ + jin_yanghuiyu:['female','jin',3,['huirong','ciwei','caiyuan'],['hiddenSkill','unseen']], shibao:['male','jin',4,['shibao_skill'],['unseen']], jin_zhangchunhua:['female','jin',3,['huishi','qingleng','xuanmu'],['hiddenSkill']], jin_simayi:['male','jin',3,['buchen','smyyingshi','xiongzhi','quanbian'],['hiddenSkill']], @@ -13,6 +14,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jin_simashi:['male','jin','3/4',['taoyin','yimie','ruilve','tairan'],['hiddenSkill','zhu']], zhanghuyuechen:['male','jin',4,['xijue']], duyu:['male','jin',4,['sanchen','zhaotao']], + re_chunyuqiong:['male','qun',4,['recangchu','reliangying','reshishou']], guozhao:['female','wei',3,['pianchong','zunwei']], hanfu:['male','qun',4,['hfjieying','weipo']], re_quyi:['male','qun',4,['refuqi','jiaozi']], @@ -81,17 +83,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mini_jiangwei:['male','shu',4,['minitiaoxin','zhiji']], mini_diaochan:['female','qun',3,['minilijian','rebiyue']], mini_zhangchunhua:['female','wei',3,['jueqing','minishangshi']], + ns_caoanmin:['male','wei',4,['nskuishe']], }, characterSort:{ sp2:{ - sp_yingbian:['jin_zhangchunhua','jin_simayi','jin_wangyuanji','jin_simazhao','jin_xiahouhui','jin_simashi','duyu','zhanghuyuechen','shibao'], + sp_yingbian:['jin_zhangchunhua','jin_simayi','jin_wangyuanji','jin_simazhao','jin_xiahouhui','jin_yanghuiyu','jin_simashi','duyu','zhanghuyuechen','shibao'], sp_whlw:["xurong","lijue","zhangji","fanchou","guosi"], sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"], sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"], sp_zizouqi:["mangyachang","xugong","zhangchangpu"], sp_sbfm:["lisu","xinpi","zhangwen"], sp_shengun:["puyuan","guanlu","gexuan","xushao"], - sp_baigei:['re_panfeng','xingdaorong','caoxing'], + sp_baigei:['re_panfeng','xingdaorong','caoxing','re_chunyuqiong'], sp_guandu:["sp_zhanghe","xunchen","sp_shenpei","gaolan","lvkuanglvxiang","chunyuqiong","sp_xuyou"], sp_huangjin:['liuhong','zhujun','re_hejin','re_hansui','liubian'], sp_fadong:['ol_dingyuan','wangrong','re_quyi','hanfu'], @@ -99,10 +102,312 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_mini:["mini_sunquan","mini_zuoci","mini_jiangwei","mini_diaochan","mini_zhangchunhua"], sp_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"], sp_yongjian:["ns_chendao","yj_caoang"], - sp_s:["ns_jiaxu"], + sp_s:["ns_jiaxu","ns_caoanmin"], } }, skill:{ + recangchu:{ + audio:2, + trigger:{ + global:'gameStart', + player:'enterGame', + }, + marktext:'粮', + forced:true, + filter:function(event,player){ + return player.countMark('recangchu')game.countPlayer(); + return player!=_status.currentPhase&&player.countMark('recangchu')0; + })); + if(num) return get.cnNumber(num); + return 'cancel2'; + }); + 'step 1' + if(result.control=='cancel2'){event.finish();return;} + player.logSkill('reliangying'); + var num=event.map[result.control]||1; + event.num=num; + player.draw(num); + 'step 2' + var num=Math.min(event.num,player.countCards('he'),game.countPlayer(function(target){ + return target!=player; + })); + if(num){ + player.chooseCardTarget({ + prompt:'将'+get.cnNumber(num)+'张牌交给其他角色', + prompt2:'操作提示:先按顺序选中所有要给出的牌,然后再按顺序选择等量的目标角色', + selectCard:num, + selectTarget:num, + filterTarget:function(card,player,target){ + return target!=player; + }, + complexSelect:true, + position:'he', + ai1:function(card){ + if(card.name=='shan') return 1; + return Math.random(); + }, + ai2:function(target){ + return get.attitude(_status.event.player,target)+(5-Math.max(4,target.countCards('h'))); + }, + forced:true, + }); + } + else event.finish(); + 'step 3' + if(result.bool){ + while(result.cards.length){ + var target=result.targets.shift(); + var card=result.cards.shift(); + target.gain(card,player); + player.$giveAuto(card,target); + } + event.next.sort(function(a,b){ + return lib.sort.seat(a.player,b.player); + }); + } + else event.finish(); + 'step 4' + game.delay(); + }, + }, + reshishou:{ + audio:2, + trigger:{player:['useCard','damageEnd']}, + forced:true, + filter:function(event,player){ + if(!player.countMark('recangchu')) return false; + return (event.name=='damage')?(event.nature=='fire'):(event.card&&event.card.name=='jiu'); + }, + content:function(){ + player.removeMark('recangchu',1); + }, + group:'reshishou2', + }, + reshishou2:{ + audio:'reshishou', + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + filter:function(event,player){ + return !player.countMark('recangchu'); + }, + content:function(){ + player.loseHp(); + }, + }, + nskuishe:{ + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + return target!=player&&target.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.choosePlayerCard(target,'he',true).set('ai',get.buttonValue); + 'step 1' + if(result.bool){ + var card=result.cards[0]; + event.card=card; + player.chooseTarget('将'+get.translation(target)+'的'+(get.position(card)=='h'&&!player.hasSkillTag('viewHandcard',null,target,true)?'手牌':get.translation(card))+'交给一名角色',true,function(target){ + return target!=_status.event.getParent().target; + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + if(_status.event.du){ + if(target.hasSkillTag('nodu')) return 0; + return -att; + } + if(target.hasSkillTag('nogain')) return 0.1; + if(att>0){ + return att+Math.max(0,5-target.countCards('h')); + } + return att; + }).set('du',event.card.name=='du'); + } + else event.finish(); + 'step 2' + if(result.bool){ + var target2=result.targets[0]; + target.line(target2,'green'); + target2.gain(target,card,'giveAuto','bySelf'); + } + else event.finish(); + 'step 3' + target.chooseToUse(function(card,player,event){ + if(get.name(card)!='sha') return false; + return lib.filter.filterCard.apply(this,arguments); + },'是否对'+get.translation(player)+'使用一张杀?').set('targetRequired',true).set('complexSelect',true).set('filterTarget',function(card,player,target){ + if(target!=_status.event.sourcex&&!ui.selected.targets.contains(_status.event.sourcex)) return false; + return lib.filter.filterTarget.apply(this,arguments); + }).set('sourcex',player); + }, + ai:{ + order:6, + expose:0.2, + result:{ + target:-1.5, + player:function(player,target){ + if(!target.canUse('sha',player)) return 0; + if(target.countCards('h')==1) return 0.1; + if(player.hasShan()) return -0.5; + if(player.hp<=1) return -2; + if(player.hp<=2) return -1; + return 0; + } + }, + }, + }, + huirong:{ + trigger:{player:'showCharacterAfter'}, + forced:true, + filter:function(event,player){ + return event.toShow&&event.toShow.contains('jin_yanghuiyu')&&game.hasPlayer(function(target){ + var num=target.countCards('h'); + return num>target.hp||Math.min(5,target.hp); + }); + }, + content:function(){ + 'step 0' + player.chooseTarget('请选择【慧容】的目标','令一名角色将手牌数摸至/弃置至与其体力值相同(至多摸至五张)',true,function(card,player,target){ + var num=target.countCards('h'); + return num>target.hp||Math.min(5,target.hp); + }).set('ai',function(target){ + var att=get.attitude(_status.event.player,target); + var num=target.countCards('h'); + if(num>target.hp) return -att*(num-target.hp); + return att*Math.max(0,Math.min(5,target.hp)-target.countCards('h')); + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target,'green'); + if(target.countCards('h')1||!game.hasPlayer(function(current){ + return current!=player&&(get.realAttitude||get.attitude)(current,player)<0&¤t.hasSkill('ciwei')&¤t.countCards('he')>0; + })) return; + if(player.getHistory('useCard').length==0){ + if(['basic','trick'].contains(get.type(card))) return num+10; + return; + } + if(!['basic','trick'].contains(get.type(card))) return num+10; + if(!player._ciwei_temp){ + player._ciwei_temp=true; + num/=Math.max(1,player.getUseValue(card)); + } + delete player._ciwei_temp; + return num; + }, + }, + }, + caiyuan:{ + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + return !player.hasSkill('caiyuan_mark')&&player.phaseNumber>1; + }, + content:function(){ + player.draw(2); + }, + group:'caiyuan_count', + subSkill:{ + mark:{ + //mark:true, + marktext:'媛', + charlotte:true, + intro:{content:'已扣减过体力'}, + }, + count:{ + trigger:{player:'changeHp'}, + silent:true, + charlotte:true, + filter:function(event,player){ + return event.num<0&&!player.hasSkill('caiyuan_mark'); + }, + content:function(){ + player.addTempSkill('caiyuan_mark',{player:'phaseAfter'}); + if(player.hasSkill('caiyuan')) player.markSkill('caiyuan_mark'); + }, + }, + }, + }, shibao_skill:{ locked:false, onremove:function(player){ @@ -870,13 +1175,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' player.showCards(result.cards); var type=get.type2(result.cards[0],target); - var cards=target.getCards('h',function(card){ - return get.type2(card,target)!=type; - }); - if(cards.length){ - target.addTempSkill('choufa2',{player:'phaseAfter'}); - target.addGaintag(cards,'choufa'); - } + target.storage.choufa2=type; + target.addTempSkill('choufa2',{player:'phaseAfter'}); }, ai:{ order:9, @@ -888,16 +1188,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, choufa2:{ - onremove:function(player){ - player.removeGaintag('choufa'); - }, + onremove:true, charlotte:true, + mark:true, + intro:{content:'手牌中的非$牌均视为杀'}, mod:{ cardname:function(card,player){ - if(card.hasGaintag('choufa')) return 'sha'; + if(get.type2(card,false)!=player.storage.choufa2) return 'sha'; }, cardnature:function(card,player){ - if(card.hasGaintag('choufa')) return false; + if(get.type2(card,false)!=player.storage.choufa2) return false; }, }, }, @@ -4314,7 +4614,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qingjiao:{ trigger:{player:'phaseUseBegin'}, filter:function(event,player){ - return player.countCards('h')&&(ui.cardPile.hasChildNodes()||ui.discardPile.hasChildNodes()); + return (ui.cardPile.hasChildNodes()||ui.discardPile.hasChildNodes()); }, //check:function(event,player){ // return player.countCards('h')<=player.hp; @@ -8535,6 +8835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xiahouhui:'夏侯徽(211年-234年),字媛容,沛国谯县(今安徽亳州)人,司马师第一任妻子。征南大将军夏侯尚之女,母德阳乡主为大司马曹真之妹。夏侯徽与司马师之间,生有五个女儿。夏侯徽很有见识器度,每当司马师有什么想法时,都由她从旁策划协助。当时司马师之父司马懿位居上将重位,而他的儿子们都有雄才大略。夏侯徽深知司马师绝非曹魏忠臣,而司马师对出身曹魏家族的夏侯徽也非常顾忌。青龙二年(234年),正逢“大疫”、“大病”之年,夏侯徽被司马师毒杀,时年二十四岁,死后葬于峻平陵。西晋建国后,追谥夏侯徽为景怀皇后。', guozhao:'郭照,电视剧《军师联盟》中的女主角之一,由唐艺昕饰演。原型为文德皇后郭氏(字女王),魏国皇后,张春华的义妹,深爱曹丕,替甄宓抚育曹叡,因甄宓之死被曹叡记恨,曹丕死后,成为皇太后,被曹叡逼上死路。自尽身亡。', shibao:'石苞(?~273年),字仲容,渤海南皮(今河北省南皮县)人。三国时曹魏至西晋重要将领,西晋开国功臣。西晋建立后,历任大司马、侍中、司徒等职,封乐陵郡公,卒后谥号为“武”。', + caoanmin:'曹安民(?-197年),沛国谯县(今安徽亳州)人,字安民。东汉时期人物,曹德之子,曹操之侄,曹昂的堂兄弟,曹丕的堂兄,死于宛城之战。按曹丕《典论》记载的“亡兄孝廉子脩、从兄安民遇害。”等情况来看,安民应该是曹操侄子错不了,曹丕是他们属于兄弟关系肯定不会弄错。另外从典论的记载来看安民是和子脩并提的,子脩是曹昂的字,安民则肯定也是字不是名,至于三国志中记载则应取自曹丕之《典论》但陈寿又不知曹安民其名,故写为“长子昂、弟子安民”。', }, characterTitle:{ wulan:'#b对决限定武将', @@ -8597,6 +8898,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ quyi:['quyi','re_quyi'], hansui:['xin_hansui','re_hansui'], jin_simashi:['jin_simashi','simashi'], + jin_yanghuiyu:['jin_yanghuiyu','yanghuiyu'], + chunyuqiong:['chunyuqiong','re_chunyuqiong'], }, translate:{ lijue:"李傕", @@ -8915,7 +9218,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ panshi:'叛弑', panshi_info:'锁定技,准备阶段,你交给有“慈孝”技能的角色一张手牌;当你于出牌阶段因使用【杀】对其他角色造成伤害时,若其拥有技能“慈孝”,则此伤害+1,且你结束出牌阶段。', xianshuai:'先率', - xianshuai_info:'锁定技,有角色造成伤害后,若此伤害是本轮第一次造成伤害:你摸一张牌;若伤害来源是你,则你对受伤角再造成1点伤害。', + xianshuai_info:'锁定技,有角色造成伤害后,若此伤害是本轮第一次造成伤害:你摸一张牌;若伤害来源是你,则你对受伤角色再造成1点伤害。', luyusheng:'陆郁生', wangrong:'王荣', minsi:'敏思', @@ -9033,7 +9336,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tuishi_info:'隐匿技,你于其他角色A的回合内登场时,可于此回合结束时选择其攻击范围内的一名角色B。A选择一项:①对B使用一张【杀】。②你对A造成1点伤害。', choufa:'筹伐', choufa2:'筹伐', - choufa_info:'出牌阶段限一次,你可展示一名其他角色的一张手牌。你令其手牌中原类型与此牌不同的手牌的牌名均视为【杀】且均视为无属性,直到其回合结束。', + choufa_info:'出牌阶段限一次,你可展示一名其他角色的一张手牌并记录其类型A。你令其原类型不为A的手牌的牌名均视为【杀】且均视为无属性,直到其回合结束。', zhaoran:'昭然', zhaoran2:'昭然', zhaoran_info:'出牌阶段开始时,你可令你的手牌对其他角色可见直到出牌阶段结束。若如此做,当你于此阶段内失去一张手牌后,若你的手牌里没有与此牌花色相同的牌且你本回合内未因该花色的牌触发过此效果,则你选择一项:①摸一张牌。②弃置一名其他角色的一张牌。', @@ -9079,6 +9382,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shibao:'石苞', shibao_skill:'石苞1', shibao_skill_info:'出牌阶段,你使用本轮获得的牌时(以此技能获得的牌除外),根据类型执行以下效果:1.基本牌,不计入次数且无距离限制;2.锦囊牌,此牌目标+1或-1;3.装备牌,摸1张牌。', + jin_yanghuiyu:'晋羊徽瑜', + jin_yanghuiyu_ab:'羊徽瑜', + huirong:'慧容', + huirong_info:'隐匿技,锁定技。当你登场后,你令一名角色将手牌数摸至/弃至与体力值相同(至多摸至五张)。', + ciwei:'慈威', + ciwei_info:'一名角色于其回合内使用第二张牌时,若此牌为基本牌或普通锦囊牌,则你可以弃置一张牌,取消此牌的所有目标。', + caiyuan:'才媛', + caiyuan_info:'锁定技,当你扣减体力时,你获得一枚“才媛”标记直到你的下回合结束。结束阶段开始时,若你没有“才媛”标记且此回合不是你的第一个回合 ,则你摸两张牌。', + ns_caoanmin:'曹安民', + nskuishe:'窥舍', + nskuishe_info:'出牌阶段限一次,你可以选择一名其他角色A的一张牌,并将此牌交给不为A的一名角色。然后A可以对你使用一张【杀】。', + re_chunyuqiong:'淳于琼', + recangchu:'仓储', + recangchu2:'仓储', + recangchu_info:'锁定技,游戏开始时,你获得3个“粮”。你的手牌上限+X(X为“粮”数)。当你于回合外获得牌时,你获得一个“粮”。(你的“粮”数不能超过存活角色数)', + reliangying:'粮营', + reliangying_info:'弃牌阶段开始时,你可以摸至多X张牌,然后交给等量的角色各一张牌。(X为你的“粮”数)', + reshishou:'失守', + reshishou2:'失守', + reshishou_info:'锁定技,当你使用【酒】时或受到火焰伤害后,你移去一个“粮”。准备阶段,若你没有“粮”,你失去1点体力。', sp_yingbian:'文德武备', sp_whlw:"文和乱武", diff --git a/character/yijiang.js b/character/yijiang.js index d99a39b27..1b01c33ef 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -12082,7 +12082,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fuhuanghou:['re_fuhuanghou','xin_fuhuanghou','fuhuanghou','old_fuhuanghou'], chenqun:['chenqun','old_chenqun'], hanhaoshihuan:['re_hanhaoshihuan','hanhaoshihuan'], - caozhen:['caozhen','old_caozhen'], + caozhen:['re_caozhen','caozhen','old_caozhen'], wuyi:['re_wuyi','wuyi'], sunluban:['re_sunluban','sunluban'], zhuhuan:['zhuhuan','old_zhuhuan'], @@ -12096,6 +12096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhangrang:['zhangrang','ol_zhangrang','junk_zhangrang'], jikang:['re_jikang','jikang'], xinxianying:['re_xinxianying','xinxianying','ol_xinxianying','sp_xinxianying'], + gongsunyuan:['re_gongsunyuan','gongsunyuan'], }, translate:{ old_huaxiong:'华雄', diff --git a/game/asset.js b/game/asset.js index abb3aa66b..3f1e47507 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.108.5', + 'v1.9.109', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -680,6 +680,7 @@ window.noname_asset_list=[ 'audio/die/huaxin.mp3', 'audio/die/guozhao.mp3', 'audio/die/wolongfengchu.mp3', + 'audio/die/ol_dengai.mp3', 'audio/skill/decadezishou1.mp3', 'audio/skill/decadezishou2.mp3', @@ -2982,6 +2983,12 @@ window.noname_asset_list=[ 'audio/skill/yingyang2.mp3', 'audio/skill/youlong1.mp3', 'audio/skill/youlong2.mp3', + 'audio/skill/jixi_ol_dengai1.mp3', + 'audio/skill/jixi_ol_dengai2.mp3', + 'audio/skill/oltuntian1.mp3', + 'audio/skill/oltuntian2.mp3', + 'audio/skill/olzaoxian1.mp3', + 'audio/skill/olzaoxian2.mp3', 'audio/voice/male/0.mp3', 'audio/voice/male/1.mp3', @@ -3449,6 +3456,11 @@ window.noname_asset_list=[ 'image/card/wutiesuolian.png', 'image/card/wuxinghelingshan.png', 'image/card/zhujinqiyuan.png', + 'image/card/diqi.png', + 'image/card/gongshoujianbei.png', + 'image/card/jintuiziru.png', + 'image/card/jiwangkailai.png', + 'image/card/zhadan.png', 'image/character/shenpei.jpg', 'image/character/re_menghuo.jpg', @@ -3747,6 +3759,12 @@ window.noname_asset_list=[ 'image/character/xin_guohuai.jpg', 'image/character/xin_panzhangmazhong.jpg', 'image/character/mini_lvmeng.jpg', + 'image/character/boss_zhaoyun.jpg', + 'image/character/chunyuqiong.jpg', + 'image/character/ns_caoanmin.jpg', + 'image/character/ol_dengai.jpg', + 'image/character/re_caozhen.jpg', + 'image/character/re_gongsunyuan.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', @@ -4854,7 +4872,6 @@ window.noname_asset_list=[ 'image/mode/boss/character/boss_yuji.jpg', 'image/mode/boss/character/boss_zhangchunhua.jpg', 'image/mode/boss/character/boss_zhangjiao.jpg', - 'image/mode/boss/character/boss_zhaoyun.jpg', 'image/mode/boss/character/boss_zhenji.jpg', 'image/mode/boss/character/boss_zhouyu.jpg', 'image/mode/boss/character/boss_zhuanxu.jpg', diff --git a/game/game.js b/game/game.js index 7aa3151f8..95b5c4b62 100644 --- a/game/game.js +++ b/game/game.js @@ -4299,6 +4299,7 @@ else{ map.double_hp.hide(); } + map.continue_game.show(); } else if(config.identity_mode=='purple'){ map.player_number.hide(); @@ -4321,8 +4322,10 @@ map.change_choice.hide(); map.free_choose.hide(); map.change_identity.hide(); + map.continue_game.hide(); } else{ + map.continue_game.show(); map.player_number.show(); map.enhance_zhu.show(); map.auto_identity.show(); @@ -4548,7 +4551,7 @@ onclick:function(bool){ game.saveConfig('continue_game',bool,this._link.config.mode); if(get.config('continue_game')){ - if(!ui.continue_game&&_status.over&&!_status.brawl){ + if(!ui.continue_game&&_status.over&&!_status.brawl&&!game.no_continue_game){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } } @@ -4987,7 +4990,7 @@ onclick:function(bool){ game.saveConfig('continue_game',bool,this._link.config.mode); if(get.config('continue_game')){ - if(!ui.continue_game&&_status.over&&!_status.brawl){ + if(!ui.continue_game&&_status.over&&!_status.brawl&&!game.no_continue_game){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } } @@ -5546,7 +5549,13 @@ name:'斗地主', connect:{ update:function(config,map){ - if(config.connect_doudizhu_mode=='kaihei'||config.connect_doudizhu_mode=='huanle'){ + if(config.connect_doudizhu_mode=='online'){ + map.connect_change_card.hide(); + } + else{ + map.connect_change_card.show(); + } + if(config.connect_doudizhu_mode=='kaihei'||config.connect_doudizhu_mode=='huanle'||config.connect_doudizhu_mode=='online'){ map.connect_double_character.hide(); } else{ @@ -5560,6 +5569,7 @@ normal:'休闲', kaihei:'开黑', huanle:'欢乐', + online:'智斗', }, restart:true, frequent:true, @@ -5579,11 +5589,37 @@ }, config:{ update:function(config,map){ - if(config.doudizhu_mode=='kaihei'||config.doudizhu_mode=='huanle'){ + if(config.doudizhu_mode=='online'){ + map.change_card.hide(); + map.edit_character.show(); + map.reset_character.show(); + } + else{ + map.change_card.show(); + map.edit_character.hide(); + map.reset_character.hide(); + } + if(config.doudizhu_mode=='kaihei'||config.doudizhu_mode=='huanle'||config.doudizhu_mode=='online'){ map.double_character.hide(); + map.free_choose.hide(); + map.change_identity.hide(); + map.change_choice.hide(); + map.continue_game.hide(); + map.dierestart.hide(); + map.choice_zhu.hide(); + map.choice_fan.hide(); + map.revive.hide(); } else{ map.double_character.show(); + map.free_choose.show(); + map.change_identity.show(); + map.change_choice.show(); + map.continue_game.show(); + map.dierestart.show(); + map.choice_zhu.show(); + map.choice_fan.show(); + map.revive.show(); } if(config.double_character&&config.doudizhu_mode!='kaihei'&&config.doudizhu_mode!='huanle'){ map.double_hp.show(); @@ -5599,6 +5635,7 @@ normal:'休闲', kaihei:'开黑', huanle:'欢乐', + online:'智斗', }, restart:true, frequent:true, @@ -5679,7 +5716,7 @@ onclick:function(bool){ game.saveConfig('continue_game',bool,this._link.config.mode); if(get.config('continue_game')){ - if(!ui.continue_game&&_status.over&&!_status.brawl){ + if(!ui.continue_game&&_status.over&&!_status.brawl&&!game.no_continue_game){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } } @@ -5748,6 +5785,124 @@ '10':'十', }, }, + edit_character:{ + name:'编辑将池', + clear:true, + onclick:function(){ + if(get.mode()!='doudizhu'){ + alert('请进入斗地主模式,然后再编辑将池'); + return; + } + var container=ui.create.div('.popup-container.editor'); + var editorpage=ui.create.div(container); + var discardConfig=ui.create.div('.editbutton','取消',editorpage,function(){ + ui.window.classList.remove('shortcutpaused'); + ui.window.classList.remove('systempaused'); + container.delete(null); + delete window.saveNonameInput; + }); + var node=container; + var map=get.config('character_online')||lib.characterOnline; + node.code='character='+get.stringify(map)+'\n/*\n 这里是智斗三国模式的武将将池。\n 您可以在这里编辑对武将将池进行编辑,然后点击“保存”按钮即可保存。\n 将池中的Key势力武将,仅同时在没有被禁用的情况下,才会出现在选将框中。\n 而非Key势力的武将,只要所在的武将包没有被隐藏,即可出现在选将框中。\n 该将池为单机模式/联机模式通用将池。在这里编辑后,即使进入联机模式,也依然会生效。\n 但联机模式本身禁用的武将(如神貂蝉)不会出现在联机模式的选将框中。\n*/'; + ui.window.classList.add('shortcutpaused'); + ui.window.classList.add('systempaused'); + var saveInput=function(){ + var code; + if(container.editor){ + code=container.editor.getValue(); + } + else if(container.textarea){ + code=container.textarea.value; + } + try{ + var character=null; + eval(code); + if(!get.is.object(character)){ + throw('err'); + } + var groups=[]; + for(var i in character){ + if(!Array.isArray(character[i])) throw('type'); + if(character[i].length>=3) groups.push(i); + } + if(groups.length<3) throw('enough'); + } + catch(e){ + if(e=='type'){ + alert('请严格按照格式填写,不要写入不为数组的数据'); + } + else if(e=='enough'){ + alert('请保证至少写入了3个势力,且每个势力至少有3个武将'); + } + else if(e=='err'){ + alert('代码格式有错误,请对比示例代码仔细检查'); + } + else{ + alert('代码语法有错误,请仔细检查('+e+')') + } + return; + } + game.saveConfig('character_online',character,'doudizhu'); + ui.window.classList.remove('shortcutpaused'); + ui.window.classList.remove('systempaused'); + container.delete(); + container.code=code; + delete window.saveNonameInput; + }; + window.saveNonameInput=saveInput; + var saveConfig=ui.create.div('.editbutton','保存',editorpage,saveInput); + var editor=ui.create.div(editorpage); + if(node.aced){ + ui.window.appendChild(node); + node.editor.setValue(node.code,1); + } + else if(lib.device=='ios'){ + ui.window.appendChild(node); + if(!node.textarea){ + var textarea=document.createElement('textarea'); + editor.appendChild(textarea); + node.textarea=textarea; + lib.setScroll(textarea); + } + node.textarea.value=node.code; + } + else{ + var aceReady=function(){ + ui.window.appendChild(node); + var mirror = window.CodeMirror(editor, { + value:node.code, + mode:"javascript", + lineWrapping:!lib.config.touchscreen&&lib.config.mousewheel, + lineNumbers:true, + indentUnit:4, + autoCloseBrackets:true, + theme:'mdn-like' + }); + lib.setScroll(editor.querySelector('.CodeMirror-scroll')); + node.aced=true; + node.editor=mirror; + } + if(!window.ace){ + lib.init.js(lib.assetURL+'game','codemirror',aceReady); + lib.init.css(lib.assetURL+'layout/default','codemirror'); + } + else{ + aceReady(); + } + }; + }, + }, + reset_character:{ + name:'重置将池', + intro:'将智斗三国模式下的将池重置为默认将池', + clear:true, + onclick:function(){ + if(confirm('该操作不可撤销!是否清除智斗三国模式的自定义将池,并将其重置为默认将池?')){ + game.saveConfig('character_online',null,'doudizhu'); + alert('将池已重置'); + } + }, + }, } }, single:{ @@ -10644,15 +10799,16 @@ if(typeof num=='function'){ numx=num(player); } - player.directgain(get.cards(numx)); - if(player.singleHp===true&&get.mode()!='guozhan'){ + if(player.getTopCards) player.directgain(player.getTopCards(numx)); + else player.directgain(get.cards(numx)); + if(player.singleHp===true&&get.mode()!='guozhan'&&(lib.config.mode!='doudizhu'||_status.mode!='online')){ player.doubleDraw(); } player=player.next; } while(player!=end); event.changeCard=get.config('change_card'); - if(_status.connectMode||lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&lib.config.mode!='doudizhu'){ + if(_status.connectMode||(lib.config.mode=='doudizhu'&&_status.mode=='online')||lib.config.mode!='identity'&&lib.config.mode!='guozhan'&&lib.config.mode!='doudizhu'){ event.changeCard='disabled'; } "step 1" @@ -14300,7 +14456,7 @@ var losecard=player.lose(cards,ui.special); if(info.visible) losecard.visible=true; if(info.loseTo) losecard.position=ui[info.loseTo]; - if(info.insert) losecard.insert=true; + if(info.insert) losecard.insert_card=true; if(losecard.position==ui.special&&info.toStorage) losecard.toStorage=true; } } @@ -14521,6 +14677,7 @@ var cards; if(num>0){ if(event.bottom) cards=get.bottomCards(num); + else if(player.getTopCards) cards=player.getTopCards(num); else cards=get.cards(num); } else{ @@ -15448,7 +15605,7 @@ if(get.config('revive')&&lib.mode[lib.config.mode].config.revive&&!ui.revive){ ui.revive=ui.create.control('revive',ui.click.dierevive); } - if(get.config('continue_game')&&!ui.continue_game&&lib.mode[lib.config.mode].config.continue_game&&!_status.brawl){ + if(get.config('continue_game')&&!ui.continue_game&&lib.mode[lib.config.mode].config.continue_game&&!_status.brawl&&!game.no_continue_game){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } if(get.config('dierestart')&&lib.mode[lib.config.mode].config.dierestart&&!ui.restart){ @@ -15666,7 +15823,11 @@ "step 0" var judgestr=get.translation(player)+'的'+event.judgestr+'判定'; event.videoId=lib.status.videoId++; - var cardj=event.directresult||get.cards()[0]; + var cardj=event.directresult; + if(!cardj){ + if(player.getTopCards) cardj=player.getTopCards()[0]; + else cardj=get.cards()[0]; + } var nextj=game.cardsGotoOrdering(cardj); if(event.position!=ui.discardPile) nextj.noOrdering=true; player.judging.unshift(cardj); @@ -26818,6 +26979,11 @@ lib.skill[i]=mode.skill[i]; } } + if(mode.card){ + for(var i in mode.card){ + lib.card[i]=mode.card[i]; + } + } game.finishCards(); if(mode.characterPack){ for(var i in mode.characterPack){ @@ -31609,7 +31775,7 @@ }); } } - else if(!_status.connectMode&&get.config('continue_game')&&!ui.continue_game&&!_status.brawl){ + else if(!_status.connectMode&&get.config('continue_game')&&!ui.continue_game&&!_status.brawl&&!game.no_continue_game){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } } @@ -32744,6 +32910,7 @@ if(num==undefined) next.num=4; else next.num=num; next.setContent('gameDraw'); + return next; }, chooseCharacterDouble:function(){ var next=game.createEvent('chooseCharacter',false); @@ -49261,6 +49428,7 @@ switch(config.doudizhu_mode){ case 'kaihei':return '开黑斗地主'; case 'huanle':return '欢乐斗地主'; + case 'online':return '智斗三国'; default:return '休闲斗地主'; } } diff --git a/game/source.js b/game/source.js index 75d26512b..91985635e 100644 --- a/game/source.js +++ b/game/source.js @@ -160,25 +160,4 @@ window.noname_source_list=[ 'theme/style/hp/image/xinround2.png', 'theme/style/hp/image/xinround3.png', 'theme/style/hp/image/xinround4.png', - 'node_modules/ws/index.js', - 'node_modules/ws/package.json', - 'node_modules/ws/lib/BufferPool.js', - 'node_modules/ws/lib/BufferUtil.fallback.js', - 'node_modules/ws/lib/BufferUtil.js', - 'node_modules/ws/lib/ErrorCodes.js', - 'node_modules/ws/lib/Extensions.js', - 'node_modules/ws/lib/PerMessageDeflate.js', - 'node_modules/ws/lib/Receiver.hixie.js', - 'node_modules/ws/lib/Receiver.js', - 'node_modules/ws/lib/Sender.hixie.js', - 'node_modules/ws/lib/Sender.js', - 'node_modules/ws/lib/Validation.fallback.js', - 'node_modules/ws/lib/Validation.js', - 'node_modules/ws/lib/WebSocket.js', - 'node_modules/ws/lib/WebSocketServer.js', - 'node_modules/ultron/index.js', - 'node_modules/ultron/package.json', - 'node_modules/ultron/test.js', - 'node_modules/options/package.json', - 'node_modules/options/lib/options.js', ]; diff --git a/game/update.js b/game/update.js index 732ee332d..8687f905a 100644 --- a/game/update.js +++ b/game/update.js @@ -1,15 +1,17 @@ window.noname_update={ - version:'1.9.108.6', - update:'1.9.108.5.1', + version:'1.9.109', + update:'1.9.108.6', changeLog:[ - '微信小程序版神吕蒙', - 'loseAsync式多人同步失去牌', + '全新“智斗三国”模式来袭', + '界邓艾、界曹真、界公孙渊、淳于琼、兀突骨、曹安民', + '高达一号下放', + '水淹七军、应变牌堆调整', 'bug修复', ], files:[ //'card/extra.js', //'card/gujian.js', - //'card/guozhan.js', + 'card/guozhan.js', //'card/gwent.js', //'card/huanlekapai.js', //'card/mtg.js', @@ -17,16 +19,16 @@ window.noname_update={ //'card/standard.js', //'card/swd.js', //'card/yunchou.js', - //'card/yingbian.js', + 'card/yingbian.js', //'card/zhenfa.js', - //'card/zhulu.js', + 'card/zhulu.js', 'character/diy.js', 'character/extra.js', - //'character/hearth.js', + 'character/hearth.js', //'character/gujian.js', - //'character/gwent.js', + 'character/gwent.js', //'character/hearth.js', - //'character/mobile.js', + 'character/mobile.js', //'character/mtg.js', //'character/old.js', //'character/ow.js', @@ -36,7 +38,7 @@ window.noname_update={ 'character/sp.js', 'character/sp2.js', //'character/tw.js', - 'character/standard.js', + //'character/standard.js', //'character/swd.js', //'character/xianjian.js', //'character/xinghuoliaoyuan.js', @@ -46,16 +48,16 @@ window.noname_update={ //'layout/default/layout.css', //'layout/default/menu.css', //'layout/nova/layout.css', - //'mode/identity.js', - //'mode/doudizhu.js', - //'mode/guozhan.js', + 'mode/boss.js', + 'mode/brawl.js', //'mode/chess.js', - //'mode/tafang.js', + 'mode/doudizhu.js', + 'mode/guozhan.js', + 'mode/identity.js', //'mode/single.js', //'mode/stone.js', - //'mode/brawl.js', + //'mode/tafang.js', //'mode/versus.js', - //'mode/boss.js', 'game/game.js', //'game/keyWords.js', //'game/NoSleep.js', diff --git a/image/card/diqi.png b/image/card/diqi.png new file mode 100644 index 000000000..b1c321eca Binary files /dev/null and b/image/card/diqi.png differ diff --git a/image/card/gongshoujianbei.png b/image/card/gongshoujianbei.png new file mode 100644 index 000000000..062f113d2 Binary files /dev/null and b/image/card/gongshoujianbei.png differ diff --git a/image/card/jintuiziru.png b/image/card/jintuiziru.png new file mode 100644 index 000000000..61e24326c Binary files /dev/null and b/image/card/jintuiziru.png differ diff --git a/image/card/jiwangkailai.png b/image/card/jiwangkailai.png new file mode 100644 index 000000000..ec620cdcc Binary files /dev/null and b/image/card/jiwangkailai.png differ diff --git a/image/card/zhadan.png b/image/card/zhadan.png new file mode 100644 index 000000000..94c76773a Binary files /dev/null and b/image/card/zhadan.png differ diff --git a/image/character/boss_zhaoyun.jpg b/image/character/boss_zhaoyun.jpg new file mode 100644 index 000000000..68d46ae9f Binary files /dev/null and b/image/character/boss_zhaoyun.jpg differ diff --git a/image/character/chunyuqiong.jpg b/image/character/chunyuqiong.jpg index 966fd710a..3a15a16cb 100644 Binary files a/image/character/chunyuqiong.jpg and b/image/character/chunyuqiong.jpg differ diff --git a/image/character/ns_caoanmin.jpg b/image/character/ns_caoanmin.jpg new file mode 100644 index 000000000..41bad394e Binary files /dev/null and b/image/character/ns_caoanmin.jpg differ diff --git a/image/character/ol_dengai.jpg b/image/character/ol_dengai.jpg new file mode 100644 index 000000000..63deebfab Binary files /dev/null and b/image/character/ol_dengai.jpg differ diff --git a/image/character/re_caozhen.jpg b/image/character/re_caozhen.jpg new file mode 100644 index 000000000..6d97a82cb Binary files /dev/null and b/image/character/re_caozhen.jpg differ diff --git a/image/character/re_gongsunyuan.jpg b/image/character/re_gongsunyuan.jpg new file mode 100644 index 000000000..93115c00f Binary files /dev/null and b/image/character/re_gongsunyuan.jpg differ diff --git a/layout/layout.css b/layout/layout.css index f86738a0b..2e88fe949 100644 --- a/layout/layout.css +++ b/layout/layout.css @@ -1869,6 +1869,7 @@ div:not(.handcards)>.card>.info>span, } .skill { + font-size: 5px; left: 0 !important; width: 70px !important; white-space: nowrap; diff --git a/mode/boss.js b/mode/boss.js index 9283a3018..7415b4a9a 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -1025,7 +1025,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ boss_zhugeliang:['male','shen',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['shu','boss','bossallowed'],'qun'], boss_huangyueying:['female','shen',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['shu','boss','bossallowed'],'wei'], boss_pangtong:['male','shen',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['shu','boss','bossallowed'],'zhu'], - boss_zhaoyun:['male','shen',1,['boss_juejing','longhun','zhanjiang'],['shu','boss','bossallowed'],'qun'], boss_zhouyu:['male','shen',6,['huoshen','boss_honglian','boss_xianyin'],['wu','boss','bossallowed'],'zhu'], @@ -1950,9 +1949,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ loopType:2, chongzheng:12 }, - boss_zhaoyun:{ - chongzheng:12 - }, boss_zhenji:{ chongzheng:4, }, @@ -7860,50 +7856,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ boss_xuanlin_intro2:{nobracket:true}, boss_xuanlin_intro3:{nobracket:true}, boss_xuanlin_intro4:{nobracket:true}, - zhanjiang:{ - trigger:{player:'phaseZhunbeiBegin'}, - filter:function(event,player){ - var players=game.filterPlayer(); - for(var i=0;i3) num++; + if(lib.character[player.name2]&&get.infoHp(lib.character[player.name2][2])>3) num++; + } + return num; + }; + } + if(_status.mode!='online'&&_status.connectMode&&lib.configOL.change_card) game.replaceHandcards(game.players.slice(0)); game.phaseLoop(game.zhu||_status.firstAct||game.me); game.zhu.showGiveup(); }, @@ -93,7 +114,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'lijue','liuzan','wenyang','shen_lvmeng','shen_ganning', 'jiakui','wangyuanji','lingcao','miheng', 'sp_key_yuri','key_hinata','key_rin','key_kyousuke', - 'ns_chendao','old_jiakui', + 'ns_chendao','jiakui','haozhao', ], addRecord:function(bool){ if(typeof bool=='boolean'){ @@ -135,6 +156,24 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } } }, + updateRoundNumber:function(){ + if(_status.mode=='online'){ + game.broadcastAll(function(num1,num2,top,bonusNum){ + if(ui.cardPileNumber){ + var str=num1+'轮 公共牌堆: '+num2; + if(game.me&&game.me.storage.doudizhu_cardPile&&game.me.storage.doudizhu_cardPile.length) str+=(' 个人牌堆: '+game.me.storage.doudizhu_cardPile.length); + if(bonusNum) str+=('
本场叫价: '+bonusNum*100); + ui.cardPileNumber.innerHTML=str; + } + _status.pileTop=top; + },game.roundNumber,ui.cardPile.childNodes.length,ui.cardPile.firstChild,game.bonusNum); + return; + } + game.broadcastAll(function(num1,num2,top){ + if(ui.cardPileNumber) ui.cardPileNumber.innerHTML=num1+'轮 剩余牌: '+num2; + _status.pileTop=top; + },game.roundNumber,ui.cardPile.childNodes.length,ui.cardPile.firstChild); + }, getRoomInfo:function(uiintro){ uiintro.add('
双将模式:'+(lib.configOL.double_character?'开启':'关闭')); // uiintro.add('
屏蔽弱将:'+(lib.configOL.ban_weak?'开启':'关闭')); @@ -152,9 +191,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(game.me.name2){ str+='/'+get.translation(game.me.name2); } + var namex; + switch(_status.mode){ + case 'normal':namex='休闲斗地主';break; + case 'kaihei':namex='开黑斗地主';break; + case 'huanle':namex='欢乐斗地主';break; + case 'online':namex='智斗三国';break; + } var name=[ str, - '欢乐斗地主'+' - '+lib.translate[game.me.identity+'2'] + namex+' - '+lib.translate[game.me.identity+'2'] ]; return name; }, @@ -180,7 +226,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ checkResult:function(){ var me=game.me._trueMe||game.me; if(game.zhu.isAlive()){ - if(game.players.length>1) return; + if(_status.mode!='online'&&game.players.length>1) return; if(me==game.zhu){ game.over(true); } @@ -203,11 +249,118 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } else return player.identity=='fan'; }, + chooseCharacterZhidou:function(){ + var next=game.createEvent('chooseCharacter',false); + next.setContent(function(){ + "step 0" + game.no_continue_game=true; + lib.init.onfree(); + "step 1" + ui.arena.classList.add('choose-character'); + var i; + var groups=[]; + event.list=[]; + event.map={}; + var chara=(get.config('character_online')||lib.characterOnline); + for(i in chara){ + var list=chara[i]; + for(var j=0;j=3){ + groups.push(i); + event.list.addArray(list); + } + } + event.list.randomSort(); + _status.characterlist=event.list.slice(0); + event.controls=['不叫地主','一倍','两倍','三倍']; + for(var player of game.players){ + var id=player.playerid; + player._group=groups.randomRemove(1)[0]; + event.map[id]=chara[player._group].randomGets(3); + player.storage.doudizhu_cardPile=get.cards(20).sort(function(a,b){ + if(a.name!=b.name) return lib.sort.card(a.name,b.name); + else if(a.suit!=b.suit) return lib.suit.indexOf(a)-lib.suit.indexOf(b); + else return a.number-b.number; + }); + } + event.dialog=ui.create.dialog('你的选将框与底牌',[event.map[game.me.playerid],'character'],game.me.storage.doudizhu_cardPile); + event.start=game.players.randomGet(); + event.current=event.start; + game.delay(4); + "step 2" + if(event.current==game.me) event.dialog.content.firstChild.innerHTML='是否叫地主?'; + else{ + event.dialog.content.firstChild.innerHTML='请等待其他玩家叫地主'; + game.delay(2); + } + event.current.chooseControl(event.controls).set('ai',function(){ + return _status.event.getParent().controls.randomGet(); + }); + "step 3" + event.current._control=result.control; + event.current.chat(result.control); + if(result.control=='三倍'){ + game.bonusNum=3; + game.zhu=event.current; + return; + } + else if(result.control!='不叫地主'){ + event.controls.splice(1,event.controls.indexOf(result.control)); + event.tempDizhu=event.current; + if(result.control=='二倍') game.bonusNum=2; + } + event.current=event.current.next; + if(event.current==event.start&&(event.start==event.tempDizhu||event.start._control=='不叫地主')){ + game.zhu=event.tempDizhu||event.start.previous; + } + else if(event.current==event.start.next&&event.current._control){ + game.zhu=event.tempDizhu; + } + else event.goto(2); + if(event.current==event.start.previous&&!event.tempDizhu) event.controls.remove('不叫地主'); + "step 4" + game.updateRoundNumber(); + for(var player of game.players){ + player.identity=player==game.zhu?'zhu':'fan'; + player.showIdentity(); + } + event.dialog.content.firstChild.innerHTML='请选择'+get.cnNumber(game.me==game.zhu?2:1)+'张武将牌'; + game.me.chooseButton(event.dialog,true,game.me==game.zhu?2:1).set('filterButton',function(button){ + return typeof button.link=='string'; + }); + "step 5" + game.me.init(result.links[0],result.links[1]); + for(var player of game.players){ + if(player!=game.me){ + if(player==game.zhu){ + var list=event.map[player.playerid].randomGets(2); + player.init(list[0],list[1]); + } + else player.init(event.map[player.playerid].randomGet()); + } + player.markSkill('doudizhu_cardPile'); + } + game.zhu.hp=4; + game.zhu.maxHp=4; + game.zhu.update(); + for(var i=0;i=3){ + groups.push(i); + event.list.addArray(list); + } + } + event.list.randomSort(); + _status.characterlist=event.list.slice(0); + event.controls=['不叫地主','一倍','两倍','三倍']; + for(var player of game.players){ + var id=player.playerid; + player._group=groups.randomRemove(1)[0]; + event.map[id]=chara[player._group].randomGets(3); + player.storage.doudizhu_cardPile=get.cards(20).sort(function(a,b){ + if(a.name!=b.name) return lib.sort.card(a.name,b.name); + else if(a.suit!=b.suit) return lib.suit.indexOf(a)-lib.suit.indexOf(b); + else return a.number-b.number; + }); + player.markSkill('doudizhu_cardPile'); + } + event.start=game.players.randomGet(); + event.current=event.start; + + event.videoId=lib.status.videoId++; + game.broadcastAll(function(map,id){ + ui.create.dialog('你的选将框和底牌',[map[game.me.playerid],'character'],game.me.storage.doudizhu_cardPile).videoId=id; + },event.map,event.videoId); + game.delay(4); + "step 1" + game.broadcastAll(function(id,current){ + var dialog=get.idDialog(id); + if(dialog){ + if(game.me==current) dialog.content.firstChild.innerHTML='是否叫地主?'; + else dialog.content.firstChild.innerHTML='请等待其他玩家叫地主'; + } + },event.videoId,event.current); + if(event.current!=game.me&&!event.current.isOnline()) game.delay(2); + event.current.chooseControl(event.controls).set('ai',function(){ + return _status.event.getParent().controls.randomGet(); + }); + "step 2" + event.current._control=result.control; + event.current.chat(result.control); + if(result.control=='三倍'){ + game.bonusNum=3; + game.zhu=event.current; + return; + } + else if(result.control!='不叫地主'){ + event.controls.splice(1,event.controls.indexOf(result.control)); + event.tempDizhu=event.current; + if(result.control=='二倍') game.bonusNum=2; + } + event.current=event.current.next; + if(event.current==event.start&&(event.start==event.tempDizhu||event.start._control=='不叫地主')){ + game.zhu=event.tempDizhu||event.start.previous; + } + else if(event.current==event.start.next&&event.current._control){ + game.zhu=event.tempDizhu; + } + else event.goto(1); + if(event.current==event.start.previous&&!event.tempDizhu) event.controls.remove('不叫地主'); + "step 3" + for(var player of game.players){ + player.identity=player==game.zhu?'zhu':'fan'; + player.showIdentity(); + player.identityShown=true; + } + game.broadcastAll('closeDialog',event.videoId); + var list=[]; + for(var i=0;i1, + } + }, + prompt:function(links){ + var name=links[0][2]; + var rawname=((name=='wanjian'||name=='taoyuan')?'gongshoujianbei':'jintuiziru'); + return '将一张'+get.translation(rawname)+'当做'+get.translation(name)+'使用'; + } + }, + ai:{ + order:10, + result:{ + player:1, + }, + }, + }, + doudizhu_cardPile:{ + intro:{ + content:'cardCount', + }, + }, kaihei:{ enable:'phaseUse', filter:function(event,player){ @@ -1293,7 +1713,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseJudgeBegin'}, direct:true, filter:function(event,player){ - return player==game.zhu&&player.countCards('j')&&player.countCards('h')>1; + return _status.mode!='online'&&player==game.zhu&&player.countCards('j')&&player.countCards('h')>1; }, content:function(){ "step 0" @@ -1310,14 +1730,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{player:'phaseZhunbeiBegin'}, forced:true, filter:function(event,player){ - return player==game.zhu; + return _status.mode!='online'&&player==game.zhu; }, content:function(){ player.draw(); }, mod:{ cardUsable:function(card,player,num){ - if(player==game.zhu&&card.name=='sha') return num+1; + if(_status.mode!='online'&&player==game.zhu&&card.name=='sha') return num+1; }, }, }, @@ -1327,14 +1747,587 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ silent:true, popup:false, filter:function(event,player){ - return event.player.identity==player.identity; + return _status.mode!='online'&&event.player.identity==player.identity; }, content:function(){ player.chooseDrawRecover(2); player.showGiveup(); }, }, + diqi_skill:{ + trigger:{player:'damageBegin2'}, + filter:function(event,player){ + var card=player.getEquip('diqi'); + return get.itemtype(card)=='card'&&lib.filter.cardDiscardable(card,player,'diqi_skill'); + }, + check:function(event,player){ + return event.num>=Math.min(player.hp,2); + }, + prompt2:function(event,player){ + return '弃置'+get.translation(player.getEquip('diqi'))+'并防止即将受到的'+get.cnNumber(event.num)+'点伤害'; + }, + content:function(){ + player.discard(player.getEquip('diqi')); + trigger.cancel(); + }, + ai:{ + filterDamage:true, + skillTagFilter:function(player,tag,arg){ + if(arg&&arg.player){ + if(arg.player.hasSkillTag('jueqing',false,player)) return false; + } + }, + }, + }, + _juzhong:{ + trigger:{global:'useCard'}, + direct:true, + ruleSkill:true, + filter:function(event,player){ + return _status.mode=='online'&&!event.all_excluded&&event.player.isFriendOf(player)&&event.player!=player&&lib.skill._juzhong.infos[event.card.name]&&player.countCards('h')>0; + }, + content:function(){ + 'step 0' + player.chooseToDiscard('是否响应【聚众】?',get.translation(trigger.player)+'使用了'+get.translation(trigger.card)+'。你可弃置一张名称相同的牌,令'+lib.skill._juzhong.infos[trigger.card.name][0],function(card,player){ + return get.name(card,player)==_status.event.getTrigger().card.name; + }).set('ai',lib.skill._juzhong.infos[trigger.card.name][2]).logSkill=['_juzhong',trigger.player]; + 'step 1' + if(result.bool){ + lib.skill._juzhong.infos[trigger.card.name][1](); + if(!event.goon) event.finish(); + } + else event.finish(); + 'step 2' + trigger.player.chooseTarget('你可选择一名角色,弃置其的一张牌',function(card,player,target){ + return target.countDiscardableCards(player,'he')>0; + }).set('ai',function(target){ + var player=_status.event.player; + var att=get.attitude(player,target); + var nh=target.countCards('h'); + if(att>0){ + if(target.getEquip('baiyin')&&target.isDamaged()&& + get.recoverEffect(target,player,player)>0){ + if(target.hp==1&&!target.hujia) return 1.6*att; + if(target.hp==2) return 0.01*att; + return 0; + } + } + var es=target.getCards('e'); + var noe=(es.length==0||target.hasSkillTag('noe')); + var noe2=(es.filter(function(esx){ + return get.value(esx,target)>0; + }).length==0); + var noh=(nh==0||target.hasSkillTag('noh')); + if(noh&&(noe||noe2)) return 0; + if(att<=0&&!target.countCards('he')) return 1.5*att; + return -1.5*att; + }); + 'step 3' + if(result.bool){ + var target=result.targets[0]; + trigger.player.line(target,'green'); + trigger.player.discardPlayerCard(target,true,'he'); + } + }, + infos:{ + sha:['此【杀】的伤害值基数+1。',function(){ + var evt=_status.event._trigger; + if(!evt.baseDamage) evt.baseDamage=1; + evt.baseDamage++; + },function(card){ + var evt=_status.event.getTrigger(); + if(!evt.targets.length) return 0; + if(evt.targets[0].hasShan()||evt.targets[0].hasSkillTag('filterDamage',null,{ + player:evt.targets[0], + card:evt.card, + })) return 0; + return 1; + }], + shan:['其可弃置一名角色的一张牌。',function(){ + _status.event.goon=true; + },function(card){ + if(game.zhu.countCards('he',function(card){ + return get.value(card,game.zhu)>=6; + })) return 7-get.value(card); + if(game.zhu.countCards('he',function(card){ + return get.value(card,game.zhu)>0 + })) return 5-get.value(card); + return 0; + }], + tao:['其摸两张牌。',function(){ + _status.event._trigger.player.draw(2); + },function(card){ + return 6-get.value(card); + }], + jiu:['其本回合的伤害值或回复值+1。',function(){ + var player=_status.event._trigger.player; + player.addTempSkill('juzhong_jiu'); + player.addMark('juzhong_jiu',1,false); + },function(card){ + return 6-get.value(card); + }], + }, + ai:{ + viewHandcard:true, + skillTagFilter:function(player,tag,target){ + if(_status.mode!='online'||player==target||player.identity!=target.identity) return false; + }, + }, + }, + juzhong_jiu:{ + trigger:{ + player:'recoverBegin', + source:'damageBegin1', + }, + forced:true, + popup:false, + content:function(){ + trigger.num+=player.countMark('juzhong_jiu'); + }, + onremove:true, + intro:{content:'本回合的伤害值和回复值+#'}, + }, + _zhadan:{ + trigger:{player:'useCard'}, + priority:5, + popup:false, + forced:true, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current.countCards('h','zhadan'); + }); + }, + forceLoad:true, + content:function(){ + 'step 0' + event.source=trigger.player; + event.card=trigger.card; + event.targets=trigger.targets; + event._global_waiting=true; + event.filterCard=function(card,player){ + if(get.name(card)!='zhadan'||get.itemtype(card)!='card') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + }; + event.send=function(player,card,source,targets,id,id2,skillState){ + if(skillState){ + player.applySkills(skillState); + } + var str=get.translation(source); + if(targets&&targets.length){ + str+='对'+get.translation(targets); + } + str+='使用了'; + str+=get.translation(card); + str+=',是否对其使用【炸弹】?'; + + var next=player.chooseToUse({ + filterCard:function(card,player){ + if(get.name(card)!='zhadan'||get.itemtype(card)!='card') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + }, + prompt:str, + _global_waiting:true, + ai1:function(card){ + var evt=_status.event.getParent('_zhadan')._trigger,player=_status.event.player; + if(!evt) return 0; + if(get.attitude(player,evt.player)>0) return 0; + var eff=0; + if(!targets.length) return Math.random()-0.5; + for(var i of targets) eff-=get.effect(i,evt.card,evt.player,player); + return eff-8; + }, + source:source, + source2:targets, + id:id, + id2:id2 + }); + next.set('respondTo',[source,card]); + + if(game.online){ + _status.event._resultid=id; + game.resume(); + } + else{ + next.nouse=true; + } + }; + 'step 1' + var list=game.filterPlayer(function(current){ + return current.countCards('h',function(card){ + if(get.name(card)!='zhadan'||get.itemtype(card)!='card') return false; + return lib.filter.cardEnabled(card,player,'forceEnable'); + }); + }); + event.list=list; + event.id=get.id(); + list.sort(function(a,b){ + return get.distance(event.source,a,'absolute')-get.distance(event.source,b,'absolute'); + }); + 'step 2' + if(event.list.length==0){ + event.finish(); + } + else if(_status.connectMode&&(event.list[0].isOnline()||event.list[0]==game.me)){ + event.goto(4); + } + else{ + event.current=event.list.shift(); + event.send(event.current,event.card,event.source,event.targets,event.id,trigger.parent.id); + } + 'step 3' + if(result.bool){ + event.zhadanresult=event.current; + event.zhadanresult2=result; + event.goto(8); + } + else{ + event.goto(2); + } + 'step 4' + var id=event.id; + var sendback=function(result,player){ + if(result&&result.id==id&&!event.zhadanresult&&result.bool){ + event.zhadanresult=player; + event.zhadanresult2=result; + game.broadcast('cancel',id); + if(_status.event.id==id&&_status.event.name=='chooseToUse'&&_status.paused){ + return (function(){ + event.resultOL=_status.event.resultOL; + ui.click.cancel(); + if(ui.confirm) ui.confirm.close(); + }); + } + } + else{ + if(_status.event.id==id&&_status.event.name=='chooseToUse'&&_status.paused){ + return (function(){ + event.resultOL=_status.event.resultOL; + }); + } + } + }; + + var withme=false; + var withol=false; + var list=event.list; + for(var i=0;i2) return 0; + return 1; + }); + else if(use) event._result={index:1}; + else if(discard) event._result={index:0}; + else event.finish(); + } + else event.finish(); + 'step 1' + var cards=player.getCards('h'); + if(result.index==0){ + player.discard(cards); + player.draw(cards.length); + event.finish(); + } + else{ + var list=[]; + for(var i of lib.inpile){ + if(i!='jiwangkailai'&&get.type(i)=='trick'&&lib.filter.filterCard({name:i,cards:cards},player)) list.push(['锦囊','',i]); + } + if(list.length){ + player.chooseButton(['继往开来:选择要使用的牌',[list,'vcard']],true).set('ai',function(button){ + var player=_status.event.player; + return player.getUseValue({name:button.link[2],cards:player.getCards('h')}); + }); + } + else event.finish(); + } + 'step 2' + if(result.bool) player.chooseUseTarget({name:result.links[0][2]},player.getCards('h'),true); + }, + ai:{ + basic:{ + order:0.5, + useful:3, + value:5 + }, + result:{ + target:function(player,target){ + if(target.needsToDiscard(1)||!target.countCards('h',function(card){ + return get.value(card,player)>=5.5; + })) return 1; + return 0; + }, + }, + tag:{ + draw:2 + } + } + }, + }, + characterOnline:{ + wei:[ + 're_caocao','re_guojia','re_simayi','re_xiahoudun','xuzhu','re_zhangliao','re_zhenji','ol_xiahouyuan','dianwei','re_xunyu','zhanghe', + 'yujin_yujin','re_caozhang','wangyi','guohuai','hanhaoshihuan','chenqun','re_caoxiu','guohuanghou','sunziliufang','xunyou','xinxianying', + 'sp_caiwenji','caoang','caochun','caohong','sp_caoren','chenlin','sp_jiaxu','litong','sp_pangde','simalang','wanglang', + 'kuailiangkuaiyue','wangji','sp_simazhao','sp_wangyuanji','yuejin','zangba','xinpi','liuye','simashi','zhuling','duji','caoanmin', + ], + shu:[ + 're_guanyu','re_huangyueying','re_liubei','re_machao','re_zhangfei','zhaoyun','re_huangzhong','re_weiyan','re_pangtong','ol_sp_zhugeliang', + 're_menghuo','re_zhurong','re_fazheng','re_masu','guanxingzhangbao','xin_liaohua','old_madai','re_jianyong','wuyi','zhangsong','zhoucang', + 'liuchen','xiahoushi','re_zhangyi','quancong','liyan','guanyinping','guansuo','mayunlu','mazhong','mizhu','sunqian','xiahouba','zhangxingcai', + 'wangping','yanyan','chendao','ganfuren','re_maliang','dengzhi','lifeng','zhangyì', + ], + wu:[ + 're_ganning','re_huanggai','re_sunquan','re_sunshangxiang','re_zhouyu','old_zhoutai','re_xiaoqiao','re_taishici','sunjian','re_zhangzhang', + 're_lingtong','re_wuguotai','xin_xusheng','re_bulianshi','re_chengpu','handang','xin_panzhangmazhong','xin_zhuran','guyong','zhuhuan','cenhun','sundeng','xuezong', + 'daxiaoqiao','heqi','kanze','sunhao','re_sunluyu','sunshao','zhugejin','zumao','dingfeng','sunliang','zhoufei', + 'weiwenzhugezhi','xf_sufei','xugong','lingcao','sunru','lvdai','panjun','yanjun','zhoufang', + ], + qun:[ + 're_diaochan','re_gongsunzan','re_huatuo','re_huaxiong','re_lvbu','ol_pangde','re_yanwen','jiaxu','gaoshun','xin_liubiao','chengong', + 're_gongsunyuan','guotufengji','dongbai','fuwan','liuxie','sp_machao','tadun','yanbaihu','yuanshu','zhangbao','yl_luzhi','huangfusong','sp_ganning','huangjinleishi', + 're_panfeng','guosi','sp_liuqi','mangyachang','gaolan','lvkuanglvxiang','xunchen','sp_zhanghe','re_hansui','re_hejin','zhujun','ol_dingyuan','hanfu','wangrong', + 'dongcheng','gongsunkang','hucheer','sp_sufei','yj_xuhuang','yj_zhanghe','yj_zhangliao','liuyao','wangcan','sp_taishici','caimao','jiling', + ], + key:[ + 'sp_key_yuri','key_akane','key_akiko','key_ao','key_harukakanata','key_haruko','key_hinata','key_kengo','key_komari','key_kotori','key_kyoko','key_nagisa','key_noda','key_rei','key_rin','key_rumi','key_ryoichi','key_sasami','key_shiorimiyuki','key_shiroha','key_shizuku','key_tomoya','key_tsumugi','key_umi','key_yoshino','key_youta','key_yukine','key_nao','key_misuzu', + ], + }, + online_cardPile:[ + ['spade',1,'guding'], + ['spade',1,'zhadan'], + ['spade',2,'tengjia'], + ['spade',2,'cixiong'], + ['spade',3,'jiu'], + ['spade',3,'guohe'], + ['spade',4,'sha','thunder'], + ['spade',4,'guohe'], + ['spade',5,'sha','thunder'], + ['spade',5,'qinglong'], + ['spade',6,'sha','thunder'], + ['spade',6,'jiwangkailai'], + ['spade',7,'sha','thunder'], + ['spade',7,'jintuiziru'], + ['spade',8,'sha','thunder'], + ['spade',8,'sha'], + ['spade',9,'jiu'], + ['spade',9,'sha'], + ['spade',10,'gongshoujianbei'], + ['spade',10,'sha'], + ['spade',11,'tiesuo'], + ['spade',11,'shunshou'], + ['spade',12,'tiesuo'], + ['spade',12,'zhangba'], + ['spade',13,'wuxie'], + ['spade',13,'dawanma'], + + ['club',1,'baiyin'], + ['club',1,'zhuge'], + ['club',2,'tengjia'], + ['club',2,'bagua'], + ['club',3,'jiu'], + ['club',3,'sha'], + ['club',4,'jintuiziru'], + ['club',4,'sha'], + ['club',5,'sha','thunder'], + ['club',5,'dilu'], + ['club',6,'sha','thunder'], + ['club',6,'sha'], + ['club',7,'sha','thunder'], + ['club',7,'sha'], + ['club',8,'sha','thunder'], + ['club',8,'sha'], + ['club',9,'jiu'], + ['club',9,'sha'], + ['club',10,'tiesuo'], + ['club',10,'sha'], + ['club',11,'tiesuo'], + ['club',11,'sha'], + ['club',12,'tiesuo'], + ['club',12,'wuxie'], + ['club',13,'tiesuo'], + ['club',13,'jiedao'], + ['club',13,'wuxie'], + + ['heart',1,'wuxie'], + ['heart',1,'gongshoujianbei'], + ['heart',1,'zhadan'], + ['heart',2,'huogong'], + ['heart',2,'shan'], + ['heart',3,'huogong'], + ['heart',3,'wuzhong'], + ['heart',4,'sha','fire'], + ['heart',4,'tao'], + ['heart',5,'tao'], + ['heart',5,'chitu'], + ['heart',6,'tao'], + ['heart',6,'jiwangkailai'], + ['heart',7,'sha','fire'], + ['heart',7,'tao'], + ['heart',8,'shan'], + ['heart',8,'wuzhong'], + ['heart',9,'shan'], + ['heart',9,'tao'], + ['heart',10,'sha','fire'], + ['heart',10,'sha'], + ['heart',11,'shan'], + ['heart',11,'wuzhong'], + ['heart',12,'shan'], + ['heart',12,'guohe'], + ['heart',13,'wuxie'], + ['heart',13,'zhuahuang'], + + ['diamond',1,'zhuque'], + ['diamond',1,'juedou'], + ['diamond',2,'tao'], + ['diamond',2,'shan'], + ['diamond',3,'tao'], + ['diamond',3,'shan'], + ['diamond',4,'sha','fire'], + ['diamond',4,'shunshou'], + ['diamond',5,'sha','fire'], + ['diamond',5,'guanshi'], + ['diamond',6,'shan'], + ['diamond',6,'sha'], + ['diamond',7,'shan'], + ['diamond',7,'shan'], + ['diamond',8,'shan'], + ['diamond',8,'shan'], + ['diamond',9,'jiu'], + ['diamond',9,'shan'], + ['diamond',10,'shan'], + ['diamond',10,'sha'], + ['diamond',11,'shan'], + ['diamond',11,'shan'], + ['diamond',12,'huogong'], + ['diamond',12,'tao'], + ['diamond',13,'xiliu'], + ['diamond',13,'sha'], + ['diamond',13,'wuxie'] + ], help:{ '斗地主':'
游戏规则
  • 游戏人数
    游戏人数为3人(地主x1 + 农民x2)。
  • 胜利条件
    农民:地主死亡。
    地主:所有农民死亡且自己存活。'+ '
  • 死亡奖惩
    当有农民死亡时,若另一名农民存活,则其可以选择摸两张牌或回复一点体力。
  • 地主专属技能
    地主可以使用专属技能【飞扬】和【跋扈】。
    【飞扬】判定阶段开始时,若你的判定区有牌,则你可以弃置两张手牌,然后弃置你判定区的一张牌。每回合限一次。
    【跋扈】锁定技,准备阶段开始时,你摸一张牌。出牌阶段,你可以多使用一张【杀】。
', diff --git a/mode/identity.js b/mode/identity.js index cdff67c5e..18c86040d 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -857,6 +857,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ next.setContent(function(){ "step 0" ui.arena.classList.add('choose-character'); + game.no_continue_game=true; lib.init.onfree(); "step 1" var list=['rZhu','rZhong','rNei','rYe'];