diff --git a/card/sp.js b/card/sp.js index eb4989ff2..bd6f7badd 100644 --- a/card/sp.js +++ b/card/sp.js @@ -687,7 +687,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ players.sort(lib.sort.seat); var choice=players[0]; var next=player.chooseTarget('是否移动木牛流马?',function(card,player,target){ - return !target.isMin()&&player!=target&&!target.getEquip(5); + return !target.isMin()&&player!=target&&target.isEmpty(5); }); next.set('ai',function(target){ return target==_status.event.choice?1:-1; diff --git a/character/extra.js b/character/extra.js index e6d25ebc7..b170146bf 100755 --- a/character/extra.js +++ b/character/extra.js @@ -11,8 +11,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_simayi:['male','shen',4,['renjie','sbaiyin','lianpo'],['wei']], shen_caocao:['male','shen',3,['guixin','feiying'],['wei']], shen_lvbu:['male','shen',5,['baonu','wumou','ol_wuqian','ol_shenfen'],['qun']], + "shen_liubei":["male","shen",6,["nzry_longnu","nzry_jieying"],["shu"]], "shen_luxun":["male","shen",4,["nzry_junlve","nzry_cuike","nzry_dinghuo"],["wu"]], + "shen_zhangliao":["male","shen",4,["drlt_duorui","drlt_zhiti"],["wei"]], + "shen_ganning":["male","shen",3,["drlt_poxi","drlt_jieying"],["wu"]], }, characterIntro:{ shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', @@ -20,6 +23,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_zhouyu:'字公瑾,庐江舒县人。东汉末年名将。有姿貌、精音律,江东有“曲有误,周郎顾”之语。周瑜少与孙策交好,后孙策遇刺身亡,孙权继任。周瑜将兵赴丧,以中护军的身份与长史张昭共掌众事,建安十三年(208年),周瑜率东吴军与刘备军联合,在赤壁击败曹操。此战也奠定了三分天下的基础。', shen_zhugeliang:'字孔明、号卧龙,汉族,琅琊阳都人,三国时期蜀汉丞相、杰出的政治家、军事家、发明家、文学家。在世时被封为武乡侯,死后追谥忠武侯,后来东晋政权推崇诸葛亮军事才能,特追封他为武兴王。诸葛亮为匡扶蜀汉政权,呕心沥血、鞠躬尽瘁、死而后已。其代表作有《前出师表》、《后出师表》、《诫子书》等。曾发明木牛流马等,并改造连弩,可一弩十矢俱发。于234年在宝鸡五丈原逝世。', }, + characterTitle:{ + shen_ganning:"体力上限:6", + }, skill:{ ol_shenfen:{ audio:2, @@ -939,7 +945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.value(card); }; "step 2" - player.lose(result.cards,ui.special)._triggered=null; + player.lose(result.cards,ui.special,'toStorage'); player.storage.qixing=result.cards; game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']); }, @@ -985,7 +991,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ player.logSkill('qixing'); - player.lose(result.cards,ui.special)._triggered=null; + player.lose(result.cards,ui.special,'toStorage'); player.storage.qixing=player.storage.qixing.concat(result.cards); player.syncStorage('qixing'); event.num=result.cards.length; @@ -1006,7 +1012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(0.5); } "step 3" - player.gain(result.links)._triggered=null; + player.gain(result.links,'fromStorage'); for(var i=0;i0; }, @@ -1880,26 +1915,487 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var num=game.countPlayer(function(current){return get.attitude(player,current)<0&¤t.isLinked()}); return player.storage.nzry_junlve>=num&&num==game.countPlayer(function(current){return get.attitude(player,current)<0}); }, + filterTarget:function(card,player,target){ + return target.isLinked(); + }, + selectTarget:function(){ + return [1,_status.event.player.storage.nzry_junlve]; + }, + multiline:true, + multitarget:true, content:function (){ 'step 0' player.awakenSkill('nzry_dinghuo'); player.storage.nzry_dinghuo=true; - player.chooseTarget([0,player.storage.nzry_junlve],'请选择【绽火】的目标',function(card,player,target){ + /*player.chooseTarget([0,player.storage.nzry_junlve],'请选择【绽火】的目标',function(card,player,target){ return target.isLinked(); }).ai=function(target){ return -get.attitude(player,target); + };*/ + 'step 1' + player.storage.nzry_junlve=0; + player.syncStorage('nzry_junlve'); + game.log(player,'移去了所有“军略”标记'); + for(var i=0;i0; + }, + content:function(){ + 'step 0' + event.skills=[]; + var skills=trigger.player.skills.slice(0); + for(var i=0;i0) return '宝物'; + return list.randomGet(); + }).set('prompt','请选择需要废除的栏位'); + } + 'step 1' + if(result.control!=undefined){ + if(result.control=='武器') player.disableEquip('equip1'); + if(result.control=='防具') player.disableEquip('equip2'); + if(result.control=='防御马') player.disableEquip('equip3'); + if(result.control=='攻击马') player.disableEquip('equip4'); + if(result.control=='宝物') player.disableEquip('equip5'); + } + if(event.skills.length>0){ + player.chooseControl(event.skills).set('prompt','请选择要获得的技能'); + } + else event.finish(); + 'step 2' + player.addTempSkill(result.control,{player:'dieAfter'}); + player.storage.drlt_duorui=[result.control]; + player.storage.drlt_duorui_player=trigger.player; + trigger.player.storage.drlt_duorui=[result.control]; + trigger.player.addTempSkill('drlt_duorui1',{player:'phaseAfter'}); + }, + group:['duorui_clear'], + }, + "duorui_clear":{ + trigger:{global:['phaseAfter','dieAfter'],}, + filter:function(event,player){ + if(!player.storage.drlt_duorui_player||!player.storage.drlt_duorui) return false; + return player.storage.drlt_duorui_player==event.player&&player.storage.drlt_duorui.length; + }, + silent:true, + forced:true, + popup:false, + content:function(){ + player.removeSkill(player.storage.drlt_duorui[0]); + delete player.storage.drlt_duorui_player; + player.storage.drlt_duorui=[]; + }, + }, + "drlt_duorui1":{ + init:function(player,skill){ + player.disableSkill(skill,player.storage.drlt_duorui); + }, + onremove:function(player,skill){ + "step 0" + player.enableSkill(skill); + "step 1" + delete player.storage.drlt_duorui; + }, + locked:true, + mark:true, + intro:{ + content:function(storage,player,skill){ + var list=[]; + for(var i in player.disabledSkills){ + if(player.disabledSkills[i].contains(skill)) list.push(i); + }; + if(list.length){ + var str='失效技能:'; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;i0; + }, + content:function(){ + 'step 0' + var list=[]; + for(var i=0;iplayer.hp&&game.countPlayer(function(current){return current!=player&¤t.hasSkill('drlt_zhiti')&&get.distance(current,player,'attack')<=1})) return num-1; + }, + }, + }, + 'drlt_poxi':{ + init:function (player,skill){ + if(player.hasStockSkill(skill)&&!player.storage[skill]){ + player.gainMaxHp(3); + player.storage[skill]=true; + } + }, + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:function(card,player,target){ + //return target!=player&&target.countCards('h')>0; + return target!=player; + }, + content:function(){ + 'step 0' + event.list1=[]; + event.list2=[]; + if(target.countCards('h')>0){ + var chooseButton=player.chooseButton(4,'hidden',['你的手牌',player.getCards('h'),get.translation(target.name)+'的手牌',target.getCards('h'),'hidden']); + }else{ + var chooseButton=player.chooseButton(4,'hidden',['你的手牌',player.getCards('h'),'hidden']); + } + chooseButton.set('ai',function(button){ + //if(button.link.name=='du') return 1; + return 0; + }); + chooseButton.filterButton=function(button){ + for(var i=0;i0) + return 0.1; + if(get.attitude(player,target)<1&&(target.isTurnedOver()||target.countCards('h')<1)) + return 0.2; + if(get.attitude(player,target)<1&&target.countCards('h')>0&&target.countCards('j',{name:'lebu'})>0) + return target.countCards('h')*0.8+target.getHandcardLimit()*0.7+2; + if(get.attitude(player,target)<1&&target.countCards('h')>0) + return target.countCards('h')*0.8+target.getHandcardLimit()*0.7; + return 1; + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + player.line(target); + player.logSkill('drlt_jieying'); + delete player.storage.drlt_jieying; + player.unmarkSkill('drlt_jieying'); + game.log(player,'失去了“营”标记'); + player.storage.drlt_jieying1=target; + if(target.storage.drlt_jieying==undefined) target.storage.drlt_jieying=0; + target.storage.drlt_jieying++; + target.markSkill('drlt_jieying'); + game.log(target,'获得了“营”标记'); + }; + }, + }, + '3':{ + audio:'drlt_jieying', + trigger:{ + global:'phaseAfter' + }, + forced:true, + filter:function(event,player){ + return event.player!=player&&event.player.storage.drlt_jieying!=undefined + }, + content:function(){ + if(trigger.player.countCards('h')>0){ + trigger.player.give(trigger.player.getCards('h'),player); + } + if(player.storage.drlt_jieying==undefined) player.storage.drlt_jieying=0; + player.storage.drlt_jieying++; + delete trigger.player.storage.drlt_jieying; + trigger.player.unmarkSkill('drlt_jieying'); + player.markSkill('drlt_jieying'); + game.log(player,'获得了“营”标记'); + }, + }, + }, + }, + '_drlt_jieying':{ + mod:{ + cardUsable:function (card,player,num){ + if(player.storage.drlt_jieying!=undefined&&card.name=='sha') return num+1; + }, + maxHandcard:function (player,num){ + if(player.storage.drlt_jieying!=undefined) return num+1; + }, + }, + audio:'drlt_jieying', + trigger:{ + player:'phaseDrawBegin' + }, + forced:true, + filter:function(event,player){ + return player.storage.drlt_jieying!=undefined; + }, + content:function(){ + trigger.num++; }, }, }, @@ -1910,13 +2406,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_cuike":"摧克", "nzry_cuike_info":"出牌阶段开始时,若“军略”标记的数量为奇数,你可以对一名角色造成一点伤害;若“军略”标记的数量为偶数,你可以横置一名角色并弃置其区域内的一张牌。若“军略”标记的数量超过7个,你可以移去全部“军略”标记并对所有其他角色造成一点伤害", "nzry_dinghuo":"绽火", - "nzry_dinghuo_info":"限定技,出牌阶段开始时,你可以移去全部“军略”标记,令至多等量的已横置角色弃置所有装备区内的牌,然后受到1点火焰伤害", + "nzry_dinghuo_info":"限定技,出牌阶段,你可以移去全部“军略”标记,令至多等量的已横置角色弃置所有装备区内的牌。然后,你对其中一名角色造成1点火焰伤害", "shen_liubei":"神刘备", "nzry_longnu":"龙怒", "nzry_longnu_info":"转换技,锁定技,①出牌阶段开始时,你流失1点体力并摸一张牌,然后本回合你的红色手牌均视为火杀且无距离限制。②出牌阶段开始时,你减1点体力上限并摸一张牌,然后本回合你的锦囊牌均视为雷杀且无使用次数限制", "nzry_jieying":"结营", "nzry_jieying_info":"锁定技,你始终处于横置状态;已横置的角色手牌上限+2;结束阶段,你横置一名其他角色", + "shen_ganning":"神甘宁", + "shen_zhangliao":"神张辽", + + "drlt_poxi":"魄袭", + "drlt_poxi_info":"出牌阶段限一次,你可以观看一名其他角色的手牌,然后你可以弃置你与其手牌中的四张花色不同的牌。若如此做,根据此次弃置你的牌的数量执行以下效果:1.没有,扣减一点体力上限;2.一张,立即结束出牌阶段且本回合手牌上限-1;三张,恢复一点体力;四张,摸四张牌", + "drlt_jieying":"劫营", + "drlt_jieying_info":"游戏开始时,你获得一个“营”标记。结束阶段,你可以将“营”标记置于一名角色的武将牌旁;有“营”标记的角色摸牌阶段多摸一张牌、出牌阶段可多使用一张【杀】、手牌上限+1。有“营”标记的其他角色的回合结束后,你获得其所有手牌并收回“营”标记。", + "drlt_duorui1":"失效技能", + "drlt_duorui1_bg":"锐", + "drlt_duorui":"夺锐", + "drlt_duorui_info":"当你于出牌阶段内对一名其他角色造成伤害后,你可以废除你装备区内的一个装备栏(若已全部废除则可以跳过此步骤),然后获得其的一个技能直到其的下回合结束或其死亡(觉醒技,限定技,主公技等特殊技能除外)。若如此做,该角色该技能失效且你不能再发动〖夺锐〗直到你失去此技能。", + "drlt_zhiti":"止啼", + "drlt_zhiti_info":"锁定技,你范围内已受伤的其他角色手牌上限-1;当你拼点或【决斗】胜利,或受到伤害后,你恢复一个装备栏", + shen_zhaoyun:'神赵云', shen_guanyu:'神关羽', shen_lvmeng:'神吕蒙', diff --git a/character/old.js b/character/old.js index d2671aa27..ce70d163d 100755 --- a/character/old.js +++ b/character/old.js @@ -29,6 +29,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_machao:['male','qun',4,['zhuiji','cihuai']], old_bulianshi:['female','wu',3,['old_anxu','zhuiyi']], + old_zhugezhan:["male","shu",3,["old_zuilun","old_fuyin"]], + zhangliang:["male","qun",3,["old_jijun","old_fangtong"]], }, characterFilter:{ old_lingju:function(mode){ @@ -36,6 +38,118 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + old_zuilun:{ + subSkill:{ + e:{}, + h:{}, + }, + enable:"phaseUse", + usable:2, + filterTarget:function (card,player,target){ + if(player==target) return false; + var pos='he'; + if(player.hasSkill('old_zuilun_h')) pos='e'; + if(player.hasSkill('old_zuilun_e')) pos='h'; + return target.countGainableCards(player,pos)>0; + }, + content:function (){ + 'step 0' + var pos='he'; + if(player.hasSkill('old_zuilun_h')) pos='e'; + if(player.hasSkill('old_zuilun_e')) pos='h'; + player.gainPlayerCard(target,pos,true); + 'step 1' + if(result.bool&&result.cards&&result.cards.length){ + target.draw(); + var pos=result.cards[0].original; + if(pos=='h'||pos=='e') player.addTempSkill('old_zuilun_'+pos,'phaseUseAfter'); + } + }, + ai:{ + order:7, + result:{ + target:-1, + }, + }, + }, + old_fuyin:{ + mod:{ + targetEnabled:function(card,player,target){ + if((card.name=='juedou'||card.name=='sha'||card.name=='huogong')&&player!=target&&player.countCards('h')>=target.countCards('h')&&!target.isEmpty(2)) return false; + }, + }, + }, + "old_jijun":{ + marktext:"方", + intro:{ + content:"cards", + }, + enable:"phaseUse", + filterCard:true, + selectCard:[1,Infinity], + filter:function (event,player){ + return player.countCards('h')>0; + }, + check:function (card){ + var player=_status.event.player; + if(player.storage.old_jijun&&(36-player.storage.old_jijun.length)<=player.countCards('h')) return 1; + return 5-get.value(card); + }, + discard:false, + lose:false, + content:function (){ + player.lose(cards,ui.special,'toStorage'); + player.$give(cards,player); + if(!player.storage.old_jijun) player.storage.old_jijun=[]; + player.storage.old_jijun.addArray(cards); + player.markSkill('old_jijun'); + }, + }, + "old_fangtong":{ + trigger:{ + player:"phaseEnd", + }, + forced:true, + skillAnimation:true, + filter:function (event,player){ + return (player.storage.old_jijun&&player.storage.old_jijun.length>35); + }, + content:function (){ + var bool=false; + if(player==game.me) bool=true; + else switch(get.mode()){ + case 'identity':{ + game.showIdentity(); + var id1=player.identity; + var id2=game.me.identity; + if(['zhu','zhong','mingzhong'].contains(id1)){ + if(['zhu','zhong','mingzhong'].contains(id2)) bool=true; + break; + } + else if(id1=='fan'){ + if(id2=='fan') bool=true; + break; + } + break; + } + case 'guozhan':{ + if(game.me.isFriendOf(player)) bool=true; + break; + } + case 'versus':{ + if(player.side==game.me.side) bool=true; + break; + } + case 'boss':{ + if(player.side==game.me.side) bool=true; + break; + } + default:{} + } + game.over(bool); + }, + }, + oldanxu:{ enable:'phaseUse', usable:1, @@ -460,7 +574,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_zhuzhi:'旧朱治', old_machao:'旧马超', old_bulianshi:'旧步练师', + old_zhugezhan:"旧诸葛瞻", + zhangliang:'张梁', + "old_jijun":"集军", + "old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)", + "old_fangtong":"方统", + "old_fangtong_info":"锁定技,结束阶段,若你的“方”的数目大于等于36,则你所在的游戏阵营直接取得游戏胜利。", + old_zuilun:"罪论", + old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。", + old_fuyin:"父荫", + old_fuyin_info:"锁定技,若你的装备区内没有防具牌,手牌数大于或等于你的其他角色不能使用【杀】、【决斗】或【火攻】指定你为目标", oldanxu:'安恤', oldanxu_info:'出牌阶段限一次,你可以选择手牌数不相等的两名其他角色,令其中手牌少的角色获得手牌多的角色的一张手牌并展示之,然后若此牌不为黑桃,你摸一张牌。', oldfaen:'法恩', diff --git a/character/refresh.js b/character/refresh.js index 008e48c63..405f074e8 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -93,7 +93,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, content:function (){ 'step 0' - player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'he').set('ai',function(card){ + player.gainPlayerCard(get.prompt('new_liyu',trigger.player),trigger.player,'he','visibleMove').set('ai',function(card){ var player=_status.event.player; var evt=_status.event.target; if(get.type(card)=='equip'){ @@ -113,7 +113,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); 'step 1' if(result.bool){ - player.showCards(result.cards); player.logSkill('new_liyu',trigger.player); if(get.type(result.cards[0])!='equip'){ trigger.player.draw(); @@ -950,7 +949,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(target.sex!='male') return false; var card=ui.selected.cards[0]; if(!card) return false; - if(get.position(card)=='e'&&target.countCards('e',{subtype:get.subtype(card)})) return false; + if(get.position(card)=='e'&&!target.isEmpty(get.subtype(card))) return false; return true; }, discard:false, diff --git a/character/shenhua.js b/character/shenhua.js index 424b734a9..19c27a3b9 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -51,6 +51,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xuyou":["male","qun",3,["nzry_chenglve","nzry_shicai","nzry_cunmu"],[]], "yl_luzhi":["male","qun",3,["nzry_mingren","nzry_zhenliang"],[]], "kuailiangkuaiyue":["male","wei",3,["nzry_jianxiang","nzry_shenshi"],[]], + + "guanqiujian":["male","wei",4,["drlt_zhenrong","drlt_hongju"],[]], + "haozhao":["male","wei",4,["drlt_zhenggu"],[]], + "zhugezhan":["male","shu",3,["xinfu_zuilun","xinfu_fuyin"],[]], + "lukang":["male","wu",4,["drlt_qianjie","drlt_jueyan","drlt_poshi"],[]], + "yl_yuanshu":["male","qun",4,["drlt_yongsi","drlt_weidi"],["zhu"]], + "zhangxiu":["male","qun",4,["drlt_xiongluan","drlt_congjian"],[]], + "chendao":["male","shu",4,["drlt_wanglie"],[]], + zhoufei:["female","wu",3,["liangyin","kongsheng"],[]], }, perfectPair:{ jiaxu:['liqueguosi'], @@ -107,10 +116,913 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xuyou":"许攸(?-204年),字子远,南阳(治今河南南阳)人。本为袁绍帐下谋士,官渡之战时其家人因犯法而被收捕,许攸因此背袁投曹,并为曹操设下偷袭袁绍军屯粮之所乌巢的计策,袁绍因此而大败于官渡。后许攸随曹操平定冀州,因自恃其功而屡屡口出狂言,终因触怒曹操而被杀。", "yl_luzhi":"卢植(139年—192年),字子干。涿郡涿县(今河北涿州)人。东汉末年经学家、将领。卢植性格刚毅,师从太尉陈球、大儒马融等,为郑玄、管宁、华歆的同门师兄。曾先后担任九江、庐江太守,平定蛮族叛乱。后与马日磾、蔡邕等一起在东观校勘儒学经典书籍,并参与续写《汉记》。黄巾起义时为北中郎将,率军与张角交战,后被诬陷下狱,皇甫嵩平定黄巾后力救卢植,于是复任为尚书。后因上谏激怒董卓被免官,隐居在上谷军都山,被袁绍请为军师。初平三年(192年)去世。著有《尚书章句》、《三礼解诂》等,今皆失佚。唐代时配享孔子,北宋时被追封为良乡伯。白马将军公孙瓒以及后来的蜀汉昭烈帝刘备皆为卢植门下弟子。范阳卢氏后来也成为著名的家族。", "kuailiangkuaiyue":"蒯(kuǎi)良,字子柔,襄阳中庐人。归刘表。蒯良为刘表定下安抚荆楚的政治方向,佐其成业,被刘表誉为“雍季之论”。之后,蒯良就被刘表擢升为主簿(bù)。其后蒯良的生平,就不得而知了,《三国志》亦没有记载其卒年。与蒯越、以及同样活跃于襄阳的蒯祺(诸葛亮姐夫)或为同族兄弟。蒯越(?-214年),字异度,襄阳中庐(今湖北襄阳西南)人。东汉末期人物,演义中为蒯良之弟。原本是荆州牧刘表的部下,曾经在刘表初上任时帮助刘表铲除荆州一带的宗贼(以宗族、乡里关系组成的武装集团)。刘表病逝后与刘琮一同投降曹操,后来官至光禄勋。", + + "guanqiujian":"毌丘俭,字仲恭,河东闻喜(今山西闻喜县)人。三国时期曹魏后期的重要将领。继承父毌丘兴爵位高阳乡侯,任平原侯文学。魏明帝即位后,上疏劝魏明帝停止加建皇宫的工程,升为荆州刺史。景初二年(238年)从司马懿攻灭公孙渊;正始五年(244年)至正始六年(245年)两次率兵征讨高句丽,攻破丸都,几亡其国,刻石纪功而还;253年击退吴国诸葛恪的大举进犯,战功累累。司马师废帝,毌丘俭感昔日魏明帝之恩,为曹魏政权做拼死一搏,于正元二年(255年)发动兵变,即后人所谓“淮南三叛”(王淩、毌丘俭、诸葛诞)之一,惜准备不足,兵败身亡。", + "haozhao":"郝昭(生卒年不详),字伯道,太原人,中国东汉末年至曹魏初年著名将领。郝昭少年从军,屡立战功,逐渐晋升为杂号将军,后受曹真的推荐镇守陈仓(在小说三国演义中是司马懿推荐),防御蜀汉。太和二年(228年),诸葛亮率军北伐,为郝昭所阻,劝降不成,昼夜相攻二十余日后被迫退军。魏明帝因此封其为关内侯。不久因染疾而病死。", + "zhugezhan":"诸葛瞻,字思远,琅邪阳都(今山东沂南县)人。三国时期蜀汉大臣,蜀汉丞相诸葛亮之子。邓艾伐蜀时,他与长子诸葛尚及蜀将张遵、李球、黄崇等人防御绵竹(今四川德阳),因不听黄崇速占险要的建议而坐失良机,后来出城与邓艾决战,在交战时阵亡,绵竹也随后失守。", + "zhoufei":"周妃(210年?—?),一说本名周彻 [1-2] 。周瑜独女,生母无载,疑为汉末美女小乔,因嫁孙登为太子妃,故称周妃。周瑜英年早逝,其遗孤都得到孙权厚遇,除却她本人在黄武四年(225年)嫁予太子外,兄长周循亦娶孙权长女孙鲁班为妻。", + "lukang":"陆抗,字幼节,吴郡吴县(今江苏苏州)人。三国时期吴国名将,丞相陆逊次子。陆抗袭父爵为江陵侯,为建武校尉,领其父众五千人。后迁立节中郎将、镇军将军等。孙皓为帝,任镇军大将军、都督西陵、信陵、夷道、乐乡、公安诸军事,驻乐乡(今湖北江陵西南)。凤凰元年(272年),击退晋将羊祜进攻,并攻杀叛将西陵督步阐。后拜大司马、荆州牧,卒于官,终年49岁。与陆逊皆是吴国的中流砥柱,并称“逊抗 ”,被誉为吴国最后的名将。", + "zhangxiu":"张绣,武威祖厉(今甘肃靖远)人。骠骑将军张济的从子。东汉末年割据宛城的军阀,汉末群雄之一。初随张济征伐,张济死后与刘表联合。后降曹操,因曹操调戏其嫂而突袭曹操,复与刘表连和。官渡之战前夕,听从贾诩的建议再次投降曹操,参加官渡之战,官至破羌将军,封宣威侯。在北征乌桓(207年)途中去世(一说为曹丕逼死),谥定侯。", + "chendao":"陈到,字叔至,生卒年不详,豫州汝南(今河南驻马店平舆县)人。三国时期蜀汉将领,刘备帐下白毦兵统领,名位常亚于赵云,以忠勇著称。蜀汉建兴年间,任征西将军、永安都督,封亭侯。在任期间去世。", }, skill:{ + //废除装备栏和判定区 + _disableJudge:{ + marktext:"废", + intro:{ + content:"已经废除了判定区", + }, + mod:{ + targetEnabled:function(card,player,target){ + if(target.storage._disableJudge&&get.type(card)=='delay') return false; + }, + }, + }, + "_disableEquip":{ + marktext:"废", + intro:{ + content:function(storage,player,skill){ + var str=''; + for(var i=0;iplayer.countCards('h'); + }, + direct:true, + content:function (){ + 'step 0' + player.choosePlayerCard('hej',get.prompt('drlt_zhenrong'),trigger.player).set('ai',function(button){ + return -get.attitude(player,trigger.player)+1; + }); + 'step 1' + if(result&&result.links&&result.links.length){ + player.line(player,trigger.player); + player.logSkill('drlt_zhenrong'); + player.storage.drlt_zhenrong.push(result.links[0]); + player.syncStorage('drlt_zhenrong'); + trigger.player.lose(result.links[0],ui.special,'toStorage'); + trigger.player.$give(result.links,player); + game.log(player,'将',result.links[0],'置于其武将牌上'); + }; + }, + }, + "drlt_hongju":{ + skillAnimation:true, + audio:2, + trigger:{ + player:'phaseBegin', + }, + forced:true, + unique:true, + derivation:['drlt_qingce'], + init:function(player){ + player.storage.zbaijiang=false; + }, + filter:function(event,player){ + return !player.storage.zbaijiang&&player.storage.drlt_zhenrong&&player.storage.drlt_zhenrong.length>=3&&game.dead.length>0; + }, + content:function(){ + 'step 0' + player.storage.zbaijiang=true; + var num=player.storage.drlt_zhenrong.length; + if(num>player.countCards('h')) num=player.countCards('h'); + player.chooseCard('h',[1,num],'请选择需要替换“荣”的手牌').set('ai',function(card){ + return 5-get.value(card); + }); + 'step 1' + if(result.bool){ + event.cards=result.cards; + player.chooseCardButton(player.storage.drlt_zhenrong,result.cards.length,'请选择需要替换的“荣”',true).ai=function(button){ + return 6-get.value(button.link); + }; + }else{ + player.addSkill('drlt_qingce'); + player.loseMaxHp(); + event.finish(); + }; + 'step 2' + if(result.bool){ + var cards=result.links; + for(var i=0;i0; + }, + filterTarget:function(card,player,target){ + return target.countCards('hej')>0; + }, + content:function(){ + 'step 0' + player.chooseCardButton(player.storage.drlt_zhenrong,1,'请选择需要弃置的“荣”',true).ai=function(button){ + return 6-get.value(button.link); + }; + 'step 1' + if(result.bool){ + var cards=result.links; + for(var i=0;i0&&target.countCards('j')>0) return 1; + return -1; + }, + }, + }, + }, + "drlt_zhenggu":{ + audio:2, + trigger:{ + player:"phaseEnd", + }, + group:["drlt_zhenggu2"], + direct:true, + content:function(){ + "step 0" + player.chooseTarget(get.prompt('drlt_zhenggu'),function(card,player,target){ + return target!=player; + }).ai=function(target){ + if(player.countCards('h')>target.countCards('h')) return get.attitude(player,target); + if(player.countCards('h')0) num1=num-player.countCards('h'); + if(num-player.countCards('h')<0) num1=num-player.countCards('h'); + if(num1!=0){ + pl.line(player,'thunder'); + pl.logSkill('drlt_zhenggu',player); + } + if(num1<0) player.chooseToDiscard('h',-num1,true); + if(num1>0) player.draw(num1); + } + delete player.storage.drlt_zhenggu; + }; + if(player.storage.drlt_zhenggu1!=undefined){ + var pl=player.storage.drlt_zhenggu1; + if(pl.isAlive()){ + var num=pl.countCards('h'); + var num1=0; + if(player.countCards('h')-num>0) num1=player.countCards('h')-num; + if(player.countCards('h')-num<0) num1=player.countCards('h')-num; + if(num1<0) pl.chooseToDiscard('h',-num1,true); + if(num1>0) pl.draw(num1); + } + delete player.storage.drlt_zhenggu1; + }; + }, + }, + "xinfu_zuilun":{ + group:["xinfu_zuilun_count"], + subSkill:{ + count:{ + sub:true, + silent:true, + popup:false, + trigger:{ + player:"discardAfter", + }, + filter:function (event,player){ + return _status.currentPhase==player; + }, + content:function (){ + player.addTempSkill('xinfu_zuilun_discarded'); + }, + forced:true, + }, + discarded:{ + sub:true, + }, + }, + audio:2, + trigger:{ + player:"phaseEnd", + }, + check:function (event,player){ + var num=0; + if(player.hasSkill('xinfu_zuilun_discarded')) num++; + if(!player.isMinHandcard()) num++; + if(!player.getStat('damage')) num++; + if(num==3) return player.hp>=2; + }, + content:function (){ + 'step 0' + event.num=0; + event.cards=get.cards(3); + if(player.hasSkill('xinfu_zuilun_discarded')) event.num++; + if(!player.isMinHandcard()) event.num++; + if(!player.getStat('damage')) event.num++; + 'step 1' + if(event.num==0){ + player.gain(event.cards,'draw'); + event.finish(); + }else{ + var prompt; + if(event.num==3) prompt="罪论:请按顺将卡牌置于牌堆顶(先选择的在上)"; + else prompt="罪论:请按顺将"+get.cnNumber(event.num)+"张卡牌置于牌堆顶(先选择的在上),然后获得其余的牌。"; + player.chooseCardButton(event.num,true,event.cards,prompt).set('ai',function(button){ + return 100-get.value(button.link); + }); + } + 'step 2' + if(result.bool){ + var list=result.links.slice(0); + var num=list.length-1; + for(var i=0;i2) return '武器'; + if(list1.contains('equip5')&&player.countCards('h',{type:'trick'})>=1) return '宝物'; + }).set('prompt','请选择需要废除的栏位'); + 'step 1' + if(result.control=='武器'){ + player.addTempSkill('drlt_jueyan1',{player:'phaseAfter'}); + player.disableEquip('equip1'); + }; + if(result.control=='防具'){ + player.disableEquip('equip2'); + player.draw(3); + player.addTempSkill('drlt_jueyan3',{player:'phaseAfter'}); + }; + if(result.control=='坐骑'){ + player.addTempSkill('drlt_jueyan2',{player:'phaseAfter'}); + player.disableEquip('equip3'); + player.disableEquip('equip4'); + }; + if(result.control=='宝物'){ + player.addTempSkill('jizhi',{player:'phaseAfter'}); + player.disableEquip('equip5'); + }; + }, + ai:{ + order:13, + result:{ + player:function(player){ + if(player.storage.disableEquip==undefined) return -1; + var list=['equip1','equip2','equip3','equip4','equip5']; + for(var i=0;i2) return 1; + if(list.contains('equip5')&&player.countCards('h',{type:'trick'})>=1) return 1; + return -1; + }, + }, + }, + }, + 'drlt_jueyan1':{ + mod:{ + cardUsable:function (card,player,num){ + if(card.name=='sha') return num+3; + }, + }, + }, + 'drlt_jueyan2':{ + mod:{ + targetInRange:function (card,player,target,now){ + return true; + }, + }, + }, + 'drlt_jueyan3':{ + mod:{ + maxHandcard:function (player,num){ + return num+3; + }, + }, + }, + "drlt_poshi":{ + audio:2, + skillAnimation:true, + trigger:{ + player:'phaseBegin', + }, + forced:true, + unique:true, + derivation:['drlt_huairou'], + init:function(player){ + player.storage.drlt_poshi=false; + }, + filter:function(event,player){ + return !player.storage.drlt_poshi&&((player.storage.disableEquip!=undefined&&player.storage.disableEquip.length==5)||player.hp==1); + }, + content:function(){ + player.storage.drlt_poshi=true; + player.loseMaxHp(); + var num=player.maxHp-player.countCards('h'); + if(num>0) player.draw(num); + player.removeSkill('drlt_jueyan'); + player.addSkill('drlt_huairou'); + }, + }, + "drlt_huairou":{ + audio:2, + enable:"phaseUse", + filter:function (event,player){ + return player.countCards('h',{type:'equip'})>0; + }, + filterCard:function (card){ + return get.type(card)=='equip'; + }, + check:function (card){ + return 1; + }, + content:function (){ + player.draw(); + }, + discard:false, + prompt:"将一张装备牌置入弃牌堆并摸一张牌", + delay:0.5, + prepare:function (cards,player){ + player.$throw(cards,1000); + }, + }, + "drlt_yongsi":{ + group:["drlt_yongsi_1","drlt_yongsi_2"], + subSkill:{ + '1':{ + audio:["yongsi1",2], + trigger:{ + player:'phaseDrawBegin' + }, + forced:true, + content:function(){ + trigger.num=game.countGroup(); + }, + }, + '2':{ + audio:["yongsi2",2], + trigger:{ + player:'phaseDiscardBegin' + }, + forced:true, + filter:function(event,player){ + var num=player.getStat('damage'); + return !num||num>1; + }, + content:function(){ + var numx=player.getStat('damage'); + if(!numx){ + var num=player.hp-player.countCards('h'); + if(num>0) player.draw(num); + } + else{ + player.addTempSkill('drlt_yongsi1',{player:'phaseDiscardAfter'}); + }; + }, + }, + }, + }, + 'drlt_yongsi1':{ + mod:{ + maxHandcard:function (player,num){ + return num+player.maxHp-2*player.hp; + }, + }, + }, + "drlt_weidi":{ + audio:2, + unique:true, + zhuSkill:true, + trigger:{ + player:"phaseDiscardAfter", + }, + direct:true, + filter:function (event,player){ + if(!player.hasZhuSkill('drlt_weidi')) return false; + return event.cards&&event.cards.length>0&&game.countPlayer(function(current){return current!=player&¤t.group=='qun'})>0; + }, + content:function(){ + 'step 0' + event.cards=trigger.cards; + 'step 1' + player.chooseTarget('是否将 '+get.translation(event.cards[0])+' 给予其他群雄角色?',function(card,player,target){ + return target!=player&&target.group=='qun'; + }).ai=function(target){ + if(event.cards[0].name=='du') return -get.attitude(player,target); + return get.attitude(player,target); + }; + 'step 2' + if(result.bool){ + player.logSkill('drlt_weidi',result.targets); + player.line(result.targets); + player.$give(event.cards[0],result.targets[0]); + result.targets[0].gain(event.cards[0],player); + }; + event.cards.remove(event.cards[0]); + if(event.cards.length>0) event.goto(1); + }, + }, + "drlt_xiongluan":{ + audio:2, + unique:true, + enable:'phaseUse', + mark:true, + skillAnimation:true, + limited:true, + init:function(player){ + player.storage.drlt_xiongluan=false; + }, + filter:function(event,player){ + if(player.storage.drlt_xiongluan) return false; + return true; + }, + filterTarget:function(card,player,target){ + return target!=player; + }, + content:function(){ + player.awakenSkill('drlt_xiongluan'); + player.storage.drlt_xiongluan=true; + player.disableEquip('equip1'); + player.disableEquip('equip2'); + player.disableEquip('equip3'); + player.disableEquip('equip4'); + player.disableEquip('equip5'); + player.disableJudge(); + player.addTempSkill('drlt_xiongluan1'); + player.storage.drlt_xiongluan1=target; + target.addSkill('drlt_xiongluan2'); + target.markSkillCharacter('drlt_xiongluan1',player,'雄乱','无法使用或打出任何手牌'); + }, + ai:{ + order:13, + result:{ + player:function(player){ + if(player.countCards('h',{name:'sha'})>=2&&game.countPlayer(function(current){return get.attitude(player,current)<0})>0) return 1; + }, + }, + }, + intro:{ + content:'limited' + }, + }, + 'drlt_xiongluan1':{ + onremove:function(player){ + player.storage.drlt_xiongluan1.removeSkill('drlt_xiongluan2'); + player.storage.drlt_xiongluan1.unmarkSkill('drlt_xiongluan1'); + delete player.storage.drlt_xiongluan1; + }, + mod:{ + targetInRange:function (card,player,target){ + if(target.hasSkill('drlt_xiongluan2')){ + return true; + } + }, + cardUsable:function (card,player,num){ + if(typeof num=='number'&&game.hasPlayer(function(current){ + return current.hasSkill('drlt_xiongluan2'); + })) return num+100; + }, + playerEnabled:function (card,player,target){ + if(game.hasPlayer(function(current){ + return current.hasSkill('drlt_xiongluan2'); + })&&!target.hasSkill('drlt_xiongluan2')){ + var num=player.getCardUsable(card)-100; + if(num<=0) return false; + } + }, + }, + }, + 'drlt_xiongluan2':{ + mod:{ + cardEnabled:function(card,player){ + if(get.position(card)=='h') return false; + }, + cardUsable:function(card,player){ + if(get.position(card)=='h') return false; + }, + cardRespondable:function(card,player){ + if(get.position(card)=='h') return false; + }, + cardSavable:function(card,player){ + if(get.position(card)=='h') return false; + }, + }, + }, + + + "drlt_congjian":{ + audio:2, + trigger:{ + global:"useCard", + }, + direct:true, + filter:function (event,player){ + return event.targets&&get.type(event.card)=='trick'&&event.targets.contains(player)&&event.targets.length>1&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + player.chooseCardTarget({ + filterCard:true, + selectCard:1, + filterTarget:function(card,player,target){ + return player!=target&&trigger.targets.contains(target); + }, + ai1:function(card){ + if(card.name=='du') return 20; + if(_status.event.player.storage.drlt_xiongluan&&get.type(card)=="equip") return 15; + return 6-get.value(card); + }, + ai2:function(target){ + var att=get.attitude(_status.event.player,target); + if(ui.selected.cards.length&&ui.selected.cards[0].name=='du'){ + if(target.hasSkillTag('nodu')) return 0.1; + return 1-att; + } + return att-3; + }, + prompt:get.prompt('drlt_congjian'), + }); + 'step 1' + if(result.bool){ + event.target=result.targets[0]; + player.line(event.target); + player.logSkill('drlt_congjian') + player.$give(result.cards[0],event.target); + event.target.gain(result.cards[0],player); + var num=1; + if(get.type(result.cards[0])=='equip') num=2; + player.draw(num); + }; + }, + }, + "drlt_wanglie":{ + group:["drlt_wangliex"], + audio:2, + trigger:{ + player:"phaseUseBefore", + }, + forced:true, + popup:false, + content:function(){ + player.storage.drlt_wanglie=true; + player.markSkillCharacter('drlt_wanglie',player,'往烈','回合内使用的第一张牌无距离限制'); + }, + }, + 'drlt_wangliex':{ + mod:{ + targetInRange:function (card,player,target,now){ + if(player.storage.drlt_wanglie==true) return true; + }, + }, + audio:2, + trigger:{ + player:"useCardBegin", + }, + filter:function (event,player){ + return player.hasSkill('drlt_wanglie')&&_status.currentPhase==player; + }, + forced:true, + popup:false, + content:function(){ + 'step 0' + if(player.storage.drlt_wanglie==true){ + delete player.storage.drlt_wanglie; + player.unmarkSkill('drlt_wanglie'); + }; + player.chooseBool().set('ai',function(){ + if(player.countCards('h')<=player.hp+1&&((get.type(trigger.card)=='trick'&&game.countPlayer(function(current){return get.attitude(current,player)<=0&¤t.countCards('h',{name:'wuxie'})})>0)||trigger.card.name=='sha')) return true; + return false; + }).set('prompt','是否令此牌不能被响应'); + 'step 1' + if(result.bool){ + player.logSkill('drlt_wanglie'); + player.storage.drlt_wanglie1=trigger.card.name; + player.addTempSkill('drlt_wanglie1',{player:'useCardAfter'}); + player.addTempSkill('drlt_wanglie2',{player:'phaseAfter'}); + }; + }, + }, + "drlt_wanglie1":{ + mod:{ + wuxieRespondable:function(card,player,target,current){ + if(player!=current&&player.storage.drlt_wanglie1==card.name) return false; + }, + }, + ai:{ + norespond:true, + skillTagFilter:function(player,tag,arg){ + if(tag=='norespond'&&Array.isArray(arg)){ + var evt=arg[2].getParent(); + if(evt.type=='card'&&evt.name==player.storage.drlt_wanglie1) return true; + }; + return false; + }, + }, + }, + "drlt_wanglie2":{ + mod:{ + cardEnabled:function(card,player){ + return false; + }, + }, + }, + + liangyin:{ + audio:2, + group:["liangyin_1","liangyin_2"], + subSkill:{ + "1":{ + trigger:{ + global:["loseAfter","addCardToStorage"], + }, + filter:function (event,player){ + if(event.name=='lose') return event.toStorage==true; + return true; + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget('是否发动【良姻】令手牌数大于你的一名角色摸一张牌?',function(card,player,target){ + return target!=player&&target.countCards('h')>player.countCards('h'); + }).ai=function(target){ + return get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.line(result.targets); + player.logSkill('liangyin'); + result.targets[0].draw(); + }else{ + event.finish(); + }; + }, + sub:true, + }, + "2":{ + trigger:{ + global:"gainAfter", + }, + filter:function (event,player){ + return event.fromStorage==true; + }, + direct:true, + content:function (){ + "step 0" + player.chooseTarget('是否发动【良姻】令手牌数小于你的一名角色弃置一张牌?',function(card,player,target){ + return target!=player&&target.countCards('h')0; + }).ai=function(target){ + return -get.attitude(player,target); + }; + "step 1" + if(result.bool){ + player.line(result.targets); + player.logSkill('liangyin'); + result.targets[0].chooseToDiscard('he',1,true); + }else{ + event.finish(); + }; + }, + sub:true, + }, + }, + }, + kongsheng:{ + audio:2, + trigger:{ + player:"phaseBegin", + }, + direct:true, + filter:function (event,player){ + return player.countCards('he')>0; + }, + content:function (){ + 'step 0' + player.chooseCard(get.prompt('kongsheng'),'he',[1,player.countCards('he')]).set('ai',function(card){ + if(card.name=='shan'||card.name=='du') return 1; + return 5-get.value(card); + }); + 'step 1' + if(result.bool){ + player.logSkill('kongsheng'); + if(player.storage.kongsheng2==undefined) player.storage.kongsheng2=[]; + player.storage.kongsheng2.addArray(result.cards); + player.lose(result.cards,ui.special,'toStorage'); + game.log(player,'将',result.cards,'置于其武将牌上'); + player.addSkill('kongsheng2'); + }else{ + event.finish(); + } + }, + }, + "kongsheng2":{ + marktext:"箜", + intro:{ + content:"cards", + }, + mark:true, + trigger:{ + player:"phaseEnd", + }, + filter:function (event,player){ + return player.storage.kongsheng2!=undefined&&player.storage.kongsheng2.length>0; + }, + forced:true, + popup:false, + content:function (){ + 'step 0' + player.logSkill('kongsheng'); + event.list=[]; + for(var i=0;i0){ + if(player.getCards('hej').contains(card)&&4-pl.countCards('h')>0){ pl.draw(4-pl.countCards('h')); pl.logSkill('nzry_shenshi'); }; @@ -1017,7 +1929,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('filterCard',lib.filter.cardDiscardable); 'step 2' if(result.bool&&result.cards.length){ - if(get.type(result.cards[0])=='equip'){ + if(get.type(result.cards[0])=='equip'&&!player.isDisabled(get.subtype(result.cards[0]))){ player.$give(result.cards,player); player.lose(result.cards,ui.special); event.toequip=result.cards[0]; @@ -1959,6 +2871,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ result.card.goto(ui.special); + event.trigger("addCardToStorage"); player.storage.tuntian.push(result.card); result.node.moveDelete(player); game.broadcast(function(cardid,player){ @@ -2151,11 +3064,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(player.group!='wu'||player.countCards('h')==0) return false; return game.hasPlayer(function(target){ - return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; + return target.hasZhuSkill('zhiba',player)&&player.canCompare(target); }); }, filterTarget:function(card,player,target){ - return target!=player&&target.hasZhuSkill('zhiba',player)&&target.countCards('h')>0; + return target.hasZhuSkill('zhiba',player)&&player.canCompare(target); }, usable:1, content:function(){ @@ -2233,7 +3146,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filterTarget:function(card,player,target){ if(target.isMin()) return false; - return player!=target&&!target.getEquip(card); + var type=get.subtype(card); + return player!=target&&target.isEmpty(type); }, content:function(){ target.equip(cards[0]); @@ -2902,8 +3816,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ if(event._notrigger.contains(event.player)) return false; return (event.card&&event.card.name=='sha'&& - event.player.classList.contains('dead')==false&& - event.player.countCards('h')&&player.countCards('h'))&&event.player!=player; + event.player.isAlive()&& + player.canCompare(event.player)); }, check:function(event,player){ return get.attitude(player,event.player)<0&&player.countCards('h')>1; @@ -3655,7 +4569,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inherit:'bagua_skill', filter:function(event,player){ if(!lib.skill.bagua_skill.filter(event,player)) return false; - if(player.getEquip(2)) return false; + if(!player.isEmpty(2)) return false; return true; }, ai:{ @@ -3664,7 +4578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player==target&&get.subtype(card)=='equip2'){ if(get.equipValue(card)<=7.5) return 0; } - if(target.getEquip(2)) return; + if(!target.isEmpty(2)) return; return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments); } } @@ -3850,7 +4764,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); }, filterTarget:function(card,player,target){ - return target.hp>player.hp&&target.countCards('h')>0; + return target.hp>player.hp&&player.canCompare(target); }, content:function(){ "step 0" @@ -4088,7 +5002,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h')>0; + return player.canCompare(target); }, filter:function(event,player){ return player.countCards('h')>0; @@ -5030,6 +5944,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ num++; } player.storage.gzbuqu.addArray(get.cards(num)); + event.trigger("addCardToStorage"); player.showCards(get.translation(player)+'的不屈牌',player.storage.gzbuqu); player.hp=0; player.update(); @@ -5051,6 +5966,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.buqu==undefined) player.storage.buqu=[]; player.storage.buqu.push(event.card); player.syncStorage('buqu'); + event.trigger("addCardToStorage"); player.showCards(player.storage.buqu,'不屈') player.markSkill('buqu'); "step 1" @@ -5317,7 +6233,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, + //废除装备栏时显示的卡牌 + card:{ + "feichu_equip1":{ + type:"equip", + subtype:"equip1", + }, + "feichu_equip2":{ + type:"equip", + subtype:"equip2", + }, + "feichu_equip3":{ + type:"equip", + subtype:"equip3", + }, + "feichu_equip4":{ + type:"equip", + subtype:"equip4", + }, + "feichu_equip5":{ + type:"equip", + subtype:"equip5", + }, + }, translate:{ + "feichu_equip1":"已废除", + "feichu_equip1_info":"武器栏已废除", + "feichu_equip2":"已废除", + "feichu_equip2_info":"防具栏已废除", + "feichu_equip3":"已废除", + "feichu_equip3_info":"防御坐骑栏已废除", + "feichu_equip4":"已废除", + "feichu_equip4_info":"攻击坐骑栏已废除", + "feichu_equip5":"已废除", + "feichu_equip5_info":"宝物栏已废除", + "feichu_equip1_bg":"废", + "feichu_equip2_bg":"废", + "feichu_equip3_bg":"废", + "feichu_equip4_bg":"废", + "feichu_equip5_bg":"废", + _disableJudge:"判定区", + re_yuanshao:'袁绍', re_lusu:'鲁肃', re_yuji:"于吉", @@ -5330,17 +6286,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "wangping":"王平", "yanyan":"严颜", + "zhugezhan":"诸葛瞻", + "lukang":"陆抗", + "haozhao":"郝昭", + "yl_yuanshu":"袁术", + "zhangxiu":"张绣", + "chendao":"陈到", + "guanqiujian":"毌丘俭", + zhoufei:"周妃", + "nzry_jianxiang":"荐降", - "nzry_jianxiang_info":"当你成为其他角色使用牌的目标前,你可令手牌数最少的一名角色摸一张牌", + "nzry_jianxiang_info":"当你成为其他角色使用牌的目标时,你可令手牌数最少的一名角色摸一张牌", "nzry_shenshi1":"审时", "nzry_shenshi":"审时", "nzry_shenshi_info":"转换技,①出牌阶段限一次,你可以将一张牌交给一名手牌数最多的角色,然后对其造成一点伤害,若该角色因此死亡,则你可以令一名角色将手牌摸至四张。②其他角色对你造成伤害后,你可以观看该角色的手牌,然后交给其一张牌,当前角色回合结束时,若该角色未失去此牌,你将手牌摸至四张", - "nzry_mingren":"明任", "nzry_mingren_info":"游戏开始时,你摸一张牌,然后将你的一张手牌至于你的武将牌上,称为“任”。结束阶段,你可以用手牌替换“任”", "nzry_zhenliang":"贞良", "nzry_zhenliang_info":"转换技,①出牌阶段限一次,你可以选择一名攻击范围内的其他角色,然后弃置X张与“任”颜色相同的牌并对其造成一点伤害(X为你与其的体力差且至少为1)。②你的回合外,当你使用或打出牌进入弃牌堆时,若此牌与“任”类型相同,则你可以令一名角色摸一张牌", - "nzry_chenglve1":"成略", "nzry_chenglve":"成略", "nzry_chenglve_info":"转换技,出牌阶段限一次,①你可以摸一张牌,然后弃置两张手牌。②你可以摸两张牌,然后弃置一张手牌。若如此做,直到本回合结束,你使用与弃置牌花色相同的牌无距离和次数限制", @@ -5349,13 +6312,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_cunmu":"寸目", "nzry_cunmu_info":"锁定技,当你摸牌时,改为从牌堆底摸牌", "nzry_kuizhu":"溃诛", - "nzry_kuizhu_info":"弃牌阶段结束后,你可以选择一项:令至多X名角色个摸一张牌,对任意名体力值之和为X的角色造成一点伤害,若不少于2名角色,你须受到一点伤害(X为你此阶段弃置的牌数)", + "nzry_kuizhu_info":"弃牌阶段结束后,你可以选择一项:令至多X名角色各摸一张牌,或对任意名体力值之和为X的角色造成一点伤害,若不少于2名角色,你须受到一点伤害。(X为你此阶段弃置的牌数)", "nzry_zhizheng":"掣政", - "nzry_zhizheng_info":"锁定技,你的出牌阶段内,攻击范围内不包含你的角色不能成为你使用牌的目标。出牌阶段结束时,若你本阶段内使用的牌数小于这些角色数,你弃置其中一名角色一张牌", + "nzry_zhizheng_info":"锁定技,你的出牌阶段内,攻击范围内不包含你的角色不能成为你使用牌的目标。出牌阶段结束时,若你本阶段内使用的牌数小于这些角色数,你可以弃置其中一名角色一张牌", "nzry_lijun1":"立军", "nzry_lijun":"立军", - "nzry_lijun_info":"主公技,其他吴势力角色与其回合内使用【杀】结算后,其可以将此【杀】交给你,然后你可以令其摸一张牌", - + "nzry_lijun_info":"主公技,其他吴势力角色于其回合内使用的【杀】结算后,其可以将此【杀】交给你,然后你可以令其摸一张牌", "nzry_huaiju":"怀橘", "nzry_huaiju_info":"锁定技,游戏开始时,你获得3个“橘”标记。(有“橘”的角色受到伤害时,防止此伤害,然后移去一个“橘”;有“橘”的角色摸牌阶段额外摸一张牌)", "_nzry_huaiju":"怀橘", @@ -5366,16 +6328,50 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "nzry_yili_info":"出牌阶段开始时,你可以失去一点体力或移去一个“橘”,然后令一名其他角色获得一个“橘”", "nzry_zhenglun":"整论", "nzry_zhenglun_info":"若你没有“橘”,你可以跳过摸牌阶段然后获得一个“橘”", - "nzry_feijun":"飞军", "nzry_feijun_info":"出牌阶段限一次,你可以弃置一张牌,然后选择一项:令一名手牌数大于你的角色交给你一张牌;或令一名装备区里牌数大于你的角色弃置一张装备牌", "nzry_binglve":"兵略", "nzry_binglve_info":"锁定技,当你发动“飞军”时,若目标与你之前指定的目标均不相同,则你摸两张牌", - "nzry_juzhan1":"拒战", "nzry_juzhan":"拒战", "nzry_juzhan_info":"转换技,①当你成为其他角色【杀】的目标后,你可以与其各摸一张牌,然后其本回合内不能再对你使用牌。②当你使用【杀】指定一名角色为目标后,你可以获得其一张牌,然后你本回合内不能再对其使用牌", - + + liangyin:"良姻", + "liangyin_info":"当有牌移至游戏外时,你可以令手牌数大于你的一名角色摸一张牌;当有牌从游戏外加入任意角色的手牌时,你可以令手牌数小于你的一名角色弃置一张牌", + kongsheng:"箜声", + "kongsheng_info":"准备阶段,你可以将任意张牌置于你的武将牌上;结束阶段,你使用武将牌上的装备牌,并获得武将牌上的其他牌", + "kongsheng2":"箜声", + "kongsheng2_info":"", + "xinfu_zuilun":"罪论", + "xinfu_zuilun_info":"结束阶段,你可以观看牌堆顶三张牌,你每满足以下一项便保留一张,然后以任意顺序放回其余的牌:1.你于此回合内造成过伤害;2.你于此回合内未弃置过牌;3.手牌数为全场最少。若均不满足,你与一名其他角色失去一点体力。", + "xinfu_fuyin":"父荫", + "xinfu_fuyin_info":"锁定技,你每回合第一次成为【杀】或【决斗】的目标后,若你的手牌数小于等于该角色,此牌对你无效。", + "drlt_wanglie":"往烈", + "drlt_wanglie_info":"出牌阶段,你使用的第一张牌无距离限制,你可以令此牌不能被响应,若如此做,本回合内你不能再使用牌", + "drlt_xiongluan":"雄乱", + "drlt_xiongluan_info":"限定技,出牌阶段,你可以废除你的判定区和装备区,然后指定一名其他角色。直到回合结束,你对其使用牌无距离和次数限制,其不能使用和打出手牌", + "drlt_congjian":"从谏", + "drlt_congjian_info":"当你成为锦囊牌的目标时,若此牌的目标数大于1,则你可以交给其中一名其他目标角色一张牌,然后摸一张牌,若你给出的是装备牌,改为摸两张牌", + "drlt_yongsi":"庸肆", + "drlt_yongsi_info":"锁定技,摸牌阶段,你改为摸X张牌(X为存活势力数);弃牌阶段,若你本回合:1.没有造成伤害,将手牌摸至当前体力值;2.造成的伤害超过1点,本回合手牌上限改为已损失体力值", + "drlt_weidi":"伪帝", + "drlt_weidi_info":"主公技,你于弃牌阶段弃置的牌可以以任意方式交给其他群雄角色", + "drlt_qianjie":"谦节", + "drlt_qianjie_info":"锁定技,你不能被横置,且不能成为延时类锦囊的目标。你不能成为其他角色拼点的目标。", + "drlt_jueyan":"决堰", + "drlt_jueyan_info":"出牌阶段限一次,你可以废除一个装备栏,然后执行对应一项:武器栏,本回合内你可以多使用三张【杀】;防具栏,摸三张牌,本回合手牌上限+3;2个坐骑栏,本回合你使用的牌无距离限制;宝物栏,本回合获得技能集智", + "drlt_poshi":"破势", + "drlt_poshi_info":"觉醒技,准备阶段开始时,若你的装备栏均已被废除或体力值为1,则你扣减一点体力上限,失去技能“决堰”并获得技能“怀柔”", + "drlt_huairou":"怀柔", + "drlt_huairou_info":"出牌阶段,你可以重铸装备牌", + "drlt_zhenggu":"镇骨", + "drlt_zhenggu_info":"结束阶段,你可以选择一名其他角色,你的回合结束后和该角色的下个回合结束时,其将手牌摸至或弃至与你手牌数相同", + "drlt_zhenrong":"徵荣", + "drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”", + "drlt_hongju":"鸿举", + "drlt_hongju_info":"觉醒技,准备阶段,若“荣”的数量大于或等于3且场上有角色死亡,则你可以用任意张手牌替换等量的“荣”,然后扣减一点体力上限并获得技能“清侧”", + "drlt_qingce":"清侧", + "drlt_qingce_info":"出牌阶段,你可以移去一张“荣”,然后弃置场上的一张牌", jianchu:'鞬出', jianchu_info:'当你使用【杀】指定一名角色为目标后,你可以弃置其一张牌,若以此法弃置的牌为装备牌,此【杀】不可被【闪】响应,若不为装备牌,该角色获得此【杀】', @@ -5612,7 +6608,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ huangtian_info:'主公技,群雄角色可在他们各自的回合里给你一张【闪】或【闪电】。', guhuo_info:'每名角色的回合限一次,你可以扣置一张手牌当一张基本牌或普通锦囊牌使用或打出。其他角色依次选择是否质疑。一旦有其他角色质疑则翻开此牌:若为假则此牌作废,若为真,则质疑角色获得技能“缠怨”(锁定技,你不能质疑于吉,只要你的体力值为1,你失去你的武将技能)', fenji_info:'每当一名角色的手牌于回合外被其他角色弃置或获得时,你可以失去1点体力,然后该角色摸两张牌。', - }, }; }); diff --git a/character/sp.js b/character/sp.js index e6d033f2c..3313c4fe4 100755 --- a/character/sp.js +++ b/character/sp.js @@ -46,7 +46,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ caoang:['male','wei',4,['kaikang']], sp_caoren:['male','wei',4,['weikui','lizhan']], zhangbao:['male','qun',3,['zhoufu','yingbin']], - zhangliang:['male','qun',3,['fulu','fuji']], + huangjinleishi:['female','qun',3,['fulu','fuji']], maliang:['male','shu',3,['zishu','yingyuan']], sp_pangtong:['male','qun',3,['manjuan','zuixiang']], zhugedan:['male','wei',4,['gongao','juyi']], @@ -241,8 +241,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhangliang:'东汉末年黄巾起义首领之一,张角的三弟。中平元年(184)随兄起义,号称“人公将军”。遭到朝廷所派左中郎将皇甫嵩进攻时,他率军在广宗(今河北威县)进行反击。后因警戒疏忽,遭到汉军夜袭,兵败身亡。', }, characterTitle:{ - "baosanniang":"Sukincen", - 'zhaotongzhaoguang':"Sukincen" + //"baosanniang":"Sukincen", + //'zhaotongzhaoguang':"Sukincen" }, perfectPair:{ yuejin:['re_lidian'], @@ -441,7 +441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(player.storage.new_xingwu.length<2){ player.$give(result.cards,player); } - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.storage.new_xingwu=player.storage.new_xingwu.concat(result.cards); player.markSkill('new_xingwu'); player.syncStorage('new_xingwu'); @@ -811,7 +811,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('ai',function(target){ var player=_status.event.player; var att=get.attitude(player,target) - if(target.getEquip(2)&&!player.getEquip(2)){ + if(target.getEquip(2)&&player.isEmpty(2)){ return -2*att; } return -att; @@ -2050,7 +2050,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' player.chooseTarget(get.prompt('shuimeng'),function(card,player,target){ - return target!=player&&target.countCards('h'); + return player.canCompare(target); }).set('ai',function(target){ if(!_status.event.goon) return 0; return -get.attitude(_status.event.player,target); @@ -2918,7 +2918,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return true; }, filterTarget:function(card,player,target){ - return target.countCards('h')&&target!=player; + return player.canCompare(target); }, ai:{ order:2.8, @@ -3186,7 +3186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }); } player.chooseTarget(get.prompt('shuangren'),function(card,player,target){ - return target!=player&&target.countCards('h'); + return player.canCompare(target); }).set('ai',function(target){ var player=_status.event.player; if(_status.event.goon&&get.attitude(player,target)<0){ @@ -4862,7 +4862,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.logSkill('tuifeng'); - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.$give(result.cards,player); for(var i=0;i0&&target.distanceTo(ui.selected.targets[0])<=1; + return ui.selected.targets[0].canCompare(target)&&target.distanceTo(ui.selected.targets[0])<=1; } return true; }, @@ -5070,7 +5070,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return target!=player&&target.countCards('h')>0; + return player.canCompare(target); }, selectTarget:[1,3], filter:function(event,player){ @@ -5106,8 +5106,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.die(); } else{ - // player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); - event.finish(); + player.chooseToDiscard('弃置一张牌,或摸一张牌').set('ai',function(){return -1;}); + //event.finish(); } } 'step 1' @@ -5281,7 +5281,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool){ var card=result.cards[0]; - player.lose(card,ui.special); + player.lose(card,ui.special,'toStorage'); player.storage.shefu.push(card); player.syncStorage('shefu'); player.markSkill('shefu'); @@ -5739,7 +5739,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); + return player.canCompare(target); }, filter:function(event,player){ return player.countCards('h')>0; @@ -5841,7 +5841,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ inherit:'bagua_skill', filter:function(event,player){ if(!lib.skill.bagua_skill.filter(event,player)) return false; - if(player.getEquip(2)) return false; + if(!player.isEmpty(2)) return false; return true; }, ai:{ @@ -6038,6 +6038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } ui.special.appendChild(trigger.card); trigger.player.markSkill('zhenwei2'); + event.trigger("addCardToStorage"); } trigger.cancel(); trigger.player.addSkill('zhenwei2'); @@ -6076,7 +6077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return player!=target&&target.countCards('h'); + return player.canCompare(target); }, filter:function(event,player){ return player.countCards('h')>0; @@ -6370,7 +6371,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool&&result.links&&result.links.length){ target.$give(result.links,player); - target.lose(result.links,ui.special); + target.lose(result.links,ui.special,'toStorage'); player.storage.yinling.push(result.links[0]); player.markSkill('yinling'); player.syncStorage('yinling'); @@ -6416,8 +6417,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countCards('he',{suit:'diamond'})>0; }, discard:false, + lose:false, prepare:'give', content:function(){ + player.lose(cards,ui.special,'toStorage'); if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ target.storage.yanxiao2.push(cards[0]); target.syncStorage('yanxiao2'); @@ -6449,7 +6452,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, content:function(){ var cards=player.storage.yanxiao2.concat(player.getCards('j')); - player.gain(cards,'gain2','log'); + player.gain(cards,'gain2','log','fromStorage'); delete player.storage.yanxiao2; player.removeSkill('yanxiao2'); }, @@ -6666,7 +6669,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('yinbing'); game.log(player,'将',result.cards,'置于武将牌上'); player.storage.yinbing=player.storage.yinbing.concat(result.cards); - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.markSkill('yinbing'); player.syncStorage('yinbing'); } @@ -6776,7 +6779,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else{ var target=result.targets[0]; target.recover(); - target.gain(player.storage.yinbing.slice(0),'gain2','log'); + target.gain(player.storage.yinbing.slice(0),'gain2','log','fromStorage'); target.draw(player.storage.yinbing.length); player.storage.yinbing.length=0; } @@ -6977,7 +6980,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 2' if(result.bool){ event.target.$give(result.links,player); - event.target.lose(result.links,ui.special); + event.target.lose(result.links,ui.special,'toStorage'); player.storage.fentian=player.storage.fentian.concat(result.links); player.syncStorage('fentian'); setTimeout(function(){ @@ -7121,7 +7124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 1' if(result.bool){ - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.storage.tunchu.addArray(result.cards); player.markSkill('tunchu'); player.syncStorage('tunchu'); @@ -7760,7 +7763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseCard(2,'he',true,'选择两张牌作为“米”'); 'step 1' player.storage.yishe=result.cards; - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.syncStorage('yishe'); player.markSkill('yishe'); } @@ -7778,7 +7781,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 1' if(result.bool){ player.logSkill('bushi'); - trigger.player.gain(result.links[0],'draw2','log'); + trigger.player.gain(result.links[0],'draw2','log','fromStorage'); player.storage.yishe.remove(result.links[0]); player.syncStorage('yishe'); if(player.storage.yishe.length==0){ @@ -8583,7 +8586,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, prepare:'throw', discard:false, + lose:false, content:function(){ + player.lose(cards,ui.special,'toStorage'); target.$gain2(cards); target.storage.zhoufu2=cards[0]; target.addSkill('zhoufu2'); @@ -8830,7 +8835,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.$give(result.cards,trigger.target); game.delay(); event.card=result.cards[0]; - if(get.type(event.card)!='equip') event.finish(); + if(get.type(event.card)!='equip'||trigger.target.isDisabled(get.subtype(event.card))) event.finish(); "step 2" if(!trigger.target.isMin()){ trigger.target.chooseBool('是否装备'+get.translation(event.card)+'?').set('ai',function(){ @@ -10523,7 +10528,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('bifa',result.targets[0]); result.targets[0].addSkill('bifa2'); result.targets[0].storage.bifa=[result.cards[0],player]; - player.lose(result.cards[0],result.targets[0].node.special); + player.lose(result.cards[0],result.targets[0].node.special,'toStorage'); player.$give(1,result.targets[0]); } }, @@ -10554,7 +10559,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.bool&&!event.directfalse){ player.storage.bifa[1].gain(result.cards,player); player.$give(result.cards,player.storage.bifa[1]); - player.gain(player.storage.bifa[0],'draw2','log'); + player.gain(player.storage.bifa[0],'draw2','log','fromStorage'); } else{ player.storage.bifa[0].discard(); @@ -10771,7 +10776,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, position:'he', filterTarget:function(card,player,target){ - return !target.getEquip(card); + return target.isEmpty(get.subtype(card)); }, ai1:function(card){ return 6-get.value(card); @@ -10923,7 +10928,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 1" player.chooseTarget(true,'选择拼点目标',function(card,player,target){ - return target.countCards('h')&&target!=_status.event.target1&&target!=player; + return _status.event.target1.canCompare(target)&&target!=player; }).set('ai',function(target){ var player=_status.event.player; var eff=get.effect(target,{name:'sha'},_status.event.target1,player); @@ -11153,7 +11158,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sunhao:'孙皓', chengyu:'程昱', simalang:'司马朗', - zhangliang:'张梁', tianfeng:'田丰', sp_pangtong:'sp庞统', sp_jiaxu:'sp贾诩', @@ -11228,6 +11232,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ beimihu:'卑弥呼', luzhi:'鲁芝', sp_liuqi:'刘琦', + huangjinleishi:'黄巾雷使', lijue:"李傕", zhangji:"张济", @@ -11444,7 +11449,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yongdi_info:'限定技,当你受到伤害后,你可令一名其他男性角色增加一点体力上限,然后若该角色的武将牌上有主公技且其不为主公,其获得此主公技', gushe:'鼓舌', gushe_bg:'舌', - gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,若你赢,对方选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记(你有7个饶舌标记时,你死亡)', + gushe_info:'出牌阶段限一次,你可以用一张手牌与至多三名角色同时拼点,然后依次结算拼点结果,没赢的角色选择一项:1.弃置一张牌;2.令你摸一张牌。若你没赢,你获得一个“饶舌”标记(你有7个饶舌标记时,你死亡)', jici:'激词', jici_info:'当你发动“鼓舌”拼点的牌亮出后,若点数小于X,你可令点数+X;若点数等于X,你可令你本回合发动“鼓舌”的次数上限+1(X为你“饶舌”标记的数量)', shefu:'设伏', diff --git a/character/standard.js b/character/standard.js index 7e751f7b5..2b749431b 100755 --- a/character/standard.js +++ b/character/standard.js @@ -30,6 +30,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lvbu:['male','qun',4,['wushuang']], diaochan:['female','qun',3,['lijian','biyue']], huaxiong:['male','qun',6,['yaowu']], + gongsunzan:['male','qun',4,['yicong']], caozhang:['male','wei',4,['new_jiangchi']], xf_yiji:["male","shu",3,["xinfu_jijie","xinfu_jiyuan"],[]], diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 515bd21cf..67ab5965a 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -209,7 +209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var i=0;i1) continue; - if(!target.getEquip(get.subtype(es[i]))) return true; + if(target.isEmpty(get.subtype(es[i]))) return true; } return false; } @@ -4407,7 +4407,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var i=0;i1) continue; - else if(!current.getEquip(get.subtype(es[i]))) return true; + else if(current.isEmpty(get.subtype(es[i]))) return true; } return false; } @@ -4421,7 +4421,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(i=0;i1) continue; - if(!target.getEquip(get.subtype(es[i]))) break; + if(target.isEmpty(get.subtype(es[i]))) break; } if(i==es.length) return 0; } @@ -5085,8 +5085,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return [1,3-player.storage.xinfu_zhaoxin.length]; }, discard:false, + lose:false, content:function (){ 'step 0' + player.lose(cards,ui.special,'toStorage') player.$give(cards,player); player.storage.xinfu_zhaoxin=player.storage.xinfu_zhaoxin.concat(cards); player.markSkill('xinfu_zhaoxin'); @@ -5137,7 +5139,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 3' if(result.bool){ player.storage.xinfu_zhaoxin.remove(event.card); - player.give(event.card,trigger.player,true); + player.$give(event.card,trigger.player); + trigger.player.gain(event.card,'fromStorage'); if(player.storage.xinfu_zhaoxin.length) player.markSkill('xinfu_zhaoxin'); else player.unmarkSkill('xinfu_zhaoxin'); player.chooseBool('是否对'+get.translation(trigger.player)+'造成一点伤害?').ai=function(){ diff --git a/character/yijiang.js b/character/yijiang.js index 68adc8ca6..df89fdb82 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -311,7 +311,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.hp=true; } event.equip=get.cardPile(function(card){ - return get.type(card)=='equip'; + return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card)); }); if(target.isMinEquip()){ target.equip(event.equip||game.createCard(get.inpilefull('equip').randomGet()),true); @@ -544,7 +544,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.attitude(player,event.target)<0; }, filter:function(event,player){ - return player.countCards('h')>0&&event.target.countCards('h')>0&&event.target!=player; + return player.canCompare(event.target); }, logTarget:'target', content:function(){ @@ -562,7 +562,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.effect(player,event.card,event.player,player)<0; }, filter:function(event,player){ - return player.countCards('h')>0&&event.player.countCards('h')>0&&event.player!=player; + return player.canCompare(event.target); }, logTarget:'player', content:function(){ @@ -794,7 +794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.index==0){ target.loseHp(); event.card=get.cardPile(function(card){ - return get.type(card)=='equip'; + return get.type(card)=='equip'&&!target.isDisabled(get.subtype(card)); }); if(event.card){ target.equip(event.card,true).set('delay',true); @@ -1012,6 +1012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(); player.storage.bizhuan.push(card); player.markSkill('bizhuan'); + event.trigger("addCardToStorage"); }, mod:{ maxHandcard:function(player,num){ @@ -1076,7 +1077,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(result.bool){ player.logSkill('tongbo'); - player.lose(result.cards,ui.special)._triggered=null; + player.lose(result.cards,ui.special,'toStorage'); player.storage.bizhuan=player.storage.bizhuan.concat(result.cards); player.syncStorage('bizhuan'); event.num=result.cards.length; @@ -1136,7 +1137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(0.5); } "step 3" - player.gain(result.links)._triggered=null; + player.gain(result.links,'fromStorage'); for(var i=0;i0; + return player.canCompare(target); }, filter:function(event,player){ return player.countCards('h')>0; @@ -3661,7 +3662,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.chunlao=player.storage.chunlao.concat(result.cards); player.syncStorage('chunlao'); player.markSkill('chunlao'); - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.$give(result.cards,player); } }, @@ -5610,7 +5611,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } game.addVideo('storage',trigger.target,['xinpojun2',get.cardsInfo(trigger.target.storage.xinpojun2),'cards']); trigger.target.addSkill('xinpojun2'); - trigger.target.lose(result.links,ui.special); + trigger.target.lose(result.links,ui.special,'toStorage'); } }, ai:{ @@ -5627,7 +5628,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ if(player.storage.xinpojun2){ - player.gain(player.storage.xinpojun2); + player.gain(player.storage.xinpojun2,'fromStorage'); delete player.storage.xinpojun2; } player.removeSkill('xinpojun2'); @@ -6188,7 +6189,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ "step 0" player.chooseTarget(get.prompt('qiaoshui'),function(card,player,target){ - return player!=target&&target.countCards('h')>0; + return player.canCompare(target); }).set('ai',function(target){ return -get.attitude(_status.event.player,target)/target.countCards('h'); }); @@ -6671,7 +6672,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 2" if(result.cards&&result.cards.length){ - player.lose(result.cards,ui.special); + player.lose(result.cards,ui.special,'toStorage'); player.storage.quanji=player.storage.quanji.concat(result.cards); player.syncStorage('quanji'); player.markSkill('quanji'); @@ -6855,7 +6856,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 0" var next; if(trigger.player.hasCard(function(card){ - return !player.getEquip(card); + return player.isEmpty(get.subtype(card)); },'e')){ next=player.chooseControl('移动装备','draw_card','cancel2',function(event,player){ var source=_status.event.source; @@ -6883,7 +6884,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(result.control=='移动装备'){ player.logSkill('qieting',trigger.player); player.choosePlayerCard(trigger.player,'e','将一张装备牌移至你的装备区').set('filterButton',function(button){ - return !_status.event.player.getEquip(button.link); + return _status.event.player.isEmpty(get.subtype(button.link)); }); } else{ @@ -6931,8 +6932,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, logTarget:'player', filter:function(event,player){ - return player.hp0&&event.player.countCards('h')>0; + return player.hp0&&player.countCards('h')>0; + return player.canCompare(event.player); }, content:function(){ "step 0" @@ -9241,6 +9248,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.storage.zyexin.push(card); player.$draw(card); player.markSkill('zyexin'); + event.trigger("addCardToStorage"); game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']); }, group:'zyexin2' @@ -9258,7 +9266,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt:'用任意数量的手牌与等量的“权”交换', content:function(){ "step 0" - player.lose(cards,ui.special)._triggered=null; + player.lose(cards,ui.special,'toStorage'); player.storage.zyexin=player.storage.zyexin.concat(cards); player.chooseCardButton(player.storage.zyexin,'选择'+cards.length+'张牌作为手牌',cards.length,true).ai=function(button){ return get.value(button.link); @@ -9267,7 +9275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delay(); } "step 1" - player.gain(result.links)._triggered=null; + player.gain(result.links,'toStorage'); for(var i=0;i0){ var es=target.getCards('e'); for(var i=0;i=equipNum){ + player.node.equips.insertBefore(card,player.node.equips.childNodes[i]); + equipped=true; + break; + } + } + if(!equipped){ + player.node.equips.appendChild(card); + if(_status.discarded){ + _status.discarded.remove(card); + } + } + return player; + }, + enableEquip:function(pos){ + if(typeof pos=='number') pos='equip'+pos; + var next=game.createEvent('enableEquip'); + next.player=this; + next.pos=pos; + next.source=_status.event.player; + next.setContent('enableEquip'); + return next; + }, + $enableEquip:function(skill){ + game.broadcast(function(player,skill){ + player.$enableEquip(skill); + },this,skill); + var player=this; + for(var i=0;i0) return false; } - return current!=current2&&!current2.hasJudge(js[i]); + return current!=current2&&!current2.storage._disableJudge&&!current2.hasJudge(js[i]); })){ return true; } @@ -16828,6 +16944,9 @@ else if(arguments[i]==='log'){ next.log=true; } + else if(arguments[i]=='fromStorage'){ + next.fromStorage=true; + } else if(typeof arguments[i]=='string'){ next.animate=arguments[i]; } @@ -16882,6 +17001,9 @@ else if(get.objtype(arguments[i])=='div'){ next.position=arguments[i]; } + else if(arguments[i]=='toStorage'){ + next.toStorage=true; + } } if(next.cards){ var hej=this.getCards('hej'); @@ -20127,36 +20249,42 @@ } }, $equip:function(card){ - game.broadcast(function(player,card){ - player.$equip(card); - },this,card); - card.fix(); - card.style.transform=''; - card.classList.remove('drawinghidden'); - delete card._transform; - var player=this; - var equipNum=get.equipNum(card); - var equipped=false; - for(var i=0;i=equipNum){ - player.node.equips.insertBefore(card,player.node.equips.childNodes[i]); - equipped=true; - break; - } + if(this.storage.disableEquip!=undefined&&this.storage.disableEquip.contains(get.subtype(card))){ + this.gain(card,'gain2'); + game.log(this,'装备失败'); } - if(!equipped){ - player.node.equips.appendChild(card); - if(_status.discarded){ - _status.discarded.remove(card); + else{ + game.broadcast(function(player,card){ + player.$equip(card); + },this,card); + card.fix(); + card.style.transform=''; + card.classList.remove('drawinghidden'); + delete card._transform; + var player=this; + var equipNum=get.equipNum(card); + var equipped=false; + for(var i=0;i=equipNum){ + player.node.equips.insertBefore(card,player.node.equips.childNodes[i]); + equipped=true; + break; + } } - } - var info=get.info(card); - if(info.skills){ - for(var i=0;i