diff --git a/card/guozhan.js b/card/guozhan.js index 2af1d7eca..73ed312a1 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -800,9 +800,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){ equipSkill:true, trigger:{player:'linkBefore'}, forced:true, - priority:20, + //priority:20, filter:function(event,player){ - return player.isMinor()&&!player.isLinked(); + return !player.isMajor()&&!player.isLinked(); }, content:function(){ trigger.cancel(); diff --git a/card/standard.js b/card/standard.js index 8053968a8..9d02c0d50 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1067,7 +1067,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ result:{ target:function(player,target){ if(get.attitude(player,target)<=0) return (target.countCards('he',function(card){ - return get.value(card)>0; + return card.name=='tengjia'||get.value(card)>0; })>0)?-1.5:1.5; var js=target.getCards('j'); if(js.length){ diff --git a/character/diy.js b/character/diy.js index d548bc60b..898ca0b0c 100755 --- a/character/diy.js +++ b/character/diy.js @@ -49,6 +49,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_key_kanade:['female','key',3,['kanade_mapo','kanade_benzhan']], key_mio:['female','key',3,['mio_tuifu','mio_tishen']], key_midori:['female','key',3,['midori_nonghuan','midori_tishen']], + key_kyoko:['female','key',3,['kyoko_juwu','kyoko_zhengyi']], + key_shizuru:['female','key',3,['shizuru_nianli','shizuru_benzhan']], // diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']], // diy_hanlong:['male','wei',4,['siji','ciqiu']], diy_feishi:['male','shu',3,['shuaiyan','moshou']], @@ -131,7 +133,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy:{ diy_tieba:["diy_wenyang","ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_zhangwei"], diy_default:["diy_feishi","diy_liuyan","diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","diy_liufu","diy_xizhenxihong","diy_liuzan","diy_zaozhirenjun","diy_yangyi","diy_tianyu"], - diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_kagari","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori"], + diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_kagari","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru"], diy_yongjian:["ns_chendao","yj_caoang"], }, }, @@ -147,6 +149,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', }, characterTitle:{ + key_shizuru:'#bRewrite', + key_kyoko:'#bSummer Pockets', sp_key_kanade:'#rAngel Beats!', key_yuzuru:'#rAngel Beats!', key_tsumugi:'#bSummer Pockets', @@ -227,8 +231,335 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_yuri:['key_kanade'], key_hinata:['key_yui'], key_iwasawa:['key_hisako'], + key_lucia:['key_shizuru'], }, skill:{ + shizuru_nianli:{ + enable:'chooseToUse', + prompt:'展示一张♦/♣/♥/♠手牌,然后视为使用一张雷杀/闪/桃/无懈可击', + viewAs:function(cards,player){ + var name=false; + var nature=null; + switch(get.suit(cards[0],player)){ + case 'club':name='shan';break; + case 'diamond':name='sha';nature='thunder';break; + case 'spade':name='wuxie';break; + case 'heart':name='tao';break; + } + if(name) return {name:name,nature:nature,isCard:true}; + return null; + }, + check:function(card){ + var player=_status.event.player; + if(_status.event.type=='phase'){ + var max=0; + var name2; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'fire':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'fire':null}); + if(temp>max){ + max=temp; + name2=map[name]; + } + } + } + if(name2==get.suit(card,player)) return 1; + return 0; + } + return 1; + }, + ignoreMod:true, + filterCard:function(card,player,event){ + event=event||_status.event; + var filter=event._backup.filterCard; + var name=get.suit(card,player); + if(name=='club'&&filter({name:'shan'},player,event)) return true; + if(name=='diamond'&&filter({name:'sha',nature:'thunder'},player,event)) return true; + if(name=='spade'&&filter({name:'wuxie'},player,event)) return true; + if(name=='heart'&&filter({name:'tao'},player,event)) return true; + return false; + }, + filter:function(event,player){ + if(player.hasSkill('shizuru_nianli_round')) return false; + var filter=event.filterCard; + if(filter({name:'sha',nature:'thunder'},player,event)&&player.countCards('h',{suit:'diamond'})) return true; + if(filter({name:'shan'},player,event)&&player.countCards('h',{suit:'club'})) return true; + if(filter({name:'tao'},player,event)&&player.countCards('h',{suit:'heart'})) return true; + if(filter({name:'wuxie'},player,event)&&player.countCards('h',{suit:'spade'})) return true; + return false; + }, + precontent:function(){ + player.logSkill('shizuru_nianli'); + player.addTempSkill('shizuru_nianli_round','roundStart'); + player.showCards(get.translation(player)+'发动了【念力】',event.result.cards.slice(0)); + event.result.card.cards=[]; + event.result.cards=[]; + delete event.result.skill; + delete event.result.card.suit; + delete event.result.card.number; + event.getParent().addCount=false; + event.getParent().shizuru_nianli=true; + }, + ai:{ + respondSha:true, + respondShan:true, + save:true, + skillTagFilter:function(player,tag){ + if(player.hasSkill('shizuru_nianli_round')) return false; + var name; + switch(tag){ + case 'respondSha':name='diamond';break; + case 'respondShan':name='club';break; + case 'save':name='heart';break; + } + if(!player.countCards('h',{suit:name})) return false; + }, + order:function(item,player){ + if(player&&_status.event.type=='phase'){ + var max=0; + var list=['sha','tao']; + var map={sha:'diamond',tao:'heart'} + for(var i=0;i0&&player.getUseValue({name:name,nature:name=='sha'?'thunder':null})>0){ + var temp=get.order({name:name,nature:name=='sha'?'thunder':null}); + if(temp>max) max=temp; + } + } + max/=1.1; + return max; + } + return 2; + }, + }, + hiddenCard:function(player,name){ + return name=='wuxie'&&player.countCards('h',{suit:'spade'})>0&&!player.hasSkill('shizuru_nianli_round'); + }, + group:'shizuru_nianli_clear', + subSkill:{ + round:{ + mark:true, + intro:{content:'本轮已发动'}, + }, + clear:{ + trigger:{player:'useCardAfter'}, + lastDo:true, + silent:true, + filter:function(event,player){ + return event.getParent().shizuru_nianli==true; + }, + content:function(){ + player.getHistory('useCard').remove(trigger); + }, + }, + }, + }, + shizuru_benzhan:{ + trigger:{global:['useCard','respond']}, + direct:true, + filter:function(event,player){ + return Array.isArray(event.respondTo)&&event.respondTo[0]!=event.player&&[event.respondTo[0],event.player].contains(player); + }, + content:function(){ + 'step 0' + event.type=get.type(trigger.card)=='basic'; + var prompt=event.type?'令一名角色摸两张牌或弃置两张牌':'令一名角色回复1点体力或对其造成1点伤害'; + player.chooseTarget(get.prompt('shizuru_benzhan'),prompt).set('ai',function(target){ + var player=_status.event.player; + if(_status.event.getParent().type){ + var att=get.attitude(player,target); + if(target.hasSkillTag('nogain')) return -att; + if(target.countCards('he')==1&&att<0) att/=2; + return Math.abs(att)*(1+0.1*(Math.min(0,5-target.countCards('h')))) + } + return Math.max(get.recoverEffect(target,player,player),get.damageEffect(target,player,player)) + }); + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + player.logSkill('shizuru_benzhan',target,'thunder'); + var trans=get.translation(target); + var list; + if(event.type){ + if(!target.countCards('h')) event._result={index:0}; + else list=['令'+trans+'摸两张牌','令'+trans+'弃置两张牌']; + } + else{ + if(target.isHealthy()) event._result={index:1}; + else list=['令'+trans+'回复1点体力','对'+trans+'造成1点伤害']; + } + player.chooseControl().set('choiceList',list).set('choice',function(){ + if(event.type) return (get.attitude(player,target)>0)?0:1; + return (get.recoverEffect(target,player,player)>get.damageEffect(target,player,player))?0:1; + }()).set('ai',function(){ + return _status.event.choice; + }); + } + else event.finish(); + 'step 2' + player.addExpose(0.2); + if(event.type){ + if(result.index==0) target.draw(2); + else target.chooseToDiscard(2,'he',true); + } + else{ + if(result.index==0) target.recover(); + else target.damage(); + } + }, + }, + kyoko_juwu:{ + trigger:{global:['loseAfter','cardsDiscardAfter']}, + direct:true, + filter:function(event,player){ + return player!=event.player&&player!=_status.currentPhase&&event.cards&&event.cards.filter(function(card){ + return get.position(card,true)=='d'&&get.type(card,false)=='equip'; + }).length>0; + }, + content:function(){ + 'step 0' + player.chooseButton([get.prompt('kyoko_juwu'),[1,Infinity],trigger.cards.filter(function(card){ + return get.position(card,true)=='d'&&get.type(card,false)=='equip'; + })]); + 'step 1' + if(result.bool){ + player.gain(result.links,'gain2','log'); + player.logSkill('kyoko_juwu'); + } + }, + }, + kyoko_zhengyi:{ + group:['kyoko_jingce','kyoko_shelie','kyoko_zhiheng'], + count:function(player){ + var list=[]; + player.countCards('e',function(card){ + list.add(get.suit(card,player)); + }); + return list.length; + }, + }, + kyoko_jingce:{ + trigger:{player:['phaseUseEnd','phaseJieshuBegin']}, + filter:function(event,player){ + var num=lib.skill.kyoko_zhengyi.count(player); + if(!num||(event.name=='phaseUse')==(num>3)) return false; + return player.getHistory('useCard',function(evt){ + return event.name!='phaseUse'||evt.getParent('phaseUse')==event; + }).length>=player.hp; + }, + frequent:true, + content:function(){ + player.draw(2); + }, + }, + kyoko_shelie:{ + audio:2, + trigger:{player:'phaseDrawBegin1'}, + filter:function(event,player){ + return !event.numFixed&&lib.skill.kyoko_zhengyi.count(player)>1; + }, + content:function(){ + "step 0" + trigger.changeToZero(); + event.cards=get.cards(5); + game.cardsGotoOrdering(event.cards); + event.videoId=lib.status.videoId++; + game.broadcastAll(function(player,id,cards){ + var str; + if(player==game.me&&!_status.auto){ + str='涉猎:获取花色各不相同的牌'; + } + else{ + str='涉猎'; + } + var dialog=ui.create.dialog(str,cards); + dialog.videoId=id; + },player,event.videoId,event.cards); + event.time=get.utc(); + game.addVideo('showCards',player,['涉猎',get.cardsInfo(event.cards)]); + game.addVideo('delay',null,2); + "step 1" + var next=player.chooseButton([0,5],true); + next.set('dialog',event.videoId); + next.set('filterButton',function(button){ + for(var i=0;i0){ + game.delay(0,time); + } + "step 3" + game.broadcastAll('closeDialog',event.videoId); + var cards2=event.cards2; + player.gain(cards2,'log','gain2'); + }, + }, + kyoko_zhiheng:{ + enable:'phaseUse', + usable:1, + position:'he', + filter:function(event,player){ + return lib.skill.kyoko_zhengyi.count(player)>2; + }, + prompt:function(){ + var str='弃置任意张牌并摸等量的牌'; + if(lib.skill.kyoko_zhengyi.count(_status.event.player)>3) str+=',若弃置了所有手牌则多摸一张牌。'; + return str; + }, + filterCard:lib.filter.cardDiscardable, + discard:false, + lose:false, + delay:false, + selectCard:[1,Infinity], + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='h'){ + return 8-get.value(card); + } + return 6-get.value(card) + }, + content:function(){ + 'step 0' + player.discard(cards); + event.num=1; + var hs=player.getCards('h'); + if(!hs.length||lib.skill.kyoko_zhengyi.count(player)<4) event.num=0; + else for(var i=0;i0 + if(current!=player&&target.canUse(card,current)) eff+=get.effect(current,card,target,target); }); if(eff>0||get.value(card)<3) return eff; return 0; @@ -8388,6 +8720,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_key_kanade:'SP立华奏', key_mio:'西园美鱼', key_midori:'西园美鸟', + key_kyoko:'岬镜子', + key_shizuru:'中津静流', lucia_duqu:'毒躯', lucia_duqu_info:'锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你和对方各获得一张花色点数随机的【毒】。
②当你因【毒】失去体力时,你改为回复等量的体力。
③当你处于濒死状态时,你可以使用一张【毒】(每回合限一次)。', lucia_zhenren:'振刃', @@ -8398,6 +8732,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ key_huanjie_info:'锁定技,当你进行判定或摸牌时,你改为从牌堆的另一端获取相应的牌。', yuri_xingdong:'行动', yuri_xingdong_info:'锁定技,出牌阶段开始时,你获得一张【杀】或普通锦囊牌。出牌阶段限一次,你可以将一张【杀】或普通锦囊牌交给一名其他角色,然后该角色选择一项:对除你以外的角色使用此牌并在此牌结算完成后和你各摸一张牌;或跳过下回合的判定阶段和摸牌阶段。', + //目标角色跳过阶段的同时 该回合不能发动〖整经(郑玄)〗 yuri_wangxi:'忘隙', yuri_wangxi_info:'主公技,限定技,当有角色因你发动的【行动】而死亡后,若其身份不为【明忠】,则其可以将身份改为忠臣并重新加入游戏,然后将势力改为与你相同,将体力值回复至2点并摸一张牌。', haruko_haofang:'豪放', @@ -8581,7 +8916,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ kanade_benzhan:'奔战', kanade_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', mio_tuifu:'推腐', - mio_tuifu_info:'锁定技,当一名男性角色对一名男性角色造成伤害后,你摸一张牌。', + mio_tuifu_info:'锁定技,当一名男性角色对一名男性角色造成伤害时,你摸一张牌。', mio_tishen:'替身', mio_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鸟】。', midori_nonghuan:'弄幻', @@ -8589,6 +8924,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ //即技能结算完成后,所有涉及到的牌移动事件不会再被getHistory获取 midori_tishen:'替身', midori_tishen_info:'限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鱼】。', + kyoko_juwu:'聚物', + kyoko_juwu_info:'你的回合外,当有装备牌进入弃牌堆后,若这些牌不是从你的区域移动的,则你可以获得这些牌。', + kyoko_zhengyi:'整遗', + kyoko_zhengyi_info:'锁定技,若你装备区的花色数:大于等于1,你视为拥有〖精策〗;大于等于2,你视为拥有〖涉猎〗:大于等于3,你视为拥有〖制衡〗;大于等于4,你将〖精策〗和〖制衡〗改为界限突破版本。', + kyoko_jingce:'精策', + kyoko_shelie:'涉猎', + kyoko_zhiheng:'制衡', + shizuru_nianli:'念力', + shizuru_nianli_info:'每轮限一次,你可以展示一张♦/♣/♥/♠手牌,然后视为使用一张雷【杀】/【闪】/【桃】/【无懈可击】。', + shizuru_benzhan:'奔战', + shizuru_benzhan_info:'当你使用或打出牌响应其他角色,或其他角色使用或打出牌响应你后,若此牌为:基本牌,你可令一名角色弃置两张牌或令一名角色摸两张牌;非基本牌,你可对一名角色造成1点伤害或令一名其他角色回复1点体力。', yj_caoang:'SP曹昂', diff --git a/character/extra.js b/character/extra.js index 7b17c39c7..efd4366a7 100755 --- a/character/extra.js +++ b/character/extra.js @@ -949,7 +949,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ maixie:true, maixie_hp:true, - effect:{ + /*effect:{ target:function(card,player,target){ if(player.hasSkillTag('jueqing',false,target)) return [1,-2]; if(get.tag(card,'damage')){ @@ -973,7 +973,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 'zeroplayertarget'; } } - } + }*/ } }, renjie2:{ @@ -2008,20 +2008,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, relonghun:{ audio:'longhun', + //技能发动时机 enable:['chooseToUse','chooseToRespond'], + //发动时提示的技能描述 prompt:'将♦牌当做杀,♥牌当做桃,♣牌当做闪,♠牌当做无懈可击使用或打出', + //动态的viewAs viewAs:function(cards,player){ var name=false; var nature=null; + //根据选择的卡牌的花色 判断要转化出的卡牌是闪还是火杀还是无懈还是桃 switch(get.suit(cards[0],player)){ case 'club':name='shan';break; case 'diamond':name='sha';nature='fire';break; case 'spade':name='wuxie';break; case 'heart':name='tao';break; } + //返回判断结果 if(name) return {name:name,nature:nature}; return null; }, + //AI选牌思路 check:function(card){ if(ui.selected.cards.length) return 0; var player=_status.event.player; @@ -2047,25 +2053,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return 1; }, + //选牌数量 selectCard:[1,2], + //确保选择第一张牌后 重新检测第二张牌的合法性 避免选择两张花色不同的牌 complexCard:true, + //选牌范围:手牌区和装备区 position:'he', + //选牌合法性判断 filterCard:function(card,player,event){ + //如果已经选了一张牌 那么第二张牌和第一张花色相同即可 if(ui.selected.cards.length) return get.suit(card,player)==get.suit(ui.selected.cards[0],player); event=event||_status.event; + //获取当前时机的卡牌选择限制 var filter=event._backup.filterCard; + //获取卡牌花色 var name=get.suit(card,player); + //如果这张牌是梅花并且当前时机能够使用/打出闪 那么这张牌可以选择 if(name=='club'&&filter({name:'shan',cards:[card]},player,event)) return true; + //如果这张牌是方片并且当前时机能够使用/打出火杀 那么这张牌可以选择 if(name=='diamond'&&filter({name:'sha',cards:[card],nature:'fire'},player,event)) return true; + //如果这张牌是黑桃并且当前时机能够使用/打出无懈 那么这张牌可以选择 if(name=='spade'&&filter({name:'wuxie',cards:[card]},player,event)) return true; + //如果这张牌是红桃并且当前时机能够使用/打出桃 那么这张牌可以选择 if(name=='heart'&&filter({name:'tao',cards:[card]},player,event)) return true; + //上述条件都不满足 那么就不能选择这张牌 return false; }, + //判断当前时机能否发动技能 filter:function(event,player){ + //获取当前时机的卡牌选择限制 var filter=event.filterCard; + //如果当前时机能够使用/打出火杀并且角色有方片 那么可以发动技能 if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('he',{suit:'diamond'})) return true; + //如果当前时机能够使用/打出闪并且角色有梅花 那么可以发动技能 if(filter({name:'shan'},player,event)&&player.countCards('he',{suit:'club'})) return true; + //如果当前时机能够使用/打出桃并且角色有红桃 那么可以发动技能 if(filter({name:'tao'},player,event)&&player.countCards('he',{suit:'heart'})) return true; + //如果当前时机能够使用/打出无懈可击并且角色有黑桃 那么可以发动技能 if(filter({name:'wuxie'},player,event)&&player.countCards('he',{suit:'spade'})) return true; return false; }, @@ -2073,6 +2097,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ respondSha:true, respondShan:true, save:true, + //让系统知道角色“有杀”“有闪”“有桃” skillTagFilter:function(player,tag){ var name; switch(tag){ @@ -2082,6 +2107,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(!player.countCards('he',{suit:name})) return false; }, + //AI牌序 order:function(item,player){ if(player&&_status.event.type=='phase'){ var max=0; @@ -2102,6 +2128,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 2; }, }, + //让系统知道玩家“有无懈” hiddenCard:function(player,name){ return name=='wuxie'&&player.countCards('he',{suit:'spade'})>0; }, @@ -2268,6 +2295,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" trigger.changeToZero(); event.cards=get.cards(5); + game.cardsGotoOrdering(event.cards); event.videoId=lib.status.videoId++; game.broadcastAll(function(player,id,cards){ var str; @@ -2297,13 +2325,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); "step 2" if(result.bool&&result.links){ - var cards2=[]; - for(var i=0;i=6) break; } else break; @@ -374,7 +375,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else { if(lib.config.background_speak) game.playAudio('skill','zhengjing_finish'); - event.dialog.textPrompt.innerHTML='
整理经典结束!'; + event.dialog.textPrompt.innerHTML='
整理经典结束!共整理出'+get.cnNumber(event.finishedx.length)+'份经典'; } while(event.zhengjing_nodes.length){ event.zhengjing_nodes.shift().delete(); @@ -454,10 +455,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ },event.videoId,event.time); var result=event.result||result; for(var i=0;i0||player.getHistory('sourceDamage').length>0; @@ -2089,13 +2097,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{player:'damageBegin4'}, forced:true, filter:function(event,player){ - return player.isDamaged()&&event.getParent().name=='sha'; + return player.isDamaged()&&event.card&&event.card.name=='sha'; }, content:function(){ 'step 0' trigger.cancel(); var cards=trigger.cards.filterInD(); - if(cards.length) player.gain(cards,'gain2'); + if(cards.length) player.gain(cards,'gain2','log'); 'step 1' player.loseMaxHp(); }, @@ -2822,7 +2830,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:"phaseDrawAfter", }, filter:function (event,player){ - if(!player.storage.xinfu_zhaoxin.length) return false; + if(!player.storage.xinfu_zhaoxin||player.storage.xinfu_zhaoxin.length) return false; return player==event.player||player.inRange(event.player); }, direct:true, @@ -4442,7 +4450,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhiyi:'执义', zhiyi_info:'锁定技,当你于一回合内使用或打出第一张基本牌时,你选择一项:1.摸一张牌。2.于此牌A(若此牌是因响应牌B而使用或打出的,则改为牌B)的使用或打出流程结算完成后,视为使用一张与此牌名称和属性相同的卡牌。', zhongzuo:'忠佐', - zhongzuo_info:'一名角色的回合结束时,若你于此回合内造成或受到过伤害,则你可以令一名角色摸两张牌。若该角色已受伤,则你摸一张牌。', + zhongzuo_info:'一名角色的结束阶段开始时,若你于此回合内造成或受到过伤害,则你可以令一名角色摸两张牌。若该角色已受伤,则你摸一张牌。', wanlan:'挽澜', wanlan_info:'限定技,当一名角色进入濒死状态时,你可以弃置所有手牌并令其回复体力至1点,然后对当前回合角色造成1点伤害。', re_jikang:"手杀嵇康", diff --git a/character/refresh.js b/character/refresh.js index 7ba670b5f..cf585892b 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_gongsunzan","re_huatuo","re_liubei","re_diaochan","re_huangyueying","re_sunquan","re_sunshangxiang","re_zhenji","re_zhugeliang","re_huaxiong"], 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","re_pangde"], - refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','re_sunjian','re_caopi','re_xuhuang'], + refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','ol_sunjian','re_caopi','re_xuhuang'], refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce'], refresh_yijiang:['re_xusheng','re_wuguotai','re_gaoshun','re_zhangyi','re_caozhi','re_zhuran','re_wuyi','re_liaohua','re_guohuai','re_zhuran','re_chengpu','re_caozhang','re_quancong','yujin_yujin','re_lingtong','re_handang','re_zhonghui'], }, @@ -81,7 +81,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_zhurong:['female','shu',4,['juxiang','relieren']], re_menghuo:['male','shu',4,['huoshou','rezaiqi']], re_dongzhuo:['male','qun',8,['rejiuchi','roulin','benghuai','baonue'],['zhu']], - re_sunjian:['male','wu',4,['gzyinghun','repolu']], + ol_sunjian:['male','wu',4,['gzyinghun','wulie']], re_caopi:['male','wei',3,['rexingshang','refangzhu','songwei'],['zhu']], re_dengai:['male','wei',4,['retuntian','zaoxian']], re_jiangwei:['male','shu',4,['retiaoxin','zhiji']], @@ -105,6 +105,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sunben:['zhouyu','taishici','daqiao'], }, skill:{ + wulie:{ + trigger:{player:'phaseJieshuBegin'}, + direct:true, + limited:true, + skillAnimation:true, + animationColor:'wood', + unique:true, + filter:function(event,player){ + return player.hp>0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.hp],get.prompt2('wulie'),lib.filter.notMe).set('ai',function(){return 0}); + 'step 1' + if(result.bool){ + var targets=result.targets.sortBySeat(); + player.logSkill('wulie',targets); + player.awakenSkill('wulie'); + player.loseHp(targets.length); + while(targets.length){ + targets[0].addSkill('wulie2'); + targets.shift().addMark('wulie2'); + } + } + }, + }, + wulie2:{ + marktext:'烈', + intro:{name2:'烈',content:'mark'}, + trigger:{player:'damageBegin3'}, + forced:true, + content:function(){ + var num=Math.min(trigger.num,player.countMark('wulie2')); + trigger.num-=num; + player.removeMark('wulie2',num); + if(!player.storage.wulie2) player.removeSkill('wulie2'); + }, + }, regongji:{ mod:{ attackFrom:function(player){ @@ -317,7 +355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, olyajiao:{ - audio:'yajiao', + audio:'reyajiao', trigger:{player:'loseAfter'}, frequent:true, filter:function(event,player){ @@ -465,7 +503,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:'paoxiao', audioname:['re_zhangfei','guanzhang','xiahouba'], filter:function(event,player){ - return player.countMark('olpaoxiao2')>0; + return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0; }, onremove:true, content:function(){ @@ -4326,10 +4364,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:[1,Infinity], check:function(card){ var player=_status.event.player; - if(get.position(card)=='h'&&!player.countCards('h',function(card){ + if(get.position(card)=='h'&&!player.countCards('h','du')&&(player.hp>2||!player.countCards('h',function(card){ return get.value(card)>=8; - })){ - return 8-get.value(card); + }))){ + return 1; } return 6-get.value(card) }, @@ -6713,7 +6751,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_zhurong:'界祝融', re_menghuo:'界孟获', re_dongzhuo:'界董卓', - re_sunjian:'界孙坚', + re_sunjian:'手杀孙坚', re_caopi:'界曹丕', rejiuchi:'酒池', rejiuchi_info:'你可以将一张黑桃手牌当做【酒】使用。锁定技,当你于回合内使用带有【酒】效果的【杀】造成伤害时,你令你的【崩坏】失效直到回合结束。', @@ -6821,6 +6859,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ requanji_info:'出牌阶段结束时,若你的手牌数大于体力值,或当你受到1点伤害后,你可以摸一张牌,然后将一张手牌置于武将牌上,称为“权”;你的手牌上限+X(X为“权”的数量)。', regongji:'弓骑', regongji_info:'出牌阶段限一次,你可以弃置一张非基本牌,然后弃置一名其他角色的一张牌。锁定技,当你的装备区内有坐骑牌时,你的攻击范围无限。', + ol_sunjian:'界孙坚', + wulie:'武烈', + wulie2:'武烈', + wulie_info:'限定技,结束阶段,你可以失去任意点体力并指定等量的角色。这些角色各获得一枚「烈」。有「烈」的角色受到1点伤害时,其移去一枚「烈」,然后令伤害-1。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/shenhua.js b/character/shenhua.js index 32a0dab4f..aee9b42e3 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -3261,7 +3261,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname:['re_dengai','gz_dengai'], enable:'phaseUse', filter:function(event,player){ - return player.storage.tuntian.length>0; + return player.storage.tuntian.length>0&&event.filterCard({name:'shunshou'},player,event); }, chooseButton:{ dialog:function(event,player){ diff --git a/character/sp.js b/character/sp.js index b8739ee0d..2b4a1a316 100755 --- a/character/sp.js +++ b/character/sp.js @@ -103,7 +103,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp_jiangwei:['male','wei',4,['kunfen','fengliang']], sp_machao:['male','qun',4,['zhuiji','ol_shichou']], sunhao:['male','wu',5,['recanshi','rechouhai','guiming'],['zhu']], - shixie:['male','qun',3,['biluan','lixia']], + shixie:['male','qun',3,['rebiluan','relixia']], mayunlu:['female','shu',4,['fengpo','mashu']], zhanglu:['male','qun',3,['yishe','bushi','midao']], wutugu:['male','qun',15,['ranshang','hanyong']], @@ -557,7 +557,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var card=targets[0].getEquip(1); if(!result.bool&&card){ event.card=card; - targets[0].chooseTarget(true,'将'+get.translation(card)+'交给一名其他角色',lib.filter.notMe).set('ai',function(target){ + player.chooseTarget(true,'将'+get.translation(card)+'交给一名其他角色').set('ai',function(target){ var card=_status.event.getParent().card; return (target.hasSkillTag('nogain')?0:get.attitude(_status.event.player,target))*Math.max(0.1,target.getUseValue(card)); }); @@ -3540,7 +3540,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } else{ - player.addTempSkill('daoshu_used','phaseUseAfter'); + player.addTempSkill('daoshu_used','phaseUseEnd'); if(player.countCards('h',function(card){return get.suit(card)!=suit2})==0){ player.showHandcards(); event.finish(); @@ -6530,7 +6530,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(_status.currentPhase!=player) return false; if(!_status.event.getParent('phaseUse')) return false; - if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')){ + if(event.card&&(event.card.name=='sha'||event.card.name=='juedou')&&event.getParent().name==event.card.name){ if(get.mode()=='guozhan'){ return (event.player.identity!='qun'||player.identity=='ye')&& !event.player.isUnseen()&&event.player.hasViceCharacter(); @@ -9175,11 +9175,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, xinzhengnan:{ audio:'zhengnan', - trigger:{global:'dieAfter'}, - direct:true, + trigger:{global:'dying'}, + forced:true, + filter:function(event,player){ + return !player.storage.xinzhengnan||!player.storage.xinzhengnan.contains(event.player); + }, content:function(){ 'step 0' - var list=['摸牌']; + if(!player.storage.xinzhengnan) player.storage.xinzhengnan=[]; + player.storage.xinzhengnan.add(trigger.player); + player.storage.xinzhengnan.sortBySeat(); + player.markSkill('xinzhengnan'); + player.recover(); + var list=[]; if(!player.hasSkill('new_rewusheng')){ list.push('new_rewusheng'); } @@ -9189,20 +9197,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(!player.hasSkill('zhiman')){ list.push('zhiman'); } - list.push('cancel2'); if(list.length){ - player.chooseControl(list).set('prompt',get.prompt2('xinzhengnan')).set('ai',function(){ - if(list.contains('xindangxian')) return 'xindangxian'; - return 0; - }); + player.draw(); + event.list=list; + } + else{ + player.draw(3); + event.finish(); } 'step 1' - if(result.control=='cancel2') return; - player.logSkill('xinzhengnan'); - if(result.control=='摸牌'){ - player.draw(3); - return; - } + if(event.list.length==1) event._result={control:event.list[0]}; + else player.chooseControl(event.list).set('prompt','征南:选择获得下列技能中的一个').set('ai',function(){ + if(event.list.contains('xindangxian')) return 'xindangxian'; + return 0; + }); + 'step 2' if(result.control=='xindangxian') player.storage.xinfuli=true; player.addSkill(result.control); player.popup(result.control); @@ -9210,7 +9219,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ threaten:1.3 - } + }, + intro:{ + content:'已因$发动过技能', + }, }, zhengnan:{ audio:1, @@ -10775,7 +10787,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nuzhan:{ audio:2, - trigger:{player:'useCard'}, + popup:false, + silent:true, + firstDo:true, + trigger:{player:'useCard1'}, filter:function(event,player){ return event.card&&event.card.name=='sha'&&event.addCount!==false&&event.cards&& event.cards.length==1&&get.type(event.cards[0],'trick')=='trick'; @@ -10791,14 +10806,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, nuzhan2:{ audio:'nuzhan', - trigger:{source:'damageBegin2'}, + trigger:{player:'useCard1'}, forced:true, + popup:false, + silent:true, + firstDo:true, filter:function(event,player){ return event.card&&event.card.name=='sha'&&event.cards&& event.cards.length==1&&get.type(event.cards[0])=='equip'; }, content:function(){ - trigger.num++; + trigger.baseDamage++; } }, jieyuan:{ @@ -11616,6 +11634,109 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.addVideo('storage',player,['biluan',player.storage.biluan]); } }, + rebiluan:{ + audio:'biluan', + trigger:{player:'phaseUseBegin'}, + mark:true, + //unique:true, + intro:{ + content:function(storage){ + if(storage>0){ + return '其他角色计算与你的距离时+'+storage; + } + else if(storage<0){ + return '其他角色计算与你的距离时'+storage; + } + else{ + return '无距离变化'; + } + } + }, + init:function(player){ + if(typeof player.storage.rebiluan!='number') player.storage.rebiluan=0; + }, + check:function(event,player){ + if(!player.countCards('h',function(card){ + return get.name(card,player)=='sha'&&player.hasValueTarget(card); + })) return true; + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i1){ + nai++; + } + } + } + return nai>=2; + }, + filter:function(event,player){ + return game.hasPlayer(function(current){ + return current!=player&&get.distance(current,player)<=1; + }); + }, + content:function(){ + var ng=[]; + var players=game.filterPlayer(); + for(var i=0;i0; + }, + content:function(){ + 'step 0' + player.chooseTarget([1,player.maxHp],get.prompt2('rexingxue')).set('ai',function(target){ + var att=get.attitude(player,target); + if(target.countCards('h')==target.hp-1) att*=2; + return att; + }); + 'step 1' + if(result.bool){ + event.targets=result.targets.sortBySeat(); + player.logSkill('rexingxue',event.targets); + game.asyncDraw(result.targets); + } + else event.finish(); + 'step 2' + game.delay(); + 'step 3' + if(event.targets.length){ + event.target=event.targets.shift(); + if(event.target.isDead()) event.redo(); + } + else event.finish(); + 'step 4' + if(target.isAlive()&&target.countCards('h')&&target.countCards('h')!=target.hp) target.chooseCard('he',true,'将一张牌置于牌堆顶'); + else event.goto(3); + 'step 5' + if(result&&result.cards){ + event.card=result.cards[0]; + target.lose(result.cards,ui.special); + game.log(target,'将',(get.position(event.card)=='h'?'一张牌':get.translation(event.card)),'置于牌堆顶'); + game.broadcastAll(function(player){ + var cardx=ui.create.card(); + cardx.classList.add('infohidden'); + cardx.classList.add('infoflip'); + player.$throw(cardx,1000,'nobroadcast'); + },target); + } + else{ + event.card=null; + } + 'step 6' + if(event.card){ + event.card.fix(); + ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); + game.delay(); + } + event.goto(3); + }, + }, + rezhaofu:{ + unique:true, + global:'rezhaofu2', + zhuSkill:true + }, + rezhaofu2:{ + mod:{ + inRangeOf:function(from,to){ + if(from.group!='wu') return; + var players=game.filterPlayer(); + for(var i=0;i0) list.push('交给其一张牌'); + if(player.countCards('he')>1) list.push('交给其一张牌'); if(trigger.player.countCards('he')>0) list.push('令其交给你一张牌'); event.list=list; - player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('shanrangzhaoshu',trigger.player)); + player.chooseControl('cancel2').set('choiceList',list).set('prompt',get.prompt('shanrangzhaoshu',trigger.player)).set('ai',function(){ + if(get.attitude(_status.event.player,_status.event.getTrigger().player)<0) return _status.event.getParent().list.length-1; + return 'cancel2'; + }); 'step 1' if(result.control=='cancel2'){ event.finish();return; @@ -2126,7 +2129,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.target=player; } 'step 2' - player.chooseCard('he',true); + player.chooseCard('he',true).set('filterCard',function(card,player){ + if(player!=_status.event.getTrigger().player) return card!=player.getEquip('shanrangzhaoshu'); + return true; + }); 'step 3' if(result.cards&&result.cards.length) target.gain(result.cards,player,'giveAuto'); }, diff --git a/mode/guozhan.js b/mode/guozhan.js index 8541c1cf1..84673cb9b 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -1726,7 +1726,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return !event.numFixed; }, - silent:true, + forced:true, + popup:false, content:function(){ trigger.num+=3; } @@ -7990,11 +7991,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, dieAfter2:function(source){ if(source&&source.shijun){ - source.discard(source.getCards('he')); - delete source.shijun; + source.discard(source.getCards('he')); + delete source.shijun; } else if(source&&source.identity!='unknown'){ if(source.identity=='ye') source.draw(3); + else if(source.shijun2){ + source.draw(1+game.countPlayer(function(current){ + return current.group==this.group + })); + } else if(this.identity=='ye') source.draw(1); else if(this.identity!=source.identity) source.draw(get.population(this.identity)+1); else source.discard(source.getCards('he')); @@ -8004,6 +8010,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ this.showCharacter(2); if(get.is.jun(this.name1)){ if(source&&source.identity==this.identity) source.shijun=true; + else if(source&&source.identity!='ye') source.shijun2=true; var yelist=[]; for(var i=0;i