From 2e378b31a4fd486fd172fa86c2985107eb1bd963 Mon Sep 17 00:00:00 2001 From: libccy Date: Sun, 5 Jun 2016 22:30:47 +0800 Subject: [PATCH] f --- character/yijiang.js | 79 ++++++++++++++++++++++++++++++++------- game/game.js | 32 ++++++++++++++-- game/update.js | 25 +++++-------- layout/default/layout.css | 3 ++ mode/guozhan.js | 2 +- theme/music/style.css | 3 ++ theme/simple/style.css | 3 ++ theme/woodden/style.css | 3 ++ 8 files changed, 115 insertions(+), 35 deletions(-) diff --git a/character/yijiang.js b/character/yijiang.js index 9f3a45be6..1f92c2889 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -209,14 +209,14 @@ character.yijiang={ }, threaten:1.6, }, - group:'taoluan2' + group:['taoluan2','taoluan4','taoluan5'] }, taoluan2:{ - trigger:{player:'useCardAfter'}, + trigger:{player:['useCardAfter','respondAfter']}, forced:true, popup:false, filter:function(event,player){ - return event.skill=='taoluan_backup'; + return event.skill=='taoluan_backup'||event.skill=='taoluan5'; }, content:function(){ 'step 0' @@ -258,6 +258,53 @@ character.yijiang={ } }, taoluan3:{}, + taoluan4:{ + trigger:{player:'chooseToRespondBegin'}, + filter:function(event,player){ + if(event.responded) return false; + if(!event.filterCard({name:'shan'})) return false; + if(player.storage.taoluan.contains('shan')) return false; + return true; + }, + check:function(event,player){ + if(player.hasSkill('taoluan3')) return 0; + var allshown=true; + for(var i=0;i1&&ai.get.attitude(player,game.players[i])>0){ + return 1; + } + } + return 0; + }, + content:function(){ + trigger.untrigger(); + trigger.responded=true; + trigger.result={bool:true,card:{name:'shan'},skill:'taoluan_backup'}; + player.storage.taoluan.push('shan'); + }, + }, + taoluan5:{ + enable:'chooseToUse', + filter:function(event,player){ + return event.type=='dying'&&!player.storage.taoluan.contains('tao'); + }, + onuse:function(result,player){ + player.storage.taoluan.push('tao'); + }, + filterCard:function(){ + return false; + }, + selectCard:-1, + viewAs:{name:'tao'}, + ai:{ + skillTagFilter:function(player){ + return !player.storage.taoluan.contains('tao'); + }, + threaten:1.5, + save:true, + } + }, + taoluan_backup:{}, jishe:{ enable:'phaseUse', filter:function(event,player){ @@ -303,7 +350,7 @@ character.yijiang={ filter:function(event,player){ if(player.num('h')) return false; for(var i=0;i0){ + if(player.isTurnedOver()||ai.get.attitude(target,player)>0||target.hp<=2){ spade=false; } target.chooseToDiscard('h',true).set('ai',function(card){ - if(_status.event.spade&&get.suit(card)=='spade'){ - return 10-ai.get.value(card); + if(get.suit(card)=='spade'){ + if(_status.event.spade){ + return 10-ai.get.value(card); + } + else{ + return -10-ai.get.value(card); + } } if(_status.event.getParent().player.storage.jiyu2.contains(get.suit(card))){ return -3-ai.get.value(card); @@ -559,7 +608,7 @@ character.yijiang={ var card=result.cards[0]; if(get.suit(card)=='spade'){ player.turnOver(); - player.loseHp(); + target.loseHp(); } player.storage.jiyu.push(target); player.storage.jiyu2.add(get.suit(card)); @@ -7141,8 +7190,10 @@ character.yijiang={ lianhuo:'链祸', lianhuo_info:'锁定技,当你受到火焰伤害时,若你处于“连环状态”且你是传导伤害的起点,则此伤害+1', taoluan:'滔乱', + taoluan4:'滔乱', + taoluan5:'滔乱', taoluan_backup:'滔乱', - taoluan_info:'你可视为使用任意一张基本牌或非延时类锦囊牌(此牌不得是本局游戏你以此法使用过的牌),然后你令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力', + taoluan_info:'在出牌或濒死阶段,你可视为使用任意一张基本牌或非延时类锦囊牌(此牌不得是本局游戏你以此法使用过的牌),然后你令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力', jiaozhao:'矫诏', jiaozhao2:'矫诏', jiaozhao_info:'出牌阶段限一次,你可以展示一张手牌,然后选择距离最近的一名其他角色,该角色声明一张基本牌的牌名。在此出牌阶段内,你可以将此手牌当声明的牌使用且你不能被选择为目标', diff --git a/game/game.js b/game/game.js index ae72c4be3..008f5d706 100755 --- a/game/game.js +++ b/game/game.js @@ -12863,6 +12863,9 @@ game.reload(); },true); } + if(!lib.configOL.observe_handcard){ + ui.arena.classList.add('observe'); + } } ui.arena.dataset.number=state.number; _status.mode=state.mode; @@ -12923,12 +12926,18 @@ player.node.identity.innerHTML=info.identityNode[0]; player.node.identity.dataset.color=info.identityNode[1]; } - else if(player==game.me||player.identityShown){ + else if(player==game.me||player.identityShown||observe){ player.setIdentity(); + player.forceShown=true; } else{ player.setIdentity('cai'); } + if(!lib.configOL.observe_handcard&&(lib.configOL.mode=='identity'||lib.configOL.mode=='guozhan')){ + if(observe&&!player.identityShown){ + player.setIdentity('cai'); + } + } } player.update(); } @@ -12948,7 +12957,16 @@ next.content=lib.init.startOnline; if(observe){ next.custom.replace.target=function(player){ - if(player.isAlive()) game.swapPlayer(player); + if(player.isAlive()){ + if(!game.me.identityShown){ + game.me.node.identity.firstChild.innerHTML='猜'; + game.me.node.identity.dataset.color='unknown'; + } + game.swapPlayer(player); + if(!game.me.identityShown){ + game.me.node.identity.firstChild.innerHTML=''; + } + } } } else{ @@ -17701,14 +17719,14 @@ } } for(i in lib.skill){ - if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(lib.config.mode)){ + if(lib.skill[i].forbid&&lib.skill[i].forbid.contains(get.mode())){ lib.skill[i]={}; if(lib.translate[i+'_info']){ lib.translate[i+'_info']='此模式下不可用'; } continue; } - if(lib.skill[i].mode&&lib.skill[i].mode.contains(lib.config.mode)==false){ + if(lib.skill[i].mode&&lib.skill[i].mode.contains(get.mode())==false){ lib.skill[i]={}; if(lib.translate[i+'_info']){ lib.translate[i+'_info']='此模式下不可用'; @@ -18894,6 +18912,11 @@ init:true, connect:true }; + infoconfig.connect_observe_handcard={ + name:'允许观看手牌', + init:true, + connect:true + }; } for(var j in infoconfig){ if(j==='update'){ @@ -23631,6 +23654,7 @@ _status.clicked=true; if(!game.getIdentityList) return; if(_status.video) return; + if(this.parentNode.forceShown) return; if(_status.clickingidentity){ for(var i=0;i<_status.clickingidentity[1].length;i++){ _status.clickingidentity[1][i].delete(); diff --git a/game/update.js b/game/update.js index 6e6c95447..4dd04a1c6 100644 --- a/game/update.js +++ b/game/update.js @@ -1,26 +1,19 @@ window.noname_update={ - version:'1.8.14', + version:'1.8.14.1', changeLog:[ - '新武将', + '修bug', + '观战设置' ], files:{ global:[ - 'character/swd.js', - 'character/hearth.js', - 'card/standard.js', - 'card/mingzhong.js', - 'mode/versus.js', - 'layout/newlayout/global.css', - 'layout/default/menu.css', - 'layout/mobile/equip.css', - 'theme/woodden/style.css', - 'game/game.js', - 'game/asset.js', 'character/yijiang.js', - 'character/sp.js', + 'mode/guoshan.js', + 'game/game.js', + 'layout/default/layout.js', + 'theme/woodden/style.css', + 'theme/simple/style.css', + 'theme/music/style.css', ], - '1.8.12.1':[], - '1.8.13':[], '1.8.14':[] } } diff --git a/layout/default/layout.css b/layout/default/layout.css index dd9bede99..e456353cf 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -202,6 +202,9 @@ table{table-layout: fixed;} #arena.chess>#arenalog{ display: none !important; } +#arena.observe .handcards>.card>div{ + opacity: 0 !important; +} #arenalog{ width: calc(50% - 210px); height: calc(100% - 370px); diff --git a/mode/guozhan.js b/mode/guozhan.js index df1d8abfd..df6aba808 100755 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -784,7 +784,7 @@ mode.guozhan={ this.init(info.name1,info.name2,false); this.name1=info.name1; this.name=info.name; - this.node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate[this.name]),this); + this.node.name_seat=ui.create.div('.name.name_seat',get.verticalStr(lib.translate[this.name].slice(0,3)),this); if(info.identityShown){ this.setIdentity(info.identity); } diff --git a/theme/music/style.css b/theme/music/style.css index 458b70c16..c06714640 100755 --- a/theme/music/style.css +++ b/theme/music/style.css @@ -10,6 +10,9 @@ html{ background-image: linear-gradient(#4b4b4b, #464646); border-radius: 8px; } +#arena.observe .handcards>.card{ + background: linear-gradient(#4b4b4b, #464646) !important; +} #window.reduce_radius #system>div>div, #window.reduce_radius #mebg, diff --git a/theme/simple/style.css b/theme/simple/style.css index 1a58713b9..a2881a9a7 100755 --- a/theme/simple/style.css +++ b/theme/simple/style.css @@ -28,6 +28,9 @@ body{ #arena:not(.chess).textequip .player[data-position='0'] .equips>.card{ background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)) !important; } +#arena.observe .handcards>.card{ + background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)) !important; +} #window.reduce_radius #system>div>div, #window.reduce_radius #mebg, diff --git a/theme/woodden/style.css b/theme/woodden/style.css index 69e576115..3c3110704 100755 --- a/theme/woodden/style.css +++ b/theme/woodden/style.css @@ -67,6 +67,9 @@ html{ #arena.mobile:not(.chess) .player[data-position='0'] .equips,.playerbg{ background: url('wood.jpg'); } +#arena.observe .handcards>.card{ + background: url('wood.jpg') !important; +} #arena:not(.chess).textequip .player[data-position='0'] .equips>.card{ background: url('wood.jpg') !important; color:rgb(77, 60, 51) !important;