skins
|
@ -245,7 +245,8 @@ card.yibao={
|
||||||
"step 0"
|
"step 0"
|
||||||
target.chooseToDiscard('he',[1,2]).ai=function(card){
|
target.chooseToDiscard('he',[1,2]).ai=function(card){
|
||||||
if(target.hasSkillTag('nofire')) return 0;
|
if(target.hasSkillTag('nofire')) return 0;
|
||||||
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
if(ai.get.damageEffect(target,player,target,'fire')>=0&&
|
||||||
|
!target.hasSkillTag('maixie')) return 0;
|
||||||
if(player.get('s').contains('xinwuyan')) return 0;
|
if(player.get('s').contains('xinwuyan')) return 0;
|
||||||
if(target.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){
|
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
character.zhuogui={
|
character.zhuogui={
|
||||||
character:{
|
character:{
|
||||||
nianshou:['male','shu',4,['nianrui','qixiang']],
|
nianshou:['male','shu',4,['nianrui','qixiang'],['fullskin']],
|
||||||
// mamian:['male','qun',4,['lianyu','guiji']],
|
mamian:['male','qun',4,['lianyu','guiji'],['fullskin']],
|
||||||
niutou:['male','shu',4,['manjia','xiaoshou'],['fullskin']],
|
niutou:['male','shu',4,['manjia','xiaoshou'],['fullskin']],
|
||||||
baiwuchang:['male','qun',3,['qiangzheng','moukui']],
|
baiwuchang:['male','qun',3,['qiangzheng','moukui'],['fullskin']],
|
||||||
heiwuchang:['male','qun',3,['suoling','xixing']],
|
heiwuchang:['male','qun',3,['suoling','xixing'],['fullskin']],
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
qixiang:{
|
qixiang:{
|
||||||
|
|
91
game/game.js
|
@ -71,6 +71,15 @@
|
||||||
name:'低性能模式',
|
name:'低性能模式',
|
||||||
init:false,
|
init:false,
|
||||||
unfrequent:true,
|
unfrequent:true,
|
||||||
|
onclick:function(bool){
|
||||||
|
game.saveConfig('low_performance',bool);
|
||||||
|
if(bool){
|
||||||
|
ui.arena.classList.add('low_performance');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
ui.arena.classList.remove('low_performance');
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
confirm_exit:{
|
confirm_exit:{
|
||||||
name:'确认退出',
|
name:'确认退出',
|
||||||
|
@ -3487,7 +3496,13 @@
|
||||||
sort=lib.config.sort_card(cards[num]);
|
sort=lib.config.sort_card(cards[num]);
|
||||||
if(lib.config.reverse_sort) sort=-sort;
|
if(lib.config.reverse_sort) sort=-sort;
|
||||||
cards[num].fix();
|
cards[num].fix();
|
||||||
cards[num].animate('start');
|
cards[num].style.transform='';
|
||||||
|
if(!lib.config.low_performance){
|
||||||
|
cards[num].animate('start');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
cards[num].classList.add('drawinghidden');
|
||||||
|
}
|
||||||
|
|
||||||
if(lib.isSingleHandcard()||sort>0) frag1.appendChild(cards[num]);
|
if(lib.isSingleHandcard()||sort>0) frag1.appendChild(cards[num]);
|
||||||
else frag2.appendChild(cards[num]);
|
else frag2.appendChild(cards[num]);
|
||||||
|
@ -3505,6 +3520,7 @@
|
||||||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||||
player.update();
|
player.update();
|
||||||
|
ui.updatehl(player);
|
||||||
},500);
|
},500);
|
||||||
}
|
}
|
||||||
else if(event.animate=='gain'){
|
else if(event.animate=='gain'){
|
||||||
|
@ -3515,6 +3531,7 @@
|
||||||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||||
player.update();
|
player.update();
|
||||||
|
ui.updatehl(player);
|
||||||
},700);
|
},700);
|
||||||
}
|
}
|
||||||
else if(event.animate=='gain2'||event.animate=='draw2'){
|
else if(event.animate=='gain2'||event.animate=='draw2'){
|
||||||
|
@ -3525,6 +3542,7 @@
|
||||||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||||
player.update();
|
player.update();
|
||||||
|
ui.updatehl(player);
|
||||||
},500);
|
},500);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -3532,6 +3550,7 @@
|
||||||
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
|
||||||
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
player.node.handcards2.insertBefore(frag2,player.node.handcards2.firstChild);
|
||||||
player.update();
|
player.update();
|
||||||
|
ui.updatehl(player);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
lose:function(){
|
lose:function(){
|
||||||
|
@ -3555,6 +3574,9 @@
|
||||||
cards[i].original=null;
|
cards[i].original=null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(lib.config.low_performance){
|
||||||
|
cards[i].style.transform+=' scale(0.8)';
|
||||||
|
}
|
||||||
if(event.position){
|
if(event.position){
|
||||||
cards[i].goto(event.position);
|
cards[i].goto(event.position);
|
||||||
}
|
}
|
||||||
|
@ -3562,6 +3584,7 @@
|
||||||
cards[i].delete();
|
cards[i].delete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ui.updatehl(player);
|
||||||
game.addVideo('lose',player,[get.cardsInfo(hs),get.cardsInfo(es),get.cardsInfo(js)]);
|
game.addVideo('lose',player,[get.cardsInfo(hs),get.cardsInfo(es),get.cardsInfo(js)]);
|
||||||
player.update();
|
player.update();
|
||||||
game.addVideo('loseAfter',player);
|
game.addVideo('loseAfter',player);
|
||||||
|
@ -3897,6 +3920,7 @@
|
||||||
player.lose(player.get('e',{subtype:get.subtype(card)}),false);
|
player.lose(player.get('e',{subtype:get.subtype(card)}),false);
|
||||||
"step 1"
|
"step 1"
|
||||||
card.fix();
|
card.fix();
|
||||||
|
card.style.transform='';
|
||||||
if(player.isMin()){
|
if(player.isMin()){
|
||||||
event.finish();
|
event.finish();
|
||||||
ui.discardPile.appendChild(card);
|
ui.discardPile.appendChild(card);
|
||||||
|
@ -3928,11 +3952,13 @@
|
||||||
game.playAudio('effect','judge');
|
game.playAudio('effect','judge');
|
||||||
}
|
}
|
||||||
cards[0].fix();
|
cards[0].fix();
|
||||||
|
cards[0].style.transform='';
|
||||||
var viewAs=typeof card=='string'?card:card.name;
|
var viewAs=typeof card=='string'?card:card.name;
|
||||||
if(!lib.card[viewAs]||!lib.card[viewAs].effect){
|
if(!lib.card[viewAs]||!lib.card[viewAs].effect){
|
||||||
ui.discardPile.appendChild(cards[0]);
|
ui.discardPile.appendChild(cards[0]);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
cards[0].style.transform='';
|
||||||
player.node.judges.insertBefore(cards[0],player.node.judges.firstChild);
|
player.node.judges.insertBefore(cards[0],player.node.judges.firstChild);
|
||||||
if(cards[0].clone&&cards[0].clone.parentNode==player.parentNode){
|
if(cards[0].clone&&cards[0].clone.parentNode==player.parentNode){
|
||||||
cards[0].clone.moveDelete(player);
|
cards[0].clone.moveDelete(player);
|
||||||
|
@ -5270,9 +5296,12 @@
|
||||||
}
|
}
|
||||||
for(var i=0;i<cards.length;i++){
|
for(var i=0;i<cards.length;i++){
|
||||||
var sort=lib.config.sort_card(cards[i]);
|
var sort=lib.config.sort_card(cards[i]);
|
||||||
if(animate!==false){
|
if(animate!==false&&!lib.config.low_performance){
|
||||||
cards[i].animate('start');
|
cards[i].animate('start');
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
cards[i].classList.add('drawinghidden');
|
||||||
|
}
|
||||||
if(lib.isSingleHandcard()||sort>0){
|
if(lib.isSingleHandcard()||sort>0){
|
||||||
this.node.handcards1.appendChild(cards[i]);
|
this.node.handcards1.appendChild(cards[i]);
|
||||||
}
|
}
|
||||||
|
@ -5280,6 +5309,7 @@
|
||||||
this.node.handcards2.appendChild(cards[i]);
|
this.node.handcards2.appendChild(cards[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ui.updatehl(this);
|
||||||
if(!_status.video){
|
if(!_status.video){
|
||||||
game.addVideo('directgain',this,get.cardsInfo(cards));
|
game.addVideo('directgain',this,get.cardsInfo(cards));
|
||||||
this.update();
|
this.update();
|
||||||
|
@ -6551,6 +6581,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
$equip:function(card){
|
$equip:function(card){
|
||||||
|
card.style.transform='';
|
||||||
var player=this;
|
var player=this;
|
||||||
var equipNum=get.equipNum(card);
|
var equipNum=get.equipNum(card);
|
||||||
var equipped=false;
|
var equipped=false;
|
||||||
|
@ -6561,6 +6592,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
game.print(card.name)
|
||||||
if(!equipped){
|
if(!equipped){
|
||||||
player.node.equips.appendChild(card);
|
player.node.equips.appendChild(card);
|
||||||
}
|
}
|
||||||
|
@ -6624,24 +6656,24 @@
|
||||||
else{
|
else{
|
||||||
var node;
|
var node;
|
||||||
if(get.itemtype(card)=='card'){
|
if(get.itemtype(card)=='card'){
|
||||||
node=this.$throwordered(card,true);
|
// node=this.$throwordered(card.copy(),true);
|
||||||
// node=card.copy('thrown',false);
|
node=card.copy('thrown',false);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
node=this.$throwordered(ui.create.div('.card.thrown'),true);
|
// node=this.$throwordered(ui.create.div('.card.thrown'),true);
|
||||||
// node=ui.create.div('.card.thrown');
|
node=ui.create.div('.card.thrown');
|
||||||
node.moveTo=lib.element.card.moveTo;
|
node.moveTo=lib.element.card.moveTo;
|
||||||
node.moveDelete=lib.element.card.moveDelete;
|
node.moveDelete=lib.element.card.moveDelete;
|
||||||
}
|
}
|
||||||
// node.fixed=true;
|
node.fixed=true;
|
||||||
// node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
||||||
// node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)';
|
||||||
// node.style.transform='scale(0)';
|
node.style.transform='scale(0)';
|
||||||
// node.hide();
|
node.hide();
|
||||||
// ui.arena.appendChild(node);
|
ui.arena.appendChild(node);
|
||||||
// ui.refresh(node);
|
ui.refresh(node);
|
||||||
// node.show();
|
node.show();
|
||||||
// node.style.transform='';
|
node.style.transform='';
|
||||||
|
|
||||||
lib.listenEnd(node);
|
lib.listenEnd(node);
|
||||||
var player=this;
|
var player=this;
|
||||||
|
@ -7107,6 +7139,7 @@
|
||||||
},
|
},
|
||||||
copy:function(){
|
copy:function(){
|
||||||
var node=this.cloneNode(true);
|
var node=this.cloneNode(true);
|
||||||
|
node.style.transform='';
|
||||||
node.name=this.name;
|
node.name=this.name;
|
||||||
node.suit=this.suit;
|
node.suit=this.suit;
|
||||||
node.number=this.number;
|
node.number=this.number;
|
||||||
|
@ -11469,6 +11502,9 @@
|
||||||
if(lib.config.layout=='default'){
|
if(lib.config.layout=='default'){
|
||||||
ui.arena.classList.add('oldlayout');
|
ui.arena.classList.add('oldlayout');
|
||||||
}
|
}
|
||||||
|
if(lib.config.low_performance){
|
||||||
|
ui.arena.classList.add('low_performance');
|
||||||
|
}
|
||||||
if(lib.config.layout=='default'&&lib.config.hp_style=='official'){
|
if(lib.config.layout=='default'&&lib.config.hp_style=='official'){
|
||||||
ui.arena.classList.add('hpimage');
|
ui.arena.classList.add('hpimage');
|
||||||
}
|
}
|
||||||
|
@ -15834,6 +15870,31 @@
|
||||||
ui.update.apply(this,arguments);
|
ui.update.apply(this,arguments);
|
||||||
ui.updateh(true);
|
ui.updateh(true);
|
||||||
},
|
},
|
||||||
|
updatehl:function(player){
|
||||||
|
if(!lib.config.low_performance) return;
|
||||||
|
if(player!=game.me) return;
|
||||||
|
var hs1=[],hs2=[];
|
||||||
|
for(var i=0;i<player.node.handcards1.childElementCount;i++){
|
||||||
|
if(!player.node.handcards1.childNodes[i].classList.contains('removing')){
|
||||||
|
hs1.push(player.node.handcards1.childNodes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i=0;i<player.node.handcards2.childElementCount;i++){
|
||||||
|
if(!player.node.handcards2.childNodes[i].classList.contains('removing')){
|
||||||
|
hs2.push(player.node.handcards2.childNodes[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for(var i=0;i<hs1.length;i++){
|
||||||
|
hs1[i].style.transform='translateX('+(i*112)+'px)';
|
||||||
|
ui.refresh(hs1[i]);
|
||||||
|
hs1[i].classList.remove('drawinghidden');
|
||||||
|
}
|
||||||
|
for(var i=0;i<hs2.length;i++){
|
||||||
|
hs2[i].style.transform='translateX('+(i*112)+'px)';
|
||||||
|
ui.refresh(hs2[i]);
|
||||||
|
hs2[i].classList.remove('drawinghidden');
|
||||||
|
}
|
||||||
|
},
|
||||||
updateh:function(compute){
|
updateh:function(compute){
|
||||||
if(!game.me) return;
|
if(!game.me) return;
|
||||||
if(compute){
|
if(compute){
|
||||||
|
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 20 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 75 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 9.2 KiB |
After Width: | Height: | Size: 46 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 431 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 53 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 48 KiB |
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 39 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 82 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 98 KiB |
After Width: | Height: | Size: 24 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 55 KiB |
After Width: | Height: | Size: 33 KiB |