From 30651e1e1e8db87a2e90377cca605cc0e68d5f7e Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 14 Feb 2018 00:10:54 +0800 Subject: [PATCH] 3 --- card/gwent.js | 8 ++++- character/swd.js | 1 + mode/boss.js | 86 ++++++++++++++++++++++++++++++------------------ 3 files changed, 62 insertions(+), 33 deletions(-) diff --git a/card/gwent.js b/card/gwent.js index 4b0ebfbe9..8e76d7f9b 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -852,6 +852,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } hs2.push(game.createCard(list.randomGet())); } + var list=get.libCard(function(info){ + return info.type=='spell'&&info.subtype!='spell_gold'; + }); + if(list.length){ + hs2.push(game.createCard(list.randomGet())); + } if(hs2.length){ player.gain(hs2,'draw'); } @@ -2236,7 +2242,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ gw_huangjiashenpan:'皇家审判', gw_huangjiashenpan_info:'获得任意一张金卡法术(皇家审判除外),然后结束出牌阶段', gw_chongci:'冲刺', - gw_chongci_info:'弃置所有牌,每弃置一张手牌,便随机获得一张类别相同的牌;每弃置一张装备区内的牌,随机装备一件类别相同的装备;获得潜行直到下一回合开始,然后结束出牌阶段', + gw_chongci_info:'弃置所有牌并随机获得一张非金法术牌,每弃置一张手牌,便随机获得一张类别相同的牌;每弃置一张装备区内的牌,随机装备一件类别相同的装备;获得潜行直到下一回合开始,然后结束出牌阶段', gw_tunshi:'吞噬', gw_tunshi_info:'随机移除一名敌方角色的一个随机技能,你获得此技能并减少一点体力和体力上限,被移除技能的角色增加一点体力和体力上限,然后结束出牌阶段', gw_dieyi:'蝶翼', diff --git a/character/swd.js b/character/swd.js index a40cef11b..4bd0e29c8 100644 --- a/character/swd.js +++ b/character/swd.js @@ -3075,6 +3075,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mingzhi:false, effect:{ target:function(card,player,target){ + if(player==_status.currentPhase) return; if(!game.hasPlayer(function(current){ return get.distance(player,current,'attack')>1&&player!=current&&get.attitude(player,current)>=0; })){ diff --git a/mode/boss.js b/mode/boss.js index 6b72b0ead..c8455eba8 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -715,18 +715,18 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ boss_taowu:['male','shen',16,['boss_xiongshou','boss_minwan','boss_nitai','boss_luanchang','boss_luanchang_switch'],['qun','boss','bossallowed'],'qun'], boss_zhuyin:['male','shen',4,['boss_xiongshou'],['qun','hiddenboss','bossallowed'],'qun'], - boss_chiyanshilian:['male','',0,['boss_chiyan','boss_chiyan_intro1','boss_chiyan_intro2','boss_chiyan_intro3'],['boss'],'zhu'], - boss_zhuque:['female','shen',4,['boss_shenyi','boss_fentian','boss_chiyan2'],['shu','hiddenboss','bossallowed']], - boss_huoshenzhurong:['male','shen',5,['boss_shenyi','boss_xingxia','boss_chiyan3'],['shu','hiddenboss','bossallowed']], - boss_yanling:['male','shen',4,['boss_huihuo','boss_furan'],['shu','hiddenboss','bossallowed']], - boss_yandi:['male','shen',6,['boss_shenyi','boss_shenen','boss_chiyi'],['shu','hiddenboss','bossallowed']], - boss_qingmushilian:['male','',0,['boss_qingmu','boss_qingmu_intro1','boss_qingmu_intro2','boss_qingmu_intro3'],['boss'],'wu'], boss_qinglong:['male','shen',4,['boss_shenyi','releiji','boss_qingmu2'],['wu','hiddenboss','bossallowed']], boss_mushengoumang:['male','shen',5,['boss_shenyi','boss_buchun','boss_qingmu3'],['wu','hiddenboss','bossallowed']], boss_shujing:['female','shen',2,['boss_cuidu'],['wu','hiddenboss','bossallowed']], boss_taihao:['male','shen',6,['boss_shenyi','boss_shenen','boss_qingyi'],['wu','hiddenboss','bossallowed']], + boss_chiyanshilian:['male','',0,['boss_chiyan','boss_chiyan_intro1','boss_chiyan_intro2','boss_chiyan_intro3'],['boss'],'zhu'], + boss_zhuque:['female','shen',4,['boss_shenyi','boss_fentian','boss_chiyan2'],['shu','hiddenboss','bossallowed']], + boss_huoshenzhurong:['male','shen',5,['boss_shenyi','boss_xingxia','boss_chiyan3'],['shu','hiddenboss','bossallowed']], + boss_yanling:['male','shen',4,['boss_huihuo','boss_furan'],['shu','hiddenboss','bossallowed']], + boss_yandi:['male','shen',6,['boss_shenyi','boss_shenen','boss_chiyi'],['shu','hiddenboss','bossallowed']], + boss_baimangshilian:['male','',0,['boss_baimang','boss_baimang_intro1','boss_baimang_intro2','boss_baimang_intro3'],['boss'],'qun'], boss_baihu:['male','shen',4,['boss_shenyi','boss_kuangxiao','boss_baimang2'],['qun','hiddenboss','bossallowed']], boss_jinshenrushou:['male','shen',5,['boss_shenyi','boss_xingqiu','boss_baimang3'],['qun','hiddenboss','bossallowed']], @@ -766,7 +766,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ boss_zhangchunhua:['female','shen',4,['jueqing','boss_wuxin','shangshix'],['wei','boss','bossallowed'],'wei'], boss_zhenji:['female','shen',4,['tashui','lingbo','jiaoxia','fanghua'],['wei','boss','bossallowed'],'wei'], - boss_liubei:['male','shen',12,['xiaoxiong','boss_zhangwu'],['shu','boss','bossallowed'],'qun'], + boss_liubei:['male','shen',8,['xiaoxiong','boss_zhangwu'],['shu','boss','bossallowed'],'qun'], boss_zhugeliang:['male','shen',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['shu','boss','bossallowed'],'qun'], boss_huangyueying:['female','shen',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['shu','boss','bossallowed'],'wei'], boss_pangtong:['male','shen',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['shu','boss','bossallowed'],'zhu'], @@ -3874,45 +3874,67 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ }, content:function(){ player.gain(game.createCard(trigger.card),'gain2'); + }, + group:'xiaoxiong_damage', + subSkill:{ + damage:{ + trigger:{global:'phaseEnd'}, + forced:true, + filter:function(event,player){ + return event.player!=player&&event.player.countUsed()==0; + }, + logTarget:'player', + content:function(){ + trigger.player.damage(); + } + } } }, boss_zhangwu:{ global:'boss_zhangwu_ai', trigger:{player:'damageEnd'}, check:function(event,player){ - return event.source&&get.damageEffect(event.source,player,player)>0; + return event.source&&event.source.isIn()&&get.damageEffect(event.source,player,player)>0; }, filter:function(event){ return event.source&&event.source.isAlive(); }, + direct:true, logTarget:'source', content:function(){ 'step 0' - var target=trigger.source; - if(target.countCards('h')==0){ - target.damage(2); + player.chooseToDiscard(get.prompt('boss_zhangwu',trigger.source),'he',[1,Infinity]).set('ai',function(card){ + if(get.attitude(player,target)<0) return 8-get.value(card); + return 0; + }).set('logSkill',['boss_zhangwu',trigger.source]); + 'step 1' + if(result.bool){ + var num=result.cards.length; + var cnum=get.cnNumber(num); + event.num=num; + trigger.source.chooseToDiscard('he','章武:弃置'+cnum+'张牌,或取消并受到'+cnum+'点伤害',num).set('ai',function(card){ + if(!trigger.source.hasSkillTag('nodamage')) return 10-get.value(card); + return 0; + }); + } + else{ event.finish(); } - else{ - target.chooseControl('discard_card','get_damage',function(){ - if(get.damageEffect(target,player,target)>=0) return 'get_damage'; - var nh=target.countCards('h'); - if(nh<=3||target.hp<=3||target.hasSkillTag('noh')) return 'discard_card'; - return 'get_damage'; - }) - } - 'step 1' - var target=trigger.source; - if(result.control=='discard_card'){ - target.discard(target.getCards('h')); - } - else{ - target.damage(2); + 'step 2' + if(!result.bool){ + trigger.source.damage(event.num); } }, ai:{ maixie:true, maixie_hp:true, + effect:{ + target:function(card,player,target){ + if(get.tag(card,'damage')&&get.attitude(target,player)<0&&player.countCards('he')