diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 5d9607ae9..3ebce337a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -1,2 +1,7 @@ 1.4.2 -富含bug的录像功能 +录像功能 +AI改进 +Bug修复 +触屏设备提示 +出牌样式改进 +界面调整 diff --git a/card/ex.js b/card/ex.js index 9a249048b..b00dd72fe 100755 --- a/card/ex.js +++ b/card/ex.js @@ -81,7 +81,7 @@ card.ex={ var equip1=player.get('e','1'); if(equip1&&equip1.name=='qinggang') return 1; if(player.num('s','unequip')) return; - if(card.name=='sha'&&get.color(card)=='black') return 0; + if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; } } } diff --git a/card/extra.js b/card/extra.js index 86b134105..4599b30e2 100755 --- a/card/extra.js +++ b/card/extra.js @@ -25,8 +25,22 @@ card.extra={ }, ai:{ basic:{ - useful:[5,1], - value:[5,1], + useful:function(card,i){ + if(_status.event.player.hp>1){ + if(i==0) return 5; + return 1; + } + if(i==0) return 7.3; + return 3; + }, + value:function(card,player){ + if(player.hp>1){ + if(i==0) return 5; + return 1; + } + if(i==0) return 7.3; + return 3; + }, }, order:function(){ return lib.card.sha.ai.order+0.2; @@ -269,6 +283,8 @@ card.extra={ ai:{ basic:{ equipValue:function(card,player){ + if(player.hasSkillTag('maixie')&&player.hp>1) return 0; + if(ai.get.damageEffect(player,player,player,'fire')>=0) return 10; var num=3; for(var i=0;i1&&ui.selected.cards.length){ return 0; } + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; if(card.name=='tao') return 0; if(target.hp==1&&card.name=='jiu') return 0; if(get.type(card)!='basic'){ diff --git a/card/qimou.js b/card/qimou.js index 285068497..819c96a83 100755 --- a/card/qimou.js +++ b/card/qimou.js @@ -272,6 +272,9 @@ card.qimou={ return -0.5; } }, + wuxie:function(){ + return 0; + }, useful:3, value:7 } diff --git a/card/shenbing.js b/card/shenbing.js index c021558e3..971c1481a 100755 --- a/card/shenbing.js +++ b/card/shenbing.js @@ -71,7 +71,7 @@ card.shenbing={ nothunder:true, effect:{ target:function(card,player,target,current){ - if(get.tag(card,'natureDamage')) return 0; + if(get.tag(card,'natureDamage')) return 'zerotarget'; if(card.name=='tiesuo'){ return [0,0]; } diff --git a/card/shenqi.js b/card/shenqi.js index e7c887b90..14ce35a67 100755 --- a/card/shenqi.js +++ b/card/shenqi.js @@ -521,6 +521,7 @@ card.shenqi={ order:7, result:{ target:function(player,target){ + if(player.num('h')<=1) return 0; if(ai.get.attitude(player,target)>=0) return 0; for(var i=0;i=0) return -1; return 1; }; @@ -191,9 +197,12 @@ card.standard={ }, ai:{ basic:{ - order:2, - useful:[8,5], - value:[8,5], + order:function(card,player){ + if(player.hasSkillTag('pretao')) return 5; + return 2; + }, + useful:[8,6], + value:[8,6], }, result:{ target:function(player,target){ @@ -217,7 +226,7 @@ card.standard={ } if(target.hp<0&&target!=player&&target.identity!='zhu') return 0; var att=ai.get.attitude(player,target); - if(att<3&&att>=0) return 0; + if(att<3&&att>=0&&player!=target) return 0; var tri=_status.event.parent._trigger; if(lib.config.mode=='identity'&&player.identity=='fan'&&target.identity=='fan'){ if(tri&&tri.name=='dying'&&tri.source&&tri.source.identity=='fan'&&tri.source!=target){ @@ -542,6 +551,8 @@ card.standard={ var next=target.chooseToRespond({name:'sha'}); next.ai=function(card){ if(ai.get.damageEffect(target,player,target)>=0) return 0; + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; return 1; }; next.autochoose=lib.filter.autoRespondSha; @@ -593,6 +604,8 @@ card.standard={ var next=target.chooseToRespond({name:'shan'}); next.ai=function(card){ if(ai.get.damageEffect(target,player,target)>=0) return 0; + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; return 1; }; next.autochoose=lib.filter.autoRespondShan; @@ -676,6 +689,8 @@ card.standard={ else{ var next=event.turn.chooseToRespond({name:'sha'}); next.ai=function(card){ + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; if(event.turn==target){ if(ai.get.attitude(target,player)<0){ return ai.get.unuseful2(card) @@ -783,7 +798,24 @@ card.standard={ } return -1.5; }, - player:1 + player:function(player,target){ + if(ai.get.attitude(player,target)<0&&!target.num('he')){ + return 0; + } + if(ai.get.attitude(player,target)>1){ + var js=target.get('j'); + if(js.length){ + var jj=js[0].viewAs?{name:js[0].viewAs}:js[0]; + if(jj.name=='shunshou') return 1; + if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){ + return 0; + } + return 1; + } + return 0; + } + return 1; + } }, tag:{ loseCard:1, @@ -1119,7 +1151,7 @@ card.standard={ if(player.skills.contains('jiu')|| player.skills.contains('tianxianjiu')|| trigger.target.hp==1){ - return 7-ai.get.value(card) + return 8-ai.get.value(card) } return 5-ai.get.value(card) } @@ -1157,7 +1189,14 @@ card.standard={ audio:true, content:function(){ "step 0" - player.chooseButton(ui.create.dialog('选择要弃置的马',trigger.target.get('e',{subtype:['equip3','equip4']}))); + var att=(ai.get.attitude(player,trigger.target)<=0); + player.chooseButton(ui.create.dialog('选择要弃置的马', + trigger.target.get('e',{subtype:['equip3','equip4']}))).ai=function(button){ + if(att){ + return ai.get.buttonValue(button); + } + return 0; + }; "step 1" if(result.bool){ player.logSkill('qilin_skill'); @@ -1272,6 +1311,13 @@ card.standard={ var aiii=info.ai.wuxie(trigger.target,trigger.card,trigger.player,_status.event.player,state); if(typeof aiii=='number') return aiii; } + if(info.multitarget){ + var eff=0; + for(var i=0;i=0) return 0; + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; return 1; }; next.autochoose=lib.filter.autoRespondSha; @@ -459,6 +461,8 @@ card.swd={ var next=target.chooseToRespond({name:'shan'}); next.ai=function(card){ if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0; + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; return 1; }; next.autochoose=lib.filter.autoRespondShan; diff --git a/card/yibao.js b/card/yibao.js index 25e0fccd6..45f08d0b6 100755 --- a/card/yibao.js +++ b/card/yibao.js @@ -246,6 +246,8 @@ card.yibao={ target.chooseToDiscard('he',[1,2]).ai=function(card){ if(target.hasSkillTag('nofire')) return 0; if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0; + if(player.get('s').contains('xinwuyan')) return 0; + if(target.get('s').contains('xinwuyan')) return 0; if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){ return 0; } @@ -311,6 +313,8 @@ card.yibao={ }; "step 2" event.card2=result.cards[0]; + ui.arena.classList.add('thrownhighlight'); + game.addVideo('thrownhighlight1'); player.$compare(event.card1,target,event.card2); game.delay(4); "step 3" @@ -333,6 +337,8 @@ card.yibao={ target.$gain2(event.card2); target.addTempSkill('dujian2','phaseBegin'); } + ui.arena.classList.remove('thrownhighlight'); + game.addVideo('thrownhighlight2'); }, ai:{ basic:{ diff --git a/character/extra.js b/character/extra.js index 3d7f863c2..278cdf675 100755 --- a/character/extra.js +++ b/character/extra.js @@ -235,7 +235,7 @@ character.extra={ }; "step 1" if(result.bool){ - player.respond(result.cards); + player.respond(result.cards,'highlight'); } else{ event.finish(); diff --git a/character/hearth.js b/character/hearth.js index 6c3d5f701..24bd7ddc3 100755 --- a/character/hearth.js +++ b/character/hearth.js @@ -953,6 +953,10 @@ character.hearth={ "step 0" ui.discardPile.appendChild(player.storage.mdzhoufu2); player.$throw(player.storage.mdzhoufu2); + if(player.storage.mdzhoufu2.clone){ + player.storage.mdzhoufu2.clone.classList.add('thrownhighlight'); + game.addVideo('highlightnode',player,get.cardInfo(player.storage.mdzhoufu2)); + } if(player.storage.mdzhoufu3.isAlive()){ // player.storage.mdzhoufu3.draw(); player.storage.mdzhoufu3.gain(player.judging,'gain2'); diff --git a/character/mountain.js b/character/mountain.js index 494d6a389..fb7e538e7 100755 --- a/character/mountain.js +++ b/character/mountain.js @@ -478,6 +478,7 @@ character.mountain={ ai:{ effect:{ target:function(card,player,target,current){ + if(!target.hasFriend()) return; if(get.tag(card,'loseCard')&&_status.currentPhase!=target&&target.num('he')){ return [0.5,Math.max(2,target.num('h'))]; } diff --git a/character/refresh.js b/character/refresh.js index 9c698fe68..f55ce8468 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -111,7 +111,7 @@ character.refresh={ }; "step 1" if(result.bool){ - player.respond(result.cards); + player.respond(result.cards,'highlight'); } else{ event.finish(); @@ -125,6 +125,8 @@ character.refresh={ } ui.discardPile.appendChild(trigger.player.judging); trigger.player.judging=result.cards[0]; + trigger.position.appendChild(result.cards[0]); + game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.delay(2); } }, @@ -518,7 +520,9 @@ character.refresh={ content:function(){ "step 0" event.card=get.cards()[0]; - event.node=event.card.copy('thrown','center',ui.arena).animate('start'); + event.node=event.card.copy('thrown','center','thrownhighlight',ui.arena).animate('start'); + ui.arena.classList.add('thrownhighlight'); + game.addVideo('thrownhighlight1'); game.addVideo('centernode',null,get.cardInfo(event.card)); if(get.type(event.card,'trick')==get.type(trigger.card,'trick')){ player.chooseTarget('选择获得此牌的角色').ai=function(target){ @@ -558,6 +562,8 @@ character.refresh={ game.addVideo('deletenode',player,[get.cardInfo(event.node)]); } event.node.delete(); + game.addVideo('thrownhighlight2'); + ui.arena.classList.remove('thrownhighlight'); }, ai:{ effect:{ diff --git a/character/sp.js b/character/sp.js index 304e7ed0e..f64456059 100755 --- a/character/sp.js +++ b/character/sp.js @@ -2006,7 +2006,7 @@ character.sp={ "step 1" if(result.bool){ event.card=result.buttons[0].link; - player.respond(event.card); + player.respond(event.card,'highlight'); } else{ event.finish(); diff --git a/character/standard.js b/character/standard.js index acd8dbf4b..a6440351e 100755 --- a/character/standard.js +++ b/character/standard.js @@ -161,7 +161,7 @@ character.standard={ }; "step 1" if(result.bool){ - player.respond(result.cards); + player.respond(result.cards,'highlight'); } else{ event.finish(); @@ -349,6 +349,7 @@ character.standard={ target:function(card,player,target){ if(get.tag(card,'damage')){ if(player.skills.contains('jueqing')) return [1,-2]; + if(!target.hasFriend()) return; if(target.hp>=4) return [1,get.tag(card,'damage')*2]; if(target.hp==3) return [1,get.tag(card,'damage')*1.5]; if(target.hp==2) return [1,get.tag(card,'damage')*0.5]; @@ -434,6 +435,15 @@ character.standard={ if(ui.selected.cards.length){ return -1; } + for(var i=0;i=3&& + ai.get.attitude(game.players[i],player)>=3){ + return 11-ai.get.value(card); + } + } if(player.num('h')>player.hp) return 10-ai.get.value(card); if(player.num('h')>2) return 6-ai.get.value(card); return -1; @@ -455,13 +465,19 @@ character.standard={ } }, ai:{ - order:10, + order:function(skill,player){ + if(player.hp1){ + return 10; + } + return 1; + }, result:{ target:function(player,target){ + if(target.num('j','lebu')) return 0; var nh=target.num('h'); var np=player.num('h'); if(player.hp==player.maxHp||player.storage.rende<0||player.num('h')<=1){ - if(nh>=np-1&&np<=player.hp) return 0; + if(nh>=np-1&&np<=player.hp&&!target.get('s').contains('haoshi')) return 0; } return Math.max(1,5-nh); } @@ -553,6 +569,11 @@ character.standard={ return false; }, filterTarget:function(card,player,target){ + if(_status.event._backup&& + typeof _status.event._backup.filterTarget=='function'&& + !_status.event._backup.filterTarget({name:'sha'},player,target)){ + return false; + } return player.canUse({name:'sha'},target); }, content:function(){ @@ -560,6 +581,7 @@ character.standard={ if(event.current==undefined) event.current=player.next; if(event.current==player){ player.addTempSkill('jijiang3','phaseAfter'); + event.parent.parent.step=0; event.finish(); } else if(event.current.group=='shu'){ diff --git a/character/swd.js b/character/swd.js index 709dc8320..36d1da756 100755 --- a/character/swd.js +++ b/character/swd.js @@ -706,6 +706,7 @@ character.swd={ if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){ return 7-ai.get.value(card); } + return 0; } "step 1" if(result.bool){ @@ -3028,7 +3029,7 @@ character.swd={ }; "step 1" if(result.bool){ - player.respond(result.cards); + player.respond(result.cards,'highlight'); } else{ event.finish(); @@ -6112,7 +6113,7 @@ character.swd={ order:1, result:{ target:function(player,target){ - var eff=ai.get.damageEffect(target,player); + var eff=ai.get.damageEffect(target,player,target,'fire'); if(eff>=0) return eff+1; var judges=target.get('j'); if(!judges.length) return 0; @@ -6248,6 +6249,10 @@ character.swd={ event.card=result.buttons[0].link; if(get.owner(event.card)) get.owner(event.card).discard(event.card); else trigger.player.$throw(event.card,1000); + if(event.card.clone){ + event.card.clone.classList.add('thrownhighlight'); + game.addVideo('highlightnode',player,get.cardInfo(event.card)); + } } "step 2" if(event.card){ @@ -6463,7 +6468,8 @@ character.swd={ }, threaten:function(player,target){ if(target.hp1; }, priority:5, content:function(){ diff --git a/character/yijiang.js b/character/yijiang.js index fa55399ff..13e9e19d2 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1719,38 +1719,37 @@ character.yijiang={ ai:{ effect:{ target:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return [0,0,0,0]; + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; }, player:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target) return [0,0,0,0]; + if(get.type(card)=='trick'&&player!=target) return 'zeroplayertarget'; } } } }, xinwuyan:{ audio:2, - trigger:{target:'useCardToBefore',player:'useCardToBefore'}, + trigger:{source:'damageBefore',player:'damageBefore'}, forced:true, priority:15, filter:function(event,player){ - if(event.player==player&&event.target==player) return false; - return (get.type(event.card,'trick')=='trick'&&get.tag(event.card,'damage')); - }, - check:function(event,player){ - return ai.get.effect(event.target,event.card,event.player,player)<0; + return get.type(event.card,'trick')=='trick'; }, content:function(){ - game.log(get.translation(player)+'发动了无言,'+get.translation(trigger.card)+'对'+get.translation(trigger.target)+'失效') trigger.untrigger(); trigger.finish(); }, ai:{ effect:{ target:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target&&get.tag(card,'damage')) return [0,0,0,0]; + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } }, player:function(card,player,target,current){ - if(get.type(card)=='trick'&&player!=target&&get.tag(card,'damage')) return [0,0,0,0]; + if(get.type(card)=='trick'&&get.tag(card,'damage')){ + return 'zeroplayertarget'; + } } } } @@ -1895,7 +1894,7 @@ character.yijiang={ effect:{ target:function(card,player,target){ if(target.get('e','2')) return; - if(card.name=='sha'&&get.color(card)=='black') return 0; + if(card.name=='sha'&&get.color(card)=='black') return 'zerotarget'; } } } diff --git a/game/config.js b/game/config.js index e8d25aba8..e88957795 100755 --- a/game/config.js +++ b/game/config.js @@ -207,10 +207,12 @@ window.config={ background_music:'music_default', background_audio:true, background_speak:true, + glow_phase:true, theme:'woodden', layout:'mobile', + card_style:'default', image_character:'default', image_background:'default', diff --git a/game/game.js b/game/game.js index a70123466..99a1598a7 100755 --- a/game/game.js +++ b/game/game.js @@ -222,6 +222,7 @@ setTimeout(function(){ layout.remove(); ui.arena.show(); + game.me.update(); setTimeout(function(){ ui.updatex(); },500); @@ -329,7 +330,6 @@ image_background_filter:{ name:'背景特效', init:'default', - unfrequent:true, item:{ default:'无', blur:'模糊', @@ -346,6 +346,23 @@ ui.click.sidebar.image_background(lib.config.image_background); }, }, + card_style:{ + name:'卡牌样式', + init:'mobile', + item:{ + default:'默认', + wood:'木纹', + music:'音乐', + simple:'原版' + }, + onclick:function(layout){ + game.saveConfig('card_style',layout); + var style=ui.css.card_style; + ui.css.card_style=lib.init.css('theme/cardstyle',lib.config.card_style); + style.remove(); + }, + unfrequent:true, + }, auto_popped_config:{ name:'自动弹出选项', init:true, @@ -387,6 +404,22 @@ init:false, unfrequent:true, }, + glow_phase:{ + name:'当前回合角色高亮', + init:false, + unfrequent:true, + onclick:function(bool){ + game.saveConfig('glow_phase',bool); + if(_status.currentPhase){ + if(lib.config.glow_phase){ + _status.currentPhase.classList.add('glow_phase'); + } + else{ + _status.currentPhase.classList.remove('glow_phase'); + } + } + } + }, show_name:{ name:'显示武将名', init:false, @@ -405,6 +438,24 @@ } } }, + // savevideo:{ + // name:'显示保存录像', + // init:true, + // onclick:function(bool){ + // game.saveConfig('savevideo',bool); + // if(!lib.db) return; + // if(lib.config.savevideo){ + // if(!ui.savevideo&&_status.over){ + // ui.savevideo=ui.create.control('保存录像',game.saveVideo); + // } + // } + // else if(ui.savevideo){ + // ui.savevideo.close(); + // delete ui.savevideo; + // } + // }, + // unfrequent:true, + // }, show_replay:{ name:'显示重来按钮', init:false, @@ -514,7 +565,8 @@ else if(ui.css.fold){ ui.css.fold.remove(); } - } + }, + unfrequent:true, }, blur_ui:{ name:'模糊效果', @@ -720,6 +772,14 @@ identity:{ name:'身份', config:{ + update:function(config,map){ + if(config.player_number=='8'){ + map.double_nei.show(); + } + else{ + map.double_nei.hide(); + } + }, player_number:{ name:'游戏人数', init:'8', @@ -735,6 +795,12 @@ frequent:true, restart:true, }, + double_nei:{ + name:'双内奸', + init:false, + frequent:true, + restart:true, + }, double_character:{ name:'双将模式', init:false, @@ -854,22 +920,22 @@ } } }, - swap:{ - name:'死亡后显示换人', - init:true, - onclick:function(bool){ - game.saveConfig('swap',bool,this._link.config.mode); - if(get.config('swap')){ - if(!ui.swap&&game.me.isDead()){ - ui.swap=ui.create.control('换人',ui.click.dieswap); - } - } - else if(ui.swap){ - ui.swap.close(); - delete ui.swap; - } - } - }, + // swap:{ + // name:'死亡后显示换人', + // init:true, + // onclick:function(bool){ + // game.saveConfig('swap',bool,this._link.config.mode); + // if(get.config('swap')){ + // if(!ui.swap&&game.me.isDead()){ + // ui.swap=ui.create.control('换人',ui.click.dieswap); + // } + // } + // else if(ui.swap){ + // ui.swap.close(); + // delete ui.swap; + // } + // } + // }, revive:{ name:'死亡后显示复活', init:false, @@ -1018,22 +1084,22 @@ } } }, - swap:{ - name:'死亡后显示换人', - init:true, - onclick:function(bool){ - game.saveConfig('swap',bool,this._link.config.mode); - if(get.config('swap')){ - if(!ui.swap&&game.me.isDead()){ - ui.swap=ui.create.control('换人',ui.click.dieswap); - } - } - else if(ui.swap){ - ui.swap.close(); - delete ui.swap; - } - } - }, + // swap:{ + // name:'死亡后显示换人', + // init:true, + // onclick:function(bool){ + // game.saveConfig('swap',bool,this._link.config.mode); + // if(get.config('swap')){ + // if(!ui.swap&&game.me.isDead()){ + // ui.swap=ui.create.control('换人',ui.click.dieswap); + // } + // } + // else if(ui.swap){ + // ui.swap.close(); + // delete ui.swap; + // } + // } + // }, revive:{ name:'死亡后显示复活', init:false, @@ -1486,6 +1552,12 @@ getUTC:function(date){ return date.getTime(); }, + saveVideo:function(){ + if(_status.videoToSave){ + game.export(lib.init.encode(JSON.stringify(_status.videoToSave)), + '无名杀 - 录像 - '+_status.videoToSave.name[0]+' - '+_status.videoToSave.name[1]); + } + }, init:{ init:function(){ lib.config={}; @@ -1570,9 +1642,26 @@ if(lib.config.threed_card) ui.css.threed=lib.init.css('layout/default','fold2'); if(lib.config.blur_ui) ui.css.blur_ui=lib.init.css('layout/default','blur'); ui.css.theme=lib.init.css('theme/'+lib.config.theme,'style'); + ui.css.card_style=lib.init.css('theme/cardstyle',lib.config.card_style); lib.config.duration=500; + var ua=navigator.userAgent.toLowerCase(); + if(ua.indexOf('iphone')!=-1||ua.indexOf('ipad')!=-1||ua.indexOf('android')!=-1){ + if(!lib.config.totouched&&!lib.config.touchscreen){ + var totouch=window.confirm('您似乎在使用触屏设备,是否切换到触屏模式?'); + game.saveConfig('totouched',true); + if(totouch){ + game.saveConfig('touchscreen',true); + game.reload(); + } + } + } + else if(ua.indexOf('macintosh')!=-1&&!lib.config.toscrolled){ + game.saveConfig('toscrolled',true); + game.saveConfig('mousewheel',false); + } + if(window.indexedDB){ var request = window.indexedDB.open(lib.configprefix+'data', 1); request.onupgradeneeded=function(e){ @@ -2038,6 +2127,8 @@ player.lose(event.card1); target.lose(event.card2); "step 3" + ui.arena.classList.add('thrownhighlight'); + game.addVideo('thrownhighlight1'); player.$compare(event.card1,target,event.card2); // player.$throw(event.card1); // target.$throw(event.card2); @@ -2087,6 +2178,8 @@ if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){ event.target.ai.shown+=0.1; } + ui.arena.classList.remove('thrownhighlight'); + game.addVideo('thrownhighlight2'); if(event.clear!==false) ui.clear(); event.dialog.close(); }, @@ -2609,6 +2702,9 @@ player.$throw(cards); } event.trigger('useCard'); + // if(event.card.name=='sha'&&lib.config.animation){ + // player.$sha(event.card.nature); + // } if(get.type(card)!='equip'){ var str=get.translation(player); if(targets.length){ @@ -2922,6 +3018,10 @@ for(var i=0;i.card,#chess>.card'); + var nodes=[]; + for(var i=0;i=0;j--){ + if(card[2]==nodes[j].name&&card[0]==nodes[j].suit&&card[1]==nodes[j].number){ + nodes[j].classList.add('thrownhighlight'); + break; + } + } + } + else{ + console.log(player,cards); + } + }, uiClear:function(){ ui.clear(); }, judge1:function(player,content){ if(player&&content){ var judging=get.infoCard(content[0]); - judging.copy('thrown','center',ui.arena).animate('start'); + if(lib.config.mode=='chess'){ + judging.copy('thrown','center','thrownhighlight',ui.arena).animate('start'); + } + else{ + player.$throwordered(judging.copy('thrownhighlight'),true); + } + ui.create.dialog(content[1]).videoId=content[2]; + ui.arena.classList.add('thrownhighlight'); } else{ console.log(player); } }, centernode:function(content){ - get.infoCard(content).copy('thrown','center',ui.arena).animate('start'); + get.infoCard(content).copy('thrown','center','thrownhighlight',ui.arena).animate('start'); }, judge2:function(videoId){ for(var i=0;i导入录像...',function(){ this.nextSibling.classList.toggle('hidden'); @@ -12475,6 +12752,7 @@ handcards1:ui.create.div('#handcards1'), handcards2:ui.create.div('#handcards2'), }; + node.node.action=ui.create.div('.action',node.node.avatar); node.skipList=[]; node.skills=[]; @@ -15727,6 +16005,10 @@ else if(temp1=='zerotarget'){ zerotarget=true; } + else if(temp1=='zeroplayertarget'){ + zeroplayer=true; + zerotarget=true; + } } if(target){ var skills2=target.get('s').concat(lib.skill.global); @@ -15761,6 +16043,10 @@ else if(temp2=='zerotarget'){ zerotarget=true; } + else if(temp2=='zeroplayertarget'){ + zeroplayer=true; + zerotarget=true; + } if(typeof temp3=='function'&&temp3(player,target)!=undefined){ threaten*=temp3(player,target); } @@ -16438,6 +16724,7 @@ lib[i][j]=lib.init.eval(mode[lib.config.mode][i][j]); } } + lib.skilllist=[]; lib.characterPack={}; for(i in character){ if(character[i].character){ @@ -16475,6 +16762,9 @@ continue; } } + for(var l=0;l.cardeffect{ + font-family: 'huangcao'; + font-size:108px; + width: 100%; + text-align: center; + top:calc(50% - 54px); + left:0; + animation:cardeffect 1s; + -webkit-animation:cardeffect 1s; + + animation-fill-mode: forwards; + -webkit-animation-fill-mode: forwards; +} .player>.damage.damageadded{ opacity: 1; transform:scale(1); @@ -294,7 +307,7 @@ margin-bottom: 5px; .player.linked>.damage.damageadded{ transform:scale(1) rotate(90deg); } -.avatar{width: 96px;height: 96px;left: 12px;top: 12px;overflow: hidden;} +.avatar{width: 100px;height: 100px;left: 10px;top: 10px;overflow: hidden;} .avatar2{width: 42px;height: 42px;top: 70px;left: 70px;overflow: hidden;} .equips{width: 96px;height: 96px;right: 14px;top:12px;} .equips>div{width: 42px;height: 42px;margin: 0;position: absolute;} @@ -509,6 +522,10 @@ margin-bottom: 5px; -webkit-animation-fill-mode: forwards; } .card.thrown{position: absolute;opacity: 1;margin:0} +#arena.thrownhighlight>.card.thrown:not(.thrownhighlight){ + opacity: 0.5; + transform:scale(0.95); +} .card.start{ animation: card_start 0.5s; -webkit-animation: card_start 0.5s; @@ -736,7 +753,8 @@ div[data-nature='soilm']{ text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px, rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px; } -.player .identity[data-color="unknownx"]{ +.player .identity[data-color="unknownx"], +div[data-nature='black']{ text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px, rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px; } @@ -877,10 +895,17 @@ div[data-color="unknownm"]{ .glow{ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(0, 133, 255, 0.8) 0 0 15px !important; } -.glow2{ +.glow2:not(.player.glow_phase)>.avatar{ /*-webkit-animation:control_glow 4s infinite;*/ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important; } +.player:not(.glow_phase)>.avatar.glow2{ + box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 5px, rgba(10, 155, 67, 1) 0 0 10px, rgba(10, 155, 67, 1) 0 0 10px !important +} +.player:not(.selectable):not(.selected).glow_phase{ + box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgb(235, 239, 59) 0 0 15px, rgb(199, 64, 64) 0 0 15px !important; + /*box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;*/ +} .control.blue{ background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1)); @@ -902,6 +927,14 @@ div[data-color="unknownm"]{ } /*--------动画--------*/ +@keyframes cardeffect{ + 0%{opacity: 0;transform: scale(0.8)} + 2%{opacity: 1;transform: scale(1)} + 50%{opacity: 1;transform: scale(1)} + 100%{opacity: 0;transform: scale(0.8)} + /*from{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;} + to{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important}*/ +} @keyframes control_glow{ 0%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px} 30%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px} diff --git a/layout/default/menu.css b/layout/default/menu.css index 4e384a787..441ab05d9 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -412,9 +412,9 @@ background-size: cover; } .videonode.menubutton>.videoavatar2{ - width: 24px; - height: 24px; - top:43px; + width: 20px; + height: 20px; + top:47px; left:3px; background-size: cover; border-radius: 100%; diff --git a/layout/mobile/equip.css b/layout/mobile/equip.css index beeca2d31..340a11c81 100644 --- a/layout/mobile/equip.css +++ b/layout/mobile/equip.css @@ -5,7 +5,7 @@ top:auto; right:auto; bottom:18px; - left:12px; + left:10px; text-align:left; } .player:not([data-position='0']).minskin .equips, @@ -120,7 +120,7 @@ .player:not([data-position='0']).linked .equips, #arena.chess .player.linked .equips{ - transform:rotate(90deg) translate(-150px,-6px); + transform:rotate(90deg) translate(-152px,-6px); transform-origin:bottom left; } .player:not([data-position='0']).minskin.linked .equips, diff --git a/layout/newlayout/equip.css b/layout/newlayout/equip.css index 1f324f68f..d3f7d8dd0 100644 --- a/layout/newlayout/equip.css +++ b/layout/newlayout/equip.css @@ -4,7 +4,7 @@ top:auto; right:auto; bottom:18px; - left:12px; + left:10px; text-align:left; } .player.minskin .equips{ @@ -100,7 +100,7 @@ .player.linked .equips{ - transform:rotate(90deg) translate(-150px,-6px); + transform:rotate(90deg) translate(-152px,-6px); transform-origin:bottom left; } .player.minskin.linked .equips{ diff --git a/layout/newlayout/global.css b/layout/newlayout/global.css index c633efbba..0eb4122ad 100644 --- a/layout/newlayout/global.css +++ b/layout/newlayout/global.css @@ -3,8 +3,8 @@ height:180px; } .player .avatar{ - width:126px; - height:156px; + width:130px; + height:160px; } .player.minskin{ width:120px; @@ -12,14 +12,14 @@ /*zoom:0.9;*/ } .player.minskin .avatar{ - height:96px; - width:96px; + height:100px; + width:100px; } .player.minskin .hp{ - left:86px; + left:88px; } .player.minskin .hp.text{ - left:86px; + left:88px; } .player.minskin .hp.longlong{ left:74px; @@ -48,17 +48,17 @@ } .player.fullskin2 .avatar, .player.fullskin2 .avatar2{ - width:63px; + width:65px; background-position:50%; } .player.fullskin2 .avatar{ border-radius:8px 0 0 8px; } .player.fullskin2 .avatar2{ - top:12px; + top:10px; left:auto; - right:12px; - height:156px; + right:10px; + height:160px; z-index:1; border-radius:0 8px 8px 0; } @@ -117,9 +117,9 @@ width:18px; line-height: 16px; text-align: center; - bottom: 20px; + bottom: 18px; top: auto; - left: 116px; + left: 118px; z-index:3; transform:rotate(180deg); } @@ -132,7 +132,7 @@ } .player .hp.long{ bottom:12px; - max-height:156px; + max-height:160px; } .player .hp.longlong{ width:30px; @@ -153,7 +153,7 @@ .player .count{ top:auto; bottom:30px; - left:-2px; + left:-3px; padding:2px; line-height:20px; width:10px; diff --git a/mode/boss.js b/mode/boss.js index c00acb44b..faed6fb4e 100755 --- a/mode/boss.js +++ b/mode/boss.js @@ -290,7 +290,7 @@ mode.boss={ game.arrangePlayers(); for(var i=0;i=3){ for(var i=0;i1) return 0; return Math.min(3,get.population('fan')); case 'fan': return -4; @@ -667,7 +680,8 @@ mode.identity={ if(get.population('fan')==0) num=-5; else if(situation<=0) num=0; else if(game.zhu&&game.zhu.hp<2) num=0; - else if(game.zhu&&game.zhu.hp==2) num=-0.5 + else if(game.zhu&&game.zhu.hp==2) num=-1; + else if(game.zhu&&game.zhu.hp<=2&&situation>1) num=-1; else num=-2; if(strategy==2) num--; if(strategy==3) num++; @@ -675,13 +689,14 @@ mode.identity={ case 'nei': if(from==to) return 10; if(from.ai.friend.contains(to)) return 5; + if(get.population('fan')+get.population('zhong')>0) return 0; return -1; case 'fan': if(strategy==5) return Math.max(-1,situation); if(strategy==6) return Math.min(0,situation); - if((game.zhu&&game.zhu.hp<=2&&situation<=0)||situation<-1) num=-3; + if((game.zhu&&game.zhu.hp<=2&&situation<0)||situation<-1) num=-3; else if(situation<0||get.population('zhong')==0) num=-2; - else if((game.zhu&&game.zhu.hp>4&&situation>0)||situation>1) num=1; + else if((game.zhu&&game.zhu.hp>=4&&situation>0)||situation>1) num=1; else num=0; if(strategy==2) num++; if(strategy==3) num--; @@ -708,10 +723,11 @@ mode.identity={ var zhuzhong=0,total=0,zhu,fan=0; for(i=0;i4){ + php=4; } + j=player.get('h').length+player.get('e').length*1.5+php*2; if(player.identity=='zhu'){ zhuzhong+=j*1.2+5; total+=j*1.2+5; diff --git a/mode/stone.js b/mode/stone.js index 46c009f03..3e10f6778 100755 --- a/mode/stone.js +++ b/mode/stone.js @@ -1208,8 +1208,8 @@ mode.stone={ if(es.length){ player.getLeader().line(enemy); game.delay(); - enemy.gain(es,'gain2'); - game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌') + enemy.discard(es.randomGet()); + // game.log(get.translation(event.enemy)+'将'+get.translation(es)+'收入手牌') } } }, @@ -1450,7 +1450,7 @@ mode.stone={ stone_shujiang_info:'你出场时,已方主将可视为对一名敌方角色使用一张杀', stone_wubing:'吴兵', - stone_wubing_info:'你出场时,敌方主将将装备区内的所有牌收入手牌', + stone_wubing_info:'你出场时,敌方主将随机弃置一张装备牌', stone_wuguan:'吴官', stone_wuguan_info:'你出场时,已方主将本回合手牌上限+2', stone_wujiang:'吴将', diff --git a/mode/versus.js b/mode/versus.js index 10292ff6e..6f4a84483 100755 --- a/mode/versus.js +++ b/mode/versus.js @@ -365,7 +365,7 @@ mode.versus={ var num=lib.storage.number; ui.create.players(num*2); for(var i=0;i=4){ ui.arena.dataset.number=parseInt(ui.arena.dataset.number)+1; diff --git a/theme/cardstyle/default.css b/theme/cardstyle/default.css new file mode 100644 index 000000000..e69de29bb diff --git a/theme/cardstyle/music.css b/theme/cardstyle/music.css new file mode 100644 index 000000000..7e2f5aef1 --- /dev/null +++ b/theme/cardstyle/music.css @@ -0,0 +1,6 @@ +.card:not(*:empty){ + color:rgb(77, 60, 51); + text-shadow:none; + background: url('../music/wood3.png'); + background-size:auto; +} diff --git a/theme/cardstyle/simple.css b/theme/cardstyle/simple.css new file mode 100644 index 000000000..61cddb4d0 --- /dev/null +++ b/theme/cardstyle/simple.css @@ -0,0 +1,9 @@ +.card:not(*:empty){ + color:rgb(77, 60, 51); + text-shadow:none; + background: url('../simple/card.png'); + background-size:cover; +} +#arena:not(.chess) .player[data-position='0']>.equips>.equip5 { + border-radius: 8px; +} diff --git a/theme/cardstyle/wood.css b/theme/cardstyle/wood.css new file mode 100644 index 000000000..583d8cddf --- /dev/null +++ b/theme/cardstyle/wood.css @@ -0,0 +1,6 @@ +.card:not(*:empty){ + color:rgb(77, 60, 51); + text-shadow:none; + background: url('../woodden/wood.jpg'); + background-size:auto; +} diff --git a/theme/simple/style.css b/theme/simple/style.css index a6e28318e..fee664ec0 100755 --- a/theme/simple/style.css +++ b/theme/simple/style.css @@ -15,17 +15,19 @@ body{ display: block; } #system>div>div,#mebg,.control,.player,.card,.avatar,.avatar2,.button,#window>.dialog.popped, -.player.unseen .equips:not(*:empty), +.player.unseen .equips:not(*:empty),.menu,.menubutton, #arena.mobile:not(.chess) .player[data-position='0'] .equips{ box-shadow: rgba(0, 0, 0, 0.4) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px; background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)); border-radius: 8px; } -.menu{ - box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.2) 0 3px 10px; - background-image: linear-gradient(#4b4b4b, #464646); - border-radius: 8px; +.menubutton{ + border-radius: 4px; } +/*.player{ + background-image: url('card.png'); + background-size: cover; +}*/ #window>.dialog.popped{ border-radius: 6px; } @@ -45,6 +47,11 @@ body{ #me>div>.card,#arena>.card:not(*:empty){ box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px; } + +.menupaused{ + opacity: 0.3; +} + .fire{ color: rgb(255,119,63); } diff --git a/theme/simple/unknown.png b/theme/simple/unknown.png new file mode 100644 index 000000000..6a27ff6a1 Binary files /dev/null and b/theme/simple/unknown.png differ