diff --git a/card/standard.js b/card/standard.js index 39eb70ad2..7612680fa 100644 --- a/card/standard.js +++ b/card/standard.js @@ -747,7 +747,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(player.hasUnknown(2)){ return 0; } - return 2-2*get.distance(player,target,'absolute')/game.countPlayer(); + return (1-get.distance(player,target,'absolute')/game.countPlayer())*get.attitude(player,target)>0?0.5:0.7; } }, tag:{ @@ -2111,9 +2111,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){ forced:true, filter:function(event,player){ if(event.card.storage&&event.card.storage.nowuxie) return false; + var card=event.card; + if(event.name=='phaseJudge'&&card.viewAs) card={name:card.viewAs}; + var info=get.info(card); + if(info.wuxieable===false) return false; if(event.name!='phaseJudge'){ if(event.getParent().nowuxie) return false; - var info=get.info(event.card); if(!event.target){ if(info.wuxieable) return true; return false; diff --git a/card/zhulu.js b/card/zhulu.js index b3b7fffbb..5295bb18a 100644 --- a/card/zhulu.js +++ b/card/zhulu.js @@ -187,7 +187,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(player.hasUnknown(2)){ return 0; } - return 2-2*get.distance(player,target,'absolute')/game.countPlayer(); + return (1-get.distance(player,target,'absolute')/game.countPlayer())*get.attitude(player,target)>0?0.4:0.7; } }, tag:{ diff --git a/character/diy.js b/character/diy.js index addf1a49b..f60595728 100755 --- a/character/diy.js +++ b/character/diy.js @@ -80,6 +80,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ns_sunchensunjun:['male','wu',5,['nsxianhai','nsxingchu']], ns_yuanxi:['male','qun',4,['nsshengyan','nsdaizhan']], ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']], + ns_sunyi:['male','wu',4,['nsguolie'],[]], + ns_huangwudie:['female','shu',4,['nsdiewu','nslingying','nspojian']], + ns_chentai:['male','wei',4,['nsweiyuan','nsjuxian']], + ns_zhangning:['female','qun',3,['nsfuzhou','nsguidao','nstaiping']], + ns_yanghu:['male','jin',3,['nsbizhao','nsqingde','nsyidi'],['hiddenSkill']], ns_zhangwei:['female','shu',3,['nsqiyue','nsxuezhu']], diy_wenyang:['male','wei','4/6',['lvli','choujue']], @@ -111,7 +116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ns_zuoci:['male','qun',3,['nsxinsheng','nsdunxing']], ns_lvzhi:['female','qun',3,['nsnongquan','nsdufu']], ns_wangyun:["male","qun",4,["liangji","jugong","chengmou"]], - ns_nanhua:["male","qun",3,["nshuanxian","nstaiping","nsshoudao"]], + ns_nanhua:["male","qun",3,["nshuanxian","nstaiping_nh","nsshoudao"]], ns_nanhua_left:["male","qun",2,[],['unseen']], ns_nanhua_right:["female","qun",2,[],['unseen']], ns_huamulan:['female','qun',3,['nscongjun','xiaoji','gongji']], @@ -179,6 +184,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy:{ diy_yijiang:["key_kud","key_misuzu","key_kamome","key_nao", "ns_huangchengyan","ns_sunchensunjun","ns_yuanxi","ns_caoshuang"], + diy_yijiang2:[ + "ns_chentai","ns_huangwudie","ns_sunyi","ns_zhangning","ns_yanghu"], diy_tieba:["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_luyusheng"], diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu"], 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"], @@ -198,6 +205,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ diy_zaozhirenjun:'枣祗,生卒年月不详,东汉末年颍川阳翟(今河南省禹州市)人。曾任东阿令、羽林监、屯田都尉、陈留太守等职。任峻(?—204年),字伯达,河南郡中牟县人。曹操每次出征,任峻通常在后方补给军队。后来发生饥荒,枣祗建议实施屯田,任峻被任命为典农中郎将,招募百姓在许下屯田,结果连年丰收,积谷足以装满全部粮仓。', diy_yangyi:'字威公,襄阳(今湖北襄阳)人,三国时期蜀汉政治家。最初,为荆州刺史傅群的主簿,后投奔关羽,任为功曹。羽遣其至成都,大受刘备赞赏,擢为尚书。建兴三年(225年)任丞相参军,此后一直跟随诸葛亮战斗。亮卒,他部署安全退军。亮生前定蒋琬继己任,仪仅拜中军师。建兴十三年(235年),因多出怨言,被削职流放至汉嘉郡。但杨仪仍不自省,又上书诽谤,言辞激烈,最后下狱,自杀身亡。', diy_tianyu:'字国让,渔阳雍奴(今天津市武清区东北)人。三国时期曹魏将领。初从刘备,因母亲年老回乡,后跟随公孙瓒,公孙瓒败亡,劝说鲜于辅加入曹操。曹操攻略河北时,田豫正式得到曹操任用,历任颖阴、郎陵令、弋阳太守等。', + chentai:'陈泰(200年~260年),字玄伯,颍川许昌(今河南省许昌市)人。三国时期魏国名将,司空陈群之子。陈泰早年起家员外散骑侍郎,其父陈群死后袭封颍阴侯,历任游击将军、并州、雍州刺史、尚书等职,高平陵政变发生时,陈泰力劝大将军曹爽投降,因此得到掌权的司马氏信任,此后为了回避朝廷的争斗,陈泰主动请求外调雍州任职,任内成功防御蜀将姜维的多次进攻。甘露元年(256年),陈泰被调回朝中任尚书右仆射,曾随司马昭两度抵抗东吴的进攻,后改任左仆射。甘露五年(260年),魏帝曹髦被弑杀,陈泰闻讯后悲痛过度,呕血而死,享年六十一岁。追赠司空,赐谥为穆。', + huangwudie:'黄舞蝶是在现代三国作品中出场的虚拟人物,设定为蜀汉大将黄忠之女,跟随父亲一同投效刘备,在游戏中是一名不错的女将。', + sunyi:'孙翊(184年~204年),又名孙俨,字叔弼,是孙坚的第三子,孙策、孙权的弟弟。曾被大臣推荐为继承者。孙权继位后,孙翊任丹杨太守,后被身边的人边鸿刺杀。', + zhangning:'《三国杀·阵面对决》中登场的角色。张角之女,能呼雷掣电。', + yanghu:'羊祜(221年-278年12月27日),字叔子,泰山郡南城县人。西晋时期杰出的战略家、政治家、文学家,曹魏上党太守羊衜的儿子,名儒蔡邕的女儿蔡文姬的外甥。出身“泰山羊氏”,博学能文,清廉正直。曹魏时期,接受公车征辟,出任中书郎,迁给事黄门侍郎。姐姐嫁给大将军司马师,投靠司马氏家族,仕途平步青云。魏元帝曹奂即位,出任秘书监、相国从事中郎、中领军,统领御林军,兼管内外政事,册封钜平县子,迁。西晋建立后,迁中军将军、散骑常侍、郎中令,册封钜平侯。泰始五年(269年),出任车骑将军、荆州都督,加任开府仪同三司坐镇襄阳,屯田兴学,以德怀柔,深得军民之心;扩充军备,训练士兵,全力准备灭亡孙吴,累迁征南大将军,册封南城侯。咸宁四年,去世,临终前举荐杜预接任职务,获赠侍中、太傅,谥号为“成”。唐宋时期,配享武庙。', }, characterTitle:{ key_kotomi:'#gClannad', @@ -269,6 +281,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ns_sunchensunjun:'#gVenusjeu', ns_yuanxi:'#g食茸二十四', ns_caoshuang:'#g荬庀芬兰', + ns_chentai:'#g荀彧III荀文若', + ns_huangwudie:'#g你爸爸来了164', + ns_sunyi:'#g无民氏4251', + ns_zhangning:'#g如颍隋行1314', + ns_yanghu:'#ginCenv', ns_luyusheng:'#g猫咪大院 - 魚と水', ns_caimao:'#gP尔号玩家◆', @@ -352,6 +369,60 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, + nsfuzhou_card:{ + fullskin:true, + type:'delay', + wuxieable:false, + modTarget:function(card,player,target){ + return lib.filter.judge(card,player,target); + }, + enable:function(card,player){ + return player.canAddJudge(card); + }, + filterTarget:function(card,player,target){ + return (lib.filter.judge(card,player,target)&&player==target); + }, + judge:function(card){ + if(get.color(card)=='red') return 0; + return -4; + }, + effect:function(){ + var source=card.storage.nsfuzhou_source; + if(!source||!source.isAlive()) return; + source.line(player,'thunder'); + if(result.color=='black'){ + player.damage(source,source.storage.nsfuzhou_damage?2:1,'thunder'); + player.chooseToDiscard('he',true); + } + else{ + source.draw(2); + if(typeof player.storage.nsfuzhou_num!='number') player.storage.nsfuzhou_num=0; + if(source.storage.nsfuzhou_draw){ + player.recover(); + player.draw(); + player.storage.nsfuzhou_num++; + } + else player.storage.nsfuzhou_num--; + player.addTempSkill('nsfuzhou_num'); + player.markSkill('nsfuzhou_num'); + } + }, + ai:{ + basic:{ + order:1, + useful:0, + value:0, + }, + result:{ + target:-1, + }, + tag:{ + // damage:1, + // natureDamage:1, + // thunderDamage:1, + } + } + }, }, perfectPair:{ yuji:['zuoci'], @@ -7647,6 +7718,614 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, noname_duocai2:{}, + nsbizhao:{ + trigger:{player:'showCharacterAfter'}, + forced:true, + hiddenSkill:true, + filter:function(event,player){ + return event.toShow&&event.toShow.contains('ns_yanghu')&&player!=_status.currentPhase; + }, + content:function(){ + player.addTempSkill('nsbizhao2',{player:'phaseBeginStart'}); + }, + }, + nsbizhao2:{ + charlotte:true, + mark:true, + intro:{content:'其他角色至自己的距离+1'}, + mod:{ + globalTo:function(source,player,distance){ + return distance+1; + }, + }, + }, + nsqingde:{ + trigger:{ + player:'damageEnd', + source:'damageSource', + }, + usable:1, + filter:function(event,player){ + if(!event.card||!event.cards||event.player==event.source||(event.card.name!='sha'&& + get.type(event.card)!='trick')||event.cards.filterInD().length!=1) return false; + var target=lib.skill.nsqingde.logTarget(event,player); + if(player.hasSkillTag('noCompareSource')||target.hasSkillTag('noCompareTarget')) return false; + return target.countCards('h')>0; + }, + logTarget:function(event,player){ + if(player==event.source) return event.player; + return event.source; + }, + check:function(event,player){ + var target=lib.skill.nsqingde.logTarget(event,player); + return get.attitude(player,target)<=0; + }, + content:function(){ + 'step 0' + var target=lib.skill.nsqingde.logTarget(trigger,player); + event.target=target + var next=player.chooseToCompare(target); + if(event.triggername=='damageSource') next.set('small',true); + if(!next.fixedResult) next.fixedResult={}; + next.fixedResult[player.playerid]=trigger.cards.filterInD()[0]; + 'step 1' + if(result.tie){ + event.finish(); + return; + } + var i=result.bool; + if(event.triggername=='damageSource') i=!i; + event.target2=i?player:target; + if(event.triggername=='damageSource') event.goto(3); + else if(event.target2.isDamaged()) player.chooseBool('是否令'+get.translation(event.target2)+'回复1点体力?').set('ai',function(){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,evt.target2)>0; + }); + else event.finish(); + 'step 2' + if(result.bool) event.target2.recover(); + event.finish(); + 'step 3' + player.chooseBool('是否令'+get.translation(event.target2)+'摸两张牌?').set('ai',function(){ + var evt=_status.event.getParent(); + return get.attitude(evt.player,evt.target2)>0; + }); + 'step 4' + if(result.bool) event.target2.draw(2); + }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(target.storage.counttrigger&&target.storage.counttrigger.nsqingde) return; + var num=get.number(card); + if(typeof num=='number'){ + if(target.hasSkillTag('noCompareSource')||player.hasSkillTag('noCompareTarget')) return; + var hs=player.getCards('h'); + if(card.cards) hs.removeArray(card.cards); + if(ui.selected.cards) hs.removeArray(ui.selected.cards); + if(!hs.length) return; + for(var i of hs){ + if(get.number(i)>=num) return; + if(player.hasSkill('tianbian')&&get.suit(card)=='heart') return; + } + return 'zerotarget'; + } + }, + }, + }, + }, + nsyidi:{ + enable:'phaseUse', + usable:1, + filter:function(event,player){ + return player.countCards('h')>0; + }, + filterCard:true, + filterTarget:lib.filter.notMe, + discard:false, + lose:false, + delay:false, + check:function(card){ + var player=_status.event.player; + if(get.type(card,player)=='basic'){ + if(game.hasPlayer(function(current){ + return get.attitude(current,player)>0&¤t.getUseValue(card)>player.getUseValue(card,null,true); + })) return 5+Math.random(); + return 0; + } + if(game.hasPlayer(function(current){ + return get.attitude(current,player)>0&&!current.hasJudge('lebu')&¤t.getUseValue(card)>player.getUseValue(card); + })) return 4.7+Math.random(); + if(card.name=='wuxie'&&game.hasPlayer(function(current){ + return get.attitude(current,player)>0; + })) return 5+Math.random(); + return 4-get.value(card); + }, + content:function(){ + 'step 0' + target.gain(cards,player,'give'); + if(get.type(cards[0],player)!='basic'){ + player.draw(); + event.finish(); + } + 'step 1' + if(target.getCards('h').contains(cards[0])&&target.hasUseTarget(cards[0])) target.chooseUseTarget(cards[0]); + }, + ai:{ + order:7, + result:{ + player:function(player,target){ + if(!ui.selected.cards.length||get.type(ui.selected.cards[0],player)=='basic') return 0; + if(get.value(ui.selected.cards[0])<4) return 2; + return 0.5; + }, + target:1, + }, + }, + }, + nsfuzhou:{ + enable:'phaseUse', + usable:2, + filter:function(event,player){ + if(!player.storage.nstaiping&&player.getStat('skill').nsfuzhou) return false; + return player.countCards('he',{color:'black'})>0; + }, + filterCard:{color:'black'}, + filterTarget:function(card,player,target){ + return !target.hasJudge('nsfuzhou_card'); + }, + check:function(card){ + return 8-get.value(card); + }, + prepare:'give', + position:'he', + discard:false, + lose:false, + delay:false, + content:function(){ + 'step 0' + target.addJudge({name:'nsfuzhou_card'},cards[0]); + cards[0].storage.nsfuzhou_source=player; + 'step 1' + game.delayx(); + }, + ai:{ + order:5, + result:{ + target:function(player,target){ + if(player.storage.nsfuzhou_draw){ + if(get.attitude(player,target)>0&&player.countCards('he',function(card){ + return get.color(card)=='red'; + })){ + return 1; + } + return 0; + } + if(player.storage.nsfuzhou_damage) return -2; + return -1.5; + }, + }, + }, + }, + nsfuzhou_num:{ + charlotte:true, + onremove:true, + mod:{ + maxHandcard:function(player,num){ + return num+player.storage.nsfuzhou_num; + }, + }, + intro:{ + content:function(num){ + return '手牌上限'+(num<0?'':'+')+num; + }, + } + }, + nsguidao:{ + trigger:{global:'judge'}, + filter:function(event,player){ + return player.countCards('hes',function(card){ + if(player.storage.nstaiping||(_status.connectMode&&get.position(card)!='e')) return true; + return get.color(card)=='black'; + })>0; + }, + direct:true, + content:function(){ + "step 0" + player.chooseCard(get.translation(trigger.player)+'的'+(trigger.judgestr||'')+'判定为'+ + get.translation(trigger.player.judging[0])+','+get.prompt('nsguidao'),'hes',function(card,player){ + if(!player.storage.nstaiping&&get.color(card)!='black') return false; + var player=_status.event.player; + var mod2=game.checkMod(card,player,'unchanged','cardEnabled2',player); + if(mod2!='unchanged') return mod2; + var mod=game.checkMod(card,player,'unchanged','cardRespondable',player); + if(mod!='unchanged') return mod; + return true; + }).set('ai',function(card){ + var trigger=_status.event.getTrigger(); + var player=_status.event.player; + var judging=_status.event.judging; + var result=trigger.judge(card)-trigger.judge(judging); + var attitude=get.attitude(player,trigger.player); + if(attitude==0||result==0) return 0; + if(attitude>0){ + return result; + } + else{ + return -result; + } + }).set('judging',trigger.player.judging[0]); + "step 1" + if(result.bool){ + player.respond(result.cards,'highlight','nsguidao','noOrdering'); + } + else{ + event.finish(); + } + "step 2" + if(result.bool){ + player.$gain2(trigger.player.judging[0]); + player.gain(trigger.player.judging[0]); + trigger.player.judging[0]=result.cards[0]; + trigger.orderingCards.addArray(result.cards); + game.log(trigger.player,'的判定牌改为',result.cards[0]); + } + "step 3" + game.delay(2); + }, + ai:{ + rejudge:true, + tag:{ + rejudge:1 + } + } + }, + nstaiping:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'thunder', + filter:function(event,player){ + return player.getAllHistory('sourceDamage',function(evt){ + return evt.getParent().name=='nsfuzhou_card'; + }).length>1||player.getAllHistory('gain',function(evt){ + return evt.getParent(2).name=='nsfuzhou_card'; + }).length>1; + }, + content:function(){ + player.awakenSkill('nstaiping'); + player.storage.nstaiping=true; + if(player.getAllHistory('sourceDamage',function(evt){ + return evt.getParent().name=='nsfuzhou_card'; + }).length>1) player.storage.nsfuzhou_damage=true; + if(player.getAllHistory('gain',function(evt){ + return evt.getParent(2).name=='nsfuzhou_card'; + }).length>1) player.storage.nsfuzhou_draw=true; + }, + derivation:['nsfuzhou_damage','nsfuzhou_draw'], + }, + nsweiyuan:{ + trigger:{player:'useCardToTargeted'}, + direct:true, + filter:function(event,player){ + return player!=event.target&&event.targets&&event.targets.length==1&&event.target.isAlive() + &&player.isPhaseUsing()&&!player.hasSkill('nsweiyuan2')&&game.hasPlayer(function(current){ + return current!=player&¤t!=event.target; + }); + }, + content:function(){ + 'step 0' + player.chooseTarget(get.prompt2('nsweiyuan'),function(card,player,target){ + return target!=player&&target!=_status.event.getTrigger().target; + }).set('ai',function(target){ + return Math.max(Math.random(),get.attitude(player,target)); + }); + 'step 1' + if(result.bool){ + player.addTempSkill('nsweiyuan2','phaseUseAfter'); + var target=result.targets[0]; + event.target=target; + player.logSkill('nsweiyuan',target); + target.chooseCard('he','交给'+get.translation(trigger.target)+'一张牌并受到一点伤害,或令'+get.translation(player)+'摸一张牌且可以重复使用牌').set('ai',function(card){ + if(_status.event.goon) return Math.random(); + return 0; + }).set('goon',function(){ + if(get.attitude(target,player)>0) return false; + return Math.random()>0.5; + }()); + } + else event.finish(); + 'step 2' + if(result.bool){ + trigger.target.gain(result.cards,target,'giveAuto'); + target.damage(); + } + else{ + player.addTempSkill('nsweiyuan_use'); + player.draw(); + } + }, + }, + nsweiyuan2:{}, + nsweiyuan_use_backup:{}, + nsweiyuan_use:{ + enable:'phaseUse', + charlotte:true, + mod:{ + cardUsable:function(){ + if(_status.event.skill=='nsweiyuan_use_backup') return Infinity; + }, + targetInRange:function(){ + if(_status.event.skill=='nsweiyuan_use_backup') return true; + }, + }, + onChooseToUse:function(event){ + if(game.online||event.type!='phase') return; + var list=[]; + event.player.getHistory('useCard',function(evt){ + var name=evt.card.name; + var type=get.type(name); + if(type!='basic'&&type!='trick') return; + if(name=='sha'){ + var nature=evt.card.nature; + switch(nature){ + case 'fire':name='huosha';break; + case 'thunder':name='leisha';break; + case 'kami':name='kamisha';break; + case 'ice':name='icesha';break; + } + } + list.add(type+'咕咕'+name); + }); + event.set('nsweiyuan_list',list); + }, + filter:function(event,player){ + return player.countCards('h')>0&&event.nsweiyuan_list&&event.nsweiyuan_list.length>0; + }, + chooseButton:{ + dialog:function(event,player){ + return ui.create.dialog('围援',[event.nsweiyuan_list.map(function(i){ + return i.split('咕'); + }),'vcard']); + }, + filter:function(button,player){ + return lib.filter.cardEnabled({ + name:button.link[2], + nature:button.link[3], + },player); + }, + check:function(button){ + return _status.event.player.getUseValue({ + name:button.link[2], + nature:button.link[3], + },false); + }, + backup:function(links,player){ + return { + popname:true, + position:'h', + filterCard:true, + ai1:function(card){ + return 7-get.value(card); + }, + viewAs:{ + name:links[0][2], + nature:links[0][3], + }, + onuse:function(links,player){ + player.removeSkill('nsweiyuan_use'); + }, + } + }, + prompt:function(links,player){ + return '将一张手牌当做'+get.translation(links[0][3]||'')+get.translation(links[0][2])+'使用'; + }, + }, + ai:{ + order:1, + result:{ + player:1, + }, + }, + }, + nsjuxian:{ + trigger:{player:'damageBegin2'}, + filter:function(event,player){ + return !player.hasSkill('nsjuxian2'); + }, + check:function(event,player){ + if(player.countCards('h')+2>=player.maxHp) return !event.source||!event.source.countCards('he')||get.attitude(player,event.source)>0; + return true; + }, + content:function(){ + 'step 0' + player.addSkill('nsjuxian2'); + player.draw(2); + 'step 1' + var target=trigger.source; + if(player.countCards('h')>=player.maxHp&&target&&target.countCards('he')){ + player.line(target,'green'); + target.chooseToDiscard('he',true); + } + }, + }, + nsjuxian2:{ + trigger:{player:'phaseDrawBefore'}, + forced:true, + charlotte:true, + content:function(){ + player.removeSkill('nsjuxian2'); + trigger.cancel(); + game.log(player,'跳过了','#y摸牌阶段'); + }, + }, + nsdiewu:{ + trigger:{ + player:['damageEnd','gainAfter'], + }, + forced:true, + locked:false, + filter:function(event,player){ + if(event.name=='gain') return event.cards&&event.cards.length>1; + return true; + }, + content:function(){ + player.addMark('nsdiewu',1); + }, + intro:{ + content:'mark', + }, + group:['nsdiewu_sha','nsdiewu_shan','nsdiewu_draw'], + subSkill:{ + sha:{ + enable:'chooseToUse', + viewAs:{name:'sha',isCard:true}, + prompt:'视为使用一张【杀】', + viewAsFilter:function(player){ + return player.countMark('nsdiewu')>0; + }, + filterCard:()=>false, + selectCard:-1, + onuse:function(links,player){ + player.removeMark('nsdiewu',1); + }, + ai:{ + order:function(){ + var player=_status.event.player; + if(!player.storage.nspojian&&player.countMark('nsdiewu')<=player.hp) return 0; + return get.order({name:'sha'})+0.1; + }, + }, + }, + shan:{ + enable:'chooseToUse', + viewAs:{name:'shan',isCard:true}, + viewAsFilter:function(player){ + return player.countMark('nsdiewu')>0&&!player.storage.nspojian; + }, + filterCard:()=>false, + selectCard:-1, + onuse:function(links,player){ + player.removeMark('nsdiewu',1); + }, + ai:{ + order:function(){ + var player=_status.event.player; + if(player.hp>1&&player.countMark('nsdiewu')<=player.hp) return 0; + return get.order({name:'shan'})-0.2; + }, + }, + }, + draw:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + filter:function(event,player){ + var evt=event.getParent(); + return evt&&evt.type=='card'&&evt.skill=='nsdiewu_sha'; + }, + content:function(){ + player.draw(); + }, + }, + }, + ai:{ + respondSha:true, + respondShan:true, + skillTagFilter:function(player,tag){ + if(tag=='respondShan'&&player.storage.nspojian) return false; + return player.countMark('nsdiewu')>0; + }, + }, + }, + nslingying:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + }, + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + }, + }, + nspojian:{ + trigger:{player:'phaseZhunbeiBegin'}, + forced:true, + juexingji:true, + skillAnimation:true, + animationColor:'fire', + filter:function(event,player){ + return player.countMark('nsdiewu')>=player.hp; + }, + content:function(){ + player.awakenSkill('nspojian'); + player.storage.nspojian=true; + player.loseMaxHp(); + player.draw(2); + player.addSkill('nsliegong'); + }, + derivation:'nsliegong', + }, + nsliegong:{ + inherit:'xinliegong', + }, + nsguolie:{ + trigger:{player:'phaseDrawBefore'}, + check:function(event,player){ + var h1=player.getUseValue({name:'sha'},false); + var h2=player.getUseValue({name:'guohe'}); + return player.countCards('h',function(card){ + if(get.color(card)=='red') return h1>0; + return h2>0; + })>2; + }, + content:function(){ + trigger.cancel(); + player.addTempSkill('nsguolie2'); + }, + }, + nsguolie2:{ + mod:{ + cardname:function(card,player){ + var color=get.color(card,player); + if(color=='red') return 'sha'; + if(color=='black') return 'guohe'; + }, + cardnature:function(){ + return false; + }, + cardUsable:function(){ + return Infinity; + }, + targetInRange:function(){ + return true; + }, + }, + trigger:{player:'phaseJieshuBegin'}, + forced:true, + filter:function(event,player){ + var cards=[]; + game.getGlobalHistory('cardMove',function(evt){ + if(evt.player==player) return; + for(var i of evt.cards){ + if(get.position(i,true)=='d') cards.push(i); + } + }); + return cards.length>0; + }, + content:function(){ + var cards=[]; + game.getGlobalHistory('cardMove',function(evt){ + if(evt.player==player) return; + if(evt.name=='cardsDiscard'&&evt.parent.name=='orderingDiscard') return; + for(var i of evt.cards){ + if(get.position(i,true)=='d') cards.push(i); + } + }); + player.gain(cards,'gain2'); + }, + }, nslongyue:{ trigger:{global:'useCard'}, filter:function(event,player){ @@ -11223,7 +11902,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } }, - nstaiping:{ + nstaiping_nh:{ trigger:{player:'damageEnd'}, filter:function(event,player){ return !event.nshuanxian&&player.getSubPlayers('nshuanxian').length; @@ -11278,12 +11957,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } player.chooseControlList(list,function(){ return _status.event.choice; - }).set('prompt',get.prompt('nstaiping')).set('choice',choice); + }).set('prompt',get.prompt('nstaiping_nh')).set('choice',choice); 'step 2' var left=player.storage.nshuanxian_left; var right=player.storage.nshuanxian_right; if(result.control!='cancel2'){ - player.logSkill('nstaiping'); + player.logSkill('nstaiping_nh'); switch(event.map[result.control]){ case '令幻身·左回复一点体力':player.storage[left].hp++;break; case '令幻身·左增加一点体力上限':player.storage[left].maxHp++;break; @@ -11976,13 +12655,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jianbi:{ - trigger:{global:'useCard'}, + trigger:{target:'useCardToTargeted'}, priority:5, filter:function(event,player){ if(get.type(event.card)!='trick') return false; if(get.info(event.card).multitarget) return false; if(event.targets.length<2) return false; - if(!event.targets.contains(player)) return false; return true; }, direct:true, @@ -12007,7 +12685,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } for(var i=0;i0; + })>0) list.push('弃置一张牌,本回合可以多使用一张【杀】且无距离限制'); + player.chooseControl('cancel2').set('prompt',get.prompt('xinjiangchi')).set('choiceList',list); + 'step 1' + if(result.control!='cancel2'){ + switch(result.index){ + case 0:{ + player.draw(); + break; + } + case 1:{ + player.draw(2); + player.addTempSkill('xinjiangchi_less'); + break; + } + case 2:{ + player.chooseToDiscard('he',true); + player.addTempSkill('xinjiangchi_more'); + break; + } + } + } + }, + subSkill:{ + less:{ + mod:{ + cardEnabled:function(card){ + if(card.name=='sha') return false; + }, + cardRespondable:function(card){ + if(card.name=='sha') return false; + }, + }, + charlotte:true, + }, + more:{ + mod:{ + cardUsable:function(card,player,num){ + if(card.name=='sha') return num+1; + }, + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + }, + charlotte:true, + }, + }, + }, //界周仓和程普 ollihuo:{ mod:{ @@ -9331,6 +9390,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ollihuo3:'疠火', ollihuo4:'疠火', ollihuo_info:'你使用普通的【杀】可以改为火【杀】,若此【杀】造成过伤害,你失去1点体力;你使用火【杀】可以多选择一个目标。你每回合使用的第一张牌如果是【杀】,则此【杀】结算完毕后可置于你的武将牌上。', + xinjiangchi:'将驰', + xinjiangchi_info:'摸牌阶段结束时,你可选择:①摸一张牌。②摸两张牌,然后本回合内不能使用或打出【杀】。③弃置一张牌,然后本回合内可以多使用一张【杀】,且使用【杀】无距离限制。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/sp.js b/character/sp.js index a277b113c..0e49de400 100755 --- a/character/sp.js +++ b/character/sp.js @@ -5,7 +5,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ connect:true, characterSort:{ sp:{ - sp_default:["caoying","simahui","yangxiu","chenlin","caohong","xiahouba","yuanshu","sp_diaochan","sp_zhaoyun","zhugejin","zhugeke","guanyinping","simalang","zhangxingcai","sp_sunshangxiang","caoang","sp_caoren","zhangbao","maliang","zhugedan","sp_jiangwei","sp_machao","sunhao","shixie","mayunlu","zhanglu","wutugu","sp_caiwenji","zhugeguo","jsp_guanyu","jsp_huangyueying","sunluyu","zumao","wenpin","daxiaoqiao","tadun","yanbaihu","chengyu","wanglang","sp_pangde","sp_jiaxu","litong","mizhu","buzhi","caochun","dongbai","zhaoxiang","mazhong","dongyun","kanze","heqi","wangyun","sunqian","xizhicai","quyi","luzhi","xujing","yuantanyuanshang","sunshao","zhangling",'guansuo','baosanniang','ol_zhangchangpu','caoshuang','sp_zhangliao','wolongfengchu','ol_xinxianying','panshu'], + sp_default:["caoying","simahui","yangxiu","chenlin","caohong","xiahouba","yuanshu","sp_diaochan","sp_zhaoyun","zhugejin","zhugeke","guanyinping","simalang","zhangxingcai","sp_sunshangxiang","caoang","sp_caoren","zhangbao","maliang","zhugedan","sp_jiangwei","sp_machao","sunhao","shixie","mayunlu","zhanglu","wutugu","sp_caiwenji","zhugeguo","jsp_guanyu","jsp_huangyueying","sunluyu","zumao","wenpin","daxiaoqiao","tadun","yanbaihu","chengyu","wanglang","sp_pangde","sp_jiaxu","litong","mizhu","buzhi","caochun","dongbai","zhaoxiang","mazhong","dongyun","kanze","heqi","wangyun","sunqian","xizhicai","quyi","luzhi","xujing","yuantanyuanshang","sunshao","zhangling",'guansuo','baosanniang','ol_zhangchangpu','caoshuang','sp_zhangliao','wolongfengchu','ol_xinxianying','panshu','huangzu'], sp_tongque:["liuxie","lingju","fuwan","sp_fuwan","sp_fuhuanghou","sp_jiben"], sp_zhongdan:["cuiyan","huangfusong"], sp_star:["sp_xiahoushi","jsp_zhaoyun","huangjinleishi","sp_pangtong","sp_daqiao","sp_ganning","sp_xiahoudun","sp_lvmeng","sp_zhangfei","sp_liubei"], @@ -18,6 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, characterFilter:{}, character:{ + huangzu:['male','qun',4,['wangong']], panshu:['female','wu',3,['weiyi','jinzhi']], sp_jiben:['male','qun',3,['spduanzhi','spduyi']], sp_fuhuanghou:['female','qun',3,['spcangni','spmixin']], @@ -309,6 +310,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ simazhao:['wangyuanji'], }, card:{ + yanxiao_card:{ + type:'delay', + judge:function(card){ + return 0; + }, + effect:function(){}, + ai:{ + basic:{ + order:1, + useful:1, + value:8, + }, + result:{ + target:1 + }, + } + }, wy_meirenji:{ fullskin:true, vanish:true, @@ -409,6 +427,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //黄祖 + wangong:{ + audio:2, + trigger:{player:'useCard'}, + forced:true, + filter:function(event,player){ + return get.type(event.card,false)=='basic'; + }, + content:function(){ + player.addSkill('wangong2'); + }, + }, + wangong2:{ + trigger:{player:'useCard1'}, + forced:true, + popup:false, + firstDo:true, + charlotte:true, + content:function(){ + player.removeSkill('wangong2'); + if(trigger.card.name=='sha') trigger.baseDamage++; + }, + mod:{ + cardUsable:function(card){ + if(card.name=='sha') return Infinity; + }, + targetInRange:function(card){ + if(card.name=='sha') return true; + }, + }, + mark:true, + intro:{ + content:'使用【杀】无距离和次数限制且伤害+1', + }, + }, //潘淑 weiyi:{ trigger:{global:'damageEnd'}, @@ -3797,8 +3850,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ mod:{ aiValue:function(player,card,num){ if((player.storage.xinshanjia||0)<3&&get.type(card)=='equip'&&!get.cardtag(card,'gifts')){ - if(get.position(card)=='e') return num/player.hp; - return num*player.hp; + return num/player.hp; } }, }, @@ -3811,7 +3863,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:"loseEnd", }, filter:function(event,player){ - return event.es.length>0; + return event.cards2&&event.cards2.length>0; }, content:function (){ lib.skill.xinshanjia.sync(player); @@ -3831,7 +3883,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var num=0; for(var i=0;i0; }, - content:function (){ + content:function(){ 'step 0' - player.chooseCard(get.prompt2('new_xingwu')).set('ai',function(card){ - var player=_status.event.player; - for(var i=0;i0&& - get.attitude(player,current)<0) - })) return 0; - } + player.chooseCard('he',get.prompt('new_xingwu'),'将一张牌置于武将牌上作为“舞”').set('ai',function(card){ + if(_status.event.goon) return 20-get.value(card); return 7-get.value(card); - }); + }).set('goon',player.needsToDiscard()||player.getStorage('new_xingwu').length>1); 'step 1' if(result.bool){ player.logSkill('new_xingwu'); - if(player.storage.new_xingwu.length<2){ - player.$give(result.cards,player,false); - } - 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'); - } - else{ - event.finish(); + var cards=result.cards; + player.lose(cards,ui.special,'toStorage'); + player.$give(cards[0],player); + player.markAuto('new_xingwu',cards); + game.log(player,'将',cards,'放在了武将牌上'); + player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']); } + else event.finish(); 'step 2' - var suitlist=[]; - for(var i=0;i2){ + choices.push('将三张“星舞”牌置入弃牌堆'); } - if(suitlist.length==3){ - player.chooseButton(['请选择要弃置的「星舞」牌',player.storage.new_xingwu],true,3).set('filterButton',function(button){ - if(ui.selected.buttons.length){ - for(var i=0;i1) choices.push('弃置两张手牌并将武将牌翻面'); + if(choices.length){ + player.chooseControl('cancel2').set('prompt','星舞:是否发射核弹?').set('choiceList',choices).set('ai',function(){ var player=_status.event.player; - if(get.attitude(player,target)>0) return -1; - return get.damageEffect(target,player,player)*target.sex=='male'?2:1+target.countCards('e')/2; + if(player.getStorage('new_xingwu').length>2) return 0; + if(player.isTurnedOver()||player.identity=='fan'||player.getEnemies().length==1) return 0; + return 'cancel2'; }); } - 'step 4' - if(result.bool){ - var target=result.targets[0]; - var num=target.sex=="male"?2:1; - target.damage(num); - event.target=target; - player.line(target,'green'); - } - else{ - event.finish(); - } - 'step 5' - if(event.target&&event.target.isAlive()){ - var es=event.target.getCards('e'); - if(es.length){ - event.target.discard(es); + else event.finish(); + 'step 3' + if(result.control!='cancel2'){ + var num=result.index+event.addIndex; + if(num==1){ + event.goto(5); + return; } + if(player.getStorage('new_xingwu').length>3) player.chooseButton(['请选择要移去的“星舞”牌',player.getStorage('new_xingwu')],3,true); + else event._result={ + bool:true, + links:player.getStorage('new_xingwu').slice(0), + } + } + else event.finish(); + 'step 4' + if(result.bool&&result.links&&result.links.length==3){ + var cards=result.links; + player.$throw(cards,1500); + player.unmarkAuto('new_xingwu',cards); + game.delayx(); + game.cardsDiscard(cards); + event.goto(6); + } + else event.finish(); + 'step 5' + player.chooseToDiscard(true,'h',2); + player.turnOver(); + 'step 6' + player.chooseTarget('请选择【星舞】的目标','弃置其装备区内的所有牌。然后对其造成两点伤害(目标为女性角色则改为1点)',true,lib.filter.notMe).set('ai',function(target){ + return -get.attitude(_status.event.player,target)*Math.sqrt(4+target.countCards('e',function(card){ + return get.value(card,target)>0; + }))*(target.sex=='female'?1:2); + }); + 'step 7' + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + player.line(target,'green'); + var num=target.countCards('e'); + if(num) player.discardPlayerCard(target,'e',num,true); + target.damage(target.sex=='female'?1:2); } }, ai:{ threaten:1.5, }, }, - "new_luoyan":{ - group:["new_luoyan_tianxiang","new_luoyan_liuli"], - }, - "new_luoyan_tianxiang":{ - inherit:"oltianxiang", - filter:function (event,player){ - if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; - if(player.hasSkill('oltianxiang')) return false; - return lib.skill.oltianxiang.filter(event,player); + new_luoyan:{ + init:function(player){ + if(player.getStorage('new_xingwu').length) player.addAdditionalSkill('new_luoyan',['oltianxiang','liuli']); }, - audio:"tianxiang", - }, - "new_luoyan_liuli":{ - inherit:"liuli", - filter:function (event,player){ - if(!player.storage.new_xingwu||!player.storage.new_xingwu.length) return false; - if(player.hasSkill('liuli')) return false; - return lib.skill.liuli.filter(event,player); + onremove:function(player){ + player.removeAdditionalSkill('new_luoyan'); }, - audio:"liuli", + derivation:['oltianxiang','liuli'], }, //新孙鲁育 "new_meibu":{ @@ -9447,60 +9482,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player.countCards('he',{suit:'diamond'})>0; }, discard:false, - //lose:false, - visible:true, - toStorage:true, + lose:false, + delay:false, prepare:'give', content:function(){ - //player.lose(cards,ui.special,'toStorage','visible'); - if(target.hasSkill('yanxiao2')&&target.storage.yanxiao2){ - target.storage.yanxiao2.push(cards[0]); - target.syncStorage('yanxiao2'); - target.markSkill('yanxiao2'); - } - else{ - target.storage.yanxiao2=cards.slice(0); - target.syncStorage('yanxiao2'); - target.addSkill('yanxiao2'); - } + 'step 0' + game.addGlobalSkill('yanxiao_global'); + target.addJudge({name:'yanxiao_card'},cards); + 'step 1' + game.delay(); }, ai:{ order:8, result:{ target:function(player,target){ - if(target.storage.yanxiao2&&target.storage.yanxiao2.length) return 0; - if(target.countCards('j')) return 1; + if(target.countCards('j',function(card){ + return get.value(target,{ + name:card.viewAs||card.name, + cards:[card], + },target,target)<0; + })) return 1; return 0; } } } }, - yanxiao2:{ - audio:'yanxiao', - mark:true, - intro:{ - content:'cards', - onunmark:function(storage,player){ - if(storage&&storage.length){ - player.$throw(storage,1000); - game.cardsDiscard(storage); - game.log(storage,'被置入了弃牌堆'); - storage.length=0; - } - }, - }, + yanxiao_global:{ trigger:{player:'phaseJudgeBegin'}, forced:true, + filter:function(event,player){ + return player.countCards('j')>0; + }, content:function(){ - var cards=player.storage.yanxiao2.concat(player.getCards('j')); - player.gain(cards,'gain2','log','fromStorage'); - delete player.storage.yanxiao2; - player.removeSkill('yanxiao2'); + player.gain(player.getCards('j'),'gain2'); }, ai:{ effect:{ target:function(card){ - if(get.type(card)=='delay') return [0,0.1]; + if(get.type(card)=='delay'&&target.hasJudge('yanxiao_card')) return [0,0,0,0.1]; } } } @@ -16445,10 +16464,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "new_zhixi_info":"锁定技,出牌阶段,你至多可使用X张牌,你使用了锦囊牌后不能再使用牌(X为你的体力值)。", "new_mumu2":"穆穆", "new_mumu2_info":"锁定技,你不能使用【杀】。", - "new_xingwu":"星舞", - "new_xingwu_info":"弃牌阶段开始时,你可以将一张手牌置于武将牌上,称之为「舞」。然后若你的「舞」中包含三种花色,则你须移去三张花色不同的「舞」并选择一名角色,该角色受到2点伤害(若为女性,则改为1点)并弃置其装备区的所有牌。", + new_xingwu:"星舞", + new_xingwu_info:"弃牌阶段开始时,你可以将一张牌置于武将牌上,称为“舞”。然后你可以选择一项:①将三张“舞”置入弃牌堆;②弃置两张手牌并将武将牌翻面。若如此做,你选择一名角色,该角色弃置其装备区的所有牌并受到2点伤害(若为女性,则改为1点)。", "new_luoyan":"落雁", - "new_luoyan_info":"锁定技。若你的武将牌上有「舞」,则你视为拥有技能〖天香〗和〖流离〗。", + "new_luoyan_info":"锁定技。若你的武将牌上有“舞”,则你视为拥有技能〖天香〗和〖流离〗。", "new_luoyan_tianxiang":"天香", "new_luoyan_tianxiang_info":"", "new_luoyan_liuli":"流离", @@ -16705,8 +16724,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ junwei2:'军威', junwei_info:'结束阶段开始时,你可以移去三张“锦”。若如此做,你须指定一名角色并令其选择一项:1.展示一张【闪】,然后你将此【闪】交给一名其他角色。2.该角色失去1点体力,然后你将其装备区内的一张牌移出游戏。该角色的回合结束后,将以此法移出游戏的装备牌移回原处。', yanxiao:'言笑', - yanxiao2:'言笑', - yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的武将牌上。武将牌上有〖言笑〗牌的角色下个判定阶段开始时,获得〖言笑〗牌及其判定区里的所有牌。', + yanxiao_info:'出牌阶段,你可以将一张♦牌置于一名角色的判定区内。判定区内有〖言笑〗牌的角色下个判定阶段开始时,其获得判定区里的所有牌。', anxian:'安娴', anxian_info:'当你使用【杀】对目标角色造成伤害时,你可以防止此伤害,令其弃置一张手牌,然后你摸一张牌;当你成为【杀】的目标后,你可以弃置一张手牌,令此【杀】对你无效,然后此【杀】的使用者摸一张牌。', xingwu:'星舞', @@ -16989,7 +17007,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lihun_info:'出牌阶段限一次,你可以弃置一张牌并选择一名其他男性角色。若如此做,你将武将牌翻面并获得其所有手牌。出牌阶段结束时,你交给其X张牌。(X为该角色的体力值)', chongzhen_info:'当你因发动〖龙胆〗而使用或打出【杀】或【闪】时,你可以获得对方的一张手牌。', bifa_info:'结束阶段开始时,你可以将一张手牌移出游戏并指定一名其他角色。该角色的准备阶段开始时,其观看你移出游戏的牌并选择一项:交给你一张与此牌类型相同的手牌并获得此牌;或将此牌置入弃牌堆,然后失去1点体力。', - songci_info:'①出牌阶段,你可以选择一名未以此法选择过的角色。若其手牌数:大于其体力值,其弃置两张牌;不小于其体力值,其摸两张牌。②弃牌阶段结束时,若你已对场上所有存活角色发动过〖颂词①〗,则你摸一张牌。', + songci_info:'①出牌阶段,你可以选择一名未以此法选择过的角色。若其手牌数:大于其体力值,其弃置两张牌;不大于其体力值,其摸两张牌。②弃牌阶段结束时,若你已对场上所有存活角色发动过〖颂词①〗,则你摸一张牌。', yongsi_info:'锁定技,摸牌阶段,你多摸X张牌。弃牌阶段开始时,你弃置X张牌。(X为场上势力数)', yicong_info:'锁定技,当你的体力值大于2时,你计算与其他角色的距离时-1;当你的体力值不大于2时,其他角色计算与你的距离时+1。', baobian_info:'锁定技,若你的体力值为3或更少,你视为拥有技能〖挑衅〗;若你的体力值为2或更少;你视为拥有技能〖咆哮〗;若你的体力值为1,你视为拥有技能〖神速〗。', @@ -17122,7 +17140,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ weiyi_info:'每名角色限一次。当有角色受到伤害后,你可选择:①若其体力值不小于你,则其失去1点体力。②若其体力值不大于你且其已受伤,则其回复1点体力。', jinzhi:'锦织', jinzhi2:'锦织', - jinzhi_info:'当你需要使用或打出一张基本牌时,你可弃置X张牌并摸一张牌。若你以此法弃置的牌均为同一颜色,则视为你使用或打出了此牌。', + jinzhi_info:'当你需要使用或打出一张基本牌时,你可弃置X张牌并摸一张牌。若你以此法弃置的牌均为同一颜色,则视为你使用或打出了此牌。(X为你于本轮内发动此技能的次数)', + yanxiao_card:'言笑', + yanxiao_global:'言笑', + yanxiao_card_info:'判定阶段开始时,你获得判定区内的所有牌。', + huangzu:'黄祖', + wangong:'挽弓', + wangong2:'挽弓', + wangong_info:'锁定技,当你使用基本牌时,你获得如下效果:当你使用下一张牌时,若此牌为【杀】,则此牌无次数和距离限制且伤害+1。', sp_default:"常规", sp_tongque:"铜雀台", diff --git a/character/sp2.js b/character/sp2.js index 6201c6329..76c1917d8 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -179,7 +179,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter:function(event,player){ return !player.getHistory('skipped').contains('phaseUse')&&player.getHistory('useCard',function(evt){ return evt.getParent().name=='mouni'; - }); + }).length>0; }, content:function(){ 'step 0' @@ -7319,6 +7319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=result.targets[0]; player.logSkill('zongkui',target); target.addMark('zongkui_mark',1); + game.delayx(); } }, subSkill:{ @@ -7410,7 +7411,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "xinfu_lveming":{ - init:function (player){ + init:function(player){ player.storage.xinfu_lveming=0; }, mark:true, @@ -7425,24 +7426,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function (){ "step 0" - var list=[1,2,3,4,5,6,7,8,9,10,11,12,13] + var list=[1,2,3,4,5,6,7,8,9,10,11,12,13].map((i)=>get.strNumber(i)); target.chooseControl(list).set('ai',function(){ - return list.randomGet(); - }); + return get.rand(0,12); + }).set('prompt','请选择一个点数'); "step 1" if(result.control){ - target.popup(result.control); - player.storage.xinfu_lveming++; - event.num=result.control; + target.$damagepop(result.control,'thunder'); + var num=result.index+1; + event.num=num; } else{ - target.popup('13'); - player.storage.xinfu_lveming++; + target.$damagepop('K','thunder'); event.num=13; }; + game.log(target,'选择的点数是','#y'+get.strNumber(event.num)); + player.storage.xinfu_lveming++; player.judge(function(card){ - if(card.number==event.num) return 4; - return -1; + if(card.number==_status.event.getParent('xinfu_lveming').num) return 4; + return 0; }); "step 2" if(result.bool==true){ diff --git a/character/yijiang.js b/character/yijiang.js index e9d7e93db..dc62cc8a3 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -19,7 +19,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xin_fazheng:['male','shu',3,['xinenyuan','xinxuanhuo'],['die_audio']], old_guanzhang:['male','shu',4,['old_fuhun']], old_wangyi:['female','wei',3,['oldzhenlie','oldmiji']], - caozhang:['male','wei',4,['jiangchi']], + caozhang:['male','wei',4,['new_jiangchi']], guohuai:['male','wei',4,['rejingce']], zhangchunhua:['female','wei',3,['jueqing','shangshi']], caozhi:['male','wei',3,['luoying','jiushi']], @@ -2437,7 +2437,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'&&!target.isDisabled(get.subtype(card)); + return get.type(card)=='equip'&&target.canUse(card,target); }); if(event.card){ target.chooseUseTarget(event.card,'nothrow','nopopup',true); @@ -2516,7 +2516,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ trigger.source.loseHp(); var card=get.cardPile(function(card){ - return get.type(card)=='equip'; + return get.type(card)=='equip'&&trigger.source.canUse(card,trigger.source); }); if(card){ trigger.source.chooseUseTarget(card,'nothrow','nopopup',true); @@ -2566,7 +2566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.logSkill('juexiang_lie',target); target.loseHp(); var card=get.cardPile(function(card){ - return get.type(card)=='equip'; + return get.type(card)=='equip'&&target.canUse(card,target); }); if(card){ target.chooseUseTarget(card,true,'nothrow','nopopup',true); diff --git a/character/yingbian.js b/character/yingbian.js index eeeaf8395..96a85a7f7 100644 --- a/character/yingbian.js +++ b/character/yingbian.js @@ -7,7 +7,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ weiguan:['male','jin',3,['zhongyun','shenpin']], cheliji:['male','qun',4,['chexuan','qiangshou']], simazhou:['male','jin',4,['caiwang','naxiang']], - huangzu:['male','qun',4,['wangong'],['unseen']], ol_lisu:['male','qun',3,['qiaoyan','xianzhu']], jin_yanghuiyu:['female','jin',3,['huirong','ciwei','caiyuan'],['hiddenSkill']], shibao:['male','jin',4,['zhuosheng']], @@ -519,40 +518,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:'已接受$的投降;对这些角色发动【才望】时将“弃置”改为“获得”', }, }, - wangong:{ - audio:2, - trigger:{player:'useCard'}, - forced:true, - filter:function(event,player){ - return get.type(event.card,false)=='basic'; - }, - content:function(){ - player.addSkill('wangong2'); - }, - }, - wangong2:{ - trigger:{player:'useCard1'}, - forced:true, - popup:false, - firstDo:true, - charlotte:true, - content:function(){ - player.removeSkill('wangong2'); - if(trigger.card.name=='sha') trigger.baseDamage++; - }, - mod:{ - cardUsable:function(card){ - if(card.name=='sha') return Infinity; - }, - targetInRange:function(card){ - if(card.name=='sha') return true; - }, - }, - mark:true, - intro:{ - content:'使用【杀】无距离和次数限制且伤害+1', - }, - }, //李肃 qiaoyan:{ trigger:{player:'damageBegin2'}, @@ -1793,7 +1758,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, filter:function(event,player){ var target=event.player; - return target!=player&&!target.storage.nohp&&(target.hp+target.countCards('h'))>=(ui.cardPile.childElementCount%10)&&player.countCards('he')>0&&player.canUse({name:'sha',nature:'ice'},target,false); + return target!=player&&target.isIn()&&!target.storage.nohp&&(target.hp+target.countCards('h'))>=(ui.cardPile.childElementCount%10)&&player.countCards('he')>0&&player.canUse({name:'sha',nature:'ice'},target,false); }, content:function(){ 'step 0' @@ -1988,10 +1953,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ciwei_info:'一名角色于其回合内使用第二张牌时,若此牌为基本牌或普通锦囊牌,则你可以弃置一张牌,取消此牌的所有目标。', caiyuan:'才媛', caiyuan_info:'锁定技,当你扣减体力时,你获得一枚“才媛”标记直到你的下回合结束。结束阶段开始时,若你没有“才媛”标记且此回合不是你的第一个回合 ,则你摸两张牌。', - huangzu:'黄祖', - wangong:'挽弓', - wangong2:'挽弓', - wangong_info:'锁定技,当你使用基本牌时,你获得如下效果:当你使用下一张牌时,若此牌为【杀】,则此牌无次数和距离限制且伤害+1。', simazhou:'司马伷', caiwang:'才望', caiwang_info:'当你使用或打出牌响应其他角色使用的牌,或其他角色使用或打出牌响应你使用的牌后,若这两张牌颜色相同,则你可以弃置对方的一张牌。', diff --git a/game/asset.js b/game/asset.js index ef07756b4..7a8f2f5f9 100644 --- a/game/asset.js +++ b/game/asset.js @@ -1,5 +1,5 @@ window.noname_asset_list=[ - 'v1.9.110.5', + 'v1.9.110.6', 'audio/background/aozhan_chaoming.mp3', 'audio/background/aozhan_online.mp3', 'audio/background/aozhan_rewrite.mp3', @@ -4030,6 +4030,12 @@ window.noname_asset_list=[ 'image/character/shibao.jpg', 'image/character/weiguan.jpg', 'image/character/zhangmiao.jpg', + 'image/character/huangzu.jpg', + 'image/character/ns_chentai.jpg', + 'image/character/ns_huangwudie.jpg', + 'image/character/ns_sunyi.jpg', + 'image/character/ns_zhangning.jpg', + 'image/character/ns_yanghu.jpg', 'image/character/baiwuchang.jpg', 'image/character/baosanniang.jpg', diff --git a/game/game.js b/game/game.js index ee0b5ebe9..bbfd7baaa 100644 --- a/game/game.js +++ b/game/game.js @@ -12528,7 +12528,7 @@ }, chooseToCompare:function(){ "step 0" - if(player.countCards('h')==0||target.countCards('h')==0){ + if(((!event.fixedResult&&!event.fixedResult[player.playerid])&&player.countCards('h')==0)||((!event.fixedResult&&!event.fixedResult[target.playerid])&&target.countCards('h')==0)){ event.result={cancelled:true,bool:false} event.finish(); return; @@ -26573,53 +26573,6 @@ } }, }, - _lianhuan2:{ - trigger:{global:'damageAfter'}, - filter:function(event,player){ - return false; - return (event.nature&&lib.linked.contains(event.nature)&&event.player.isLinked()&& - event.player.classList.contains('dead')&&player.isLinked()); - }, - silent:true, - popup:false, - forced:true, - priority:-5, - content:function(){ - "step 0" - event.forceDie=true; - trigger.player.removeLink(); - if(!trigger.notLink()) event.finish(); - "step 1" - event.targets=game.filterPlayer(function(current){ - return current.isLinked(); - }); - lib.tempSortSeat=_status.currentPhase||trigger.player; - event.targets.sort(lib.sort.seat); - delete lib.tempSortSeat; - event._args=[trigger.num,trigger.nature,trigger.cards,trigger.card]; - if(trigger.source) event._args.push(trigger.source); - else event._args.push("nosource"); - "step 2" - if(event.targets.length){ - var target=event.targets.shift(); - target.damage.apply(target,event._args.slice(0)); - event.redo(); - } - } - }, - _lianhuan3:{ - trigger:{global:'damageAfter'}, - priority:-10, - forced:true, - popup:false, - filter:function(event,player){ - return false; - return event.player.classList.contains('dead'); - }, - content:function(){ - trigger.player.removeLink(); - } - }, _lianhuan4:{ trigger:{player:'changeHp'}, priority:-10, @@ -27765,7 +27718,7 @@ cardsGotoSpecial:function(cards,bool){ var type=get.itemtype(cards); if(type!='cards'&&type!='card') return; - var next=game.createEvent('cardsDiscard'); + var next=game.createEvent('cardsGotoSpecial'); next.cards=type=='cards'?cards.slice(0):[cards]; if(bool===false) next.notrigger=true; next.setContent('cardsGotoSpecial'); @@ -44211,7 +44164,7 @@ node=item.cloneNode(true); } node.classList.add('button'); - position.appendChild(node); + if(position) position.appendChild(node); node.link=item; if(item.style.backgroundImage){ node.style.backgroundImage=item.style.backgroundImage; @@ -44226,6 +44179,13 @@ if(!noclick){ lib.setIntro(node); } + if(get.position(item)=='j'&&item.viewAs&&item.viewAs!=item.name&&lib.config.cardtempname!='off'){ + node._tempName=ui.create.div('.tempname',node); + var tempname=get.translation(item.viewAs); + node._tempName.dataset.nature='wood'; + node._tempName.innerHTML=lib.config.cardtempname=='default'?get.verticalStr(tempname):tempname; + node._tempName.tempname=tempname; + } break; case 'vcard': @@ -49751,7 +49711,7 @@ case 'kaihei':return '开黑斗地主'; case 'huanle':return '欢乐斗地主'; case 'online':return '智斗三国'; - default:return '休闲斗地主'; + default:return '休闲'+(config.double_character?'双将':'')+'斗地主'; } } if(config.mode=='versus'){ @@ -49773,7 +49733,8 @@ else if(config.mode=='identity'&&config.identity_mode!='normal'){ switch(config.identity_mode){ case 'purple':return '三对三对二'; - case 'zhong':return '忠胆英杰'; + case 'zhong':return (config.double_character?'双将':'')+'忠胆英杰'; + default:return (config.double_character?'双将':'')+get.cnNumber(parseInt(config.number))+'人身份'; } } else if(config.mode=='guozhan'&&config.guozhan_mode!='normal'){ @@ -50952,7 +50913,7 @@ }, selectableCards:function(sort){ if(!_status.event.player) return[]; - var cards=_status.event.player.getCards('hejs'); + var cards=_status.event.player.getCards('hes'); var selectable=[]; for(var i=0;i0) return 0.5; if(efff==0) return 0; return -1.5; diff --git a/game/update.js b/game/update.js index d33eee648..174b07f87 100644 --- a/game/update.js +++ b/game/update.js @@ -1,26 +1,26 @@ window.noname_update={ - version:'1.9.110.5', - update:'1.9.110.4', + version:'1.9.110.6', + update:'1.9.110.5', changeLog:[ - '文德武备独立分包', - '彻里吉、石苞、潘淑、卫瓘、张邈', - '国战唐咨、刘琦、张鲁、士燮技能调整', + '武将设计比赛2021:三国组', + '黄祖', + '界曹彰、曹纯、大小乔技能调整', 'bug修复', ], files:[ - 'card/extra.js', + //'card/extra.js', //'card/gujian.js', //'card/guozhan.js', //'card/gwent.js', //'card/huanlekapai.js', //'card/mtg.js', //'card/sp.js', - //'card/standard.js', + 'card/standard.js', //'card/swd.js', //'card/yunchou.js', 'card/yingbian.js', //'card/zhenfa.js', - //'card/zhulu.js', + 'card/zhulu.js', 'character/diy.js', //'character/extra.js', //'character/hearth.js', @@ -32,8 +32,8 @@ window.noname_update={ //'character/old.js', //'character/ow.js', 'character/rank.js', - //'character/refresh.js', - 'character/shenhua.js', + 'character/refresh.js', + //'character/shenhua.js', 'character/sp.js', 'character/sp2.js', //'character/tw.js', @@ -42,7 +42,7 @@ window.noname_update={ //'character/xianjian.js', //'character/xinghuoliaoyuan.js', 'character/yingbian.js', - //'character/yijiang.js', + 'character/yijiang.js', //'character/yxs.js', //'extension/boss/extension.js', //'layout/default/layout.css', @@ -61,10 +61,10 @@ window.noname_update={ 'game/game.js', //'game/keyWords.js', //'game/NoSleep.js', - 'game/config.js', - 'game/package.js', + //'game/config.js', + //'game/package.js', //'game/asset.js', - 'game/source.js', + //'game/source.js', //'theme/style/hp/xinglass.css', //'theme/style/hp/xinround.css', //'theme/style/hp/image/xinglass1.png', diff --git a/image/character/huangzu.jpg b/image/character/huangzu.jpg new file mode 100644 index 000000000..2bfa3b97c Binary files /dev/null and b/image/character/huangzu.jpg differ diff --git a/image/character/ns_chentai.jpg b/image/character/ns_chentai.jpg new file mode 100644 index 000000000..2f8c889a0 Binary files /dev/null and b/image/character/ns_chentai.jpg differ diff --git a/image/character/ns_huangwudie.jpg b/image/character/ns_huangwudie.jpg new file mode 100644 index 000000000..82e87db28 Binary files /dev/null and b/image/character/ns_huangwudie.jpg differ diff --git a/image/character/ns_sunyi.jpg b/image/character/ns_sunyi.jpg new file mode 100644 index 000000000..7b0eb534a Binary files /dev/null and b/image/character/ns_sunyi.jpg differ diff --git a/image/character/ns_yanghu.jpg b/image/character/ns_yanghu.jpg new file mode 100644 index 000000000..dc3b38a8b Binary files /dev/null and b/image/character/ns_yanghu.jpg differ diff --git a/image/character/ns_zhangning.jpg b/image/character/ns_zhangning.jpg new file mode 100644 index 000000000..5a1e8831f Binary files /dev/null and b/image/character/ns_zhangning.jpg differ