diff --git a/card/extra.js b/card/extra.js index ccb0e6441..7aa5fc3dc 100644 --- a/card/extra.js +++ b/card/extra.js @@ -576,11 +576,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ jiu:'酒', jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1(每回合限使用1次);濒死阶段,对自己使用,回复1点体力', huogong:'火攻', - tiesuo:'铁锁连环', + tiesuo:'铁索连环', tiesuo_info:'出牌阶段使用,选择1至2个角色,分别横置或重置这些角色', huogong_bg:'攻', huogong_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则火攻对该角色造成1点火焰伤害。', - tiesuo_bg:'锁', + tiesuo_bg:'索', bingliang:'兵粮寸断', hualiu:'骅骝', zhuque:'朱雀羽扇', diff --git a/card/guozhan.js b/card/guozhan.js index c2c09d7dc..7ea63367f 100644 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -128,7 +128,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ 'step 0' player.draw(2); 'step 1' - player.loseHp(); + if(player.hp>1) player.loseHp(); } }, yuxi:{ @@ -1283,7 +1283,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ feilongduofeng3:'飞龙夺凤', feilongduofeng_info:'当你使用【杀】指定一名角色为目标后,你可令该角色弃置一张牌。当你使用【杀】令其他角色进入濒死状态时,你可以获得其一张手牌。', taipingyaoshu:'太平要术', - taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,你的手牌上限便+1;当你失去装备区里的【太平要术】时,你摸两张牌,然后失去1点体力。', + taipingyaoshu_info:'锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,你的手牌上限便+1;当你失去装备区里的【太平要术】时,你摸两张牌,然后若你的体力值大于1,你失去1点体力。', yuxi_skill:'玉玺', yuxi_skill2:'玉玺', yuxi:'玉玺', diff --git a/character/extra.js b/character/extra.js index e6525199e..bb7ec834f 100755 --- a/character/extra.js +++ b/character/extra.js @@ -16,7 +16,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "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"]], + "shen_ganning":["male","shen","3/6",["drlt_poxi","drlt_jieying"],["wu"]], }, characterIntro:{ shen_guanyu:'关羽,字云长。曾水淹七军、擒于禁、斩庞德、威震华夏,吓得曹操差点迁都躲避,但是东吴偷袭荆州,关羽兵败被害。后传说吕蒙因关羽之魂索命而死。', @@ -25,7 +25,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_zhugeliang:'字孔明、号卧龙,汉族,琅琊阳都人,三国时期蜀汉丞相、杰出的政治家、军事家、发明家、文学家。在世时被封为武乡侯,死后追谥忠武侯,后来东晋政权推崇诸葛亮军事才能,特追封他为武兴王。诸葛亮为匡扶蜀汉政权,呕心沥血、鞠躬尽瘁、死而后已。其代表作有《前出师表》、《后出师表》、《诫子书》等。曾发明木牛流马等,并改造连弩,可一弩十矢俱发。于234年在宝鸡五丈原逝世。', }, characterTitle:{ - shen_ganning:"体力上限:6", + //shen_ganning:"体力上限:6", }, skill:{ "new_wuhun":{ @@ -47,18 +47,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){ source.markSkill('new_wuhun_mark'); }, contentx:function (){ - "step 0" - source.line(player,{color:[255, 255, 0]}); - source.logSkill('new_wuhun_die',player); + "step 0" + var num=0; + for(var i=0;inum){ + num=current.storage.new_wuhun_mark; + } + } + player.chooseTarget(true,'请选择【武魂】的目标',function(card,player,target){ + return target!=player&&target.storage.new_wuhun_mark==num; + }).set('ai',function(target){ + return -get.attitude(_status.event.player,target); + }).set('forceDie',true); + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + var target=result.targets[0]; + event.target=target; + player.logSkill('new_wuhun_die',target); + player.line(target,{color:[255, 255, 0]}); game.delay(2); - "step 1" - player.judge(function(card){ + } + "step 2" + target.judge(function(card){ if(['tao','taoyuan'].contains(card.name)) return 10; return -10; }); - "step 2" + "step 3" if(!result.bool){ - lib.element.player.die.apply(player,[]); + lib.element.player.die.apply(target,[]); } }, subSkill:{ @@ -77,25 +94,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function (){ "step 0" - var num=0; - for(var i=0;inum){ - num=current.storage.new_wuhun_mark; - } - } - player.chooseTarget(true,'请选择【武魂】的目标',function(card,player,target){ - return target!=player&&target.storage.new_wuhun_mark==num; - }).ai=function(target){ - return -get.attitude(_status.event.player,target); - }; - "step 1" - if(result.bool&&result.targets&&result.targets.length){ var next=game.createEvent('new_wuhun',null,trigger.parent); - next.player=result.targets[0]; - next.source=player; + next.forceDie=true; + next.player=player; next.setContent(lib.skill.new_wuhun.contentx); - } }, sub:true, }, @@ -452,7 +454,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.num>0; }, content:function(){ - player.storage.baonu+=trigger.num; + if(player==trigger.player) player.storage.baonu+=trigger.num; + if(player==trigger.source) player.storage.baonu+=trigger.num; player.markSkill('baonu'); player.syncStorage('baonu'); }, @@ -2315,12 +2318,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, '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, diff --git a/character/refresh.js b/character/refresh.js index 641ae0aa8..4f2d00010 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -1868,9 +1868,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.num=trigger.num; "step 1" player.judge(function(card){ - if(get.color(card)=='red') return _status.event.eff; + if(get.color(card)=='red') return 1; return 0; - }).set('eff',get.damageEffect(trigger.source,player,player)); + }); "step 2" if(result.color=='black'){ if(trigger.source.countCards('he')){ @@ -1882,13 +1882,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } event.num--; if(event.num>0){ - player.chooseBool('是否继续发动?'); + player.chooseBool(get.prompt2('reganglie')); } else{ event.finish(); } "step 3" if(result.bool){ + player.logSkill('reganglie',trigger.source); event.goto(1); } }, diff --git a/character/shenhua.js b/character/shenhua.js index 9941c0edb..e5eec82d2 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -63,7 +63,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, perfectPair:{ jiaxu:['liqueguosi'], - yuanshao:['yanwen'], + re_yuanshao:['yanwen'], menghuo:['zhurong'], sp_zhugeliang:['pangtong'], sunce:['zhouyu','taishici','daqiao'], @@ -1180,9 +1180,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, filter:function(event,player){ - return event.player.storage.nzry_huaiju&&event.player.storage.nzry_huaiju>0; + return !event.tachibanaed&&event.player.storage.nzry_huaiju&&event.player.storage.nzry_huaiju>0; }, content:function(){ + trigger.tachibanaed=true; player.line(trigger.player,'green'); if(trigger.name=='damage'){ trigger.cancel(); @@ -1279,7 +1280,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseControl().set('ai',function(){ if(game.countPlayer(function(current){return get.attitude(player,current)<0&¤t.hp==trigger.num})>0&&trigger.num<=3) return 1; return 0; - }).set('choiceList',[event.str1,event.str2]); + }).set('choiceList',[event.str1,event.str2]).set('prompt','是否发动【溃诛】?'); 'step 1' event.control=[event.str1,event.str2][result.index]; 'step 2' @@ -1293,10 +1294,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ num+=targets[i].hp; }; return num+target.hp<=trigger.num; - }).ai=function(target){ + }).set('ai',function(target){ if(ui.selected.targets[0]!=undefined) return -1; return get.attitude(player,target)<0; - }; + }).promptbar='none'; }else{ player.chooseTarget('请选择【溃诛】的目标',[1,trigger.num]).ai=function(target){ return get.attitude(player,target); @@ -1369,7 +1370,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ 'step 0' - player.chooseTarget(get.prompt('nzry_zhizheng'),function(card,player,target){ + player.chooseTarget(get.prompt2('nzry_zhizheng'),function(card,player,target){ return get.distance(target,player,'attack')>1&&target.countDiscardableCards(player,'he'); }).ai=function(target){ return -get.attitude(player,target); @@ -1528,9 +1529,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, prompt2:"当你使用牌指定目标时,若此牌与你本回合使用的牌类型均不同(包括装备牌),则你可以将此牌置于牌堆顶,然后摸一张牌", trigger:{ - player:['useCard','respond'], + player:['useCard','useCardAfter','respond'], }, - filter:function (event,player){ + filter:function (event,player,name){ + if(name=='useCard'&&!['equip','delay'].contains(get.type(event.card))) return false; + if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false; return ((event.name=='respond'&&event.card.name=='shan'&&event.parent.parent.name=='sha')||event.name=='useCard')&&event.cards.length>0&&player.storage.nzry_shicai!=undefined&&!player.storage.nzry_shicai.contains(get.type(event.card,'trick')); }, check:function (event,player){ @@ -2187,7 +2190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lianhuan4:{ mod:{ selectTarget:function(card,player,range){ - if(card.name=='tiesuo'&&range[1]<3) range[1]=3; + if(card.name=='tiesuo'&&player.hasSkill('xinlianhuan')&&range[1]<3) range[1]=3; }, }, }, @@ -3139,12 +3142,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, // unique:true, // gainable:true, - trigger:{global:'discardAfter'}, + group:["guzheng_count"], + subSkill:{ + count:{ + trigger:{global:'discardAfter'}, + forced:true, + silent:true, + popup:false, + filter:function(event,player){ + if(event.guzhenged) return false; + if(!event.cards||!event.cards.length) return false; + var evt=event.getParent('phaseDiscard'); + return evt&&evt.name=='phaseDiscard'&&evt.player!=player; + }, + content:function(){ + var evt=event.getParent('phaseDiscard'); + trigger.guzhenged=true; + if(!evt.guzhengcards) evt.guzhengcards=[]; + evt.guzhengcards.addArray(trigger.cards); + }, + sub:true, + }, + }, + trigger:{global:'phaseDiscardAfter'}, filter:function(event,player){ if(event.player!=player&&event.player.isIn()&& - event.cards&&event.cards.length&&event.getParent(2).name=='phaseDiscard'){ - for(var i=0;i0; + return _status.currentPhase&&_status.currentPhase.isIn()&&event.num>0; }, - logTarget:'source', + //logTarget:'source', content:function(){ - var source=trigger.source; + var source=_status.currentPhase; if(source.hasSkill('hengjiang2')){ source.storage.hengjiang2+=trigger.num; + source.storage.hengjiang3.add(player); source.updateMarks(); } else{ - source.storage.hengjiang3=player; + source.storage.hengjiang3=[player]; source.storage.hengjiang2=trigger.num; source.addTempSkill('hengjiang2'); } @@ -4170,12 +4173,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{player:'phaseDiscardEnd'}, filter:function(event,player){ - return player.storage.hengjiang3.isIn()&&(!event.cards||event.cards.length==0); + if(event.cards&&event.cards.length) return false; + var players=player.storage.hengjiang3; + for(var i=0;i刘焉初以汉朝宗室身份,拜为中郎,历任雒阳令、冀州刺史、南阳太守、宗正、太常等官。因益州刺史郄俭在益州大肆聚敛,贪婪成风,加上当时天下大乱。刘焉欲取得一安身立命之所,割据一方,于是向朝廷求为益州牧,封阳城侯,前往益州整饬吏治。郄俭为黄巾军所杀,刘焉进入益州,派张鲁盘踞汉中,张鲁截断交通,斩杀汉使,从此益州与中央道路不通。刘焉进一步对内打击地方豪强,巩固自身势力,益州因而处于半独立的状态。兴平元年(194年),刘焉因背疮迸发而逝世,其子刘璋继领益州牧。", }, characterTitle:{ - lijue:"体力上限:6", + //lijue:"体力上限:6", }, perfectPair:{ lijue:['guosi','jiaxu'], @@ -71,12 +71,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_yisuan":{ usable:1, audio:2, - init:function (player){ - if(player.hasStockSkill('xinfu_yisuan')&&!player.storage.xinfu_yisuan){ - player.gainMaxHp(2); - player.storage.xinfu_yisuan=true; - } - }, trigger:{ player:"useCardAfter", }, @@ -2056,7 +2050,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skillAnimation:true, content:function (){ "step 0" - trigger.source.chooseBool('【许身】:是否将自己的武将牌替换为关索?').set('ai',function(){ + trigger.source.chooseBool('【许身】:是否将自己的一张武将牌替换为“关索”?').set('ai',function(){ return true; }); "step 1" @@ -2069,12 +2063,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else event.finish(); "step 2" - var num=4; - if(game.zhu==trigger.source&&game.players.length>=5){ - if(trigger.source.name2!=undefined) num++; - num++; - } - trigger.source.reinit(result.control,'guansuo',num); + trigger.source.reinit(result.control,'guansuo'); player.recover(); player.addSkill('xinfu_zhennan'); }, @@ -3479,8 +3468,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ forced:true, filter:function (event,player){ if(!event.source) return false; - if(event.source.getAttackRange()==3) return false; - if(event.source.getAttackRange()<3&&event.num<=1) return false; + var range=event.source.getAttackRange(); + if(range==3) return false; + if(range<3&&event.num<=1) return false; return true; }, priority:-9.5, @@ -4968,6 +4958,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "xinfu_jijie":{ enable:"phaseUse", usable:1, + audio:2, filter:function(){ return ui.cardPile.hasChildNodes(); }, @@ -5010,6 +5001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ global:["gainEnd","dying"], }, priority:6, + audio:2, filter:function (event,player){ if(event.name=='dying') return true; if(['gainPlayerCard','gainMultiple'].contains(event.parent.name)) return false; @@ -5026,6 +5018,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, "xinfu_daigong":{ usable:1, + audio:2, trigger:{ player:"damageBegin", }, @@ -5063,6 +5056,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, enable:"phaseUse", usable:1, + audio:2, init:function (player,skill){ if(!player.storage[skill]) player.storage[skill]=[]; }, @@ -5147,6 +5141,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "xinfu_qianchong":{ + audio:3, mod:{ targetInRange:function (card,player,target){ if(player.storage.xinfu_qianchong.contains(get.type(card,'trick'))){ @@ -5213,6 +5208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "qc_weimu":{ + audio:"xinfu_qianchong", mod:{ targetEnabled:function (card,player,target){ var bool=true; @@ -5227,7 +5223,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "qc_mingzhe":{ - audio:2, + audio:"xinfu_qianchong", trigger:{ player:["useCardAfter","respondAfter","discardAfter"], }, @@ -5260,6 +5256,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ trigger:{ global:"phaseEnd", }, + audio:2, filter:function (event,player){ return player.storage.xinfu_shangjian<=player.hp&&player.storage.xinfu_shangjian>0; }, diff --git a/character/yijiang.js b/character/yijiang.js index 688a6b261..4cdd7909c 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -7352,10 +7352,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, skillAnimation:true, content:function(){ - "step 0" - player.chooseTarget(get.prompt('zhuiyi'),function(card,player,target){ + var next=game.createEvent('zhuiyi',null,trigger.parent); + next.forceDie=true; + next.player=player; + if(trigger.source) next.source=trigger.source; + next.setContent(lib.skill.zhuiyi.contentx); + }, + contentx:function(){ + "step 0" + player.chooseTarget(get.prompt2('zhuiyi'),function(card,player,target){ return player!=target&&_status.event.source!=target; - }).set('ai',function(target){ + }).set('forceDie',true).set('ai',function(target){ var num=get.attitude(_status.event.player,target); if(num>0){ if(target.hp==1){ @@ -7366,22 +7373,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } return num; - }).set('source',trigger.source); + }).set('source',event.source); "step 1" if(result.bool){ - var target=result.targets[0]; - var next=game.createEvent('zhuiyi',null,trigger.parent); - next.player=target; - next.source=player; - next.setContent(lib.skill.zhuiyi.contentx); + var target=result.targets[0]; + player.logSkill('zhuiyi',target); + player.line(target,'green'); + target.recover(); + target.draw(3); } }, - contentx:function(){ - event.source.logSkill('zhuiyi',player); - event.source.line(player,'green'); - player.recover(); - player.draw(3); - }, ai:{ expose:0.5, } @@ -7442,7 +7443,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ for(var i=0;i=0&&num20) return -3; + return -1; + } } return 0; } @@ -7450,7 +7454,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return 1; } }, - player:0.1 + player:1, } } }, @@ -8512,30 +8516,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ "step 0" - player.chooseTarget([1,2],get.prompt('xuanfeng'),function(card,player,target){ + event.count=2; + "step 1" + player.chooseTarget(get.prompt('xuanfeng'),function(card,player,target){ if(player==target) return false; - return target.countCards('he'); + return target.countDiscardableCards(player,'he'); }).set('ai',function(target){ return -get.attitude(_status.event.player,target); }); - "step 1" + "step 2" if(result.bool){ player.logSkill('xuanfeng',result.targets); - event.targets=result.targets - if(result.targets.length==1){ - player.discardPlayerCard(event.targets[0],'he',[1,2],true); - } - else{ - player.discardPlayerCard(event.targets[0],'he',true); - } - } - else{ - event.finish(); - } - "step 2" - if(targets.length==2){ - player.discardPlayerCard(targets[1],'he',true); + player.line(result.targets,'green'); + player.discardPlayerCard(result.targets[0],'he',true); + event.count--; } + else event.finish(); + "step 3" + if(event.count) event.goto(1); }, ai:{ effect:{ diff --git a/game/game.js b/game/game.js index 638ce938c..83e3b9e9f 100644 --- a/game/game.js +++ b/game/game.js @@ -9246,6 +9246,7 @@ wuColor:"#b2d9a9", qunColor:"#f6f6f6", shenColor:"#ffe14c", + westernColor:"#ffe14c", basic:'基本', equip:'装备', trick:'锦囊', @@ -11576,10 +11577,12 @@ if(event.prompt2){ event.dialog.addText(event.prompt2,event.prompt2.length<=20); } - event.promptbar=event.dialog.add('0/'+get.numStr(get.select(event.selectTarget)[1],'target')); - event.custom.add.target=function(){ - _status.event.promptbar.innerHTML= - ui.selected.targets.length+'/'+get.numStr(get.select(event.selectTarget)[1],'target'); + if(event.promptbar!='none'){ + event.promptbar=event.dialog.add('0/'+get.numStr(get.select(event.selectTarget)[1],'target')); + event.custom.add.target=function(){ + _status.event.promptbar.innerHTML= + ui.selected.targets.length+'/'+get.numStr(get.select(event.selectTarget)[1],'target'); + } } } else if(get.itemtype(event.dialog)=='dialog'){ @@ -14452,14 +14455,17 @@ } } + var hp1=get.infoHp(info[2]); + var maxHp1=get.infoMaxHp(info[2]); + this.node.avatar.show(); this.node.count.show(); this.node.equips.show(); this.name=character; this.sex=info[0]; this.group=info[1]; - this.hp=info[2]; - this.maxHp=info[2]; + this.hp=hp1; + this.maxHp=maxHp1; this.hujia=0; this.node.intro.innerHTML=lib.config.intro; this.node.name.dataset.nature=get.groupnature(this.group); @@ -14489,7 +14495,8 @@ this.node.avatar2.show(); this.name2=character2; - var hp1=info[2],hp2=info2[2]; + var hp2=get.infoHp(info2[2]); + var maxHp2=get.infoMaxHp(info2[2]); var double_hp; if(_status.connectMode){ double_hp='pingjun'; @@ -14499,16 +14506,31 @@ } switch(double_hp){ case 'pingjun':{ - this.maxHp=Math.floor((hp1+hp2)/2); - this.singleHp=((hp1+hp2)%2===1); + this.maxHp=Math.floor((maxHp1+maxHp2)/2); + this.hp=Math.floor((hp1+hp2)/2); + this.singleHp=((maxHp1+maxHp2)%2===1); break; } - case 'zuidazhi':this.maxHp=Math.max(hp1,hp2);break; - case 'zuixiaozhi':this.maxHp=Math.min(hp1,hp2);break; - case 'zonghe':this.maxHp=hp1+hp2;break; - default:this.maxHp=hp1+hp2-3; + case 'zuidazhi':{ + this.maxHp=Math.max(maxHp1,maxHp2); + this.hp=Math.max(hp1,hp2); + break; + } + case 'zuixiaozhi':{ + this.maxHp=Math.min(maxHp1,maxHp2); + this.hp=Math.min(hp1,hp2); + break; + } + case 'zonghe':{ + this.maxHp=maxHp1+maxHp2; + this.hp=hp1+hp2; + break; + } + default:{ + this.maxHp=maxHp1+maxHp2-3; + this.hp=hp1+hp2-3; + }; } - this.hp=this.maxHp; this.node.count.classList.add('p2'); skills=skills.concat(info2[3]); @@ -14692,7 +14714,7 @@ } else{ if(typeof maxHp!='number'){ - maxHp=info2[2]; + maxHp=get.infoMaxHp(info2[2]); } num=maxHp-info1[2]; } @@ -18890,16 +18912,16 @@ } return num; }, - getAttackRange:function(){ + getAttackRange:function(raw){ var player=this; var range=0; - range=game.checkMod(player,player,range,'globalFrom',player); + if(raw) range=game.checkMod(player,player,range,'globalFrom',player); range=game.checkMod(player,player,range,'attackFrom',player); var equips=player.getCards('e'); for(var i=0;i '+card[1]; + this.node.info.innerHTML=get.translation(card[0])+' '+cardnum; } if(info.addinfo){ if(!this.node.addinfo){ @@ -21254,7 +21280,7 @@ this.node.name.classList.add('longlong'); } } - this.node.name2.innerHTML=get.translation(card[0])+card[1]+' '+name; + this.node.name2.innerHTML=get.translation(card[0])+cardnum+' '+name; this.suit=card[0]; this.number=parseInt(card[1])||0; this.name=card[2]; @@ -22727,8 +22753,8 @@ var name2=info[4][j].slice(9); var info2=lib.character[name2]; player.storage.dualside.push(name2); - player.storage.dualside.push(info2[2]); - player.storage.dualside.push(info2[2]); + player.storage.dualside.push(get.infoHp(info2[2])); + player.storage.dualside.push(get.infoMaxHp(info2[2])); } } } @@ -23175,7 +23201,7 @@ if(!trigger.notLink()) event.finish(); "step 1" event.targets=game.filterPlayer(function(current){ - return current.isLinked(); + return current!=event.player&¤t.isLinked(); }); lib.tempSortSeat=_status.currentPhase||player; event.targets.sort(lib.sort.seat); @@ -24176,7 +24202,7 @@ } }, suit:['club','spade','diamond','heart'], - group:['wei','shu','wu','qun','shen','western'], + group:['wei','shu','wu','qun','shen'], nature:['fire','thunder','poison'], linked:['fire','thunder'], groupnature:{ @@ -35094,7 +35120,8 @@ } } var hp=page.querySelector('input.new_hp').value; - hp=parseInt(hp)||1; + if(hp=='Infinity') hp=Infinity; + else if(hp.indexOf('/')==-1) hp=parseInt(hp)||1; var skills=[]; for(var i=0;i14){ - node.node.hp.innerHTML=get.numStr(infoitem[2]); + if(typeof infoitem[2]=='string'||infoitem[2]>14){ + if(typeof infoitem[2]=='string') node.node.hp.innerHTML=infoitem[2]; + else node.node.hp.innerHTML=get.numStr(infoitem[2]); node.node.hp.classList.add('text'); } else{ @@ -42816,7 +42844,7 @@ var range=get.info(this).range; if(range){ if(typeof range.attack==='number'){ - player.createRangeShadow(Math.min(8,player.getAttackRange()+range.attack-1)); + player.createRangeShadow(Math.min(8,player.getAttackRange(true)+range.attack-1)); } else if(typeof range.global==='number'){ player.createRangeShadow(Math.min(8,player.getGlobalFrom()+range.global)); @@ -44469,6 +44497,20 @@ }, }; var get={ + infoHp:function(hp){ + if(typeof hp=='number') return hp; + else if(typeof hp=='string'&&hp.indexOf('/')!=-1){ + return parseInt(hp.slice(0,hp.indexOf('/'))); + } + return 0; + }, + infoMaxHp:function(hp){ + if(typeof hp=='number') return hp; + else if(typeof hp=='string'&&hp.indexOf('/')!=-1){ + return parseInt(hp.slice(hp.indexOf('/')+1)); + } + return 0; + }, is:{ converted:function(event){ return !(event.cards&&event.card&&event.cards.length==1&&event.cards[0]==event.card); @@ -46146,11 +46188,15 @@ } } if(str.suit&&str.number){ + var cardnum=str.number||''; + if([1,11,12,13].contains(cardnum)){ + cardnum={'1':'A','11':'J','12':'Q','13':'K'}[cardnum] + } if(arg=='viewAs'&&str.viewAs!=str.name&&str.viewAs){ str2+='('+get.translation(str)+')'; } else{ - str2+='【'+get.translation(str.suit)+str.number+'】'; + str2+='【'+get.translation(str.suit)+cardnum+'】'; // var len=str2.length-1; // str2=str2.slice(0,len)+''+str2[len]+'·'+get.translation(str.suit)+str.number; } @@ -46737,8 +46783,8 @@ node=node.link; } var capt=get.translation(node.name); - if(lib.character[node.name]&&lib.character[node.name][1]){ - capt+='  '+lib.translate[lib.character[node.name][1]]; + if(lib.character[node.name]&&(lib.character[node.name][1]||lib.group.contains(node.group))){ + capt+='  '+(lib.group.contains(node.group)?get.translation(node.group):lib.translate[lib.character[node.name][1]]); } uiintro.add(capt); diff --git a/game/update.js b/game/update.js index b0b3f24cd..1711f250e 100644 --- a/game/update.js +++ b/game/update.js @@ -1,33 +1,26 @@ window.noname_update={ - version:'1.9.90', - update:'1.9.89.4', + version:'1.9.90.1', + update:'1.9.90', changeLog:[ - '手杀武将单独分包', - '统率三军文聘和诸葛瑾', - '英文版三国杀特典武将凯撒', - '其他bug修复', - 'players://["kaisa"]', + '神武将选择势力(仅限单机身份模式)', + 'bug修复', ], files:[ - 'card/standard.js', - 'character/diy.js', + 'card/extra.js', + 'card/guozhan.js', 'character/extra.js', - 'character/mobile.js', - 'character/old.js', - 'character/sp.js', - 'character/yijiang.js', 'character/refresh.js', 'character/shenhua.js', + 'character/sp.js', + 'character/standard.js', 'character/xinghuoliaoyuan.js', - 'character/yxs.js', + 'character/yijiang.js', 'mode/boss.js', 'mode/guozhan.js', + 'mode/identity.js', 'mode/versus.js', - //'game/asset.js', - 'game/config.js', 'game/game.js', - 'game/package.js', - 'game/source.js', - //'game/package.js' + 'layout/default/layout.css', + 'layout/mobile/layout.css', ] }; diff --git a/layout/default/layout.css b/layout/default/layout.css index 7ca5d9e53..eab5feb22 100644 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -2469,6 +2469,10 @@ div:not(.handcards)>.card>.info>span, border-radius: 21px; z-index: 1 } +.equips>.equip6 { + bottom: 3; + left: calc(50% - 21px); +} .equips>div>div:not(.image),.judges>div>div:not(.image),.marks>div>div:not(.image) { display: none; } @@ -3689,6 +3693,11 @@ span[data-nature='firemx'] { text-shadow: black 0 0 1px,rgba(191, 0, 0,0.2) 0 0 2px,rgba(191, 0, 0,1) 0 0 2px,rgba(191, 0, 0,1) 0 0 5px, rgba(191, 0, 0,1) 0 0 5px,black 0 0 1px; } +div[data-nature='firemm'], +span[data-nature='firemm'] { + text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 2px, + rgba(232, 53, 53,1) 0 0 2px,black 0 0 1px; +} .player .identity[data-color="mingzhong"] { text-shadow: black 0 0 1px,rgba(255, 120, 0,1) 0 0 2px,rgba(255, 120, 0,1) 0 0 5px,rgba(255, 120, 0,1) 0 0 10px, diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index 9f7ecdeb4..5465d1c67 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -188,6 +188,7 @@ #arena:not(.chess) .player[data-position='0']>.equips>.equip2{top: 10px;right: 10px;} #arena:not(.chess) .player[data-position='0']>.equips>.equip3{bottom: 10px;left: 10px;} #arena:not(.chess) .player[data-position='0']>.equips>.equip4{bottom: 10px;right: 10px;} +#arena:not(.chess) .player[data-position='0']>.equips>.equip6{bottom: 10px;right: 10px;} #arena:not(.chess) .player[data-position='0']>.name, #arena:not(.chess) .player[data-position='0'].linked>.name{ @@ -305,7 +306,8 @@ top:20px; } #arena.mobile.oblongcard:not(.chess):not(.textequip) .player[data-position='0']>.equips>.equip3, -#arena.mobile.oblongcard:not(.chess):not(.textequip) .player[data-position='0']>.equips>.equip4{ +#arena.mobile.oblongcard:not(.chess):not(.textequip) .player[data-position='0']>.equips>.equip4, +#arena.mobile.oblongcard:not(.chess):not(.textequip) .player[data-position='0']>.equips>.equip6{ bottom:20px; } diff --git a/mode/boss.js b/mode/boss.js index 5f3774617..869449854 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -737,13 +737,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ characterPack:{ mode_boss:{ boss_hundun:['male','shen',25,['boss_xiongshou','boss_wuzang','boss_xiangde','boss_yinzei','boss_yinzei_switch'],['qun','boss','bossallowed'],'qun'], - boss_qiongqi:['male','shen',20,['boss_xiongshou','boss_zhue','boss_futai','boss_yandu','boss_yandu_switch'],['qun','boss','bossallowed'],'qun'], + boss_qiongqi:['male','shen','20/25',['boss_xiongshou','boss_zhue','boss_futai','boss_yandu','boss_yandu_switch'],['qun','boss','bossallowed'],'qun'], boss_taotie:['male','shen',20,['boss_xiongshou','boss_tanyu','boss_cangmu','boss_jicai','boss_jicai_switch'],['qun','boss','bossallowed'],'qun'], boss_taowu:['male','shen',25,['boss_xiongshou','boss_minwan','boss_nitai','boss_luanchang','boss_luanchang_switch'],['qun','boss','bossallowed'],'qun'], boss_zhuyin:['male','shen',4,['boss_xiongshou'],['qun','hiddenboss','bossallowed'],'qun'], boss_xiangliu:['male','shen',25,['boss_yaoshou','boss_duqu','boss_jiushou','boss_echou','boss_echou_switch'],['qun','boss','bossallowed'],'qun'], - boss_zhuyan:['male','shen',25,['boss_yaoshou','boss_bingxian','boss_juyuan','boss_xushi','boss_xushi_switch'],['qun','boss','bossallowed'],'qun'], + boss_zhuyan:['male','shen','25/30',['boss_yaoshou','boss_bingxian','boss_juyuan','boss_xushi','boss_xushi_switch'],['qun','boss','bossallowed'],'qun'], boss_bifang:['male','shen',25,['boss_yaoshou','boss_zhaohuo','boss_honglianx','boss_yanyu','boss_yanyu_switch'],['qun','boss','bossallowed'],'qun'], boss_yingzhao:['male','shen',25,['boss_yaoshou','boss_fengdong','boss_xunyou','boss_sipu','boss_sipu_switch'],['qun','boss','bossallowed'],'qun'], @@ -1905,7 +1905,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{global:'gameStart'}, content:function(){ player.disableSkill('boss_xushi_awake','boss_xushi'); - player.gainMaxHp(5); }, silent:true }, @@ -2575,7 +2574,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{global:'gameStart'}, content:function(){ player.disableSkill('boss_yandu_awake','boss_yandu'); - player.gainMaxHp(5); }, silent:true }, @@ -5665,11 +5663,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ group:['boss_manjia1','boss_manjia2'] }, boss_manjia1:{ - trigger:{target:'useCardToBefore'}, + trigger:{target:['useCardToBefore','shaBegin']}, forced:true, priority:6, - filter:function(event,player){ + filter:function(event,player,name){ if(player.getEquip(2)) return false; + if(name=='shaBegin') return lib.skill.tengjia3.filter(event,player); return lib.skill.tengjia1.filter(event,player); }, content:function(){ @@ -7484,7 +7483,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ shenqu:'神躯', shenqu_info:'每名角色的准备阶段,若你的手牌数少于或等于你的体力上限数,你可以摸两张牌;当你受到伤害后,你可以使用一张【桃】', jiwu:'极武', - jiwu_info:'出牌阶段,你可以弃置一张手牌,然后获得一项:“强袭”、“烈刃”、“旋风”、“完杀”,直到回合结束', + jiwu_info:'出牌阶段,你可以弃置一张牌,然后获得一项:“强袭”、“铁骑”(界)、“旋风”、“完杀”,直到回合结束', mode_boss_card_config:'挑战卡牌', mode_boss_character_config:'挑战武将', diff --git a/mode/guozhan.js b/mode/guozhan.js index 2ded9dcfd..27d0938c6 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -808,6 +808,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ init:function(player){player.storage.gzweidi=[]}, enable:'phaseUse', usable:1, + filter:function(event,player){ + return player.storage.gzweidi.length>0 + }, filterTarget:function(card,player,target){return target!=player&&player.storage.gzweidi.contains(target)}, content:function(){ 'step 0' @@ -852,7 +855,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ trigger:{global:'gainBefore'}, silent:true, filter:function(event,player){ - if(player.storage.gzweidi.contains(event.player)||_status.currentPhase!=player) return false; + if(player==event.player||player.storage.gzweidi.contains(event.player)||_status.currentPhase!=player) return false; if(event.cards.length){ if(event.getParent().name=='draw') return true; for(var i=0;i
是否与'+get.translation(trigger.player)+'交换装备区内坐骑牌'); + player.chooseBool('是否发动【总御】,与'+get.translation(trigger.player)+'交换装备区内坐骑牌?'); 'step 1' if(result.bool){ player.logSkill('gzzongyu_others',trigger.player); @@ -2459,7 +2462,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ filterTarget:function (card,player,target){ if(player==target) return false; for(var i=0;i0; }, diff --git a/mode/identity.js b/mode/identity.js index 83587ba63..4194ec7cb 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -617,6 +617,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(typeof lib.config.test_game=='string'&&player==game.me.next){ player.init(lib.config.test_game); } + if(player.group=='shen'){ + var list=lib.group.slice(0); + list.remove('shen'); + if(list.length) player.group=list.randomGet(); + } + player.node.name.dataset.nature=get.groupnature(player.group); } next.setContent(function(){ "step 0" @@ -1143,22 +1149,49 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ui.cheat2.close(); delete ui.cheat2; } + var chooseGroup=false; if(event.chosen.length){ - game.me.init(event.chosen[0],event.chosen[1]); + if(lib.character[event.chosen[0]][1]=='shen'){ + chooseGroup=true; + } } else if(event.modchosen){ if(event.modchosen[0]=='random') event.modchosen[0]=result.buttons[0].link; else event.modchosen[1]=result.buttons[0].link; - game.me.init(event.modchosen[0],event.modchosen[1]); } else if(result.buttons.length==2){ - game.me.init(result.buttons[0].link,result.buttons[1].link); + event.choosed=[result.buttons[0].link,result.buttons[1].link]; game.addRecentCharacter(result.buttons[0].link,result.buttons[1].link); + if(lib.character[event.choosed[0]][1]=='shen'){ + chooseGroup=true; + } } else{ - game.me.init(result.buttons[0].link); + event.choosed=[result.buttons[0].link]; + if(lib.character[event.choosed[0]][1]=='shen'){ + chooseGroup=true; + } game.addRecentCharacter(result.buttons[0].link); } + if(chooseGroup){ + var list=lib.group.slice(0); + list.remove('shen'); + game.me.chooseControl(list).prompt='请选择神武将的势力'; + } + "step 2" + event.group=result.control||false; + if(event.chosen.length){ + game.me.init(event.chosen[0],event.chosen[1]); + } + else if(event.modchosen){ + game.me.init(event.modchosen[0],event.modchosen[1]); + } + else if(event.choosed.length==2){ + game.me.init(event.choosed[0],event.choosed[1]); + } + else{ + game.me.init(event.choosed[0]); + } event.list.remove(game.me.name); event.list.remove(game.me.name2); if(game.me==game.zhu&&game.players.length>4){ @@ -1171,6 +1204,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.ai(game.players[i],event.list.splice(0,get.config('choice_'+game.players[i].identity)),null,event.list) } } + "step 3" + if(event.group){ + game.me.group=event.group; + game.me.node.name.dataset.nature=get.groupnature(game.me.group); + game.me.update(); + } + "step 4" setTimeout(function(){ ui.arena.classList.remove('choose-character'); },500); diff --git a/mode/versus.js b/mode/versus.js index 15943de8f..c24660e4d 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -98,8 +98,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.prepareArena(2); } else if(_status.mode=='three'){ - lib.character.wenpin[3]=['zhenwei_three']; - lib.character.zhugejin[3]=['hongyuan','huanshi_three','mingzhe']; + if(lib.character.wenpin) lib.character.wenpin[3]=['zhenwei_three']; + if(lib.character.zhugejin) lib.character.zhugejin[3]=['hongyuan','huanshi_three','mingzhe']; if(!get.config('enable_all_cards')){ lib.translate.wuzhong_info+='若对方存活角色多于己方,则额外摸一张牌'; lib.translate.zhuge_info='锁定技,出牌阶段,你使用杀的次数上限+3'; @@ -4239,14 +4239,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ unique:true, content:function(){ "step 0" - event.players=get.players(player); + event.players=game.filterPlayer(function(current){ + return current.isEnemyOf(player); + }); "step 1" if(event.players.length){ var current=event.players.shift(); - if(current.isEnemyOf(player)){ - player.line(current,'fire'); - current.damage('fire'); - } + player.line(current,'fire'); + current.damage('fire'); event.redo(); } }, @@ -4820,7 +4820,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.cards=get.cards(3); event.cards2=[]; for(var i=0;i