diff --git a/card/hearth.js b/card/hearth.js index 5f21c0eb2..ea118272e 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -102,13 +102,13 @@ card.hearth={ var js=target.get('j'); if(js.length){ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; - if(jj.name=='guohe') return 3; + if(jj.name=='zhaomingdan') return 3; if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){ - return 0.5; + return 0; } return 3; } - return 0.5; + return 0.1; } } } diff --git a/character/gujian.js b/character/gujian.js index 0a741a6f7..7a172d959 100644 --- a/character/gujian.js +++ b/character/gujian.js @@ -218,6 +218,9 @@ character.gujian={ } event.finish(); } + else if(info.notarget){ + player.useCard(card); + } else{ var next=player.chooseTarget('选择'+get.translation(name)+'的目标'); next._get_card=card; @@ -716,6 +719,7 @@ character.gujian={ filter:function(event,player){ return event.source&&event.source!=player&&event.source.num('h')>0; }, + logTarget:'source', content:function(){ "step 0" trigger.source.chooseCard('交给'+get.translation(player)+'一张手牌',true).ai=function(card){ @@ -1637,7 +1641,7 @@ character.gujian={ yanjia:'偃甲', yanjia_info:'出牌阶段,你可以将两张装备牌合成为一张强化装备', xiuhua:'袖花', - xiuhua_info:'每当一件装备因被替换或弃置进入弃牌堆,你可以获得之', + xiuhua_info:'每当一件其他角色的装备因被替换或弃置进入弃牌堆,你可以获得之', liuying:'流影', liuying_info:'每当你使用一张杀,你可以指定一名不是此杀目标的角色并进行一次判定,若结果是黑色,将其追加为杀的额外目标并可以再次判定', boyun:'拨云', diff --git a/character/ow.js b/character/ow.js index b4fab7826..3941c15fe 100644 --- a/character/ow.js +++ b/character/ow.js @@ -248,7 +248,7 @@ character.ow={ unique:true, init2:function(player){ if(!player.storage.zhongdun){ - player.changeHujia(game.players.length); + player.changeHujia(8); player.storage.zhongdun=true; } }, @@ -2973,7 +2973,7 @@ character.ow={ mengji:'猛击', mengji_info:'锁定技,若你已发动重盾,当你没有护甲时,你的杀造成的伤害+1', zhongdun:'重盾', - zhongdun_info:'游戏开始时,你获得等同于游戏人数护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', + zhongdun_info:'游戏开始时,你获得8点护甲;出牌阶段限一次,你可以弃置一张牌并将一点护甲分给一名没有护甲的其他角色', paotai:'炮台', paotai2:'炮台', paotai_info:'出牌阶段,你可以弃置一张杀布置或升级一个炮台(最高3级);回合结束阶段,炮台有一定机率对一名随机敌人造成一点火焰伤害;每当你受到一点伤害,炮台降低一级', diff --git a/character/standard.js b/character/standard.js index 797ea54e1..e9bc9ea6a 100644 --- a/character/standard.js +++ b/character/standard.js @@ -318,7 +318,11 @@ character.standard={ tiandu:{ audio:4, trigger:{player:'judgeEnd'}, - frequent:true, + frequent:'check', + check:function(event){ + if(event.result.card.name=='du') return false; + return true; + }, filter:function(event,player){ if(get.owner(event.result.card)){ return false; diff --git a/character/swd.js b/character/swd.js index 2277cf734..95202b5a4 100644 --- a/character/swd.js +++ b/character/swd.js @@ -4073,7 +4073,7 @@ character.swd={ var att=ai.get.attitude(player,trigger.player); var nh=player.num('h'); var next=player.chooseToDiscard(get.prompt('susheng',trigger.player)); - next.logSkill='susheng'; + next.logSkill=['susheng',trigger.player]; next.ai=function(card){ if(att>3||(att>1&&nh>2)){ return ai.get.unuseful2(card); diff --git a/extension/boss/extension.js b/extension/boss/extension.js index 72a43cdc6..d10f264eb 100644 --- a/extension/boss/extension.js +++ b/extension/boss/extension.js @@ -5,8 +5,6 @@ play.boss={ lib.characterPack.mode_extension_boss={ boss_zhangchunhua:['female','wei',4,['jueqing','wuxin','shangshix'],['boss','bossallowed'],'wei'], boss_zhenji:['female','wei',4,['tashui','lingbo','jiaoxia','fanghua'],['boss','bossallowed'],'wei'], - // boss_liubei:['male','shu',5,['lingfeng'],['boss','bossallowed'],'qun'], - // boss_zhugeliang:['male','shu',4,[],['boss','bossallowed'],'qun'], boss_huangyueying:['female','shu',4,['boss_gongshen','boss_jizhi','qicai','boss_guiyin'],['boss','bossallowed'],'wei'], boss_pangtong:['male','shu',4,['boss_tianyu','qiwu','niepan','boss_yuhuo'],['boss','bossallowed'],'zhu'], boss_zhaoyun:['male','shu',1,['boss_juejing','longhun','zhanjiang'],['boss','bossallowed'],'qun'], @@ -41,6 +39,12 @@ play.boss={ boss_huatuo:['male','qun',6,['chulao','mazui','boss_shengshou','guizhen','wuqin'],['boss','bossallowed'],'wu'], boss_dongzhuo:['male','qun',20,['jiuchi','boss_qiangzheng','boss_baolin'],['boss','bossallowed'],'shu'], // boss_shuijing:['male','qun',8,[],['boss','bossallowed'],'wei'], + + + boss_liubei:['male','shu',12,['xiaoxiong','boss_zhangwu'],['boss','bossallowed'],'qun'], + boss_zhugeliang:['male','shu',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['boss','bossallowed'],'qun'], + boss_guojia:['male','wei',4,['tiandu','boss_guimou','boss_yuance','boss_qizuo'],['boss','bossallowed'],'zhu'], + boss_caocao:['male','wei',12,['boss_guixin','xiongcai'],['boss','bossallowed'],'wei'], }; for(var i in lib.characterPack.mode_extension_boss){ lib.characterPack.mode_extension_boss[i][4].push('mode:boss'); diff --git a/game/game.js b/game/game.js index 807da7054..7c369e0e1 100644 --- a/game/game.js +++ b/game/game.js @@ -3722,7 +3722,7 @@ } }, init:{ - bind:function(){ + init:function(){ if(window.cordovaLoadTimeout){ clearTimeout(window.cordovaLoadTimeout); delete window.cordovaLoadTimeout; @@ -4172,8 +4172,7 @@ _status.windowLoaded=true; } }; - }, - init:function(){ + if(window.noname_update){ lib.version=window.noname_update.version; lib.changeLog=window.noname_update.changeLog; @@ -5264,6 +5263,7 @@ proceed(); } localStorage.removeItem(lib.configprefix+'directstart'); + delete lib.init.init; }, startOnline:function(){ 'step 0' @@ -15502,7 +15502,7 @@ // else{ // trigger.start=trigger.source||trigger.player; // } - var str=get.translation(trigger.player.name)+'濒死,是否帮助?
当前体力:'+trigger.player.hp+'
'; + var str=get.translation(trigger.player.name)+'濒死,是否帮助?
当前体力:'+trigger.player.hp+'
'; _status.dying=event.dying; if(lib.config.tao_enemy&&event.dying.side!=player.side&&lib.config.mode!='identity'&&lib.config.mode!='guozhan'){ event._result={bool:false} @@ -23238,6 +23238,9 @@ if(mode.indexOf('mode_')!=0){ page.appendChild(cfgnode); } + else{ + page.style.paddingTop='8px'; + } var banCard=function(e){ if(_status.clicked){ _status.clicked=false; @@ -33092,10 +33095,26 @@ } break; } + case 'character':case 'characters':{ + if(typeof content=='string'){ + content=[content]; + } + if(dialog&&Array.isArray(content)){ + dialog.addAuto([content,'character']); + return false; + } + else{ + if(content&&content.length){ + return get.translation(content); + } + return false; + } + break; + } default:{ if(typeof type=='string'){ type=type.replace(/#/g,content); - type.replace(/\$/g,get.cnNumber(content)); + type.replace(/&/g,get.cnNumber(content)); return type; } else if(typeof type=='function'){ @@ -34245,6 +34264,5 @@ } }, }; - lib.init.bind(); lib.init.init(); }()); diff --git a/game/update.js b/game/update.js index db0224f55..023cfffe8 100644 --- a/game/update.js +++ b/game/update.js @@ -1,8 +1,9 @@ window.noname_update={ - version:'1.9.7.2', + version:'1.9.7.3', update:'1.9.7', changeLog:[ 'bug修复', + '新boss', ], files:[ 'game/game.js', @@ -10,23 +11,25 @@ window.noname_update={ // 'game/package.js', // 'game/asset.js', // 'game/source.js', - // 'card/hearth.js', + 'card/hearth.js', 'card/swd.js', // 'card/gujian.js', // 'card/sp.js', // 'card/guozhan.js', // 'character/rank.js', // 'character/extra.js', - // 'character/ow.js', + 'character/ow.js', // 'character/hearth.js', // 'character/refresh.js', // 'character/shenhua.js', + 'character/standard.js', // 'character/sp.js', // 'character/xianjian.js', - // 'character/swd.js', + 'character/swd.js', // 'character/yxs.js', + 'character/gujian.js', 'character/yijiang.js', - // 'mode/boss.js', + 'mode/boss.js', // 'mode/chess.js', // 'mode/versus.js', // 'mode/guozhan.js', @@ -39,5 +42,6 @@ window.noname_update={ // 'layout/mobile/layout.css', // 'layout/newlayout/global.css', // 'layout/mode/stone.css', + 'extension/boss/extension.js', ] } diff --git a/mode/boss.js b/mode/boss.js index 86e3780c1..bc45c0a3d 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -78,7 +78,8 @@ mode.boss={ var list=[]; for(var i in lib.character){ var info=lib.character[i]; - if(info[4].contains('boss')&&get.config(i+'_boss_config')){ + if(info[4].contains('boss')){ + if(lib.characterPack.mode_boss[i]&&!get.config(i+'_boss_config')) continue; var cfg=i+'_bossconfig'; if(get.config(cfg)==undefined){ game.saveConfig(cfg,true,true); @@ -188,8 +189,8 @@ mode.boss={ var rect=event.current.getBoundingClientRect(); var boss=ui.create.player(); boss.getId(); - boss.init(event.current.name); game.boss=boss; + boss.init(event.current.name); boss.side=true; boss.node.equips.style.opacity='0'; if(!event.noslide){ @@ -423,10 +424,10 @@ mode.boss={ // boss_shuijing:['male','qun',8,[],['boss','bossallowed'],'wei'], // boss_sunshangxiang:['male','qun',8,[],['boss','bossallowed'],'wei'], - // boss_liubei:['male','shu',5,['lingfeng'],['boss','bossallowed'],'qun'], - // boss_zhugeliang:['male','shu',4,[],['boss','bossallowed'],'qun'], - // boss_guojia:['male','wei',4,[],['boss','bossallowed'],'zhu'], - // boss_caocao:['male','wei',4,[],['boss','bossallowed'],'wei'], + boss_liubei:['male','shu',12,['xiaoxiong','boss_zhangwu'],['boss','bossallowed'],'qun'], + boss_zhugeliang:['male','shu',Infinity,['xiangxing','yueyin','fengqi','gaiming'],['boss','bossallowed'],'qun'], + boss_guojia:['male','wei',4,['tiandu','boss_guimou','boss_yuance','boss_qizuo'],['boss','bossallowed'],'zhu'], + boss_caocao:['male','wei',12,['boss_guixin','xiongcai'],['boss','bossallowed'],'wei'], } }, init:function(){ @@ -823,20 +824,582 @@ mode.boss={ }, }, skill:{ - _bossswap:{ - trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', - 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', - 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, - forced:true, - priority:100, - popup:false, + boss_qizuo:{ + trigger:{player:'useCardAfter'}, filter:function(event,player){ - if(!get.config('single_control')) return false; - if(event.autochoose&&event.autochoose()) return false; - return player.isUnderControl(); + if(event.parent.name=='boss_qizuo') return false; + if(!event.targets||!event.card) return false; + if(event.card&&event.card.name=='wuxie') return false; + var type=get.type(event.card); + if(type!='trick') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number,event.card.nature); + for(var i=0;i=0){ + if(att1+att2>0){ + return '选项二'; + } + else{ + return '选项一'; + } + } + else{ + if(trigger.player.isHealthy()&&trigger.source.isHealthy()) return rand; + if(trigger.player.isHealthy()){ + if(att1<0) return '选项二'; + if(att1>0&&!stop) return '选项一'; + } + if(trigger.source.isHealthy()){ + if(att2<0) return '选项二'; + if(att2>0&&!stop) return '选项一'; + } + if(stop) return 'cancel2'; + return rand; + } + }).set('prompt',get.prompt('boss_yuance')+ + '

选项一:若结果为黑色,受伤害角色失去一点体力,否则伤害来源失去一点体力

选项二:若结果为红色,受伤害角色回复一点体力,否则伤害来源回复一点体力
'); + 'step 1' + var att1=ai.get.attitude(player,trigger.player); + var att2=ai.get.attitude(player,trigger.source); + if(result.control=='选项一'){ + event.type=1; + player.judge(function(card){ + if(get.color(card)=='black'){ + if(att1>0) return -1; + if(att1<0) return 1; + } + else{ + if(att2>0) return -1; + if(att2<0) return 1; + } + return 0; + }); + } + else if(result.control=='选项二'){ + event.type=2; + player.judge(function(card){ + if(get.color(card)=='red'){ + if(trigger.player.isDamaged()){ + if(att1>0) return 1; + if(att1<0) return -1; + } + } + else{ + if(trigger.source.isDamaged()){ + if(att2>0) return 1; + if(att2<0) return -1; + } + } + return 0; + }); + } + else{ + event.finish(); + } + 'step 2' + if(event.type==1){ + if(result.color=='black'){ + trigger.player.loseHp(); + } + else{ + trigger.source.loseHp(); + } + } + else{ + if(result.color=='red'){ + trigger.player.recover(); + } + else{ + trigger.source.recover(); + } + } + } + }, + boss_guixin:{ + trigger:{global:'drawAfter'}, + forced:true, + logTarget:'player', + filter:function(event,player){ + return event.result&&event.result.length>=2&&event.player!=player; + }, + content:function(){ + 'step 0' + trigger.player.chooseCard(function(card){ + return trigger.result.contains(card); + },'归心:交给'+get.translation(player)+'一张牌',true); + 'step 1' + if(result.bool){ + player.gain(result.cards,trigger.player); + trigger.player.$give(1,player); + } + } + }, + xiongcai:{ + unique:true, + trigger:{player:'phaseAfter'}, + direct:true, + init:function(player){ + player.storage.xiongcai=[]; + // player.storage.xiongcai2=0; + }, + intro:{ + content:'characters' + }, + content:function(){ + 'step 0' + // if(player.storage.xiongcai2<1){ + // player.storage.xiongcai2++; + // event.finish(); + // } + // else{ + // player.storage.xiongcai2=0; + // } + 'step 1' + player.logSkill('xiongcai'); + var list=[]; + var list2=[]; + var players=game.players.concat(game.dead); + for(var i=0;i'+get.translation(player)+'发动了【雄才】',[[name],'character']); + game.delay(2); + 'step 2' + event.dialog.close(); + } + }, + xiaoxiong:{ + trigger:{global:'useCardAfter'}, + forced:true, + unique:true, + forceunique:true, + filter:function(event,player){ + var type=get.type(event.card,'trick'); + return event.player!=player&&(type=='basic'||type=='trick'); + }, + content:function(){ + player.gain(game.createCard(trigger.card),'gain2'); + } + }, + boss_zhangwu:{ + global:'boss_zhangwu_ai', + trigger:{player:'damageEnd'}, + check:function(event,player){ + return event.source&&ai.get.damageEffect(event.source,player,player)>0; + }, + filter:function(event){ + return event.source&&event.source.isAlive(); + }, + logTarget:'source', + content:function(){ + 'step 0' + var target=trigger.source; + if(target.num('h')==0){ + target.damage(); + event.finish(); + } + else{ + target.chooseControl('discard_card','get_damage',function(){ + if(ai.get.damageEffect(target,player,target)>=0) return 'get_damage'; + var nh=target.num('h'); + if(nh==1||target.hp<=2||target.hasSkillTag('noh')) return 'discard_card'; + return 'get_damage'; + }) + } + 'step 1' + var target=trigger.source; + if(result.control=='discard_card'){ + target.discard(target.get('h')); + } + else{ + target.damage(); + } + }, + ai:{ + maixie:true + } + }, + boss_zhangwu_ai:{ + ai:{ + effect:{ + target:function(card,player,target){ + if(get.tag(card,'recover')&&card.name!='recover'){ + for(var i=0;i=4) return true; + } + return false; + }, + x2:function(player){ + return player.num('j')>=2; + }, + x1:function(){ + return game.players.length==2; + } + }, + }, + xiangxing:{ + unique:true, + init:function(player){ + player.storage.xiangxing=7; + player.storage.xiangxing_count=0; + player.addSkill('xiangxing7'); + }, + mark:true, + intro:{ + content:'当前有#枚星' + }, + trigger:{player:['damageEnd','loseHpEnd']}, + forced:true, + popup:false, + content:function(){ + 'step 0' + var num=trigger.num; + if(num){ + player.storage.xiangxing_count+=num; + } + if(player.storage.xiangxing_count>=7){ + if(player.hasSkill('yueyin')&&lib.skill.yueyin.skipDamage['x'+player.storage.xiangxing](player,trigger)){ + event.goto(3); + } + player.removeSkill('xiangxing'+player.storage.xiangxing); + player.storage.xiangxing--; + player.storage.xiangxing_count=0; + player.updateMarks(); + if(player.storage.xiangxing){ + player.addSkill('xiangxing'+player.storage.xiangxing); + } + else{ + player.awakenSkill('xiangxing'); + } + player.popup('xiangxing'); + game.log(player,'失去了一枚星'); + } + else{ + player.updateMarks(); + event.finish(); + } + 'step 1' + var list=game.players.slice(0); + list.remove(player); + list.sort(lib.sort.seat); + var list2=[]; + for(var i=0;i0){ + return 1+trigger.judge(button.link); + } + if(ai.get.attitude(player,trigger.player)<0){ + return 1-trigger.judge(button.link); + } + return 0; + }; + "step 1" + if(!result.bool){ + event.finish(); + return; + } + player.logSkill('gaiming',trigger.player); + var card=result.links[0]; + event.cards.remove(card); + var judgestr=get.translation(trigger.player)+'的'+trigger.judgestr+'判定'; + event.videoId=lib.status.videoId++; + event.dialog=ui.create.dialog(judgestr); + event.dialog.classList.add('center'); + event.dialog.videoId=event.videoId; + + game.addVideo('judge1',player,[get.cardInfo(card),judgestr,event.videoId]); + for(var i=0;i0){ + trigger.result.bool=true; + trigger.player.popup('洗具'); + } + if(trigger.result.judge<0){ + trigger.result.bool=false; + trigger.player.popup('杯具'); + } + game.log(trigger.player,'的判定结果为',card); + trigger.direct=true; + trigger.position.appendChild(card); + game.delay(2); + } + else{ + event.finish(); + } + "step 2" + ui.arena.classList.remove('thrownhighlight'); + event.dialog.close(); + game.addVideo('judge2',null,event.videoId); + ui.clear(); + var card=trigger.result.card; + trigger.position.appendChild(card); + trigger.result.node.delete(); + game.delay(); }, }, tiandao:{ @@ -2766,8 +3329,8 @@ mode.boss={ priority:100, audio:2, mode:['identity','guozhan','boss','stone'], - init:function(){ - if(get.mode()=='boss'){ + init:function(player){ + if(get.mode()=='boss'&&player==game.boss){ lib.onwash.push(function(){ if(!_status.boss_baonuwash){ _status.boss_baonuwash=true; @@ -2997,7 +3560,23 @@ mode.boss={ } } } - } + }, + _bossswap:{ + trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', + 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', + 'chooseBoolBegin','choosePlayerCardBegin','discardPlayerCardBegin','gainPlayerCardBegin']}, + forced:true, + priority:100, + popup:false, + filter:function(event,player){ + if(!get.config('single_control')) return false; + if(event.autochoose&&event.autochoose()) return false; + return player.isUnderControl(); + }, + content:function(){ + game.modeSwapPlayer(player); + }, + }, }, translate:{ zhu:'神', @@ -3046,6 +3625,36 @@ mode.boss={ boss_guojia:'世之奇士', boss_caocao:'魏武大帝', + boss_guimou:'鬼谋', + boss_guimou_info:'回合结束阶段,你可以令一名随机的其他角色进入混乱状态直到其下一回合结束', + boss_yuance:'远策', + boss_yuance_info:'每当一名角色受到其他角色的伤害,你可以选择一项并进行一次判定:1. 若结果为黑色,受伤害角色失去一点体力,否则伤害来源失去一点体力;2. 若结果为红色,受伤害角色回复一点体力,否则伤害来源回复一点体力', + boss_qizuo:'奇佐', + boss_qizuo_info:'你可以令你的非延时锦囊牌额外结算一次', + boss_guixin:'归心', + boss_guixin_info:'锁定技,其他角色摸牌时,若摸牌数不少于2,须将摸到的牌中的一张交给你', + xiongcai:'雄才', + xiongcai_info:'锁定技,你在回合结束后随机获得一个魏势力角色的所有技能', + xiaoxiong:'枭雄', + xiaoxiong_info:'锁定技,每当一名其他角色使用一张基本牌或锦囊牌,你获得一张与之同名的牌', + boss_zhangwu:'章武', + boss_zhangwu_info:'每当你受到一次伤害,你可以令伤害来源选择一项:弃置所有手牌,或受到一点伤害', + xiangxing:'禳星', + xiangxing_info:'锁定技,游戏开始时,你获得7枚星;每当你累计扣减7点体力,你失去一枚星,并造成7点雷属性伤害,随机分配给其他角色;当你失去全部星后,你的体力上限变为3', + yueyin:'月隐', + yueyin_info:'锁定技,你的每一枚星对应的一个特定条件,当你失去星时,若满足此条件,则不造成伤害', + xiangxing7_info:'你没有手牌', + xiangxing6_info:'此次受到的是火属性伤害', + xiangxing5_info:'此次受到的是雷属性伤害', + xiangxing4_info:'此次为失去体力', + xiangxing3_info:'一名其他角色有至少4件装备', + xiangxing2_info:'你的判定区内至少有2张牌', + xiangxing1_info:'场上只有2名存活角色', + gaiming:'改命', + gaiming_info:'锁定技,在你的判定牌生效前,你观看牌堆顶的7张牌并选择一张作为判定结果,此结果不可更改', + fengqi:'风起', + fengqi_info:'回合开始和结束阶段,你可以视为使用任意一张非延时锦囊牌', + jiaoxia:'皎霞', jiaoxia_info:'每当你成为红色牌的目标,你可以摸一张牌', lingbo:'凌波',