This commit is contained in:
libccy 2016-07-01 11:09:23 +08:00
parent 56af0b5678
commit 88a8da8d02
11 changed files with 199 additions and 59 deletions

View File

@ -104,6 +104,24 @@ card.refresh={
save:true,
respondSha:true,
respondShan:true,
skillTagFilter:function(player,tag){
var muniu=player.get('e','5');
if(!muniu||!muniu.cards) return false;
for(var i=0;i<muniu.cards.length;i++){
switch(tag){
case 'respondSha':if(muniu.cards[i].name=='sha') return true;break;
case 'respondShan':if(muniu.cards[i].name=='shan') return true;break;
case 'save':{
if(muniu.cards[i].name=='tao'||muniu.cards[i].name=='spell_zhiliaoshui') return true;
if(player==_status.event.dying){
if(muniu.cards[i].name=='jiu'||muniu.cards[i].name=='tianxianjiu') return true;
}
break;
}
}
}
return false;
},
order:1,
expose:0.1,
result:{

View File

@ -770,12 +770,14 @@ card.standard={
if(player.get('s').contains('xinwuyan')) return 0;
if(target.get('s').contains('xinwuyan')) return 0;
if(event.turn==target){
if(player.hasSkill('naman')) return -1;
if(ai.get.attitude(target,player)<0){
return ai.get.unuseful2(card)
}
return -1;
}
else{
if(target.hasSkill('naman')) return -1;
if(ai.get.attitude(player,target)<0){
return ai.get.unuseful2(card)
}
@ -1279,6 +1281,9 @@ card.standard={
selectCard:2,
position:'h',
viewAs:{name:'sha'},
filter:function(event,player){
return player.num('h')>=2;
},
audio:true,
prompt:'将两张手牌当杀使用或打出',
check:function(card){
@ -1287,6 +1292,9 @@ card.standard={
},
ai:{
respondSha:true,
skillTagFilter:function(event,player){
return player.num('h')>=2;
},
}
},
guanshi_skill:{

View File

@ -1462,10 +1462,12 @@ character.shenhua={
audio:2,
enable:'chooseToUse',
filterCard:function(card){
if(get.type(card)=='trick') return false;
if(get.type(card)=='delay') return false;
if(get.type(card)!='basic'&&get.type(card)!='equip') return false;
return get.color(card)=='black';
},
filter:function(event,player){
return player.num('he',{type:['basic','equip'],color:'black'})
},
position:'he',
viewAs:{name:'bingliang'},
prompt:'将一黑色的基本牌或装备牌当兵粮寸断使用',

View File

@ -7,7 +7,7 @@ character.swd={
swd_septem:['male','qun',4,['jiying','liaoyuan','yishan']],
swd_kama:['female','qun',3,['yueren','shangshi']],
// swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']],
swd_nicole:['female','wu',3,['huanjian','lingwu','minjing']],
swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']],
swd_wangsiyue:['female','wei',3,['duishi','biyue']],
swd_weida:['female','qun',3,['yueren','zhenlie']],
swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian']],
@ -3209,6 +3209,9 @@ character.swd={
},
viewAs:{name:'dujian'},
position:'he',
filter:function(event,player){
return player.num('h',{color:'black'})>0;
},
viewAsFilter:function(player){
if(!player.num('he',{color:'black'})) return false;
},

View File

@ -22698,48 +22698,95 @@
var packsource;
var clickCapt=function(e){
if(_status.dragged) return;
if(newlined2){
newlined2.style.display='none';
packsource.innerHTML='武将包';
packsource.classList.remove('thundertext');
if(this.alphabet){
if(this.classList.contains('thundertext')){
dialog.currentcapt=null;
dialog.currentcaptnode=null;
this.classList.remove('thundertext');
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentcapt2&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt,true)){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
else{
if(dialog.currentcaptnode){
dialog.currentcaptnode.classList.remove('thundertext');
}
dialog.currentcapt=this.link;
dialog.currentcaptnode=this;
this.classList.add('thundertext');
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentcapt2&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt,true)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
}
if(this.classList.contains('thundertext')){
dialog.currentcapt=null;
dialog.currentcaptnode=null;
this.classList.remove('thundertext');
// this.dataset.nature='';
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
else{
// this.dataset.nature=this._nature||'metalm';
if(dialog.currentcaptnode){
dialog.currentcaptnode.classList.remove('thundertext');
// dialog.currentcaptnode.dataset.nature='';
}
dialog.currentcapt=this.link;
dialog.currentcaptnode=this;
this.classList.add('thundertext');
if(this.parentNode==newlined2){
packsource.innerHTML=this.innerHTML;
packsource.classList.add('thundertext');
if(newlined2){
newlined2.style.display='none';
packsource.innerHTML='武将包';
packsource.classList.remove('thundertext');
}
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)||
(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup)){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
if(this.classList.contains('thundertext')){
dialog.currentcapt2=null;
dialog.currentcaptnode2=null;
this.classList.remove('thundertext');
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
else{
if(dialog.currentcaptnode2){
dialog.currentcaptnode2.classList.remove('thundertext');
}
dialog.currentcapt2=this.link;
dialog.currentcaptnode2=this;
this.classList.add('thundertext');
if(this.parentNode==newlined2){
packsource.innerHTML=this.innerHTML;
packsource.classList.add('thundertext');
}
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt,true)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentgroup&&dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
}
}
}
if(dialog.seperate){
for(var i=0;i<dialog.seperate.length;i++){
if(!dialog.seperate[i].nextSibling.querySelector('.button:not(.nodisplay)')){
@ -22788,6 +22835,7 @@
var span=document.createElement('span');
span.innerHTML=' '+namecapt[i].toUpperCase()+' ';
span.link=namecapt[i];
span.alphabet=true;
span.addEventListener(lib.config.touchscreen?'touchend':'click',clickCapt);
node.appendChild(span);
}
@ -22805,9 +22853,11 @@
dialog.currentgroup=null;
dialog.currentgroupnode=null;
node.classList.remove('thundertext');
// node.dataset.nature='';
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
if(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentcapt2&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt,true)){
dialog.buttons[i].classList.add('nodisplay');
}
else{
@ -22818,17 +22868,20 @@
else{
if(dialog.currentgroupnode){
dialog.currentgroupnode.classList.remove('thundertext');
// dialog.currentgroupnode.dataset.nature='';
}
dialog.currentgroup=link;
dialog.currentgroupnode=node;
node.classList.add('thundertext');
// node.dataset.nature=node._nature;
for(var i=0;i<dialog.buttons.length;i++){
if(dialog.buttons[i].group!=link||
(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt))){
if(dialog.currentcapt&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.currentcapt2&&dialog.buttons[i].capt!=dialog.getCurrentCapt(dialog.buttons[i].link,dialog.buttons[i].capt,true)){
dialog.buttons[i].classList.add('nodisplay');
}
else if(dialog.buttons[i].group!=dialog.currentgroup){
dialog.buttons[i].classList.add('nodisplay');
}
else{
dialog.buttons[i].classList.remove('nodisplay');
}
@ -22952,12 +23005,17 @@
dialog.classList.add('noupdate');
dialog.classList.add('scroll1');
dialog.classList.add('scroll2');
dialog.getCurrentCapt=function(link,capt){
if(lib.characterDialogGroup[this.currentcapt]){
return lib.characterDialogGroup[this.currentcapt](link,capt);
dialog.getCurrentCapt=function(link,capt,noalph){
var currentcapt=noalph?this.currentcapt2:this.currentcapt;
if(this.seperatelist&&noalph){
if(this.seperatelist[currentcapt].contains(link)) return capt;
return null;
}
if(lib.characterPack[this.currentcapt]){
if(lib.characterPack[this.currentcapt][link]){
if(lib.characterDialogGroup[currentcapt]){
return lib.characterDialogGroup[currentcapt](link,capt);
}
if(lib.characterPack[currentcapt]){
if(lib.characterPack[currentcapt][link]){
return capt;
}
return null;
@ -22972,7 +23030,32 @@
if(seperate){
seperate=seperate(list);
dialog.seperate=[];
dialog.seperatelist=seperate.list;
if(dialog.seperatelist){
newlined=document.createElement('div');
newlined.style.marginTop='5px';
newlined.style.display='block';
newlined.style.fontFamily='xinwei';
if(lib.config.layout=='phone'){
newlined.style.fontSize='32px';
}
else{
newlined.style.fontSize='22px';
}
newlined.style.textAlign='center';
node.appendChild(newlined);
for(var i in dialog.seperatelist){
var span=document.createElement('span');
span.style.margin='3px';
span.innerHTML=i;
span.link=i;
span.seperate=true;
span.addEventListener(lib.config.touchscreen?'touchend':'click',clickCapt);
newlined.appendChild(span);
}
}
for(var i in seperate){
if(i=='list') continue;
var link='';
var linkcontent=seperate[i];
if(i.indexOf('_link:')!=-1){
@ -23534,6 +23617,8 @@
}
ui.auto=ui.create.system('托管',ui.click.auto);
ui.auto.id='autobutton';
ui.autonode=ui.create.div('#autonode','<div>托管中...</div>',ui.arena);
ui.autonode.listen(ui.click.auto);
if(lib.config.mode=='connect'){
ui.auto.hide();
ui.pause.hide();
@ -26121,6 +26206,7 @@
if(!_status.auto){
_status.auto=true;
ui.auto.classList.add('glow');
ui.arena.classList.add('auto');
if(_status.imchoosing&&_status.paused){
if(ui.confirm) ui.confirm.close();
@ -26147,6 +26233,7 @@
ui.control.show();
_status.auto=false;
ui.auto.classList.remove('glow');
ui.arena.classList.remove('auto');
if(game.online){
game.send('unauto');

View File

@ -18,10 +18,14 @@ window.noname_update={
'card/shenqi.js',
'card/hearth.js',
'card/mingzhong.js',
'card/standard.js',
'game/game.js',
'game/config.js',
'mode/stone.js',
'layout/default/layout.css',
'layout/mobile/layout.css',
'layout/newlayout/global.css',
'layout/mode/chess.css',
],
'1.8.16.1':[],
'1.8.16.2':[]

View File

@ -357,6 +357,11 @@ table{table-layout: fixed;}
}
#me,#mebg{width: 100%;height: 140px;top:calc(100% - 140px);left:0;}
#mebg{z-index:-1}
#autonode{z-index: 10;width: 100%;height: 140px;top:calc(100% - 140px);left:0;display: table;text-align: center;font-size: 60px;font-family: 'xinwei';text-shadow: black 0 0 10px}
#arena:not(.chess):not(.mobile)>#autonode{display: none}
#arena:not(.auto)>#autonode{opacity: 0;pointer-events: none}
#arena.auto #handcards1,#arena.auto #handcards2{opacity: 0.5}
#autonode>div{display: table-cell;vertical-align: middle;position: relative}
#handcards1,#handcards2{
width: calc(50% - 140px);height: 127px;padding: 10px;
text-align: left;

View File

@ -20,7 +20,8 @@
line-height: 34px;
}*/
#arena:not(.chess)>#me,
#arena:not(.chess)>#mebg{
#arena:not(.chess)>#mebg,
#arena:not(.chess)>#autonode{
bottom:30px;
width: calc(5000% / 47);
left:calc(-150% / 47);

View File

@ -6,12 +6,20 @@
transition:all 0s !important;
}
#arena.chess>#me,
#arena.chess>#mebg{
#arena.chess>#mebg,
#arena.chess>#autonode{
bottom:0;
top:auto;
border-radius:0;
}
#me>.fakeme.avatar {
width: 120px;
height: 120px;
border-radius: 0px;
top: 0;
left: 0;
background-size: cover;
}
#chess-container{
width:100%;
height :calc(100% - 120px);
@ -45,7 +53,7 @@
#handcards2{
display:none;
}
#mebg,#me{
#mebg,#me,#autonode{
height:120px;
}

View File

@ -399,7 +399,7 @@
.card[data-position='0']{top:calc(100% - 130px);left:calc(50% - 52px);}
.popup[data-position='0']{top:calc(100% - 206px);left:calc(50% - 61px);}
#me,#mebg{top:calc(100% - 150px);}
#me,#mebg,#autonode{top:calc(100% - 150px);}
#handcards1,#handcards2{width: calc(50% - 95px);height: 127px;padding: 10px;}
#handcards2{left: calc(50% + 75px);}
.dialog{

View File

@ -138,7 +138,9 @@ mode.stone={
career[lib.careerList[i]]=[];
careerspell[lib.careerList[i]]=[];
}
var result={}
var result={
list:{}
};
for(var i=0;i<list.length;i++){
if(lib.card[list[i][2]].type=='stonecard'){
if(lib.card[list[i][2]].career&&lib.careerList.contains(lib.card[list[i][2]].career)){
@ -158,9 +160,11 @@ mode.stone={
}
}
for(var i=0;i<lib.careerList.length;i++){
result.list[get.translation(lib.careerList[i])]=careerspell[lib.careerList[i]].concat(career[lib.careerList[i]]);
result['法术·'+get.translation(lib.careerList[i])+'_link:'+lib.careerList[i]]=careerspell[lib.careerList[i]];
result['随从·'+get.translation(lib.careerList[i])+'_link:'+lib.careerList[i]]=career[lib.careerList[i]];
}
result.list['中立']=ns.concat(nl);
result['法术·中立']=ns;
result['随从·中立']=nl;
return result;