diff --git a/audio/die/nanhualaoxian.mp3 b/audio/die/nanhualaoxian.mp3 new file mode 100644 index 000000000..fe5a0d7ad Binary files /dev/null and b/audio/die/nanhualaoxian.mp3 differ diff --git a/audio/die/simazhou.mp3 b/audio/die/simazhou.mp3 new file mode 100644 index 000000000..a979aa7b2 Binary files /dev/null and b/audio/die/simazhou.mp3 differ diff --git a/audio/skill/caiwang1.mp3 b/audio/skill/caiwang1.mp3 new file mode 100644 index 000000000..c9867e527 Binary files /dev/null and b/audio/skill/caiwang1.mp3 differ diff --git a/audio/skill/caiwang2.mp3 b/audio/skill/caiwang2.mp3 new file mode 100644 index 000000000..3f1846446 Binary files /dev/null and b/audio/skill/caiwang2.mp3 differ diff --git a/audio/skill/naxiang1.mp3 b/audio/skill/naxiang1.mp3 new file mode 100644 index 000000000..192743494 Binary files /dev/null and b/audio/skill/naxiang1.mp3 differ diff --git a/audio/skill/naxiang2.mp3 b/audio/skill/naxiang2.mp3 new file mode 100644 index 000000000..36e3311ee Binary files /dev/null and b/audio/skill/naxiang2.mp3 differ diff --git a/audio/skill/tianshu1.mp3 b/audio/skill/tianshu1.mp3 new file mode 100644 index 000000000..221b6998f Binary files /dev/null and b/audio/skill/tianshu1.mp3 differ diff --git a/audio/skill/tianshu2.mp3 b/audio/skill/tianshu2.mp3 new file mode 100644 index 000000000..762ec64f9 Binary files /dev/null and b/audio/skill/tianshu2.mp3 differ diff --git a/audio/skill/yufeng1.mp3 b/audio/skill/yufeng1.mp3 new file mode 100644 index 000000000..d2257c767 Binary files /dev/null and b/audio/skill/yufeng1.mp3 differ diff --git a/audio/skill/yufeng2.mp3 b/audio/skill/yufeng2.mp3 new file mode 100644 index 000000000..051c7cee0 Binary files /dev/null and b/audio/skill/yufeng2.mp3 differ diff --git a/card/extra.js b/card/extra.js index b6549bb44..819015906 100644 --- a/card/extra.js +++ b/card/extra.js @@ -10,24 +10,31 @@ game.import('card',function(lib,game,ui,get,ai,_status){ subtype:'equip5', nomod:true, onEquip:function(){ - player.markSkill('muniu_skill6'); + if(card&&card.cards&&card.cards.length){ + player.directgains(card.cards,null,'muniu'); + } + player.markSkill('muniu_skill'); }, forceDie:true, onLose:function(){ - player.unmarkSkill('muniu_skill6'); + player.unmarkSkill('muniu_skill'); delete player.getStat('skill').muniu_skill; - if((event.getParent(2)&&event.getParent(2).name!='swapEquip')&&event.parent.type!='equip'&&card&&card.cards&&card.cards.length){ + if(!card||!card.cards||!card.cards.length) return; + if((event.getParent(2)&&event.getParent(2).name!='swapEquip')&&event.parent.type!='equip'){ + player.lose(card.cards,ui.discardPile); player.$throw(card.cards,1000); player.popup('muniu'); game.log(card,'掉落了',card.cards); - game.cardsDiscard(card.cards); card.cards.length=0; } + else{ + player.lose(card.cards,ui.special); + } }, clearLose:true, equipDelay:false, loseDelay:false, - skills:['muniu_skill','muniu_skill4','muniu_skill6','muniu_skill7'], + skills:['muniu_skill','muniu_skill7'], ai:{ equipValue:function(card){ if(card.card) return 7+card.card.length; @@ -507,8 +514,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return 10-get.useful(card); }, discard:false, - lose:true, - toStorage:true, + lose:false, + delay:false, sync:function(muniu){ if(game.online){ return; @@ -517,7 +524,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ muniu.cards=[]; } for(var i=0;i=3&&get.attitude(current,player)>=3){ @@ -570,7 +578,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return target==_status.event.choice?1:-1; }); next.set('choice',choice); - "step 1" + "step 3" if(result.bool){ var card=player.getEquip(5); result.targets[0].equip(card); @@ -583,146 +591,23 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } }, ai:{ - respondSha:true, - respondShan:true, - skillTagFilter:function(player,tag){ - var muniu=player.getEquip(5); - if(!muniu||!muniu.cards) return false; - for(var i=0;i0) return get.order(button.link); - return -1; - }, - backup:function(links,player){ - return { - filterCard:function(){return false}, - selectCard:-1, - position:'h', - viewAs:links[0], - precontent:function(){ - delete event.result.skill; - }, - }; - }, - prompt:function(links){ - return '选择'+get.translation(links)+'的目标'; - }, - }, - ai:{ - order:function(item,player){ - var event=_status.event; - if(event.type!='phase') return 4; - if(!player) return -1; + mod:{ + cardEnabled2:function(card,player){ + if(!ui.selected.cards.length) return; var muniu=player.getEquip('muniu'); - if(!muniu||!muniu.cards) return -1; - var order=0; - for(var i=0;i0){ - var order2=get.order(muniu.cards[i]); - if(order2>order) order=order2 - } - } - return order+0.1; - }, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; + if(!muniu||!muniu.cards||!muniu.cards.length) return; + for(var i of ui.selected.cards){ + if(i==muniu&&muniu.cards.contains(card)) return false; + if(muniu.cards.contains(i)&&card==muniu) return false; } }, - useful:-1, - value:-1 - } - }, - muniu_skill6:{ + }, mark:true, intro:{ content:function(storage,player){ @@ -753,29 +638,21 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } }, muniu_skill7:{ - hiddenCard:function(player,name){ - var muniu=player.getEquip(5); - if(!muniu.cards) return false; - lib.skill.muniu_skill.sync(muniu); - for(var i=0;i0; }, content:function(){ var muniu=player.getEquip(5); if(muniu&&muniu.cards){ - muniu.cards.remove(trigger.cards); + muniu.cards.removeArray(trigger.ss); lib.skill.muniu_skill.sync(muniu); } player.updateMarks(); @@ -1073,12 +950,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ muniu:'木牛流马', muniu_bg:'牛', muniu_skill:'木牛', - muniu_skill2:'流马', - muniu_skill3:'流马', - muniu_skill4:'流马', - muniu_skill6:'木牛流马', - muniu_skill6_bg:'辎', - muniu_skill4_backup:'流马', + muniu_skill_bg:'辎', muniu_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。', muniu_skill_info:'出牌阶段限一次,你可以将一张手牌扣置于你装备区里的【木牛流马】下,若如此做,你可以将此装备移动到一名其他角色的装备区里;你可以将此装备牌下的牌如手牌般使用或打出。', }, diff --git a/card/guozhan.js b/card/guozhan.js index e8caec529..0ce4e539e 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -105,7 +105,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, taipingyaoshu:{ audio:true, - mode:['guozhan'], fullskin:true, type:'equip', subtype:'equip2', @@ -1070,12 +1069,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){ equipSkill:true, mod:{ maxHandcard:function(player,num){ - if(player.hasSkill('huangjintianbingfu')){ - num+=player.storage.huangjintianbingfu.length; + if(get.mode()=='guozhan'){ + if(player.hasSkill('huangjintianbingfu')){ + num+=player.storage.huangjintianbingfu.length; + } + return num+game.countPlayer(function(current){ + return current.isFriendOf(player); + }); } - return num+game.countPlayer(function(current){ - return current.isFriendOf(player); - }); + return num+game.countGroup(); } }, trigger:{player:'damageBegin4'}, @@ -1399,7 +1401,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ feilongduofeng3:'飞龙夺凤', feilongduofeng_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置一张牌。当你使用【杀】令其他角色进入濒死状态时,你可以获得其一张手牌。', taipingyaoshu:'太平要术', - taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,你的手牌上限便+1;当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', + taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;你的手牌上限+X(X为势力数);当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', + taipingyaoshu_info_guozhan:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,你的手牌上限便+1;当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', yuxi_skill:'玉玺', yuxi_skill2:'玉玺', yuxi:'玉玺', diff --git a/card/sp.js b/card/sp.js index 4afff5935..790373c09 100644 --- a/card/sp.js +++ b/card/sp.js @@ -449,8 +449,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ filterCard:true, viewAs:{name:'shan'}, viewAsFilter:function(player){ - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; }, + position:'hs', prompt:'将一张手牌当闪使用或打出', check:function(card){ return 6-get.value(card); @@ -458,11 +459,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; }, effect:{ target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0&&target.countCards('h')) return 0.59 + if(get.tag(card,'respondShan')&¤t<0&&target.countCards('hs')) return 0.59 } }, order:4, diff --git a/card/standard.js b/card/standard.js index 7f186f5fd..4d096c723 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1838,11 +1838,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ enable:['chooseToUse','chooseToRespond'], filterCard:true, selectCard:2, - position:'h', + position:'hs', viewAs:{name:'sha'}, complexCard:true, filter:function(event,player){ - return player.countCards('h')>=2; + return player.countCards('hs')>=2; }, audio:true, prompt:'将两张手牌当杀使用或打出', @@ -1853,7 +1853,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, skillTagFilter:function(player){ - return player.countCards('h')>=2; + return player.countCards('hs')>=2; }, } }, diff --git a/character/diy.js b/character/diy.js index 6ef4b0da2..50c0b2b0e 100755 --- a/character/diy.js +++ b/character/diy.js @@ -3077,7 +3077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ isCard:true, }, viewAsFilter:function(player){ - return !player.hasJudge('lebu')&&player.countCards('he',function(card){ + return !player.hasJudge('lebu')&&player.countCards('hes',function(card){ return get.color(card)=='red'&&get.type(card,'trick')!='trick'; }); }, @@ -3088,7 +3088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 7+(_status.event.dying||_status.event.player).getDamagedHp()-get.value(card); }, ignoreMod:true, - position:'he', + position:'hes', precontent:function(){ player.logSkill('misuzu_nongyin'); player.$throw(event.result.cards); @@ -3550,10 +3550,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })>1?1:-1; }, filter:function(event,player){ - return player.countCards('h','tao')&&game.hasPlayer(function(current){ + return player.countCards('hs','tao')&&game.hasPlayer(function(current){ return lib.skill.nao_shouqing2.filterTarget(null,player,current) }); }, + position:'hs', onuse:function(links,player){ player.addSkill('nao_shouqing3'); player.addMark('nao_shouqing3',1,false); @@ -4122,9 +4123,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{name:'mapodoufu'}, filterCard:{suit:'heart'}, viewAsFilter:function(player){ - return player.countCards('he',{suit:'heart'})>0; + return player.countCards('hes',{suit:'heart'})>0; }, - position:'he', + position:'hes', mod:{ selectTarget:function(card,player,range){ if(card.name=='mapodoufu'&&range[1]!=-1) range[1]++; @@ -4806,7 +4807,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ hinata_qiulve:{ enable:['chooseToUse','chooseToRespond'], viewAsFilter:function(player){ - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return get.type(card)!='basic'; })>0; }, @@ -4815,7 +4816,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.type(card)!='basic'; }, locked:false, - position:'he', + position:'hes', check:function(card){ var val=get.value(card); if(val>=6) return 0; @@ -4831,7 +4832,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ respondSha:true, skillTagFilter:function(player){ - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return get.type(card)!='basic'; })>0; }, @@ -5640,10 +5641,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inari_baiwei:{ enable:['chooseToUse','chooseToRespond'], hiddenCard:function(player,name){ - return name!='du'&&get.type(name)=='basic'&&player.countCards('he',{suit:'diamond'})>0; + return name!='du'&&get.type(name)=='basic'&&player.countCards('hes',{suit:'diamond'})>0; }, filter:function(event,player){ - if(event.type=='wuxie'||!player.countCards('he',{suit:'diamond'})) return false; + if(event.type=='wuxie'||!player.countCards('hse',{suit:'diamond'})) return false; for(var i=0;i0; + return player.countCards('hse',{suit:'diamond'})>0; }, }, }, @@ -6309,10 +6310,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:['chooseToUse','chooseToRespond'], viewAs:{name:'shan'}, filterCard:true, - position:'he', + position:'hes', prompt:'将一张牌当做闪使用或打出', viewAsFilter:function(player){ - return player.isDisabled(2)&&player.countCards('he')>0; + return player.isDisabled(2)&&player.countCards('hes')>0; }, check:function(card){ return 1/Math.max(0.1,get.value(card)); @@ -7383,7 +7384,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ noname_retieji:{ inherit:"retieji", mark:true, - marktext:"", + marktext:"", intro:{ name:"小无·铁骑", content:"你使用【杀】指定一名角色为目标后,可以进行一次判定并令该角色的非锁定技失效直到回合结束,除非该角色弃置一张与判定结果花色相同的牌,否则不能使用【闪】抵消此【杀】。", @@ -7392,7 +7393,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ noname_jiang:{ inherit:"jiang", mark:true, - marktext:"", + marktext:"", intro:{ name:"小无·激昂", content:"每当你使用(指定目标后)或被使用(成为目标后)一张【决斗】或红色的【杀】时,你可以摸一张牌。", @@ -7885,7 +7886,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'taoluan', enable:'chooseToUse', filter:function(event,player){ - return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('junktaoluan3')&&player.countCards('he',function(card){ + return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('junktaoluan3')&&player.countCards('hes',function(card){ return !player.storage.junktaoluan2.contains(get.suit(card)); })>0; }, @@ -7918,7 +7919,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, check:function(button){ var player=_status.event.player; - if(player.countCards('h',button.link[2])>0) return 0; + if(player.countCards('sh',button.link[2])>0) return 0; if(button.link[2]=='wugu') return; var effect=player.getUseValue(button.link[2]); if(effect>0) return effect; @@ -7935,7 +7936,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(card){ return 6-get.value(card); }, - position:'he', + position:'hse', viewAs:{name:links[0][2],nature:links[0][3]}, onuse:function(result,player){ player.storage.junktaoluan2.add(get.suit(result.cards[0],player)); @@ -8032,7 +8033,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:'将一张牌当做闪使用', enable:'chooseToUse', filter:function(event,player){ - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return !player.storage.junktaoluan2.contains(get.suit(card)); })&&!player.storage.junktaoluan.contains('shan')&&!player.hasSkill('junktaoluan3'); }, @@ -8055,7 +8056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card,player){ return !player.storage.junktaoluan2.contains(get.suit(card)); }, - position:'he', + position:'hes', selectCard:1, viewAs:{name:'shan'}, check:function(card){ @@ -8073,7 +8074,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ skillTagFilter:function(player){ - return player.countCards('he')&&!player.storage.junktaoluan.contains('shan')&&!player.hasSkill('junktaoluan3'); + return player.countCards('hse')&&!player.storage.junktaoluan.contains('shan')&&!player.hasSkill('junktaoluan3'); }, threaten:1.5, respondShan:true, @@ -8084,12 +8085,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', prompt:'将一张牌当做无懈可击使用', filter:function(event,player){ - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return !player.storage.junktaoluan2.contains(get.suit(card)); })&&(!player.storage.junktaoluan.contains('wuxie'))&&!player.hasSkill('junktaoluan3'); }, viewAsFilter:function(player){ - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return !player.storage.junktaoluan2.contains(get.suit(card)); })&&(!player.storage.junktaoluan.contains('wuxie'))&&!player.hasSkill('junktaoluan3'); }, @@ -8112,7 +8113,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card,player){ return !player.storage.junktaoluan2.contains(get.suit(card)); }, - position:'he', + position:'hse', selectCard:1, viewAs:{name:'wuxie'}, check:function(card){ @@ -10715,13 +10716,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.hp<=0; }, filterCard:{suit:'club'}, - position:'he', + position:'hse', viewAs:{name:'tao'}, prompt:'将一张梅花牌当桃使用', check:function(card){return 15-get.value(card)}, ai:{ skillTagFilter:function(player){ - return player.countCards('he',{suit:'club'})>0; + return player.countCards('hes',{suit:'club'})>0; }, threaten:1.5, save:true, @@ -10870,8 +10871,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return player.hasCard(function(card){ return get.color(card)!=player.storage.nsduijue_use; - }); + },'hs'); }, + position:'hs', filterCard:function(card,player){ return get.color(card)!=player.storage.nsduijue_use; }, @@ -10900,15 +10902,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:true, viewAs:{name:'sha'}, viewAsFilter:function(player){ - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; }, + position:'hs', prompt:'将一张手牌当杀打出', check:function(card){return 7-get.value(card)}, ai:{ respondSha:true, skillTagFilter:function(player,tag,arg){ if(arg!='respond') return false; - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; }, } }, @@ -11736,8 +11739,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{name:'wugu'}, usable:1, filterCard:{type:'basic'}, + position:'hs', filter:function(event,player){ - return player.countCards('h',{type:'basic'})>0; + return player.countCards('hs',{type:'basic'})>0; }, check:function(card){ return 6-get.value(card); @@ -12516,11 +12520,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card){ return get.type(card)!='basic'; }, - position:'he', + position:'hse', filter:function(event,player){ return player.hasCard(function(card){ return get.type(card)!='basic'; - },'he'); + },'hes'); }, viewAs:{name:'shuiyanqijun'}, prompt:'将一张非基本牌当水淹七军使用', diff --git a/character/extra.js b/character/extra.js index 458d8b741..0289737b9 100755 --- a/character/extra.js +++ b/character/extra.js @@ -2679,7 +2679,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张红桃牌当作桃使用'; }, - position:'he', + position:'hes', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); @@ -2689,7 +2689,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'tao'}, viewAsFilter:function(player){ - return player.countCards('he',{suit:'heart'})>=player.hp; + return player.countCards('hes',{suit:'heart'})>=player.hp; }, filterCard:function(card){ return get.suit(card)=='heart'; @@ -2701,7 +2701,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张方片当作火杀使用或打出'; }, - position:'he', + position:'hes', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); @@ -2711,7 +2711,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'sha',nature:'fire'}, viewAsFilter:function(player){ - return player.countCards('he',{suit:'diamond'})>=player.hp; + return player.countCards('hes',{suit:'diamond'})>=player.hp; }, filterCard:function(card){ return get.suit(card)=='diamond'; @@ -2723,7 +2723,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张黑桃牌当作无懈可击使用'; }, - position:'he', + position:'hes', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 7-get.value(card); @@ -2733,7 +2733,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'wuxie'}, viewAsFilter:function(player){ - return player.countCards('he',{suit:'spade'})>=player.hp; + return player.countCards('hes',{suit:'spade'})>=player.hp; }, filterCard:function(card){ return get.suit(card)=='spade'; @@ -2745,7 +2745,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:function(){ return '将'+get.cnNumber(Math.max(1,_status.event.player.hp))+'张梅花牌当作闪使用或打出'; }, - position:'he', + position:'hes', check:function(card,event){ if(_status.event.player.hp>1) return 0; return 10-get.value(card); @@ -2753,6 +2753,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:function(){ return Math.max(1,_status.event.player.hp); }, + viewAsFilter:function(player){ + return player.countCards('hes',{suit:'club'})>=player.hp; + }, viewAs:{name:'shan'}, filterCard:function(card){ return get.suit(card)=='club'; @@ -2807,7 +2810,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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}); @@ -2826,8 +2829,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:[1,2], //确保选择第一张牌后 重新检测第二张牌的合法性 避免选择两张花色不同的牌 complexCard:true, - //选牌范围:手牌区和装备区 - position:'he', + //选牌范围:手牌区和装备区和木马 + position:'hes', //选牌合法性判断 filterCard:function(card,player,event){ //如果已经选了一张牌 那么第二张牌和第一张花色相同即可 @@ -2853,13 +2856,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //获取当前时机的卡牌选择限制 var filter=event.filterCard; //如果当前时机能够使用/打出火杀并且角色有方片 那么可以发动技能 - if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('he',{suit:'diamond'})) return true; + if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true; //如果当前时机能够使用/打出闪并且角色有梅花 那么可以发动技能 - if(filter({name:'shan'},player,event)&&player.countCards('he',{suit:'club'})) return true; + if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true; //如果当前时机能够使用/打出桃并且角色有红桃 那么可以发动技能 - if(filter({name:'tao'},player,event)&&player.countCards('he',{suit:'heart'})) return true; + if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true; //如果当前时机能够使用/打出无懈可击并且角色有黑桃 那么可以发动技能 - if(filter({name:'wuxie'},player,event)&&player.countCards('he',{suit:'spade'})) return true; + if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true; return false; }, ai:{ @@ -2873,7 +2876,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ case 'respondShan':name='club';break; case 'save':name='heart';break; } - if(!player.countCards('he',{suit:name})) return false; + if(!player.countCards('hes',{suit:name})) return false; }, //AI牌序 order:function(item,player){ @@ -2883,7 +2886,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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}); @@ -2898,9 +2901,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, //让系统知道玩家“有无懈”“有桃” hiddenCard:function(player,name){ - if(name=='wuxie'&&_status.connectMode&&player.countCards('h')>0) return true; - if(name=='wuxie') return player.countCards('he',{suit:'spade'})>0; - if(name=='tao') return player.countCards('he',{suit:'heart'})>0; + if(name=='wuxie'&&_status.connectMode&&player.countCards('hs')>0) return true; + if(name=='wuxie') return player.countCards('hes',{suit:'spade'})>0; + if(name=='tao') return player.countCards('hes',{suit:'heart'})>0; }, group:['relonghun_num','relonghun_discard'], subSkill:{ @@ -2962,7 +2965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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}); @@ -2977,7 +2980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 1; }, - position:'h', + position:'hs', filterCard:function(card,player,event){ event=event||_status.event; var filter=event._backup.filterCard; @@ -2990,10 +2993,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ 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; + if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hs',{suit:'diamond'})) return true; + if(filter({name:'shan'},player,event)&&player.countCards('hs',{suit:'club'})) return true; + if(filter({name:'tao'},player,event)&&player.countCards('hs',{suit:'heart'})) return true; + if(filter({name:'wuxie'},player,event)&&player.countCards('hs',{suit:'spade'})) return true; return false; }, ai:{ @@ -3006,7 +3009,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ case 'respondShan':name='club';break; case 'save':name='heart';break; } - if(!player.countCards('h',{suit:name})) return false; + if(!player.countCards('hs',{suit:name})) return false; }, order:function(item,player){ if(player&&_status.event.type=='phase'){ @@ -3015,7 +3018,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 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}); @@ -3029,9 +3032,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, 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; + if(name=='wuxie'&&_status.connectMode&&player.countCards('hs')>0) return true; + if(name=='wuxie') return player.countCards('hs',{suit:'spade'})>0; + if(name=='tao') return player.countCards('hs',{suit:'heart'})>0; }, }, xinjuejing:{ diff --git a/character/mobile.js b/character/mobile.js index 2f665a433..1cfbf3d9c 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -6,7 +6,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ connect:true, characterSort:{ mobile:{ - mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang"], + mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei","furong","dingyuan","simashi","yanghuiyu","hucheer","gongsunkang","nanhualaoxian"], mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning"], mobile_shijizhi:["sp_wangcan","sp_chenzhen","sp_sunshao","sp_xunchen","luotong","sp_duyu","sp_bianfuren","feiyi"], mobile_sunben:["re_sunben"], @@ -17,6 +17,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + nanhualaoxian:['male','qun',3,['yufeng','tianshu']], feiyi:['male','shu',3,['reshengxi','fyjianyu']], sp_bianfuren:['female','wei',3,['spwanwei','spyuejian']], sp_duyu:['male','qun',4,['spwuku','spsanchen']], @@ -99,6 +100,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_sunben:['male','wu',4,['jiang','rehunzi','zhiba'],['zhu']], }, characterIntro:{ + nanhualaoxian:'南华老仙,是古典小说《三国演义》中的虚拟人物。其原型来自道教典籍中对庄子的封号,又称“南华仙人”、“南华真人”等。在古典小说《三国演义》通行本的第一回中,描述了南华老仙将《太平要术》赠送给张角的情节。', feiyi:'费祎(?~253年2月),字文伟,江夏鄳县(今河南省罗山县)人,三国时期蜀汉名臣,与诸葛亮、蒋琬、董允并称为蜀汉四相。深得诸葛亮器重,屡次出使东吴,孙权、诸葛恪、羊茞等人以辞锋刁难,而费祎据理以答,辞义兼备,始终不为所屈。孙权非常惊异于他的才能,加以礼遇。北伐时为中护军,又转为司马。当时魏延与杨仪不和,经常争论,费祎常为二人谏喻,两相匡护,以尽其用。诸葛亮死后,初为后军师,再为尚书令,官至大将军,封成乡侯。费祎主政时,与姜维北伐的主张相左,执行休养生息的政策,为蜀汉的发展尽心竭力。费祎性格谦恭真诚,颇为廉洁,家无余财。后为魏降将郭循(一作郭脩)行刺身死。葬于今广元市昭化古城城西。', luotong:'骆统(193年-228年),字公绪。会稽郡乌伤县(今浙江义乌)人。东汉末年至三国时期吴国将领、学者,陈国相骆俊之子。骆统二十岁时已任乌程国相,任内有政绩,使得国中民户过万。又迁为功曹,行骑都尉。曾劝孙权尊贤纳士,省役息民。后出任为建忠中郎将。将军凌统逝世后,统领其部曲。因战功迁偏将军,封新阳亭侯,任濡须督。黄武七年(228年),骆统去世,年仅三十六岁。有集十卷,今已佚。', chenzhen:'陈震(?—公元235年),字孝起。荆州南阳郡(今河南南阳)人。三国时期蜀汉官员。刘备领荆州牧时,辟陈震为从事。后随刘备入蜀,为蜀郡北部都尉、汶山太守、犍为太守。建兴三年(225年),拜尚书,迁尚书令。建兴七年(229年),孙权称帝。蜀汉以陈震为卫尉,前往祝贺,与孙权开坛歃盟,交分天下。还蜀,封城阳亭侯。建兴十三年(235年),卒。', @@ -333,6 +335,325 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //南华老仙 + yufeng:{ + audio:2, + enable:'phaseUse', + usable:1, + content:function(){ + "step 0" + if(_status.connectMode) event.time=lib.configOL.choose_timeout; + event.videoId=lib.status.videoId++; + if(player.isUnderControl()){ + game.swapPlayerAuto(player); + } + var switchToAuto=function(){ + game.pause(); + game.countChoose(); + setTimeout(function(){ + _status.imchoosing=false; + var score=Math.random()<0.5?4:get.rand(2,4); + event._result={ + bool:true, + score:score, + win:score>=4, + }; + if(event.dialog) event.dialog.close(); + if(event.control) event.control.close(); + game.resume(); + },5000); + }; + var createDialog=function(player,id){ + if(_status.connectMode) lib.configOL.choose_timeout='30'; + if(player==game.me) return; + var str=get.translation(player)+'正在表演《御风飞行》...
'; + ui.create.dialog(str).videoId=id; + }; + var chooseButton=function(){ + var roundmenu=false; + if(ui.roundmenu&&ui.roundmenu.display!='none'){ + roundmenu=true; + ui.roundmenu.style.display='none'; + } + var event=_status.event; + event.settleed=false; + event.score=0; + event.dialog=ui.create.dialog('forcebutton','hidden'); + event.dialog.textPrompt=event.dialog.add('
准备好了吗?准备好了的话就点击屏幕开始吧!
'); + event.dialog.textPrompt.style["z-index"]=10; + event.switchToAuto=function(){ + event._result={ + bool:true, + score:event.score, + win:event.score>=4, + }; + event.dialog.close(); + game.resume(); + _status.imchoosing=false; + if(roundmenu) ui.roundmenu.style.display=''; + }; + event.dialog.classList.add('fixed'); + event.dialog.classList.add('scroll1'); + event.dialog.classList.add('scroll2'); + event.dialog.classList.add('fullwidth'); + event.dialog.classList.add('fullheight'); + event.dialog.classList.add('noupdate'); + event.dialog.style.overflow='hidden'; + event.dialog.open(); + + var height=event.dialog.offsetHeight; + var width=event.dialog.offsetWidth; + var top=50; + var speed=0; + var start=false; + + var bird=ui.create.div(''); + bird.style["background-image"]='linear-gradient(rgba(240, 235, 3, 1), rgba(230, 225, 5, 1))'; + bird.style["border-radius"]='3px'; + var pipes=[]; + bird.style.position='absolute'; + bird.style.height='40px'; + bird.style.width='40px'; + bird.style.left=Math.ceil(width/3)+'px'; + bird.style.top=(top/100*height)+'px'; + bird.updatePosition=function(){ + bird.style.transform='translateY('+(top/100*height-bird.offsetTop)+'px)'; + }; + event.dialog.appendChild(bird); + var isDead=function(){ + if(top>100||top<0) return true; + var btop=top; + var bleft=100/3; + var bdown=btop+5; + var bright=bleft+5; + for(var i of pipes){ + var left2=i.left; + var right2=left2+10; + var bottom2=i.height1; + var top2=i.height2; + + if(left2>bright||right2top2) return true; + return false; + } + return false; + }; + + var fly=function(){ + if(!start){ + start=true; + event.dialog.textPrompt.innerHTML='
当前分数:'+event.score+'
'; + speed=-4; + event.fly=setInterval(function(){ + top+=speed; + if(top<0) top=0; + bird.updatePosition(); + for(var i of pipes){ + i.left-=0.5; + i.updateLeft(); + } + speed+=0.5; + if(speed>2.5) speed=2.5; + + if(isDead()==true){ + event.settle(); + } + },35); + var addPipe=function(){ + var num=get.rand(5,55); + + var pipe1=ui.create.div(''); + pipe1.style["background-image"]='linear-gradient(rgba(57, 133, 4, 1), rgba(60, 135, 6, 1))'; + pipe1.style["border-radius"]='3px'; + pipe1.style.position='absolute'; + pipe1.height1=num; + pipe1.height2=num+50; + pipe1.left=110; + pipe1.num=1; + pipe1.style.height=Math.ceil(height*num/100)+'px'; + pipe1.style.width=(width/10)+'px'; + pipe1.style.left=(pipe1.left*width/100)+'px'; + pipe1.style.top='0px'; + + var pipe2=ui.create.div(''); + pipe2.style["background-image"]='linear-gradient(rgba(57, 133, 4, 1), rgba(60, 135, 6, 1))'; + pipe2.style["border-radius"]='3px'; + pipe1.pipe2=pipe2; + pipe2.style.position='absolute'; + pipe2.style.height=Math.ceil((100-pipe1.height2)*height/100)+'px'; + pipe2.style.width=(width/10)+'px'; + pipe2.style.left=(pipe1.left*width/100)+'px'; + pipe2.style.top=Math.ceil(pipe1.height2*height/100)+'px'; + pipes.add(pipe1); + event.dialog.appendChild(pipe1); + event.dialog.appendChild(pipe2); + pipe1.updateLeft=function(){ + this.style.transform='translateX('+((this.left/100*width)-this.offsetLeft)+'px)'; + this.pipe2.style.transform='translateX('+((this.left/100*width)-this.pipe2.offsetLeft)+'px)'; + if(this.left<25&&!this.score){ + this.score=true; + event.score++; + event.dialog.textPrompt.innerHTML='
当前分数:'+event.score+'
'; + if(event.score>=4){ + event.settle(); + } + } + if(this.left<-15){ + this.remove(); + this.pipe2.remove(); + pipes.remove(this); + } + } + }; + event.addPipe=setInterval(addPipe,2500); + } + else if(speed>0){ + speed=-4; + } + }; + document.addEventListener(lib.config.touchscreen?'touchend':'click',fly); + + event.settle=function(){ + clearInterval(event.fly); + clearInterval(event.addPipe); + document.removeEventListener(lib.config.touchscreen?'touchend':'click',fly); + setTimeout(function(){ + event.switchToAuto() + },1000); + }; + + game.pause(); + game.countChoose(); + }; + //event.switchToAuto=switchToAuto; + game.broadcastAll(createDialog,player,event.videoId); + if(event.isMine()){ + chooseButton(); + } + else if(event.isOnline()){ + event.player.send(chooseButton); + event.player.wait(); + game.pause(); + } + else{ + switchToAuto(); + } + "step 1" + game.broadcastAll(function(id,time){ + if(_status.connectMode) lib.configOL.choose_timeout=time; + var dialog=get.idDialog(id); + if(dialog){ + dialog.close(); + } + },event.videoId,event.time); + var result=event.result||result; + player.popup(get.cnNumber(result.score)+'分',result.win?'wood':'fire') + game.log(player,'御风飞行',result.win?'#g成功':'#y失败'); + game.log(player,'获得了','#g'+result.score+'分'); + if(!result.win){ + player.draw(result.score); + event.finish(); + } + else{ + event.score=result.score; + player.chooseTarget('请选择【御风】的目标',[1,result.score],function(card,player,target){ + return target!=player&&!target.hasSkill('yufeng2'); + }).set('ai',function(target){ + var player=_status.event.player; + var att=-get.attitude(player,target),attx=att*2; + if(att<=0||target.hasSkill('xinfu_pdgyingshi')) return 0; + if(target.hasJudge('lebu')) attx-=att; + if(target.hasJudge('bingliang')) attx-=att; + return attx/Math.max(2.25,Math.sqrt(target.countCards('h')+1)); + }); + } + "step 2" + if(result.bool){ + result.targets.sortBySeat(); + player.line(result.targets,'green'); + game.log(result.targets,'获得了','#y“御风”','效果'); + for(var i of result.targets) i.addSkill('yufeng2'); + if(event.score>result.targets.length) player.draw(event.score-result.targets.length); + } + else player.draw(result.score); + }, + ai:{ + order:10, + result:{player:1}, + threaten:3.2, + } + }, + yufeng2:{ + trigger:{player:'phaseZhunbeiBegin'}, + audio:false, + forced:true, + charlotte:true, + content:function(){ + 'step 0' + player.removeSkill('yufeng2'); + player.judge(); + 'step 1' + if(result.color=='red') player.skip('phaseDraw'); + else{ + player.skip('phaseUse'); + player.skip('phaseDiscard'); + } + }, + mark:true, + intro:{ + content:'准备阶段时进行判定,结果为红则跳过摸牌阶段,为黑则跳过出牌阶段和弃牌阶段', + }, + ai:{ + order:7, + result:{ + player:1, + }, + }, + }, + tianshu:{ + audio:2, + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('he')>0&&!game.hasPlayer(function(current){ + return current.countCards('ej','taipingyaoshu'); + }); + }, + position:'he', + filterCard:true, + filterTarget:true, + check:function(card){ + return 6-get.value(card); + }, + content:function(){ + 'step 0' + if(!lib.inpile.contains('taipingyaoshu')){ + lib.inpile.push('taipingyaoshu'); + event.card=game.createCard2('taipingyaoshu','heart',3); + } + else{ + event.card=get.cardPile(function(card){ + return card.name=='taipingyaoshu'; + }); + } + if(!event.card) event.finish(); + else target.gain(event.card,'gain2'); + 'step 1' + if(target.getCards('h').contains(card)&&get.name(card,target)=='taipingyaoshu') target.chooseUseTarget(card,'nopopup',true); + }, + ai:{ + order:3, + result:{ + target:function(player,target){ + if(lib.inpile.contains('taipingyaoshu')&&!get.cardPile(function(card){ + return card.name=='taipingyaoshu'; + })) return 0; + return target.getUseValue({name:'taipingyaoshu'}); + }, + }, + }, + }, //始计篇·智 refubi:{ audio:'fubi', @@ -691,7 +1012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:['chooseToUse','chooseToRespond'], filter:function(event,player){ - if(!player.countMark('spwuku')||!player.countCards('he')||player.hasSkill('spmiewu2')) return false; + if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; for(var i of lib.inpile){ var type=get.type2(i); if((type=='basic'||type=='trick')&&lib.filter.filterCard({name:i},player,event)) return true; @@ -719,7 +1040,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, check:function(button){ var player=_status.event.player; - if(player.countCards('h',button.link[2])>0) return 0; + if(player.countCards('hs',button.link[2])>0) return 0; if(['wugu','zhulu_card'].contains(button.link[2])) return 0; var effect=player.getUseValue(button.link[2]); if(effect>0) return effect; @@ -742,7 +1063,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(card){ return 8-get.value(card); }, - position:'he', + position:'hse', viewAs:{name:links[0][2],nature:links[0][3]}, precontent:function(){ player.addTempSkill('spmiewu2'); @@ -756,7 +1077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, hiddenCard:function(player,name){ var type=get.type2(name); - return (type=='basic'||type=='trick')&&player.countMark('spwuku')>0&&player.countCards('he')>0&&!player.hasSkill('spmiewu2'); + return (type=='basic'||type=='trick')&&player.countMark('spwuku')>0&&player.countCards('she')>0&&!player.hasSkill('spmiewu2'); }, ai:{ combo:'spwuku', @@ -764,7 +1085,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respondSha:true, respondShan:true, skillTagFilter:function(player){ - if(!player.countMark('spwuku')||!player.countCards('he')||player.hasSkill('spmiewu2')) return false; + if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false; }, order:1, result:{ @@ -819,6 +1140,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(cards.length) player.gain(cards,'gain2'); }, + group:'qinzheng_count', + intro:{ + content:function(num){ + var str='
  • 总次数:'; + str+=num; + str+='
  • 杀/闪:'; + str+=num%3; + str+='/3
  • 桃/酒:'; + str+=num%5; + str+='/5
  • 决斗/无中生有:'; + str+=num%8; + str+='/8'; + return str; + }, + }, + }, + qinzheng_count:{ + trigger:{player:'useCard1'}, + silent:true, + firstDo:true, + noHidden:true, + content:function(){ + player.storage.qinzheng=player.getAllHistory('useCard').length+player.getAllHistory('respond').length; + player.markSkill('qinzheng'); + }, }, spqiai:{ audio:2, @@ -1144,221 +1490,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, - //Flappy Bird实验 - flappybird:{ - audio:2, - enable:'phaseUse', - usable:1, - content:function(){ - "step 0" - if(_status.connectMode) event.time=lib.configOL.choose_timeout; - event.videoId=lib.status.videoId++; - if(player.isUnderControl()){ - game.swapPlayerAuto(player); - } - var switchToAuto=function(){ - game.pause(); - game.countChoose(); - setTimeout(function(){ - _status.imchoosing=false; - event._result={ - bool:true, - score:get.rand(1,10), - }; - if(event.dialog) event.dialog.close(); - if(event.control) event.control.close(); - game.resume(); - },5000); - }; - var createDialog=function(player,id){ - if(_status.connectMode) lib.configOL.choose_timeout='30'; - if(player==game.me) return; - var str=get.translation(player)+'正在玩Flappy Bird...
    '; - ui.create.dialog(str).videoId=id; - }; - var chooseButton=function(){ - var roundmenu=false; - if(ui.roundmenu&&ui.roundmenu.display!='none'){ - roundmenu=true; - ui.roundmenu.style.display='none'; - } - var event=_status.event; - event.settleed=false; - event.score=0; - event.dialog=ui.create.dialog('forcebutton','hidden'); - event.dialog.textPrompt=event.dialog.add('
    准备好了吗?准备好了的话就点击屏幕开始吧!
    '); - event.dialog.textPrompt.style["z-index"]=10; - event.switchToAuto=function(){ - event._result={ - bool:true, - score:event.score, - }; - event.dialog.close(); - game.resume(); - _status.imchoosing=false; - if(roundmenu) ui.roundmenu.style.display=''; - }; - event.dialog.classList.add('fixed'); - event.dialog.classList.add('scroll1'); - event.dialog.classList.add('scroll2'); - event.dialog.classList.add('fullwidth'); - event.dialog.classList.add('fullheight'); - event.dialog.classList.add('noupdate'); - event.dialog.style.overflow='hidden'; - event.dialog.open(); - - var height=event.dialog.offsetHeight; - var width=event.dialog.offsetWidth; - var top=50; - var speed=0; - var start=false; - - var bird=ui.create.div(''); - bird.style["background-image"]='linear-gradient(rgba(57, 133, 4, 1), rgba(60, 135, 6, 1))'; - bird.style["border-radius"]='3px'; - var pipes=[]; - bird.style.position='absolute'; - bird.style.height='40px'; - bird.style.width='40px'; - bird.style.left=Math.ceil(width/3)+'px'; - bird.style.top=(top/100*height)+'px'; - bird.updatePosition=function(){ - bird.style.transform='translateY('+(top/100*height-bird.offsetTop)+'px)'; - }; - event.dialog.appendChild(bird); - var isDead=function(){ - if(top>100||top<0) return true; - var btop=top; - var bleft=100/3; - var bdown=btop+5; - var bright=bleft+5; - for(var i of pipes){ - var left2=i.left; - var right2=left2+10; - var bottom2=i.height1; - var top2=i.height2; - - if(left2>bright||right2top2) return true; - return false; - } - return false; - }; - - var fly=function(){ - if(!start){ - start=true; - event.dialog.textPrompt.innerHTML='
    当前分数:'+event.score+'
    '; - speed=-4; - event.fly=setInterval(function(){ - top+=speed; - if(top<0) top=0; - bird.updatePosition(); - for(var i of pipes){ - i.left-=0.5; - i.updateLeft(); - } - speed+=0.5; - if(speed>2.5) speed=2.5; - - if(isDead()==true){ - event.settle(); - } - },35); - var addPipe=function(){ - var num=get.rand(5,55); - - var pipe1=ui.create.div(''); - pipe1.style["background-image"]='linear-gradient(rgba(150, 47, 47, 1), rgba(132, 43, 43, 1))'; - pipe1.style["border-radius"]='3px'; - pipe1.style.position='absolute'; - pipe1.height1=num; - pipe1.height2=num+50; - pipe1.left=110; - pipe1.num=1; - pipe1.style.height=Math.ceil(height*num/100)+'px'; - pipe1.style.width=(width/10)+'px'; - pipe1.style.left=(pipe1.left*width/100)+'px'; - pipe1.style.top='0px'; - - var pipe2=ui.create.div(''); - pipe2.style["background-image"]='linear-gradient(rgba(150, 47, 47, 1), rgba(132, 43, 43, 1))'; - pipe2.style["border-radius"]='3px'; - pipe1.pipe2=pipe2; - pipe2.style.position='absolute'; - pipe2.style.height=Math.ceil((100-pipe1.height2)*height/100)+'px'; - pipe2.style.width=(width/10)+'px'; - pipe2.style.left=(pipe1.left*width/100)+'px'; - pipe2.style.top=Math.ceil(pipe1.height2*height/100)+'px'; - pipes.add(pipe1); - event.dialog.appendChild(pipe1); - event.dialog.appendChild(pipe2); - pipe1.updateLeft=function(){ - this.style.transform='translateX('+((this.left/100*width)-this.offsetLeft)+'px)'; - this.pipe2.style.transform='translateX('+((this.left/100*width)-this.pipe2.offsetLeft)+'px)'; - if(this.left<25&&!this.score){ - this.score=true; - event.score++; - event.dialog.textPrompt.innerHTML='
    当前分数:'+event.score+'
    '; - } - if(this.left<-15){ - this.remove(); - this.pipe2.remove(); - pipes.remove(this); - } - } - }; - event.addPipe=setInterval(addPipe,2500); - } - else if(speed>0){ - speed=-4; - } - }; - document.addEventListener(lib.config.touchscreen?'touchend':'click',fly); - - event.settle=function(){ - clearInterval(event.fly); - clearInterval(event.addPipe); - document.removeEventListener(lib.config.touchscreen?'touchend':'click',fly); - setTimeout(function(){ - event.switchToAuto() - },1000); - }; - - game.pause(); - game.countChoose(); - }; - //event.switchToAuto=switchToAuto; - game.broadcastAll(createDialog,player,event.videoId); - if(event.isMine()){ - chooseButton(); - } - else if(event.isOnline()){ - event.player.send(chooseButton); - event.player.wait(); - game.pause(); - } - else{ - switchToAuto(); - } - "step 1" - game.broadcastAll(function(id,time){ - if(_status.connectMode) lib.configOL.choose_timeout=time; - var dialog=get.idDialog(id); - if(dialog){ - dialog.close(); - } - },event.videoId,event.time); - var result=event.result||result; - game.log(player,'获得了','#g'+result.score+'分'); - }, - ai:{ - order:10, - result:{player:1}, - threaten:3.2, - } - }, //界伏皇后 xinzhuikong:{ audio:2, @@ -1870,16 +2001,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card,player){ return get.color(card)=='black'; }, - position:'he', + position:'hse', viewAs:{name:'sha'}, viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; + if(!player.countCards('hse',{color:'black'})) return false; }, prompt:'将一张黑色牌当杀使用或打出', check:function(card){return 4.5-get.value(card)}, ai:{ skillTagFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; + if(!player.countCards('hes',{color:'black'})) return false; }, respondSha:true, } @@ -5527,7 +5658,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.filterCard({name:'tao'},player,event)){ return player.hasCard(function(card){ return get.type(card)=='basic'; - },'h'); + },'hs'); } return false; }, @@ -5557,7 +5688,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ switch(button.link[2]){ case 'tao':return 5; case 'jiu':{ - if(player.countCards('h',{type:'basic'})>=2) return 3; + if(player.countCards('hs',{type:'basic'})>=2) return 3; }; case 'sha': if(button.link[3]=='fire') return 2.95; @@ -5577,7 +5708,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 9-get.value(card); }, viewAs:{name:links[0][2],nature:links[0][3]}, - position:'he', + position:'hs', popname:true, } }, @@ -5589,7 +5720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:function(){ var player=_status.event.player; var event=_status.event; - if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.countCards('h',{type:'basic'})>=2){ + if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.countCards('hs',{type:'basic'})>=2){ return 3.3; } return 3.1; @@ -5598,7 +5729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillTagFilter:function(player,tag,arg){ if(player.hasCard(function(card){ return get.type(card)=='basic'; - },'he')){ + },'hs')){ if(tag=='respondSha'){ if(arg!='use') return false; } @@ -6336,20 +6467,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:["chooseToUse","chooseToRespond"], hiddenCard:function(player,name){ if(!['sha','shan','tao','jiu'].contains(name)) return false; - if(!player.storage.yizan&&player.countCards('he')<2) return false; + if(!player.storage.yizan&&player.countCards('hes')<2) return false; return player.hasCard(function(card){ return get.type(card)=='basic'; - },'h'); + },'hs'); }, filter:function(event,player){ - if(!player.storage.yizan&&player.countCards('he')<2) return false; + if(!player.storage.yizan&&player.countCards('hes')<2) return false; if(event.filterCard({name:'sha'},player,event)|| event.filterCard({name:'shan'},player,event)|| event.filterCard({name:'jiu'},player,event)|| event.filterCard({name:'tao'},player,event)){ return player.hasCard(function(card){ return get.type(card)=='basic'; - },'h'); + },'hs'); } return false; }, @@ -6382,7 +6513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ switch(button.link[2]){ case 'tao':case 'shan':return 5; case 'jiu':{ - if(player.storage.yizan&&player.countCards('h',{type:'basic'})>2) return 3; + if(player.storage.yizan&&player.countCards('hs',{type:'basic'})>2) return 3; }; case 'sha': if(button.link[3]=='fire') return 2.95; @@ -6414,7 +6545,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else return 6-get.value(card); }, viewAs:{name:links[0][2],nature:links[0][3]}, - position:'he', + position:'hes', popname:true, precontent:function(){ player.addMark('yizan_use',1,false); @@ -6430,17 +6561,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ order:function(){ var player=_status.event.player; var event=_status.event; - if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.storage.yizan&&player.countCards('h',{type:'basic'})>2){ + if(event.filterCard({name:'jiu'},player,event)&&get.effect(player,{name:'jiu'})>0&&player.storage.yizan&&player.countCards('hs',{type:'basic'})>2){ return 3.3; } return 3.1; }, skillTagFilter:function(player,tag,arg){ if(tag=='fireAttack') return true; - if(!player.storage.yizan&&player.countCards('he')<2) return false; + if(!player.storage.yizan&&player.countCards('hes')<2) return false; if(!player.hasCard(function(card){ return get.type(card)=='basic'; - },'he')){ + },'hes')){ return false; } }, @@ -7492,8 +7623,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, filter:function(event,player){ var list=[]; - player.getStorage('gnjinfan').filter(function(card){ - list.add(get.suit(card)); + player.getCards('s',function(card){ + if(card.hasGaintag('gnjinfan')) list.add(get.suit(card)); }); if(list.length>=lib.suit.length) return false; return player.countCards('h',function(card){ @@ -7505,8 +7636,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseCard('h',get.prompt('gnjinfan'),'将任意张手牌当做“铃”置于武将牌上',[1,function(){ var list=[]; var list2=[]; - player.getStorage('gnjinfan').filter(function(card){ - list.add(get.suit(card)); + player.getCards('s',function(card){ + if(card.hasGaintag('gnjinfan')) list.add(get.suit(card)); }); player.getCards('h',function(card){ list2.add(get.suit(card)); @@ -7514,10 +7645,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ list2.removeArray(list); return list2.length; }()],function(card,player){ - var list=player.getStorage('gnjinfan').concat(ui.selected.cards); - return list.filter(function(cardx){ - return get.suit(card)==get.suit(cardx); - }).length==0; + return !player.countCards('s',function(cardx){ + return cardx.hasGaintag('gnjinfan')&&get.suit(cardx,false)==get.suit(card,player); + })&&!ui.selected.cards.filter(function(cardx){ + return get.suit(cardx,player)==get.suit(card,player); + }).length; }).set('ai',function(card){ var player=_status.event.player; if(player.hasUseTarget(card)&&!player.hasValueTarget(card)) return 0; @@ -7527,199 +7659,72 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.logSkill('gnjinfan'); - player.markAuto('gnjinfan',result.cards); - player.lose(result.cards,'toStorage',ui.special,'visible'); game.log(player,'将',result.cards,'放到了武将牌上'); + player.loseToSpecial(result.cards,'gnjinfan'); } + else event.finish(); + 'step 2' + player.markSkill('gnjinfan'); }, - group:['gnjinfan3','gnjinfan4','gnjinfan6','gnjinfan7'], + group:['gnjinfan_gain'], marktext:'铃', intro:{ - content:'cards', + mark:function(dialog,storage,player){ + dialog.addAuto(player.getCards('s',function(card){ + return card.hasGaintag('gnjinfan'); + })); + }, + markcount:function(storage,player){ + return player.getCards('s',function(card){ + return card.hasGaintag('gnjinfan'); + }).length; + }, + onunmark:function(storage,player){ + var cards=player.getCards('s',function(card){ + return card.hasGaintag('gnjinfan'); + }); + if(cards.length){ + player.lose(cards,ui.discardPile); + player.$throw(cards,1000); + game.log(cards,'进入了弃牌堆'); + } + }, + }, + mod:{ + aiOrder:function(player,card,num){ + if(get.itemtype(card)=='card'&&card.hasGaintag('gnjinfan')) return num+0.5; + }, }, }, - gnjinfan3:{ - trigger:{player:'chooseToRespondBegin'}, - filter:function(event,player){ - if(event.responded) return false; - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return false; - for(var i=0;i0) return get.order(button.link); - return -1; - }, - backup:function(links,player){ - return { - audio:'gnjinfan', - filterCard:function(){return false}, - selectCard:-1, - viewAs:links[0], - onuse:function(result,player){ - var gnjinfan=player.getStorage('gnjinfan'); - if(gnjinfan){ - player.unmarkAuto('gnjinfan',[result.card]); - } - } - } - }, - prompt:function(links){ - return '选择'+get.translation(links)+'的目标'; - }, - }, - ai:{ - order:function(item,player){ - var event=_status.event; - if(event.type!='phase') return 4; - if(!player) return -1; - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return -1; - var order=0; - for(var i=0;i0){ - var order2=get.order(gnjinfan[i]); - if(order2>order) order=order2 - } - } - return order+0.1; - }, - result:{ - player:function(player){ - if(_status.event.dying) return get.attitude(player,_status.event.dying); - return 1; - } - }, - useful:-1, - value:-1 - } - }, - gnjinfan6:{ - trigger:{global:'cardsGotoOrderingAfter'}, + gnjinfan_gain:{ + trigger:{player:'loseAfter'}, forced:true, - popup:false, filter:function(event,player){ - var evt=event.getParent(); - return evt&&evt.player==player&&evt.skill&&evt.skill.indexOf('gnjinfan')==0; + if(!event.ss||!event.ss.length) return false; + for(var i in event.gaintag_map){ + if(event.gaintag_map[i].contains('gnjinfan')) return true; + return false; + } }, content:function(){ 'step 0' - event.cards=trigger.cards.slice(0); - 'step 1' - var suit=get.suit(cards[0]); - cards.shift(); - var card=get.cardPile2(function(cardx){ - return get.suit(cardx)==suit; - }); - if(card) player.gain(card,'gain2','log'); - if(cards.length) event.redo(); - 'step 2' - game.delayx(); - }, - }, - gnjinfan7:{ - filter:function(){return false}, - hiddenCard:function(player,name){ - var gnjinfan=player.getStorage('gnjinfan'); - if(!gnjinfan) return false; - for(var i=0;i0; - }, - content:function(){ - var cards=player.getStorage('gnjinfan'); - player.gain('gain2','log',cards,'fromStorage'); - cards.length=0; - player.unmarkSkill('gnjinfan'); + if(cards.length) player.gain(cards,'gain2'); + var num=player.getCards('s',function(card){ + return card.hasGaintag('gnjinfan'); + }).length; + if(num) player.markSkill('gnjinfan'); + else player.unmarkSkill('gnjinfan'); + 'step 1' + game.updateRoundNumber(); }, }, gnsheque:{ @@ -8070,13 +8075,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ weifeng3:'威风', weifeng_info:'锁定技,当你于出牌阶段内使用第一张伤害性基本牌或普通锦囊牌后,你令此牌的一名没有“惧”的其他目标角色获得一枚名称为此牌牌名的“惧”。有“惧”的角色受到伤害时,其移去“惧”,然后若造成伤害的牌名称和“惧”:相同,此伤害+1;不同,你获得该角色的一张牌。准备阶段开始时或你死亡时,你移去场上的所有“惧”。', gnjinfan:'锦帆', - gnjinfan3:'锦帆', - gnjinfan4:'锦帆', - gnjinfan6:'锦帆', - gnjinfan7:'锦帆', - gnjinfan8:'锦帆', - gnjinfan4_backup:'锦帆', - gnjinfan_info:'弃牌阶段开始时,你可将任意张手牌置于武将牌上,称为“铃”(每种花色的“铃”限一张)。当你需要使用或打出一张手牌时,你可以使用或打出一张“铃”。当有“铃”移动到处理区后,你从牌堆中获得与“铃”花色相同的一张牌。', + gnjinfan_gain:'锦帆', + gnjinfan_info:'弃牌阶段开始时,你可将任意张手牌置于武将牌上,称为“铃”(每种花色的“铃”限一张)。你可以如手牌般使用或打出“铃”。当有“铃”移动到处理区后,你从牌堆中获得与“铃”花色相同的一张牌。', gnsheque:'射却', gnsheque_info:'一名其他角色的准备阶段开始时,若其装备区内有牌,则你可以对其使用一张【杀】(无距离关系的限制且无视防具)。', sp_sufei:'SP苏飞', @@ -8230,6 +8230,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rezuici:'罪辞', rezuici_backup:'罪辞', rezuici_info:'出牌阶段,或当你处于濒死状态时,你可以废除一个有牌的装备栏并回复2点体力,然后可以移动“辅弼”标记。', + nanhualaoxian:'南华老仙', + yufeng:'御风', + yufeng2:'御风', + yufeng_info:'出牌阶段限一次,你可以表演“御风飞行”。若表演失败,则你摸X张牌。若表演成功,则你可以选择至多X名其他角色获得“御风”效果,然后摸X-Y张牌(准备阶段开始时,你进行判定。若结果为:红色,你跳过摸牌阶段;黑色,你跳过出牌阶段和弃牌阶段。X为你的得分。Y为你选择的角色数)。', + tianshu:'天书', + tianshu_info:'出牌阶段限一次,若场上没有【太平要术】,则你可以弃置一张牌并选择一名角色。该角色获得并使用【太平要术】。', mobile_standard:'手杀异构·标准包', mobile_shenhua:'手杀异构·神话再临', diff --git a/character/old.js b/character/old.js index c32d66a89..4dee97699 100755 --- a/character/old.js +++ b/character/old.js @@ -82,7 +82,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:["old_guhuo_guess","old_guhuo_respond","old_guhuo_wuxie"], enable:"chooseToUse", filter:function (event,player){ - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; var list=['sha','tao','shan','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; if(get.mode()=='guozhan'){ list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']); @@ -120,6 +120,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return { filterCard:true, selectCard:1, + position:'hs', viewAs:{name:links[0][2],nature:links[0][3]}, } }, @@ -293,7 +294,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:"chooseToUse", filterCard:true, viewAsFilter:function (player){ - return player.countCards('h')>0; + return player.countCards('hs')>0; }, viewAs:{ name:"wuxie", @@ -306,7 +307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.2, }, old_zuilun:{ - audio:'xinfu_zuilun', + audio:'xinfu_zuilun', subSkill:{ e:{}, h:{}, diff --git a/character/rank.js b/character/rank.js index 06439185c..f09221454 100644 --- a/character/rank.js +++ b/character/rank.js @@ -249,6 +249,7 @@ window.noname_character_rank={ 'wolongfengchu', 'yanghuiyu', 'liubian', + 'nanhualaoxian', 'key_misuzu', 'key_sunohara', 'key_umi', @@ -436,6 +437,7 @@ window.noname_character_rank={ 'jin_simashi', 'jin_wangyuanji', 'duyu', + 'yj_ganning', 'key_kyousuke', 'key_yusa', 'key_misa', @@ -897,7 +899,6 @@ window.noname_character_rank={ 're_heqi', 're_sp_zhugeliang', 're_liushan', - 'yj_ganning', 're_pangtong', 'xin_yuanshao', 'liuye', @@ -1120,6 +1121,7 @@ window.noname_character_rank={ 'mini_lvmeng', 'boss_zhaoyun', 'yanghuiyu', + 'nanhualaoxian', 'key_yuri', 'key_yuzuru', 'sp_key_kanade', diff --git a/character/refresh.js b/character/refresh.js index e7c5f2426..6db2bf4ad 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -7,7 +7,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ refresh_standard:["re_caocao","re_simayi","re_guojia","re_lidian","re_zhangliao","re_xuzhu","re_xiahoudun","re_zhangfei","re_zhaoyun","re_guanyu","re_machao","re_xushu","re_zhouyu","re_lvmeng","re_ganning","re_luxun","re_daqiao","re_huanggai","re_lvbu","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong",'re_gongsunzan'], refresh_feng:['caoren','ol_xiahouyuan','re_huangzhong','ol_weiyan','ol_xiaoqiao','zhoutai','re_zhangjiao','xin_yuji'], refresh_huo:["ol_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","ol_pangtong","ol_yuanshao","ol_pangde","re_taishici"], - refresh_lin:['re_zhurong','re_menghuo','ol_sunjian','re_caopi','re_xuhuang','ol_dongzhuo'], + refresh_lin:['re_zhurong','re_menghuo','ol_sunjian','re_caopi','re_xuhuang','ol_dongzhuo','ol_zhurong'], refresh_shan:['re_jiangwei','re_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce','ol_dengai'], refresh_yijiang1:['re_wuguotai','re_gaoshun','re_caozhi','yujin_yujin','re_masu','xin_xusheng','re_fazheng','xin_lingtong','re_zhangchunhua'], refresh_yijiang2:['old_madai','wangyi','guanzhang','xin_handang','re_zhonghui','re_liaohua','re_chengpu','re_caozhang','re_bulianshi','xin_liubiao'], @@ -18,6 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, connect:true, character:{ + ol_zhurong:['female','shu',4,['juxiang','lieren','changbiao'],['unseen']], re_zhangchunhua:['female','wei',3,['rejueqing','reshangshi']], re_gongsunyuan:['male','qun',4,['rehuaiyi']], re_caozhen:['male','wei',4,['residi']], @@ -131,6 +132,78 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_xushu:['zhaoyun','sp_zhugeliang'], }, skill:{ + //长标 + changbiao:{ + audio:2, + mod:{ + targetInRange:function(card,player,target){ + if(card.changbiao) return true; + }, + }, + enable:'phaseUse', + usable:1, + position:'hs', + viewAs:{ + name:'sha', + changbiao:true, + }, + locked:false, + filter:function(event,player){ + return player.countCards('hs')>0; + }, + filterCard:true, + selectCard:[1,Infinity], + position:'hs', + check:function(card){ + var player=_status.event.player; + if(ui.selected.cards.length){ + var list=game.filterPlayer(function(current){ + return current!=player&&player.canUse('sha',current,false)&&get.effect(current,{name:'sha'},player,player)>0; + }).sort(function(a,b){ + return get.effect(b,{name:'sha'},player,player)-get.effect(a,{name:'sha'},player,player); + }); + if(!list.length) return 0; + var target=list[0]; + if(target.mayHaveShan()&&!player.hasSkillTag('directHit_ai',true,{ + target:target, + card:card, + },true)) return 0; + return 6.5-get.value(card); + } + return 6.3-get.value(card); + }, + onuse:function(result,player){ + player.addTempSkill('changbiao_draw'); + }, + subSkill:{ + draw:{ + trigger:{player:'phaseUseEnd'}, + forced:true, + charlotte:true, + filter:function(event,player){ + return player.getHistory('sourceDamage',function(evxt){ + var evt=evxt.getParent(); + return evt&&evt.name=='sha'&&evt.skill=='changbiao'&&evt.getParent('phaseUse')==event; + }).length>0; + }, + content:function(){ + var num=0; + player.getHistory('sourceDamage',function(evxt){ + var evt=evxt.getParent(); + if(evt&&evt.name=='sha'&&evt.skill=='changbiao'&&evt.getParent('phaseUse')==trigger) num+=evt.cards.length; + }); + player.draw(num); + }, + }, + }, + ai:{ + order:function(item,player){ + return get.order({name:'sha'},player)+0.3*(Math.min(player.getCardUsable('sha'),player.countCards('hs','sha')+player.hasCard(function(card){ + return card.name!='sha'&&get.value(card,player)<6.3; + },'hs')?1:0)>1?-1:1); + }, + }, + }, //国钟会 gzquanji:{ audio:'quanji', @@ -2294,11 +2367,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'longdan_sha', audioname:['re_zhaoyun'], hiddenCard:function(player,name){ - if(name=='tao') return player.countCards('h','jiu')>0; - if(name=='jiu') return player.countCards('h','tao')>0; + if(name=='tao') return player.countCards('hs','jiu')>0; + if(name=='jiu') return player.countCards('hs','tao')>0; return false; }, enable:['chooseToUse','chooseToRespond'], + position:'hs', prompt:'将杀当做闪,或将闪当做杀,或将桃当做酒,或将酒当做桃使用或打出', viewAs:function(cards,player){ var name=false; @@ -2320,7 +2394,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var map={sha:'shan',tao:'jiu',jiu:'tao'} for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ var temp=get.order({name:name}); if(temp>max){ max=temp; @@ -2345,10 +2419,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ var filter=event.filterCard; - if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; - if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; - if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; - if(filter({name:'jiu'},player,event)&&player.countCards('h','tao')) return true; + if(filter({name:'sha'},player,event)&&player.countCards('hs','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true; + if(filter({name:'jiu'},player,event)&&player.countCards('hs','tao')) return true; return false; }, ai:{ @@ -2360,7 +2434,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ case 'respondSha':name='shan';break; case 'respondShan':name='sha';break; } - if(!player.countCards('h',name)) return false; + if(!player.countCards('hs',name)) return false; }, order:function(item,player){ if(player&&_status.event.type=='phase'){ @@ -2369,7 +2443,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var map={sha:'shan',tao:'jiu',jiu:'tao'} for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ var temp=get.order({name:name}); if(temp>max) max=temp; } @@ -4527,7 +4601,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return (lib.inpile.contains(name)&&player.countCards('h')>0&&!player.hasSkill('reguhuo_phase')); }, filter:function(event,player){ - if(!player.countCards('h')||player.hasSkill('reguhuo_phase')) return false; + if(!player.countCards('hs')||player.hasSkill('reguhuo_phase')) return false; for(var i of lib.inpile){ if(i=='shan'||i=='wuxie') continue; var type=get.type(i); @@ -4583,6 +4657,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ suit:'none', number:null, }, + position:'hs', ai1:function(card){ var player=_status.event.player; var hasEnemy=game.hasPlayer(function(current){ @@ -4596,11 +4671,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 6-get.value(card); }, filterCard:true, - position:'h', } }, prompt:function(links){ - return '将一张牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; + return '将一张手牌当做'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; }, }, ai:{ @@ -4608,7 +4682,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respondShan:true, respondSha:true, skillTagFilter:function(player){ - if(!player.countCards('h')||player.hasSkill('reguhuo_phase')) return false; + if(!player.countCards('hs')||player.hasSkill('reguhuo_phase')) return false; }, order:10, result:{ @@ -4626,7 +4700,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ number:null, }, viewAsFilter:function(player){ - return player.countCards('h')&&!player.hasSkill('reguhuo_phase'); + return player.countCards('hs')&&!player.hasSkill('reguhuo_phase'); }, check:function(card){ var player=_status.event.player; @@ -4642,7 +4716,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, prompt:'将一张牌当做【闪】使用或打出', filterCard:true, - position:'h', + position:'hs', ai:{ order:4, }, @@ -4667,11 +4741,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 6-get.value(card); }, viewAsFilter:function(player){ - return player.countCards('h')&&!player.hasSkill('reguhuo_phase'); + return player.countCards('hs')&&!player.hasSkill('reguhuo_phase'); }, filterCard:true, prompt:'将一张牌当做【无懈可击】使用', - position:'h', + position:'hs', ai:{ order:4, }, @@ -4967,13 +5041,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{global:'judge'}, filter:function(event,player){ - return player.countCards('he',{color:'black'})>0; + return player.countCards('hes',{color:'black'})>0; }, direct:true, content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('xinguidao'),'he',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('xinguidao'),'hes',function(card){ if(get.color(card)!='black') return false; var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); @@ -5038,17 +5112,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card){ return get.color(card)=='black'; }, - position:'he', + position:'hes', viewAs:{name:'shan'}, viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; + if(!player.countCards('hes',{color:'black'})) return false; }, prompt:'将一张黑色牌当闪打出', check:function(){return 1}, ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; + if(!player.countCards('hes',{color:'black'})) return false; }, effect:{ target:function(card,player,target,current){ @@ -5104,7 +5178,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ threaten:1.5, }, rehuoji:{ - position:"he", + position:"hes", audio:2, audioname:['ol_sp_zhugeliang','ol_pangtong'], enable:"chooseToUse", @@ -5116,7 +5190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ nature:"fire", }, viewAsFilter:function (player){ - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; }, prompt:"将一张红色牌当火攻使用", check:function (card){ @@ -5133,13 +5207,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ rekanpo:{ audio:2, audioname:['ol_sp_zhugeliang','ol_pangtong'], - position:"he", + position:"hes", enable:"chooseToUse", filterCard:function (card){ return get.color(card)=='black'; }, viewAsFilter:function (player){ - return player.countCards('he',{color:'black'})>0; + return player.countCards('hes',{color:'black'})>0; }, viewAs:{ name:"wuxie", @@ -5614,16 +5688,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(get.zhu(player,'shouyue')) return true; return get.color(card)=='red'; }, - position:"he", + position:"hes", viewAs:{ name:"sha", }, viewAsFilter:function(player){ if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; + if(!player.countCards('hes')) return false; } else{ - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; } }, prompt:"将一张红色牌当杀使用或打出", @@ -5632,10 +5706,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respondSha:true, skillTagFilter:function(player){ if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; + if(!player.countCards('hes')) return false; } else{ - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; } }, }, @@ -6812,12 +6886,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'judge'}, direct:true, filter:function(event,player){ - return player.countCards('he')>0; + return player.countCards('hes')>0; }, content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'he',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('reguicai'),'hes',function(card){ var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod2!='unchanged') return mod2; @@ -7931,14 +8005,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, discard:false, + lose:false, + delay:false, filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; + return player.countCards('hes',{suit:'diamond'})>0; }, - prepare:'throw', - position:'he', + position:'hes', filterCard:{suit:'diamond'}, filterTarget:function(card,player,target){ - if(target.hasJudge('lebu')) return true; + if(get.position(ui.selected.cards[0])!='s'&&lib.filter.cardDiscardable(ui.selected.cards[0],player,'reguose')&&target.hasJudge('lebu')) return true; if(player==target) return false; if(!game.checkMod(ui.selected.cards[0],player,'unchanged','cardEnabled2',player)) return false; return player.canUse({name:'lebu',cards:ui.selected.cards},target); @@ -7948,6 +8023,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ if(target.hasJudge('lebu')){ + player.discard(cards); target.discard(target.getJudge('lebu')); } else{ @@ -8500,8 +8576,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.suit(card)=='spade'; }, viewAs:{name:'jiu'}, + position:'hs', viewAsFilter:function(player){ - if(!player.countCards('h',{suit:'spade'})) return false; + if(!player.countCards('hs',{suit:'spade'})) return false; return true; }, prompt:'将一张黑桃手牌当酒使用', @@ -8509,11 +8586,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player&&player==cardx.player) return true; if(_status.event.type=='dying') return 1; var player=_status.event.player; - var shas=player.getCards('h',function(card){ + var shas=player.getCards('hs',function(card){ return card!=cardx&&get.name(card,player)=='sha'; }); if(!shas.length) return -1; - if(shas.length>1&&(player.getCardUsable('sha')>1||player.countCards('h','zhuge'))){ + if(shas.length>1&&(player.getCardUsable('sha')>1||player.countCards('hs','zhuge'))){ return 0; } shas.sort(function(a,b){ @@ -9143,6 +9220,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gzpaiyi:'排异', gzpaiyi_backup:'排异', gzpaiyi_info:'出牌阶段,你可以将移去一张“权”,然后选择一名角色并令其摸X张牌(X为“权”的数量),若其手牌数不小于你,则你对其造成1点伤害且本技能于此回合内失效。', + ol_zhurong:'界祝融', + changbiao:'长标', + changbiao_info:'出牌阶段限一次,你可以将任意张手牌当做【杀】使用(无距离限制)。若你因此【杀】对目标角色造成过伤害,则你于出牌阶段结束时摸X张牌(X为此【杀】对应的实体牌数量)。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/shenhua.js b/character/shenhua.js index 60da709e8..586974c66 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1127,10 +1127,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ subSkill:{ "1":{ trigger:{ - global:["loseAfter","addCardToStorage"], + global:["loseAfter","addCardToStorage","loseAsyncAfter"], }, - filter:function(event,player){ - if(event.name=='lose') return event.toStorage==true; + filter:function(event,player,name){ + if(name!='addCardToStorage') return event.toStorage==true; return true; }, direct:true, @@ -2507,13 +2507,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['ol_pangtong'], enable:'chooseToUse', filter:function(event,player){ - return player.countCards('he',{suit:'club'})>0; + return player.countCards('hes',{suit:'club'})>0; }, filterCard:{suit:'club'}, viewAs:{name:'tiesuo'}, prompt:'将一张梅花牌当铁锁连环使用', check:function(card){return 6-get.value(card)}, - position:'he', + position:'hes', }, xinlianhuan:{ audio:2, @@ -2530,7 +2530,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['ol_pangtong'], enable:'chooseToUse', filter:function(event,player){ - return player.countCards('h',{suit:'club'})>0; + return player.countCards('hs',{suit:'club'})>0; }, filterCard:{suit:'club'}, viewAs:{name:'tiesuo'}, @@ -2552,6 +2552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!player.storage.reluanji) return true; return !player.storage.reluanji.contains(get.suit(card)); }, + position:'hs', selectCard:2, check:function(card){ var player=_status.event.player; @@ -4423,9 +4424,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.color(card)=='black'; }, filter:function(event,player){ - return player.countCards('he',{type:['basic','equip'],color:'black'}) + return player.countCards('hes',{type:['basic','equip'],color:'black'}) }, - position:'he', + position:'hes', viewAs:{name:'bingliang'}, prompt:'将一黑色的基本牌或装备牌当兵粮寸断使用', check:function(card){return 6-get.value(card)}, @@ -4757,7 +4758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'jiu'}, viewAsFilter:function(player){ - if(!player.countCards('h',{suit:'spade'})) return false; + if(!player.countCards('hs',{suit:'spade'})) return false; }, prompt:'将一张黑桃手牌当酒使用', check:function(card){ @@ -4995,8 +4996,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'huogong',nature:'fire'}, viewAsFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; + if(!player.countCards('hs',{color:'red'})) return false; }, + position:'hs', prompt:'将一张红色牌当火攻使用', check:function(card){ var player=_status.currentPhase; @@ -5046,9 +5048,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.color(card)=='black'; }, viewAsFilter:function(player){ - return player.countCards('h',{color:'black'})>0; + return player.countCards('hs',{color:'black'})>0; }, viewAs:{name:'wuxie'}, + position:'hs', prompt:'将一张黑色手牌当无懈可击使用', check:function(card){ var tri=_status.event.getTrigger(); @@ -5066,8 +5069,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['re_pangtong'], enable:'chooseToUse', filter:function(event,player){ - return player.countCards('h',{suit:'club'})>0; + return player.countCards('hs',{suit:'club'})>0; }, + position:'hs', filterCard:function(card){ return get.suit(card)=='club'; }, @@ -5593,6 +5597,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return str; }, viewAs:{name:'juedou'}, + position:'hs', onremove:true, filterCard:function(card,player){ return get.color(card)!=player.storage.shuangxiong; @@ -5609,12 +5614,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ luanji:{ audio:2, enable:'phaseUse', + position:'hs', viewAs:{name:'wanjian'}, filterCard:function(card,player){ if(ui.selected.cards.length){ return get.suit(card)==get.suit(ui.selected.cards[0]); } - var cards=player.getCards('h'); + var cards=player.getCards('hs'); for(var i=0;i0; + return player.countCards('hes',{color:'black'})>0; }, direct:true, content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'he',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('guidao'),'hes',function(card){ if(get.color(card)!='black') return false; var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); @@ -6767,7 +6773,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, audio:2, filter:function(event,player){ - return player.countCards('h')>0 + return player.countCards('hs')>0 }, chooseButton:{ dialog:function(){ @@ -6894,7 +6900,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:"chooseToUse", filter:function(event,player){ if(player.hasSkill('guhuo_phase'))return false; - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; var list=['sha','shan','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; if(get.mode()=='guozhan'){ list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']); @@ -6932,6 +6938,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return { filterCard:true, selectCard:1, + position:'hs', viewAs:{name:links[0][2],nature:links[0][3]}, } }, @@ -7123,7 +7130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.responded) return false; if(!event.filterCard({name:'shan'})&&!event.filterCard({name:'sha'})) return false; if(!lib.filter.cardRespondable({name:'shan'},player,event)&&!lib.filter.cardRespondable({name:'sha'},player,event)) return false; - if(!player.countCards('h')) return false; + if(!player.countCards('hs')) return false; return true; }, direct:true, @@ -7131,7 +7138,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" if(trigger.filterCard({name:'shan'})&&lib.filter.cardRespondable({name:'shan'},player,trigger)) event.name='shan'; else event.name='sha'; - player.chooseCard('是否发动【蛊惑】,将一张手牌当做'+get.translation(event.name)+'打出?'); + player.chooseCard('是否发动【蛊惑】,将一张手牌当做'+get.translation(event.name)+'打出?','hs'); "step 1" if(result.bool){ player.addTempSkill('guhuo_phase'); @@ -7235,10 +7242,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ silent:true, popup:false, enable:"chooseToUse", + position:'hs', filterCard:true, viewAsFilter:function(player){ if(player.hasSkill('guhuo_phase'))return false; - return player.countCards('h')>0; + return player.countCards('hs')>0; }, viewAs:{ name:"wuxie", diff --git a/character/sp.js b/character/sp.js index 98a0f78b4..215baa869 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1303,10 +1303,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(target.hp<=player.hp) return false; return lib.filter.filterTarget.apply(this,arguments); }, - position:'he', + position:'hes', audio:'niluan', viewAsFilter:function(player){ - return player.countCards('he',lib.skill.spniluan.filterCard)>0&&game.hasPlayer(function(current){ + return player.countCards('hes',lib.skill.spniluan.filterCard)>0&&game.hasPlayer(function(current){ return current.hp>player.hp&&player.canUse('sha',current); }); }, @@ -1335,7 +1335,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, viewAs:{name:'shunshou'}, filterCard:{color:'red'}, - position:'he', + position:'hes', check:function(card){ return 7-get.value(card); }, @@ -1344,7 +1344,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return lib.filter.filterTarget.apply(this,arguments); }, viewAsFilter:function(player){ - return player.countCards('he',lib.skill.spweiwu.filterCard)>0&&game.hasPlayer(function(current){ + return player.countCards('hes',lib.skill.spweiwu.filterCard)>0&&game.hasPlayer(function(current){ return current.countCards('h')>player.countCards('h')&&player.canUse('shunshou',current); }); }, @@ -1748,7 +1748,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filter:function(event,player){ - return event.xinjingong_list&&player.countCards('he',function(card){ + return event.xinjingong_list&&player.countCards('hes',function(card){ return card.name=='sha'||get.type(card)=='equip'; }); }, @@ -1786,7 +1786,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'jingong', filterCard:true, popname:true, - position:'he', + position:'hes', viewAs:{name:links[0][2]}, check:function(card){ return 6-get.value(card); @@ -2096,13 +2096,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ splanggu_rewrite:{ trigger:{player:'judge'}, filter:function (event,player){ - return player.countCards('h')>0&&event.getParent().name=='splanggu'; + return player.countCards('hs')>0&&event.getParent().name=='splanggu'; }, direct:true, content:function (){ "step 0" player.chooseCard('狼顾的判定结果为'+ - get.translation(trigger.player.judging[0])+',是否打出一张手牌进行代替?','h',function(card){ + get.translation(trigger.player.judging[0])+',是否打出一张手牌进行代替?','hs',function(card){ var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod2!='unchanged') return mod2; @@ -2727,7 +2727,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ niluanx:{ viewAs:{name:'sha'}, filterCard:{color:'black'}, - position:'he', + position:'hes', check:function(card){return 5-get.value(card)}, }, cuorui:{ @@ -2857,13 +2857,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"judge", }, filter:function (event,player){ - return player.countCards('he')>0&&player.side==event.player.side; + return player.countCards('hes')>0&&player.side==event.player.side; }, direct:true, content:function (){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'he',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('huanshi_three'),'hes',function(card){ var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod2!='unchanged') return mod2; @@ -4607,7 +4607,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filter:function(event,player){ - return event.xinjingong_list&&player.countCards('he',function(card){ + return event.xinjingong_list&&player.countCards('hes',function(card){ return card.name=='sha'||get.type(card)=='equip'; }); }, @@ -4645,7 +4645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'jingong', filterCard:true, popname:true, - position:'he', + position:'hes', viewAs:{name:links[0][2]}, check:function(card){ return 6-get.value(card); @@ -6191,8 +6191,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ fanghun:{ hiddenCard:function(player,name){ if(!player.storage.fanghun||player.storage.fanghun<=0) return false; - if(name=='tao') return player.countCards('h','jiu')>0; - if(name=='jiu') return player.countCards('h','tao')>0; + if(name=='tao') return player.countCards('hs','jiu')>0; + if(name=='jiu') return player.countCards('hs','tao')>0; return false; }, audio:2, @@ -6242,6 +6242,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name) return {name:name}; return null; }, + position:'hs', check:function(card){ var player=_status.event.player; if(_status.event.type=='phase'){ @@ -6251,7 +6252,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var map={sha:'shan',tao:'jiu',jiu:'tao'} for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ var temp=get.order({name:name}); if(temp>max){ max=temp; @@ -6277,10 +6278,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(!player.storage.fanghun||player.storage.fanghun<=0) return false; var filter=event.filterCard; - if(filter({name:'sha'},player,event)&&player.countCards('h','shan')) return true; - if(filter({name:'shan'},player,event)&&player.countCards('h','sha')) return true; - if(filter({name:'tao'},player,event)&&player.countCards('h','jiu')) return true; - if(filter({name:'jiu'},player, event)&&player.countCards('h','tao')) return true; + if(filter({name:'sha'},player,event)&&player.countCards('hs','shan')) return true; + if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true; + if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true; + if(filter({name:'jiu'},player, event)&&player.countCards('hs','tao')) return true; return false; }, onrespond:function(){return this.onuse.apply(this,arguments)}, @@ -6297,7 +6298,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ case 'respondSha':name='shan';break; case 'respondShan':name='sha';break; } - if(!player.countCards('h',name)) return false; + if(!player.countCards('hs',name)) return false; }, order:function(item,player){ if(player&&_status.event.type=='phase'){ @@ -6306,7 +6307,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var map={sha:'shan',tao:'jiu',jiu:'tao'} for(var i=0;i(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ + if(player.countCards('hs',map[name])>(name=='jiu'?1:0)&&player.getUseValue({name:name})>0){ var temp=get.order({name:name}); if(temp>max) max=temp; } @@ -9909,23 +9910,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, viewAs:{name:'tao'}, viewAsFilter:function(player){ - return player!=_status.currentPhase&&player.countCards('he')>1; + return player!=_status.currentPhase&&player.countCards('hes')>1; }, selectCard:2, filterCard:true, - position:'he', - ai:{ - skillTagFilter:function(){ - return lib.skill.xisheng.viewAsFilter.apply(this,arguments) - }, - }, + position:'hes', }, shulv:{ inherit:'zhiheng', prompt:'弃置一张牌并摸一张牌', selectCard:1, filter:function(event,player){ - return player.countCards('h')>player.hp; + return player.countCards('hs')>player.hp; }, }, xiandeng:{ @@ -10158,7 +10154,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return player.getHistory('useCard',function(evt){ return evt.isPhaseUsing()&&['basic','trick'].contains(get.type(evt.card)); - }).length>0&&player.countCards('h')>0; + }).length>0&&player.countCards('hs')>0; }, content:function(){ "step 0" @@ -10168,7 +10164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }) "step 1" event._result={}; - if(event.count&&event.history.length&&player.countCards('h')){ + if(event.count&&event.history.length&&player.countCards('hs')){ event.count--; var card=event.history.shift().card; card={name:card.name,nature:card.nature}; @@ -10204,6 +10200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.itemtype(card)=='card'; }, selectCard:1, + position:'hs', popname:true, }, chenqing2:{}, @@ -14140,7 +14137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chixin1:{ enable:['chooseToRespond','chooseToUse'], filterCard:{suit:'diamond'}, - position:'he', + position:'hes', viewAs:{name:'sha'}, prompt:'将一张♦牌当杀使用或打出', check:function(card){return 5-get.value(card)}, @@ -14152,7 +14149,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:['chooseToUse','chooseToRespond'], filterCard:{suit:'diamond'}, viewAs:{name:'shan'}, - position:'he', + position:'hes', prompt:'将一张♦牌当闪使用或打出', check:function(card){return 5-get.value(card)}, ai:{ @@ -14705,8 +14702,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:3, audio:2, enable:"chooseToUse", - position:"he", - filterCard:function (card){ + position:"hes", + filterCard:function(card){ return get.color(card)=='red'; }, viewAs:{ @@ -14718,7 +14715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!game.hasPlayer(function(current){ return current.hasSkill('xinfu_jianjie'); })) return false; - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; }, prompt:"将一张红色牌当火攻使用", check:function (card){ @@ -14742,7 +14739,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return current.hasSkill('xinfu_jianjie'); })) return false; if((player.getStat().skill.smh_lianhuan||0)+(player.getStat().skill.smh_lianhuan1||0)>=3) return false; - return player.countCards('h',{suit:'club'})>0; + return player.countCards('hs',{suit:'club'})>0; }, filterCard:function (card){ return get.suit(card)=='club'; @@ -14750,6 +14747,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{ name:"tiesuo", }, + position:'hs', prompt:"将一张梅花牌当铁锁连环使用", check:function (card){return 6-get.value(card)}, mark:true, @@ -15485,10 +15483,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:"chooseToUse", viewAsFilter:function(player){ if(player==_status.currentPhase) return false; - return player.hasMark('xinfu_falu_club')&&player.countCards('h')>0; + return player.hasMark('xinfu_falu_club')&&player.countCards('hs')>0; }, filterCard:true, - position:"h", + position:"hs", viewAs:{ name:"tao", }, diff --git a/character/sp2.js b/character/sp2.js index 8351e6185..83213214d 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -2145,11 +2145,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pozhu:{ enable:'phaseUse', viewAsFilter:function(player){ - return !player.hasSkill('pozhu3'); + return !player.hasSkill('pozhu3')&&player.countCards('hs')>0; }, viewAs:{name:'chuqibuyi'}, filterCard:true, - position:'h', + position:'hs', check:function(card){ return 7-get.value(card); }, @@ -4559,7 +4559,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ group:'juanhui3', enable:'phaseUse', filter:function(event,player){ - return player.getStorage('juanhui3').length>0&&player.countCards('h')>0; + return player.getStorage('juanhui3').length>0&&player.countCards('hs')>0; }, chooseButton:{ dialog:function(event,player){ @@ -4585,6 +4585,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'juanhui', popname:true, filterCard:true, + position:'hs', viewAs:{ name:links[0][2], nature:links[0][3], @@ -5876,12 +5877,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:"phaseUse", filter:function(event,player){ if(player.hasJudge('bingliang')) return false; - return player.countCards('he',function(card){ + return player.countCards('hes',function(card){ return get.color(card)=='black'&&get.type(card)=='basic'; })>0; }, viewAs:{name:'bingliang'}, - position:"he", + position:"hes", filterCard:function(card,player,event){ return get.color(card)=='black'&&get.type(card)=='basic'&&player.canAddJudge({name:'bingliang',cards:[card]}); }, @@ -8715,7 +8716,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:'useCardAfter', }, filter:function(event,player){ - if(player.hasSkill('xinfu_sidaoy')||!player.countCards('h')) return false; + if(player.hasSkill('xinfu_sidaoy')||!player.countCards('hs')) return false; if(!event.targets||!event.targets.length||!event.isPhaseUsing(player)) return false; var history=player.getHistory('useCard'); var index=history.indexOf(event)-1; @@ -8749,7 +8750,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card){ return get.itemtype(card)=='card'; }, - position:"h", + position:"hs", viewAs:{ name:"shunshou", }, diff --git a/character/standard.js b/character/standard.js index 2044a4761..8e56bea11 100755 --- a/character/standard.js +++ b/character/standard.js @@ -290,12 +290,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{global:'judge'}, direct:true, filter:function(event,player){ - return player.countCards(get.mode()=='guozhan'?'he':'h')>0; + return player.countCards(get.mode()=='guozhan'?'hes':'hs')>0; }, content:function(){ "step 0" player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ - get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),get.mode()=='guozhan'?'he':'h',function(card){ + get.translation(trigger.player.judging[0])+','+get.prompt('guicai'),get.mode()=='guozhan'?'hes':'hs',function(card){ var player=_status.event.player; var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); if(mod2!='unchanged') return mod2; @@ -725,14 +725,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, viewAs:{name:'shan'}, viewAsFilter:function(player){ - if(!player.countCards('h',{color:'black'})) return false; + if(!player.countCards('hs',{color:'black'})) return false; }, + position:'hs', prompt:'将一张黑色手牌当闪使用或打出', check:function(){return 1}, ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('h',{color:'black'})) return false; + if(!player.countCards('hs',{color:'black'})) return false; }, effect:{ target:function(card,player,target,current){ @@ -941,14 +942,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(get.zhu(player,'shouyue')) return true; return get.color(card)=='red'; }, - position:'he', + position:'hes', viewAs:{name:'sha'}, viewAsFilter:function(player){ if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; + if(!player.countCards('hes')) return false; } else{ - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; } }, prompt:'将一张红色牌当杀使用或打出', @@ -956,10 +957,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ skillTagFilter:function(player){ if(get.zhu(player,'shouyue')){ - if(!player.countCards('he')) return false; + if(!player.countCards('hes')) return false; } else{ - if(!player.countCards('he',{color:'red'})) return false; + if(!player.countCards('hes',{color:'red'})) return false; } }, respondSha:true, @@ -1498,8 +1499,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:{name:'shan'}, viewAs:{name:'sha'}, viewAsFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, + position:'hs', prompt:'将一张闪当杀使用或打出', check:function(){return 1}, ai:{ @@ -1510,7 +1512,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, respondSha:true, skillTagFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, order:function(){ return get.order({name:'sha'})+0.1; @@ -1527,13 +1529,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ viewAs:{name:'shan'}, prompt:'将一张杀当闪使用或打出', check:function(){return 1}, + position:'hs', viewAsFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, effect:{ target:function(card,player,target,current){ @@ -1858,10 +1861,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterCard:function(card){ return get.color(card)=='black'; }, - position:'he', + position:'hes', viewAs:{name:'guohe'}, viewAsFilter:function(player){ - if(!player.countCards('he',{color:'black'})) return false; + if(!player.countCards('hes',{color:'black'})) return false; }, prompt:'将一张黑色牌当过河拆桥使用', check:function(card){return 4-get.value(card)} @@ -1974,13 +1977,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ guose:{ audio:2, filter:function(event,player){ - return player.countCards('he',{suit:'diamond'})>0; + return player.countCards('hes',{suit:'diamond'})>0; }, enable:'chooseToUse', filterCard:function(card){ return get.suit(card)=='diamond'; }, - position:'he', + position:'hes', viewAs:{name:'lebu'}, prompt:'将一张方片牌当乐不思蜀使用', check:function(card){return 6-get.value(card)}, @@ -2362,12 +2365,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['re_huatuo'], enable:'chooseToUse', viewAsFilter:function(player){ - return player!=_status.currentPhase&&player.countCards('he',{color:'red'})>0; + return player!=_status.currentPhase&&player.countCards('hes',{color:'red'})>0; }, filterCard:function(card){ return get.color(card)=='red'; }, - position:'he', + position:'hes', viewAs:{name:'tao'}, prompt:'将一张红色牌当桃使用', check:function(card){return 15-get.value(card)}, diff --git a/character/swd.js b/character/swd.js index 2cc845479..c30446dc6 100644 --- a/character/swd.js +++ b/character/swd.js @@ -26,7 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ swd_quxian:['female','qun',3,['mojian','huanxia']], swd_xiyan:['male','qun',3,['jiefen','datong']], swd_cheyun:['female','wu',3,['cyxianjiang','cyqiaoxie','shengong']], - swd_huanyuanzhi:['male','qun',3,['tianshu','lanzhi','mufeng']], + swd_huanyuanzhi:['male','qun',3,['swdtianshu','lanzhi','mufeng']], swd_murongshi:['female','shu',4,['duanyi','guxing']], swd_jipeng:['male','wu',3,['reyingzi','guozao']], swd_qi:['male','qun',3,['yaotong','heihuo','pojian']], @@ -7123,13 +7123,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - tianshu_old:{ + swdtianshu_old:{ unique:true, trigger:{player:'phaseEnd'}, direct:true, init:function(player){ - player.storage.tianshu=[]; - player.storage.tianshu2={}; + player.storage.swdtianshu=[]; + player.storage.swdtianshu2={}; }, intro:{ content:function(storage){ @@ -7154,10 +7154,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - player.chooseToDiscard('he',get.prompt('tianshu')).ai=function(card){ + player.chooseToDiscard('he',get.prompt('swdtianshu')).ai=function(card){ if(get.position(card)=='h') return 5-get.useful(card); return 4-get.value(card); - }.logSkill='tianshu'; + }.logSkill='swdtianshu'; 'step 1' if(result.bool){ var list=[]; @@ -7176,7 +7176,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } 'step 2' - player.storage.tianshu_learn=result.links[0]; + player.storage.swdtianshu_learn=result.links[0]; // // var target=trigger.targets[0]; // var names=[]; @@ -7190,7 +7190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ // if(info){ // var skills=info[3]; // for(var j=0;j0; + return !player.hasSkill('swdtianshu3')&&player.storage.swdtianshu&&player.storage.swdtianshu.length>0; }, intro:{ nocount:true @@ -7222,9 +7222,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ delay:0, content:function(){ 'step 0' - var list=player.storage.tianshu; - if(player.additionalSkills.tianshu){ - player.removeSkill(player.additionalSkills.tianshu); + var list=player.storage.swdtianshu; + if(player.additionalSkills.swdtianshu){ + player.removeSkill(player.additionalSkills.swdtianshu); } event.skillai=function(list){ return get.max(list,get.skillRank,'item'); @@ -7272,12 +7272,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var link=result; player.addSkill(link); player.skills.remove(link); - player.additionalSkills.tianshu=link; + player.additionalSkills.swdtianshu=link; player.popup(link); - var target=player.storage.tianshu2[player.storage.tianshu.indexOf(link)]; - player.markSkillCharacter('tianshu2',target,get.translation(link),lib.translate[link+'_info']); + var target=player.storage.swdtianshu2[player.storage.swdtianshu.indexOf(link)]; + player.markSkillCharacter('swdtianshu2',target,get.translation(link),lib.translate[link+'_info']); player.checkMarks(); - player.addSkill('tianshu3'); + player.addSkill('swdtianshu3'); }, ai:{ order:10, @@ -7288,17 +7288,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - tianshu3:{ + swdtianshu3:{ trigger:{global:['useCardAfter','useSkillAfter','phaseAfter']}, silent:true, filter:function(event){ - return event.skill!='tianshu2'; + return event.skill!='swdtianshu2'; }, content:function(){ - player.removeSkill('tianshu3'); + player.removeSkill('swdtianshu3'); } }, - tianshu:{ + swdtianshu:{ unique:true, enable:'phaseUse', filterCard:function(card){ @@ -7327,7 +7327,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return false; } }, - group:'tianshu_remove', + group:'swdtianshu_remove', createDialog:function(player,target,onlylist){ var names=[]; var list=[]; @@ -7384,7 +7384,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.max(list,get.skillRank,'item'); }; if(event.isMine()){ - event.dialog=lib.skill.tianshu.createDialog(player,target); + event.dialog=lib.skill.swdtianshu.createDialog(player,target); event.switchToAuto=function(){ event._result=event.skillai(event.list); game.resume(); @@ -7393,7 +7393,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.pause(); } else{ - event._result=event.skillai(lib.skill.tianshu.createDialog(player,target,true)); + event._result=event.skillai(lib.skill.swdtianshu.createDialog(player,target,true)); } "step 1" _status.imchoosing=false; @@ -7401,10 +7401,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.dialog.close(); } var link=result; - player.addAdditionalSkill('tianshu',link); + player.addAdditionalSkill('swdtianshu',link); player.popup(link); - player.markSkillCharacter('tianshu',target,get.translation(link),lib.translate[link+'_info']); - player.storage.tianshu=target; + player.markSkillCharacter('swdtianshu',target,get.translation(link),lib.translate[link+'_info']); + player.storage.swdtianshu=target; player.checkMarks(); game.log(player,'获得了技能','【'+get.translation(link)+'】'); }, @@ -7418,35 +7418,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - tianshu_remove:{ + swdtianshu_remove:{ trigger:{global:'dieAfter'}, silent:true, filter:function(event,player){ - return event.player==player.storage.tianshu; + return event.player==player.storage.swdtianshu; }, content:function(){ - player.unmarkSkill('tianshu'); - player.removeAdditionalSkill('tianshu'); - delete player.storage.tianshu; + player.unmarkSkill('swdtianshu'); + player.removeAdditionalSkill('swdtianshu'); + delete player.storage.swdtianshu; } }, - tianshu2_old:{ + swdtianshu2_old:{ trigger:{player:'phaseBegin'}, direct:true, priority:-9, content:function(){ "step 0" - player.chooseTarget(get.prompt('tianshu'),lib.skill.tianshu.filterTarget).ai=function(target){ + player.chooseTarget(get.prompt('swdtianshu'),lib.skill.swdtianshu.filterTarget).ai=function(target){ if(target.maxHp<5) return Math.random()*(5-target.maxHp); return -1; }; "step 1" if(result.bool){ - player.logSkill('tianshu',result.targets); + player.logSkill('swdtianshu',result.targets); event.target=result.targets[0]; if(event.isMine()){ ui.auto.hide(); - event.dialog=lib.skill.tianshu.createDialog(player,result.targets[0]); + event.dialog=lib.skill.swdtianshu.createDialog(player,result.targets[0]); game.pause(); } else{ @@ -7482,8 +7482,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } "step 2" - if(player.storage.tianshu){ - player.unmark(player.storage.tianshu+'_charactermark'); + if(player.storage.swdtianshu){ + player.unmark(player.storage.swdtianshu+'_charactermark'); } ui.auto.show(); if(event.dialog){ @@ -7493,7 +7493,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=event.target; player.addSkill(link); player.skills.remove(link); - player.additionalSkills.tianshu=link; + player.additionalSkills.swdtianshu=link; player.markCharacter(target.name,{ name:get.translation(link), content:lib.translate[link+'_info'] @@ -7501,10 +7501,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addVideo('markCharacter',player,{ name:'get.translation(link)', content:lib.translate[link+'_info'], - id:'tianshu', + id:'swdtianshu', target:target.name }); - player.storage.tianshu=target.name; + player.storage.swdtianshu=target.name; player.checkMarks(); player.popup(link); }, @@ -10144,9 +10144,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tanlin2:'探麟', pozhen:'破阵', yunchou:'运筹', - tianshu:'天书', - tianshu_bg:'书', - tianshu2:'天书', + swdtianshu:'天书', + swdtianshu_bg:'书', + swdtianshu2:'天书', xingdian:'星点', luomei:'落梅', yulin:'玉鳞', @@ -10259,8 +10259,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ pozhen_info_alter:'每当你受到一次伤害,若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。', yunchou_info:'出牌阶段限一次,你可以弃置一张手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', yunchou_info_alter:'出牌阶段限一次,你可以弃置一张非基本手牌,并弃置一名其他角色的一张手牌,若两张牌颜色相同,你摸一张牌,否则对方摸一张牌', - tianshu_old_info:'结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能', - tianshu_info:'出牌阶段,你可以弃置一张锦囊牌,然后获得一名其他角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)', + swdtianshu_old_info:'结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能', + swdtianshu_info:'出牌阶段,你可以弃置一张锦囊牌,然后获得一名其他角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)', zaowu_info:'出牌阶段限一次,你可以将一张黑桃或红桃手牌当作封印之蛋使用', luomei_info:'每当你使用或打出一张梅花花色的牌,你可以摸一张牌', xingdian_info:'出牌阶段限一次,你可以弃置一张手牌,然后随机弃置两名敌人各一张牌', diff --git a/character/xianjian.js b/character/xianjian.js index 9ea21eef4..e6b1f8a68 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -3,7 +3,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'xianjian', character:{ - pal_lixiaoyao:['male','qun',4,['tianjian','yufeng']], + pal_lixiaoyao:['male','qun',4,['tianjian','xjyufeng']], pal_zhaoliner:['female','wei',3,['huimeng','tianshe']], pal_linyueru:['female','wei',3,['guiyuan','qijian']], pal_anu:['female','wu',3,['lingdi','anwugu']], @@ -229,13 +229,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ switch(player.countUsed()){ case 2:skill='yanzhan';break; case 3:skill='tianjian';break; - case 4:skill='yufeng';break; + case 4:skill='xjyufeng';break; } if(skill&&!player.hasSkill(skill)){ player.addTempSkill(skill); player.popup(skill); game.log(player,'获得了','【'+get.translation(skill)+'】'); - if(skill=='yufeng'){ + if(skill=='xjyufeng'){ var nh=player.countCards('h'); if(nh<2){ player.draw(2-nh); @@ -243,7 +243,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!player.storage.counttrigger){ player.storage.counttrigger={}; } - player.storage.counttrigger.yufeng=1; + player.storage.counttrigger.xjyufeng=1; } } } @@ -1838,7 +1838,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, }, - yufeng:{ + xjyufeng:{ trigger:{player:'loseEnd'}, forced:true, usable:2, @@ -4368,8 +4368,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ tianjian:'天剑', tianjian_info:'出牌阶段限一次,你可以将一张杀当作万箭齐发使用,受到伤害的角色随机弃置一张牌', tianjian_info_alter:'出牌阶段限一次,你可以将一张杀当作万箭齐发使用', - yufeng:'御风', - yufeng_info:'锁定技,当你失去手牌后,若手牌数少于2,你将手牌数补至2(每回合最多发动两次)', + xjyufeng:'御风', + xjyufeng_info:'锁定技,当你失去手牌后,若手牌数少于2,你将手牌数补至2(每回合最多发动两次)', huimeng:'回梦', huimeng_info:'每当你回复一点体力,可以摸两张牌', tianshe:'天蛇', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index c14e378f2..9b7a9564a 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -1449,7 +1449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, aiValue:function(player,card,num){ if(card.name=='zhangba') return 15; - if(player.getEquip('zhangba')&&player.countCards('h')>1&&['shan','tao'].contains(card.name)) return 0; + if(player.getEquip('zhangba')&&player.countCards('hs')>1&&['shan','tao'].contains(card.name)) return 0; if(card.name=='shan'||card.name=='tao') return num/2; }, }, @@ -1459,11 +1459,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ discard:false, filter:function (event,player){ if(player.hasJudge('lebu')) return false; - return player.countCards('he',{suit:'diamond'})>0; + return player.countCards('hes',{suit:'diamond'})>0; }, viewAs:{name:'lebu'}, //prepare:"throw", - position:"he", + position:"hes", filterCard:function(card,player,event){ return get.suit(card)=='diamond'&&player.canAddJudge({name:'lebu',cards:[card]}); }, @@ -1473,7 +1473,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, check:function(card){ var player=_status.event.player; - if(!player.getEquip('zhangba')&&player.countCards('h','sha')<2){ + if(!player.getEquip('zhangba')&&player.countCards('hs','sha')<2){ if(player.countCards('h',function(cardx){ return cardx!=card&&cardx.name=='shan'; })>0) return 0; diff --git a/character/yijiang.js b/character/yijiang.js index c5be5930a..530b1234f 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1117,7 +1117,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'taoluan', enable:'chooseToUse', filter:function(event,player){ - return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('xintaoluan3')&&player.countCards('he')>0&&!_status.dying.length; + return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('xintaoluan3')&&player.countCards('hes')>0&&!_status.dying.length; }, init:function(player){ if(!player.storage.xintaoluan) player.storage.xintaoluan=[]; @@ -1147,7 +1147,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, check:function(button){ var player=_status.event.player; - if(player.countCards('h',button.link[2])>0) return 0; + if(player.countCards('hs',button.link[2])>0) return 0; if(button.link[2]=='wugu') return; var effect=player.getUseValue(button.link[2]); if(effect>0) return effect; @@ -1162,7 +1162,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(card){ return 6-get.value(card); }, - position:'he', + position:'hes', viewAs:{name:links[0][2],nature:links[0][3]}, onuse:function(result,player){ var evt=_status.event.getParent('phase'); @@ -1257,7 +1257,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:'将一张牌当做闪使用', enable:'chooseToUse', filter:function(event,player){ - return player.countCards('he')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; + return player.countCards('hes')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; }, onuse:function(result,player){ var evt=_status.event.getParent('phase'); @@ -1275,7 +1275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.xintaoluan.add('shan'); }, filterCard:true, - position:'he', + position:'hes', selectCard:1, viewAs:{name:'shan'}, check:function(card){ @@ -1294,7 +1294,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ skillTagFilter:function(player){ - return player.countCards('he')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3'); + return player.countCards('hes')&&!player.storage.xintaoluan.contains('shan')&&!player.hasSkill('xintaoluan3'); }, threaten:1.5, respondShan:true, @@ -1305,10 +1305,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', prompt:'将一张牌当做无懈可击使用', filter:function(event,player){ - return player.countCards('he')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; + return player.countCards('hes')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; }, viewAsFilter:function(player){ - return player.countCards('he')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; + return player.countCards('hes')&&(!player.storage.xintaoluan.contains('wuxie'))&&!player.hasSkill('xintaoluan3')&&!_status.dying.length; }, onuse:function(result,player){ var evt=_status.event.getParent('phase'); @@ -1326,7 +1326,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.xintaoluan.add('wuxie'); }, filterCard:true, - position:'he', + position:'hes', selectCard:1, viewAs:{name:'wuxie'}, check:function(card){ @@ -3754,10 +3754,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'chooseToUse', filter:function(event,player){ - return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('taoluan3')&&player.countCards('he')>0;//&&!_status.dying.length; + return event.type!='wuxie'&&event.type!='respondShan'&&!player.hasSkill('taoluan3')&&player.countCards('hes')>0;//&&!_status.dying.length; }, hiddenCard:function(player,name){ - return (!player.storage.taoluan.contains(name)&&player.countCards('he')>0&&!player.hasSkill('taoluan3')&&lib.inpile.contains(name)); + return (!player.storage.taoluan.contains(name)&&player.countCards('hes')>0&&!player.hasSkill('taoluan3')&&lib.inpile.contains(name)); }, init:function(player){ if(!player.storage.taoluan) player.storage.taoluan=[]; @@ -3787,7 +3787,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, check:function(button){ var player=_status.event.player; - if(player.countCards('h',button.link[2])>0) return 0; + if(player.countCards('hs',button.link[2])>0) return 0; if(button.link[2]=='wugu') return 0; var effect=player.getUseValue(button.link[2]); if(effect>0) return effect; @@ -3802,7 +3802,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ check:function(card){ return 6-get.value(card); }, - position:'he', + position:'hes', viewAs:{name:links[0][2],nature:links[0][3]}, onuse:function(result,player){ player.storage.taoluan.add(result.card.name); @@ -3815,7 +3815,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ skillTagFilter:function(player){ - if(!player.countCards('he')||player.hasSkill('taoluan3')) return false; + if(!player.countCards('hes')||player.hasSkill('taoluan3')) return false; if(!player.storage.taoluan.contains('tao')){} else if(player.isDying()&&!player.storage.taoluan.contains('jiu')){} else return false; @@ -3855,9 +3855,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var player=_status.event.player; if(get.attitude(player,target)>0){ if(get.attitude(target,player)>0){ - return target.countCards('h'); + return target.countCards('he'); } - return target.countCards('h')/2; + return target.countCards('he')/2; } return 0; }); @@ -3892,18 +3892,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:'将一张牌当做闪使用', enable:'chooseToUse', filter:function(event,player){ - return !player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3')&&player.countCards('he');//&&!_status.dying.length; + return !player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3')&&player.countCards('hes');//&&!_status.dying.length; }, onuse:function(result,player){ player.storage.taoluan.add('shan'); }, filterCard:true, - position:'he', + position:'hes', selectCard:1, viewAs:{name:'shan'}, ai:{ skillTagFilter:function(player){ - return player.countCards('he')&&!player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3'); + return player.countCards('hes')&&!player.storage.taoluan.contains('shan')&&!player.hasSkill('taoluan3'); }, threaten:1.5, respondShan:true, @@ -3914,13 +3914,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'chooseToUse', prompt:'将一张牌当做无懈可击使用', viewAsFilter:function(player){ - return !player.storage.taoluan.contains('wuxie')&&!player.hasSkill('taoluan3')&&player.countCards('he'); + return !player.storage.taoluan.contains('wuxie')&&!player.hasSkill('taoluan3')&&player.countCards('hes'); }, onuse:function(result,player){ player.storage.taoluan.add('wuxie'); }, filterCard:true, - position:'he', + position:'hes', selectCard:1, viewAs:{name:'wuxie'}, }, @@ -5184,8 +5184,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.color(card)=='black'; }, viewAsFilter:function(player){ - return player.countCards('h',{color:'black'})>0; + return player.countCards('hs',{color:'black'})>0; }, + position:'hs', viewAs:{name:'wuxie'}, prompt:'将一张黑色手牌当无懈可击使用', check:function(card){return 8-get.value(card)}, @@ -5198,8 +5199,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.color(card)=='red'; }, viewAs:{name:'shan'}, + position:'hs', viewAsFilter:function(player){ - if(!player.countCards('h',{color:'red'})) return false; + if(!player.countCards('hs',{color:'red'})) return false; }, audio:true, prompt:'将一张红色手牌当闪使用或打出', @@ -7892,27 +7894,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:['chooseToUse','chooseToRespond'], filterCard:true, selectCard:2, - position:'h', + position:'hs', audio:2, derivation:['new_rewusheng','olpaoxiao'], viewAs:{name:'sha'}, prompt:'将两张手牌当杀使用或打出', + viewAsFilter:function(player){ + return player.countCards('hs')>1; + }, check:function(card){ if(_status.event.player.hasSkill('new_rewusheng')&&get.color(card)=='red') return 0; if(_status.event.name=='chooseToRespond'){ if(card.name=='sha') return 0; return 6-get.useful(card); } - if(_status.event.player.countCards('h')<4) return 6-get.useful(card); + if(_status.event.player.countCards('hs')<4) return 6-get.useful(card); return 7-get.useful(card); }, ai:{ respondSha:true, + skillTagFilter:function(player){ + if(player.countCards('hs')<2) return false; + }, order:function(item,player){ if(player.hasSkill('new_rewusheng')&&player.hasSkill('olpaoxiao')){ return 1; } - if(player.countCards('h')<4){ + if(player.countCards('hs')<4){ return 1; } return 4; diff --git a/game/asset.js b/game/asset.js index 860f63eaa..14fc9f484 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.109.3.8', + 'v1.9.110', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -701,6 +701,8 @@ window.noname_asset_list=[ 'audio/die/sp_bianfuren.mp3', 'audio/die/sp_duyu.mp3', 'audio/die/zongyu.mp3', + 'audio/die/nanhualaoxian.mp3', + 'audio/die/simazhou.mp3', 'audio/skill/decadezishou1.mp3', 'audio/skill/decadezishou2.mp3', @@ -3087,6 +3089,14 @@ window.noname_asset_list=[ 'audio/skill/spyuejian2.mp3', 'audio/skill/zyqiao1.mp3', 'audio/skill/zyqiao2.mp3', + 'audio/skill/caiwang1.mp3', + 'audio/skill/caiwang2.mp3', + 'audio/skill/naxiang1.mp3', + 'audio/skill/naxiang2.mp3', + 'audio/skill/tianshu1.mp3', + 'audio/skill/tianshu2.mp3', + 'audio/skill/yufeng1.mp3', + 'audio/skill/yufeng2.mp3', 'audio/voice/male/0.mp3', 'audio/voice/male/1.mp3', @@ -3183,7 +3193,8 @@ window.noname_asset_list=[ 'image/card/kuwu.png', 'image/card/jiuwei.png', 'image/card/mianju.png', - 'image/card/shoulijian.png','image/card/rewrite_bagua.png', + 'image/card/shoulijian.png', + 'image/card/rewrite_bagua.png', 'image/card/rewrite_baiyin.png', 'image/card/rewrite_lanyinjia.png', 'image/card/rewrite_renwang.png', @@ -3893,6 +3904,7 @@ window.noname_asset_list=[ 'image/character/noname_machao.png', 'image/character/noname_sunce.png', 'image/character/simazhou.jpg', + 'image/character/nanhualaoxian.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/game.js b/game/game.js index 24bf16a57..6a14671e1 100644 --- a/game/game.js +++ b/game/game.js @@ -5161,6 +5161,12 @@ map.expand_dialog.hide(); map.fouralign.hide(); } + if(config.versus_mode=='three'){ + map.edit_character_three.show(); + } + else{ + map.edit_character_three.hide(); + } if(config.versus_mode=='three'||config.versus_mode=='one'){ map.enable_all_three.show(); map.enable_all_cards.show(); @@ -5425,6 +5431,113 @@ }, clear:true, }, + edit_character_three:{ + name:'编辑统率将池', + clear:true, + onclick:function(){ + if(get.mode()!='versus'){ + 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_three')||lib.choiceThree; + var str='character=[\n '; + for(var i=0;i0) return map; + if(map.cards.length>0||map.ss.length>0) return map; }; next.gaintag=[]; return next; @@ -19590,7 +19793,7 @@ } } if(next.cards){ - var hej=this.getCards('hej'); + var hej=this.getCards('hejs'); for(var i=0;i0) return map; + if(map.cards.length>0||map.ss.length>0) return map; }; return next; }, @@ -20004,6 +20209,7 @@ hs:[], es:[], js:[], + ss:[], cards:[], cards2:[], }; @@ -20012,11 +20218,12 @@ map.hs.addArray(evt.hs); map.es.addArray(evt.es); map.js.addArray(evt.js); + map.ss.addArray(evt.ss); map.cards.addArray(evt.cards); map.cards2.addArray(evt.cards2); } }); - if(map.cards.length>0) return map; + if(map.cards.length>0||map.ss.length>0) return map; }; return next; }, @@ -22086,7 +22293,7 @@ return false; }, hasWuxie:function(){ - if(this.countCards('h','wuxie')) return true; + if(this.countCards('hs','wuxie')) return true; var skills=this.getSkills(true).concat(lib.skill.global); game.expandSkills(skills); for(var i=0;i0) return map; + if(map.cards.length>0||map.ss.length>0) return map; }; if(arg&&get.is.object(arg)){ for(var i in arg) next[i]=arg[i]; @@ -29775,6 +29976,14 @@ console.log(player); } }, + directgains:function(player,cards){ + if(player&&cards){ + player.directgains(get.infoCards(cards)); + } + else{ + console.log(player); + } + }, directequip:function(player,cards){ if(player&&cards){ player.directequip(get.infoCards(cards)); @@ -29911,8 +30120,8 @@ }, lose:function(player,info){ if(player&&info){ - var hs=info[0],es=info[1],js=info[2]; - var phs=player.getCards('h'),pes=player.getCards('e'),pjs=player.getCards('j'); + var hs=info[0],es=info[1],js=info[2],ss=info[3]; + var phs=player.getCards('h'),pes=player.getCards('e'),pjs=player.getCards('j'),pss=player.getCards('s'); var checkMatch=function(l1,l2){ for(var i=0;i.card>.info>span, #window:not(.nopointer) .pointertable td>span, #window:not(.nopointer) .config>.toggle.onoff, #window:not(.nopointer) .pointerdialog .button:not(.unselectable), -#window:not(.nopointer) .dialog.fullheight .buttons .button:not(.selectedx):not(.glow):not(.forbidden), +#window:not(.nopointer) .dialog.fullheight .buttons .button:not(.selectedx):not(.glow):not(.glows):not(.forbidden), #window:not(.nopointer) #arena.selecting:not(.video) .player .equips>.card.selectable, #window:not(.nopointer) #arena.selecting #me .card.selectable, #window:not(.nopointer) #arena.selecting .button.selectable, @@ -4483,6 +4483,7 @@ div[data-decoration="bronze"]::after{ }*/ .player.selectable:not(.selected)::before, .card.glow::before, +.card.glows::before, .button.glow::before { opacity: 1; } @@ -4503,6 +4504,9 @@ div[data-decoration="bronze"]::after{ #me .card.glow::before { box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgb(0, 133, 255) 0 0 5px, rgba(0, 133, 255,1) 0 0 10px; } +#me .card.glows::before { + box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px,rgb(255, 153, 51) 0 0 5px, rgba(255, 153, 51,1) 0 0 10px; +} #me>#handcards1:not(.scrollh), #me>#handcards2:not(.scrollh) { @@ -4514,6 +4518,9 @@ div[data-decoration="bronze"]::after{ #me>div:not(.scrollh)>.handcards>.card.selected{ top:-20px; }*/ +.glows:not(.button):not(.card){ + box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(255, 153, 51, 0.4) 0 0 5px, rgba(255, 153, 51, 0.5) 0 0 12px, rgba(255, 153, 51, 0.8) 0 0 15px !important; +} .glow:not(.button):not(.card){ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 133, 255, 0.4) 0 0 5px, rgba(0, 133, 255, 0.5) 0 0 12px, rgba(0, 133, 255, 0.8) 0 0 15px !important; } diff --git a/mode/doudizhu.js b/mode/doudizhu.js index 91bc7e581..4c665879f 100644 --- a/mode/doudizhu.js +++ b/mode/doudizhu.js @@ -1589,7 +1589,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ _gongshoujintui:{ enable:'chooseToUse', filter:function(event,player){ - var cards=player.getCards('h'); + var cards=player.getCards('hs'); for(var i of cards){ var name=get.name(i,player); if(name=='gongshoujianbei'){ @@ -1620,11 +1620,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ chooseButton:{ dialog:function(event,player){ var list=[]; - if(player.countCards('h','gongshoujianbei')){ + if(player.countCards('hs','gongshoujianbei')){ list.push(['锦囊','','wanjian']); list.push(['锦囊','','taoyuan']); } - if(player.countCards('h','jintuiziru')){ + if(player.countCards('hs','jintuiziru')){ list.push(['锦囊','','nanman']); list.push(['锦囊','','wugu']); } @@ -1633,7 +1633,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(button,player){ var name=button.link[2]; var rawname=((name=='wanjian'||name=='taoyuan')?'gongshoujianbei':'jintuiziru'); - var cards=player.getCards('h'); + var cards=player.getCards('hs'); var evt=_status.event.getParent(); for(var i of cards){ if(get.name(i,player)==rawname&&evt.filterCard({ diff --git a/mode/guozhan.js b/mode/guozhan.js index 9474b61ec..21106111c 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1078,7 +1078,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ gzbiluan:{ mod:{ globalTo:function(from,to,distance){ - return distance+to.countCards('e'); + return distance+Math.max(1,to.countCards('e')); }, }, }, @@ -2754,9 +2754,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ name:"sha", }, viewAsFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, prompt:"将一张闪当杀使用或打出", + position:'hs', check:function(){return 1}, ai:{ effect:{ @@ -2766,7 +2767,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, respondSha:true, skillTagFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, order:function(){ return get.order({name:'sha'})+0.1; @@ -2783,15 +2784,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ viewAs:{ name:"shan", }, + position:'hs', prompt:"将一张杀当闪使用或打出", check:function(){return 1}, viewAsFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, effect:{ target:function(card,player,target,current){ @@ -2908,9 +2910,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, filter:function(event,player){ if(player.hasSkill('new_duanliang_off')) return false; - return player.countCards('he',{type:['basic','equip'],color:'black'}) + return player.countCards('hes',{type:['basic','equip'],color:'black'}) }, - position:"he", + position:"hes", viewAs:{ name:"bingliang", }, @@ -2978,6 +2980,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return !player.storage.new_luanji.contains(get.suit(card)); }, selectCard:2, + position:'hs', + filter:function(event,player){ + return player.countCards('hs',function(card){ + return !player.storage.new_luanji||!player.storage.new_luanji.contains(get.suit(card)); + })>1; + }, check:function(card){ var player=_status.event.player; var targets=game.filterPlayer(function(current){ @@ -3416,8 +3424,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ viewAs:{ name:"sha", }, + position:'hs', viewAsFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, prompt:"将一张闪当杀使用或打出", check:function(){return 1}, @@ -3429,7 +3438,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, respondSha:true, skillTagFilter:function(player){ - if(!player.countCards('h','shan')) return false; + if(!player.countCards('hs','shan')) return false; }, order:function(){ return get.order({name:'sha'})+0.1; @@ -3446,15 +3455,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ viewAs:{ name:"shan", }, + position:'hs', prompt:"将一张杀当闪使用或打出", check:function(){return 1}, viewAsFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, ai:{ respondShan:true, skillTagFilter:function(player){ - if(!player.countCards('h','sha')) return false; + if(!player.countCards('hs','sha')) return false; }, effect:{ target:function(card,player,target,current){ @@ -4054,7 +4064,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ audio:'bmcanshi', enable:"phaseUse", filter:function(event,player){ - return player.countCards('h',{suit:'spade'})>0; + return player.countCards('hs',{suit:'spade'})>0; }, init:function(player){ if(!player.storage.hmkguishu) player.storage.hmkguishu=0; @@ -4079,7 +4089,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return 3; } if(button.link=='zhibi'){ - if(player.countCards('h',{suit:'spade'})>2) return 1; + if(player.countCards('hs',{suit:'spade'})>2) return 1; return 0; } }, @@ -4089,7 +4099,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filterCard:function(card,player){ return get.suit(card)=='spade'; }, - position:"h", + position:"hs", selectCard:1, popname:true, ai:function(card){ @@ -7004,8 +7014,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ viewAs:{name:'yiyi'}, usable:4, filterCard:{color:'red'}, + position:'hs', viewAsFilter:function(player){ - return player.countCards('h',{color:'red'})>0; + return player.countCards('hs',{color:'red'})>0; }, check:function(card){ return 5-get.value(card); @@ -8311,7 +8322,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ gzmidao:'米道', gzmidao_info:'与你势力相同的其他角色的出牌阶段限一次。该角色使用基本牌或普通锦囊牌指定目标时,其可交给你一张手牌,然后你可改变此牌的花色和点数。', gzbiluan:'避乱', - gzbiluan_info:'锁定技,其他角色计算至你的距离时+X(X为你装备区内的牌数)。', + gzbiluan_info:'锁定技,其他角色计算至你的距离时+X(X为你装备区内的牌数且至少为1)。', gzlixia:'礼下', gzlixia_info:'与你势力不同的角色的准备阶段开始时,其可弃置你装备区内的一张牌,然后其选择一项:①弃置两张牌。②失去1点体力。③令你摸两张牌。', mffengshi:'锋势', diff --git a/mode/versus.js b/mode/versus.js index bb4cfb970..21d509187 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -1944,13 +1944,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ lib.init.onfree(); } else{ + var chara=(get.config('character_three')||lib.choiceThree); game.chooseCharacterDouble(function(i){ if(get.config('enable_all_three')){ if(lib.filter.characterDisabled(i)) return false; return !lib.filter.characterDisabled(i); } else{ - return lib.choiceThree.contains(i); + return chara.contains(i); } },function(i){ return i==1?'主帅':'前锋';