This commit is contained in:
libccy 2016-06-27 10:17:51 +08:00
parent d6b727c00a
commit 99eecebf6b
5 changed files with 78 additions and 6 deletions

View File

@ -317,6 +317,9 @@ character.sp={
jili:{ jili:{
trigger:{global:'useCard'}, trigger:{global:'useCard'},
forced:true, forced:true,
check:function(event,player){
return ai.get.effect(player,event.card,event.player,player)>0;
},
filter:function(event,player){ filter:function(event,player){
if(get.color(event.card)!='red') return false; if(get.color(event.card)!='red') return false;
if(!event.targets) return false; if(!event.targets) return false;

View File

@ -3311,7 +3311,7 @@ character.swd={
} }
var js=get.infoCards(data[i].j); var js=get.infoCards(data[i].j);
for(var j=0;j<js.length;j++){ for(var j=0;j<js.length;j++){
player.node.judges.appendChild(js[j]); current.node.judges.appendChild(js[j]);
} }
} }
ui.window.classList.remove('zoomout3'); ui.window.classList.remove('zoomout3');
@ -3423,6 +3423,10 @@ character.swd={
storage[i].judges[j].parentNode==ui.cardPile){ storage[i].judges[j].parentNode==ui.cardPile){
storage[i].judges[j].style.transform=''; storage[i].judges[j].style.transform='';
storage[i].judges[j].viewAs=storage[i].viewAs[j]; storage[i].judges[j].viewAs=storage[i].viewAs[j];
if(storage[i].judges[j].viewAs&&storage[i].judges[j].viewAs!=storage[i].judges[j].name&&storage[i].judges[j].classList.contains('fullskin')){
storage[i].judges[j].classList.add('fakejudge');
storage[i].judges[j].node.background.innerHTML=lib.translate[storage[i].judges[j].viewAs+'_bg']||get.translation(storage[i].judges[j].viewAs)[0]
}
player.node.judges.appendChild(storage[i].judges[j]); player.node.judges.appendChild(storage[i].judges[j]);
} }
} }

View File

@ -724,6 +724,11 @@
} }
} }
}, },
clear_log:{
name:'自动清除历史记录',
init:false,
unfrequent:true,
},
log_highlight:{ log_highlight:{
name:'历史记录高亮', name:'历史记录高亮',
init:true, init:true,
@ -1199,6 +1204,12 @@
} }
else{ else{
map.textequip.hide(); map.textequip.hide();
}
if(config.show_log!='off'){
map.clear_log.show();
}
else{
map.clear_log.hide();
} }
// if(config.theme=='woodden'&&config.image_background=='default'){ // if(config.theme=='woodden'&&config.image_background=='default'){
// map.background_color_wood.show(); // map.background_color_wood.show();
@ -7097,6 +7108,13 @@
card.style.transform=''; card.style.transform='';
card.classList.remove('drawinghidden'); card.classList.remove('drawinghidden');
card.viewAs=viewAs; card.viewAs=viewAs;
if(viewAs&&viewAs!=card.name&&card.classList.contains('fullskin')){
card.classList.add('fakejudge');
card.node.background.innerHTML=lib.translate[viewAs+'_bg']||get.translation(viewAs)[0]
}
else{
card.classList.remove('fakejudge');
}
player.node.judges.insertBefore(card,player.node.judges.firstChild); player.node.judges.insertBefore(card,player.node.judges.firstChild);
if(card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){ if(card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){
card.clone.moveDelete(player); card.clone.moveDelete(player);
@ -7116,9 +7134,14 @@
delete cards[0].viewAs; delete cards[0].viewAs;
} }
if(cards[0].viewAs&&cards[0].viewAs!=cards[0].name){ if(cards[0].viewAs&&cards[0].viewAs!=cards[0].name){
if(cards[0].classList.contains('fullskin')){
cards[0].classList.add('fakejudge');
cards[0].node.background.innerHTML=lib.translate[cards[0].viewAs+'_bg']||get.translation(cards[0].viewAs)[0];
}
game.log(player,'被贴上了<span class="yellowtext">'+get.translation(cards[0].viewAs)+'</span>',cards,''); game.log(player,'被贴上了<span class="yellowtext">'+get.translation(cards[0].viewAs)+'</span>',cards,'');
} }
else{ else{
cards[0].classList.remove('fakejudge');
game.log(player,'被贴上了',cards); game.log(player,'被贴上了',cards);
} }
game.addVideo('addJudge',player,[get.cardInfo(cards[0]),cards[0].viewAs]); game.addVideo('addJudge',player,[get.cardInfo(cards[0]),cards[0].viewAs]);
@ -7569,6 +7592,7 @@
handcards:this.get('h'), handcards:this.get('h'),
equips:this.get('e'), equips:this.get('e'),
judges:this.get('j'), judges:this.get('j'),
views:[],
position:parseInt(this.dataset.position), position:parseInt(this.dataset.position),
hujia:this.hujia, hujia:this.hujia,
side:this.side, side:this.side,
@ -7579,6 +7603,9 @@
linked:this.isLinked(), linked:this.isLinked(),
turnedover:this.isTurnedOver(), turnedover:this.isTurnedOver(),
} }
for(var i=0;i<state.judges.length;i++){
state.views[i]=state.judges[i].viewAs;
}
if(this.getModeState){ if(this.getModeState){
state.mode=this.getModeState(); state.mode=this.getModeState();
} }
@ -13038,6 +13065,11 @@
player.$equip(info.equips[i]); player.$equip(info.equips[i]);
} }
for(var i=0;i<info.judges.length;i++){ for(var i=0;i<info.judges.length;i++){
if(info.views[i]&&info.views[i]!=info.judges[i]){
info.judges[i].classList.add('fakejudge');
info.judges[i].viewAs=info.views[i];
info.judges[i].node.background.innerHTML=lib.translate[info.views[i]+'_bg']||get.translation(info.views[i])[0]
}
player.node.judges.appendChild(info.judges[i]); player.node.judges.appendChild(info.judges[i]);
} }
if(!player.setModeState){ if(!player.setModeState){
@ -15157,6 +15189,10 @@
if(player&&content){ if(player&&content){
var card=get.infoCard(content[0]); var card=get.infoCard(content[0]);
card.viewAs=content[1]; card.viewAs=content[1];
if(card.viewAs&&card.viewAs!=card.name&&card.classList.contains('fullskin')){
card.classList.add('fakejudge');
card.node.background.innerHTML=lib.translate[card.viewAs+'_bg']||get.translation(card.viewAs)[0]
}
player.node.judges.insertBefore(card,player.node.judges.firstChild); player.node.judges.insertBefore(card,player.node.judges.firstChild);
} }
else{ else{
@ -18058,11 +18094,31 @@
},str); },str);
if(lib.config.title) document.title=str; if(lib.config.title) document.title=str;
if(lib.config.show_log!='off'&&!game.chess){ if(lib.config.show_log!='off'&&!game.chess){
ui.arenalog.insertBefore(node.cloneNode(true),ui.arenalog.firstChild); var nodeentry=node.cloneNode(true);
ui.arenalog.insertBefore(nodeentry,ui.arenalog.firstChild);
if(!lib.config.clear_log){
while(ui.arenalog.childNodes.length&&ui.arenalog.scrollHeight>ui.arenalog.offsetHeight){ while(ui.arenalog.childNodes.length&&ui.arenalog.scrollHeight>ui.arenalog.offsetHeight){
ui.arenalog.lastChild.remove(); ui.arenalog.lastChild.remove();
} }
} }
if(!lib.config.low_performance){
nodeentry.style.transition='all 0s';
nodeentry.style.marginBottom=(-nodeentry.offsetHeight)+'px';
ui.refresh(nodeentry);
nodeentry.style.transition='';
nodeentry.style.marginBottom='';
}
if(lib.config.clear_log){
nodeentry.timeout=setTimeout(function(){
nodeentry.delete();
},1000);
for(var i=0;i<ui.arenalog.childElementCount;i++){
if(!ui.arenalog.childNodes[i].timeout){
ui.arenalog.childNodes[i].remove();
}
}
}
}
}, },
putDB:function(type,id,item,callback){ putDB:function(type,id,item,callback){
if(!lib.db) return item; if(!lib.db) return item;

View File

@ -7,12 +7,15 @@ window.noname_update={
global:[ global:[
'character/hearth.js', 'character/hearth.js',
'character/ow.js', 'character/ow.js',
'character/swd.js',
'character/yijiang.js', 'character/yijiang.js',
'character/sp.js', 'character/sp.js',
'card/swd.js', 'card/swd.js',
'card/guozhan.js', 'card/guozhan.js',
'game/game.js', 'game/game.js',
'layout/default/layout.css',
], ],
'1.8.16.1':[] '1.8.16.1':[],
'1.8.16.2':[]
} }
} }

View File

@ -237,6 +237,10 @@ table{table-layout: fixed;}
display: block; display: block;
width: calc(100% - 20px); width: calc(100% - 20px);
left:20px; left:20px;
line-height: 18px;
}
#arena:not(.low_performance) #arenalog>div{
-webkit-animation: game_start 0.5s;
} }
/*#arena[data-font_size='14']{ /*#arena[data-font_size='14']{
font-size:14px; font-size:14px;
@ -575,6 +579,8 @@ div:not(.handcards)>.card>.info>span,
#arena.low_performance .player .equips, #arena.low_performance .player .equips,
#arena.low_performance .player .name{transition: all 0s} #arena.low_performance .player .name{transition: all 0s}
.judges>.card>.background,.marks>.card>.background{font-size: 20px;height: 20px;padding-top: 3px;} .judges>.card>.background,.marks>.card>.background{font-size: 20px;height: 20px;padding-top: 3px;}
.judges>.card.fakejudge.fullskin>.image{display: none !important}
.judges>.card.fakejudge.fullskin>.background{display: block !important;font-family: 'huangcao' !important;padding-top: 4px !important;}
.button.card>.background{font-size: 68px;height: 68px;padding-top: 12px;} .button.card>.background{font-size: 68px;height: 68px;padding-top: 12px;}
.card>.background{font-family:'xiaozhuan'} .card>.background{font-family:'xiaozhuan'}
.card>.background.tight{letter-spacing: -0.2em} .card>.background.tight{letter-spacing: -0.2em}