This commit is contained in:
libccy 2015-11-25 20:34:54 +08:00
parent dccdeaafdf
commit 4662814a72
21 changed files with 113 additions and 26 deletions

View File

@ -2,3 +2,5 @@
低性能模式优化
双击换肤
新手向导
录像声音
bug修复

View File

@ -360,6 +360,7 @@ card.extra={
},
forced:true,
popup:false,
audio:false,
content:function(){
player.removeSkill('jiu');
if(player.node.jiu){

View File

@ -344,6 +344,7 @@ character.gujian={
trigger:{source:'damageEnd'},
forced:true,
popup:false,
audio:false,
filter:function(event,player){
return player.storage.mingkong?true:false;
},

View File

@ -136,6 +136,7 @@ character.mountain={
trigger:{player:'phaseEnd'},
forced:true,
popup:false,
audio:false,
content:function(){
"step 0"
player.chooseToDiscard(true);
@ -161,6 +162,7 @@ character.mountain={
trigger:{player:'phaseAfter'},
forced:true,
popup:false,
audio:false,
content:function(){
if(player.marks.fangquan){
player.marks.fangquan.delete();

View File

@ -384,6 +384,7 @@ character.refresh={
init:function(player){
player.storage.reqianxun2=[];
},
audio:2,
trigger:{target:'useCardToBegin',player:'judgeBefore'},
filter:function(event,player){
if(player.num('h')==0) return false;
@ -412,6 +413,7 @@ character.refresh={
reqianxun2:{
trigger:{global:'phaseAfter'},
forced:true,
audio:false,
content:function(){
player.gain(player.storage.reqianxun2);
player.removeSkill('reqianxun2');
@ -687,6 +689,7 @@ character.refresh={
forced:true,
mark:true,
popup:'遗计拿牌',
audio:false,
content:function(){
player.$draw(player.storage.reyiji2.length);
player.gain(player.storage.reyiji2);

View File

@ -758,6 +758,7 @@ character.sp={
trigger:{global:'phaseAfter'},
forced:true,
priority:10,
audio:2,
mod:{
cardEnabled:function(){
return false;
@ -1224,6 +1225,7 @@ character.sp={
kuiwei2:{
trigger:{player:'phaseDrawBegin'},
forced:true,
audio:false,
content:function(){
var num=0;
for(var i=0;i<game.players.length;i++){
@ -2607,6 +2609,7 @@ character.sp={
trigger:{player:'phaseBegin'},
forced:true,
popup:false,
audio:false,
content:function(){
player.removeSkill('duwu2');
}
@ -2706,6 +2709,7 @@ character.sp={
trigger:{player:'phaseBegin'},
forced:true,
mark:true,
audio:false,
content:function(){
"step 0"
if(player.storage.bifa[1].isAlive()){
@ -2930,6 +2934,7 @@ character.sp={
trigger:{player:'phaseUseEnd'},
forced:true,
popup:false,
audio:false,
content:function(){
"step 0"
player.removeSkill('lihun2');

View File

@ -3307,7 +3307,8 @@ character.swd={
prompt:'将一张红桃手牌当作流星火羽使用',
check:function(card){return 6-ai.get.value(card)},
ai:{
threaten:1.4
threaten:1.4,
order:9,
}
},
rexue:{

View File

@ -198,6 +198,7 @@ character.wind={
trigger:{player:['damageAfter','damageCancelled']},
forced:true,
popup:false,
audio:false,
content:function(){
if(player.hp<player.maxHp) player.draw(player.maxHp-player.hp);
player.removeSkill('tianxiang2');

View File

@ -326,6 +326,7 @@ character.woods={
trigger:{player:'phaseDrawEnd'},
forced:true,
popup:false,
audio:false,
content:function(){
"step 0"
player.removeSkill('haoshi2');

View File

@ -1742,6 +1742,7 @@ character.yijiang={
trigger:{global:'phaseAfter'},
forced:true,
popup:false,
audio:false,
content:function(){
if(lib.config.glow_phase){
if(_status.currentPhase){
@ -1871,6 +1872,7 @@ character.yijiang={
xinpojun2:{
trigger:{global:'phaseEnd'},
forced:true,
audio:false,
mark:true,
intro:{
content:'cardCount'
@ -2313,6 +2315,7 @@ character.yijiang={
trigger:{global:'phaseAfter'},
forced:true,
mark:true,
audio:false,
content:function(){
player.removeSkill('qianxi2');
delete player.storage.qianxi2;
@ -2547,6 +2550,7 @@ character.yijiang={
xiantu2:{
trigger:{player:'phaseUseEnd'},
forced:true,
audio:false,
content:function(){
if(player.storage.xiantu){
player.storage.xiantu.loseHp();
@ -2559,6 +2563,7 @@ character.yijiang={
xiantu3:{
trigger:{source:'dieAfter'},
forced:true,
audio:false,
content:function(){
delete player.storage.xiantu;
player.removeSkill('xiantu2');
@ -2755,6 +2760,7 @@ character.yijiang={
trigger:{player:'phaseEnd'},
forced:true,
popup:false,
audio:false,
content:function(){
player.removeSkill('chanhui2');
}
@ -4002,6 +4008,7 @@ character.yijiang={
shiyong2:{
trigger:{player:'damageEnd'},
forced:true,
audio:false,
check:function(){
return false;
},

View File

@ -221,7 +221,7 @@ window.config={
image_background:'default',
card_font:'xiaozhuan',
show_name:false,
show_name:true,
show_replay:false,
show_pause:true,
show_auto:true,

View File

@ -4083,7 +4083,7 @@
var skills=info[3];
this.skills.length=0;
this.classList.add('fullskin');
if(!game.minskin&&lib.isNewLayout()){
if(!game.minskin&&lib.isNewLayout()&&!info[4].contains('minskin')){
this.classList.remove('minskin');
this.node.avatar.setBackground(character,'character');
}
@ -4111,6 +4111,12 @@
this.maxHp=info[2];
this.hujia=0;
this.node.intro.innerHTML=lib.config.intro;
switch(this.group){
case 'wei':this.node.name.dataset.nature='watermm';break;
case 'shu':this.node.name.dataset.nature='soilmm';break;
case 'wu':this.node.name.dataset.nature='woodmm';break;
case 'qun':this.node.name.dataset.nature='metalmm';break;
}
if(lib.config.touchscreen){
lib.setLongPress(this,ui.click.intro);
}
@ -5320,7 +5326,7 @@
this.node.handcards2.appendChild(cards[i]);
}
}
if(this==game.me) ui.updatehl();
if(this==game.me||_status.video) ui.updatehl();
if(!_status.video){
game.addVideo('directgain',this,get.cardsInfo(cards));
this.update();
@ -8073,6 +8079,7 @@
}
if(_status.skillaudio.contains(str)) return;
_status.skillaudio.add(str);
game.addVideo('playAudio',null,str);
setTimeout(function(){
_status.skillaudio.remove(str);
},1000);
@ -8096,6 +8103,7 @@
},
playSkillAudio:function(name){
if(_status.skillaudio.contains(name)) return;
game.addVideo('playSkillAudio',null,name);
_status.skillaudio.add(name);
setTimeout(function(){
_status.skillaudio.remove(name);
@ -8416,6 +8424,12 @@
ui.updateh(true);
}
},
playAudio:function(str){
game.playAudio(str);
},
playSkillAudio:function(name){
game.playSkillAudio(name);
},
phaseChange:function(player){
if(player){
var glowing=document.querySelector('.glow_phase');
@ -9091,6 +9105,7 @@
checkMatch(hs,phs);
checkMatch(es,pes);
checkMatch(js,pjs);
ui.updatehl();
}
else{
console.log(player);
@ -9211,15 +9226,21 @@
player.node.handcards1.innerHTML='';
player.node.handcards2.innerHTML='';
player.directgain(cards,false);
if(lib.config.low_performance){
game.me.node.handcards1.remove();
game.me.node.handcards2.remove();
}
else{
game.me.node.handcards1.delete();
game.me.node.handcards2.delete();
}
game.me.node.handcards1.delete();
game.me.node.handcards2.delete();
game.me=player;
ui.handcards1=player.node.handcards1.animate('start').fix();
ui.handcards2=player.node.handcards2.animate('start').fix();
ui.handcards1Container.appendChild(ui.handcards1);
ui.handcards2Container.appendChild(ui.handcards2);
ui.handcards1Container.insertBefore(ui.handcards1,ui.handcards1Container.firstChild);
ui.handcards2Container.insertBefore(ui.handcards2,ui.handcards2Container.firstChild);
game.me=player;
ui.updateh(true);
if(lib.config.mode=='chess'){
ui.create.fakeme();
@ -10557,13 +10578,19 @@
},
swapControl:function(player){
if(player==game.me) return;
game.me.node.handcards1.delete();
game.me.node.handcards2.delete();
if(lib.config.low_performance){
game.me.node.handcards1.remove();
game.me.node.handcards2.remove();
}
else{
game.me.node.handcards1.delete();
game.me.node.handcards2.delete();
}
game.me=player;
ui.handcards1=player.node.handcards1.animate('start').fix();
ui.handcards2=player.node.handcards2.animate('start').fix();
ui.handcards1Container.appendChild(ui.handcards1);
ui.handcards2Container.appendChild(ui.handcards2);
ui.handcards1Container.insertBefore(ui.handcards1,ui.handcards1Container.firstChild);
ui.handcards2Container.insertBefore(ui.handcards2,ui.handcards2Container.firstChild);
ui.updateh(true);
game.addVideo('swapControl',player,get.cardsInfo(player.get('h')));
@ -13901,9 +13928,9 @@
ui.create.div('',node.node.hp);
}
}
// if(!lib.config.show_name){
if(!lib.config.show_name){
node.node.name.style.display='none';
// }
}
var name=get.translation(item);
node.node.name.innerHTML='';
for(var i=0;i<name.length;i++){
@ -16012,7 +16039,10 @@
updateh:function(compute){
if(!game.me) return;
if(lib.config.low_performance){
if(compute) ui.updatehl();
if(compute){
ui.updatehl();
setTimeout(ui.updatehl,1000);
}
return;
}
if(compute){

View File

@ -330,6 +330,8 @@ margin-bottom: 5px;
font-family: 'xinwei';
font-size: 20px;
letter-spacing: -2px;
right:5px;
text-align: right;
}
.player>.avatar.hidden,
.player>.avatar2.hidden{
@ -357,7 +359,10 @@ margin-bottom: 5px;
filter:grayscale(1);
-webkit-filter:grayscale(1);
}
.player>.name{left: 16px;top:36px;font-family: 'huangcao';font-size:20px}
.player>.name{left: 16px;top:24px;font-family: 'xinwei';font-size:20px}
.button.character>.name{
font-family: 'xinwei'
}
.player>.intro{top:87px;left: 18px;}
.player>.damage{
font-family: 'huangcao';
@ -814,6 +819,10 @@ div[data-nature='metalm']{
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 5px,
rgba(255, 203, 0,1) 0 0 5px,black 0 0 1px;
}
div[data-nature='metalmm']{
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,
rgba(255, 203, 0,1) 0 0 2px,black 0 0 1px;
}
.player .identity[data-color="nei"],
.player .identity[data-color="ye"],
div[data-nature='thunder']{
@ -830,6 +839,14 @@ div[data-nature='wood']{
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px,
rgba(57, 123, 4,1) 0 0 10px,rgba(57, 123, 4,1) 0 0 20px,rgba(57, 123, 4,1) 0 0 20px,black 0 0 1px;
}
div[data-nature='woodm']{
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 5px,
rgba(57, 123, 4,1) 0 0 5px,black 0 0 1px;
}
div[data-nature='woodmm']{
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,
rgba(57, 123, 4,1) 0 0 2px,black 0 0 1px;
}
.player .identity[data-color="cai"],
.player .identity[data-color="wei"],
div[data-nature='water']{
@ -839,6 +856,9 @@ div[data-nature='water']{
div[data-nature='waterm']{
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 5px,
rgba(78, 117, 140,1) 0 0 5px,black 0 0 1px;
}div[data-nature='watermm']{
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,
rgba(78, 117, 140,1) 0 0 2px,black 0 0 1px;
}
.player .identity[data-color="shu"],
div[data-nature='soil']{
@ -849,6 +869,10 @@ 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;
}
div[data-nature='soilmm']{
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,
rgba(128, 59, 2,1) 0 0 2px,black 0 0 1px;
}
.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,

View File

@ -91,6 +91,7 @@
#arena:not(.chess) .player[data-position='0']>.name{
left:4px;
top:10px;
}
#arena:not(.chess) .player[data-position='0']>.identity{
left: 106px;

View File

@ -23,3 +23,9 @@
#arena.stone>.player.minskin[data-position='8']{top:30px;left:0;}
#arena.stone>.card[data-position='8']{top:38px;left:8px;}
#arena.stone>.popup[data-position='8']{top:160px;left:8px;}
#arena:not(.chess).mobile>.player[data-position='0']>.name{
top:30px;
}
#arena .player>.name{
top:36px;
}

View File

@ -153,14 +153,15 @@ mode.guozhan={
dialog.add('选择座位');
var seats=document.createElement('table');
seats.style.margin='0 auto';
seats.style.maxWidth='490px';
seats.style.maxWidth=(60*parseInt(get.config('player_number')))+'px';
var tr=document.createElement('tr');
seats.appendChild(tr);
for(var i=1;i<=game.players.length;i++){
var td=document.createElement('td');
tr.appendChild(td);
td.style.width='40px';
td.style.fontSize='18px';
td.style.fontSize='25px';
td.style.fontFamily='xinwei';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1;
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){

View File

@ -433,7 +433,7 @@ mode.identity={
dialog.add('选择身份');
var table=document.createElement('table');
table.style.margin='0 auto';
table.style.maxWidth='500px';
table.style.maxWidth='400px';
var tr=document.createElement('tr');
table.appendChild(tr);
var list;
@ -447,9 +447,9 @@ mode.identity={
for(var i=0;i<list.length;i++){
var td=document.createElement('td');
tr.appendChild(td);
td.style.width='40px';
td.style.fontSize='18px';
td.link=list[i];
td.style.fontSize='25px';
td.style.fontFamily='xinwei';
if(td.link===game.me.identity){
td.classList.add('thundertext');
}
@ -483,14 +483,15 @@ mode.identity={
dialog.add('选择座位');
var seats=document.createElement('table');
seats.style.margin='0 auto';
seats.style.maxWidth='490px';
seats.style.maxWidth=(60*(parseInt(get.config('player_number'))-1))+'px';
var tr=document.createElement('tr');
seats.appendChild(tr);
for(var i=2;i<=game.players.length;i++){
var td=document.createElement('td');
tr.appendChild(td);
td.style.width='40px';
td.style.fontSize='18px';
td.style.fontSize='25px';
td.style.fontFamily='xinwei';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1;
if(get.distance(game.zhu,game.me,'absolute')===i-1){

View File

@ -304,7 +304,7 @@ mode.stone={
list2.push(name);
}
lib.card[name]={
image:'character/default/'+i,
image:'character/'+i,
stoneact:lib.character[i][5][0]
};
for(j in lib.card.stonecharacter){

View File

@ -36,7 +36,7 @@ play.character={
lib.card[name]={
enable:true,
type:'character',
image:'character/default/'+list[i],
image:'character/'+list[i],
color:'white',
opacity:1,
textShadow:'black 0 0 2px',