diff --git a/character/collab.js b/character/collab.js index 22921c374..5de2d131d 100644 --- a/character/collab.js +++ b/character/collab.js @@ -4,6 +4,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'collab', connect:true, character:{ + dc_caocao:['male','wei',4,['dcjianxiong']], + dc_liubei:['male','shu',4,['dcrende']], + dc_sunquan:['male','wu',4,['dczhiheng']], zhutiexiong:['male','qun',3,['dcbianzhuang']], wu_zhutiexiong:['male','qun',3,['dcbianzhuang'],['unseen']], xiaoyuehankehan:['male','qun',3,['dctongliao','dcwudao']], @@ -30,9 +33,227 @@ game.import('character',function(lib,game,ui,get,ai,_status){ collab_tongque:["sp_fuwan","sp_fuhuanghou","sp_jiben","old_lingju",'sp_mushun'], collab_duanwu:['sunwukong','longwang','taoshen'], collab_decade:['libai','xiaoyuehankehan','zhutiexiong','wu_zhutiexiong'], + collab_remake:['dc_caocao','dc_liubei','dc_sunquan'], }, }, skill:{ + //隅泣曹操 + dcjianxiong:{ + audio:'rejianxiong', + trigger:{ + player:'damageEnd', + }, + content:function (){ + 'step 0' + if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0],true)=='o'){ + player.gain(trigger.cards,'gain2'); + } + player.draw(player.countMark('dcjianxiong')+1,'nodelay'); + 'step 1' + if(player.countMark('dcjianxiong')<4) player.addMark('dcjianxiong',1,false); + }, + marktext:'雄', + intro:{ + markcount:function(storage,player){ + return player.countMark('dcjianxiong')+1; + }, + content:function(storage,player){ + return '摸牌数为'+(player.countMark('dcjianxiong')+1); + }, + }, + ai:{ + maixie:true, + maixie_hp:true, + effect:{ + target:function (card,player,target){ + if(player.hasSkillTag('jueqing',false,target)) return [1,-1]; + if(get.tag(card,'damage')&&player!=target){ + var cards=card.cards,evt=_status.event; + if(evt.player==target&&card.name=='damage'&&evt.getParent().type=='card') cards=evt.getParent().cards.filterInD(); + if(target.hp<=1) return; + if(get.itemtype(cards)!='cards') return; + for(var i of cards){ + if(get.name(i,target)=='tao') return [1,5+player.countMark('dcjianxiong')/2]; + } + if(get.value(cards,target)>=(7-player.countMark('dcjianxiong')/2+target.getDamagedHp())) return [1,3+player.countMark('dcjianxiong')/2]; + return [1,0.6+player.countMark('dcjianxiong')/2]; + } + }, + }, + }, + }, + //缺德刘备 + dcrende:{ + audio:'rerende', + enable:'phaseUse', + filter:function(event,player){ + return game.hasPlayer(current=>{ + return lib.skill.dcrende.filterTarget(null,player,current); + }); + }, + discard:false, + lose:false, + delay:false, + filterTarget:function(card,player,target){ + if(player.getStorage('dcrende_targeted').contains(target)) return false; + return player!=target&&target.countGainableCards(player,'h')>1; + }, + content:function(){ + 'step 0' + player.addTempSkill('dcrende_targeted','phaseUseAfter'); + player.markAuto('dcrende_targeted',[target]); + player.gainPlayerCard(target,'h',true,2); + 'step 1' + var list=[]; + for(var name of lib.inpile){ + if(get.type(name)!='basic') continue; + var card={name:name,isCard:true}; + if(lib.filter.cardUsable(card,player,event.getParent('chooseToUse'))&&game.hasPlayer(current=>{ + return player.canUse(card,current); + })){ + list.push(['基本','',name]); + } + if(name=='sha'){ + for(var nature of lib.inpile_nature){ + card.nature=nature; + if(lib.filter.cardUsable(card,player,event.getParent('chooseToUse'))&&game.hasPlayer(current=>{ + return player.canUse(card,current); + })){ + list.push(['基本','',name,nature]); + } + } + } + } + if(list.length){ + player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){ + var player=_status.event.player; + var card={name:button.link[2],nature:button.link[3],isCard:true}; + if(card.name=='tao'){ + if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){ + return 5; + } + return 1; + } + if(card.name=='sha'){ + if(game.hasPlayer(function(current){ + return player.canUse(card,current)&&get.effect(current,card,player,player)>0 + })){ + if(card.nature=='fire') return 2.95; + if(card.nature=='thunder'||card.nature=='ice') return 2.92; + return 2.9; + } + return 0; + } + if(card.name=='jiu'){ + return 0.5; + } + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(result&&result.bool&&result.links[0]){ + var card={name:result.links[0][2],nature:result.links[0][3],isCard:true}; + player.chooseUseTarget(card,true); + } + }, + subSkill:{ + targeted:{ + onremove:true, + charlotte:true, + }, + }, + ai:{ + fireAttack:true, + order:function(skill,player){ + return 10; + }, + result:{ + target:function(player,target){ + if(target.hasSkillTag('noh')) return -0.1; + return -2; + } + }, + threaten:3, + }, + }, + //会玩孙权 + dczhiheng:{ + audio:'rezhiheng', + enable:'phaseUse', + position:'he', + filterCard:lib.filter.cardDiscardable, + discard:false, + lose:false, + delay:false, + selectCard:[1,Infinity], + filter:function(event,player){ + var skill=player.getStat().skill; + return !skill.dczhiheng||skill.dczhiheng<1+player.getStorage('dczhiheng_hit').length; + }, + check:function(card){ + var player=_status.event.player; + if(get.position(card)=='h'&&!player.countCards('h','du')&&(player.hp>2||!player.countCards('h',function(card){ + return get.value(card)>=8; + }))){ + return 1; + } + return 6-get.value(card) + }, + group:'dczhiheng_add', + content:function(){ + 'step 0' + player.discard(cards); + event.num=1; + var hs=player.getCards('h'); + if(!hs.length) event.num=0; + for(var i=0;i