Add compareCardShowBefore.
This commit is contained in:
parent
f2b7418744
commit
18cebfb44e
27
game/game.js
27
game/game.js
|
@ -2917,10 +2917,12 @@
|
||||||
switch(item){
|
switch(item){
|
||||||
case 'default':
|
case 'default':
|
||||||
var node=hs[i]._tempName;
|
var node=hs[i]._tempName;
|
||||||
|
node.classList.add('vertical');
|
||||||
node.innerHTML=get.verticalStr(node.tempname);
|
node.innerHTML=get.verticalStr(node.tempname);
|
||||||
break;
|
break;
|
||||||
case 'horizon':
|
case 'horizon':
|
||||||
var node=hs[i]._tempName;
|
var node=hs[i]._tempName;
|
||||||
|
node.classList.remove('vertical');
|
||||||
node.innerHTML=node.tempname;
|
node.innerHTML=node.tempname;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -14305,8 +14307,11 @@
|
||||||
num1:[],
|
num1:[],
|
||||||
num2:[],
|
num2:[],
|
||||||
};
|
};
|
||||||
game.log(player,'的拼点牌为',event.card1);
|
|
||||||
"step 3"
|
"step 3"
|
||||||
|
event.trigger('compareCardShowBefore');
|
||||||
|
"step 4"
|
||||||
|
game.log(player,'的拼点牌为',event.card1);
|
||||||
|
"step 5"
|
||||||
if(event.iwhile<targets.length){
|
if(event.iwhile<targets.length){
|
||||||
event.target=targets[event.iwhile];
|
event.target=targets[event.iwhile];
|
||||||
event.target.animate('target');
|
event.target.animate('target');
|
||||||
|
@ -14320,9 +14325,9 @@
|
||||||
game.delay(0,1500);
|
game.delay(0,1500);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.goto(7);
|
event.goto(9);
|
||||||
}
|
}
|
||||||
"step 4"
|
"step 6"
|
||||||
event.result.num1[event.iwhile]=event.num1;
|
event.result.num1[event.iwhile]=event.num1;
|
||||||
event.result.num2[event.iwhile]=event.num2;
|
event.result.num2[event.iwhile]=event.num2;
|
||||||
var str;
|
var str;
|
||||||
|
@ -14350,7 +14355,7 @@
|
||||||
},1000);
|
},1000);
|
||||||
},str);
|
},str);
|
||||||
game.delay(2);
|
game.delay(2);
|
||||||
"step 5"
|
"step 7"
|
||||||
if(event.callback){
|
if(event.callback){
|
||||||
game.broadcastAll(function(card1,card2){
|
game.broadcastAll(function(card1,card2){
|
||||||
if(card1.clone) card1.clone.style.opacity=0.5;
|
if(card1.clone) card1.clone.style.opacity=0.5;
|
||||||
|
@ -14366,11 +14371,11 @@
|
||||||
next.setContent(event.callback);
|
next.setContent(event.callback);
|
||||||
event.compareMultiple=true;
|
event.compareMultiple=true;
|
||||||
}
|
}
|
||||||
"step 6"
|
"step 8"
|
||||||
game.broadcastAll(ui.clear);
|
game.broadcastAll(ui.clear);
|
||||||
event.iwhile++;
|
event.iwhile++;
|
||||||
event.goto(3);
|
event.goto(5);
|
||||||
"step 7"
|
"step 9"
|
||||||
event.cards.add(event.card1);
|
event.cards.add(event.card1);
|
||||||
},
|
},
|
||||||
chooseToCompare:function(){
|
chooseToCompare:function(){
|
||||||
|
@ -14484,6 +14489,8 @@
|
||||||
}).setContent('chooseToCompareLose');
|
}).setContent('chooseToCompareLose');
|
||||||
}
|
}
|
||||||
"step 5"
|
"step 5"
|
||||||
|
event.trigger('compareCardShowBefore');
|
||||||
|
"step 6"
|
||||||
game.broadcast(function(){
|
game.broadcast(function(){
|
||||||
ui.arena.classList.add('thrownhighlight');
|
ui.arena.classList.add('thrownhighlight');
|
||||||
});
|
});
|
||||||
|
@ -14502,7 +14509,7 @@
|
||||||
event.num2=getNum(event.card2);
|
event.num2=getNum(event.card2);
|
||||||
event.trigger('compare');
|
event.trigger('compare');
|
||||||
game.delay(0,1500);
|
game.delay(0,1500);
|
||||||
"step 6"
|
"step 7"
|
||||||
event.result={
|
event.result={
|
||||||
player:event.card1,
|
player:event.card1,
|
||||||
target:event.card2,
|
target:event.card2,
|
||||||
|
@ -14539,7 +14546,7 @@
|
||||||
},1000);
|
},1000);
|
||||||
},str);
|
},str);
|
||||||
game.delay(2);
|
game.delay(2);
|
||||||
"step 7"
|
"step 8"
|
||||||
if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){
|
if(typeof event.target.ai.shown=='number'&&event.target.ai.shown<=0.85&&event.addToAI){
|
||||||
event.target.ai.shown+=0.1;
|
event.target.ai.shown+=0.1;
|
||||||
}
|
}
|
||||||
|
@ -36508,6 +36515,7 @@
|
||||||
if(cards[i].name!=cardname||((cardnature||cards[i].nature)&&cards[i].nature!=cardnature)){
|
if(cards[i].name!=cardname||((cardnature||cards[i].nature)&&cards[i].nature!=cardnature)){
|
||||||
if(!cards[i]._tempName) cards[i]._tempName=ui.create.div('.tempname',cards[i]);
|
if(!cards[i]._tempName) cards[i]._tempName=ui.create.div('.tempname',cards[i]);
|
||||||
var tempname=get.translation(cardname);
|
var tempname=get.translation(cardname);
|
||||||
|
cards[i]._tempName.classList[lib.config.cardtempname=='default'?'add':'remove']('vertical');
|
||||||
cards[i]._tempName.dataset.nature='fire';
|
cards[i]._tempName.dataset.nature='fire';
|
||||||
if(cardname=='sha'){
|
if(cardname=='sha'){
|
||||||
if(cardnature) tempname=get.translation(cardnature)+tempname;
|
if(cardnature) tempname=get.translation(cardnature)+tempname;
|
||||||
|
@ -48137,6 +48145,7 @@
|
||||||
if(get.position(item)=='j'&&item.viewAs&&item.viewAs!=item.name&&lib.config.cardtempname!='off'){
|
if(get.position(item)=='j'&&item.viewAs&&item.viewAs!=item.name&&lib.config.cardtempname!='off'){
|
||||||
node._tempName=ui.create.div('.tempname',node);
|
node._tempName=ui.create.div('.tempname',node);
|
||||||
var tempname=get.translation(item.viewAs);
|
var tempname=get.translation(item.viewAs);
|
||||||
|
if(lib.config.cardtempname=='default') node._tempName.classList.add('vertical');
|
||||||
node._tempName.dataset.nature='wood';
|
node._tempName.dataset.nature='wood';
|
||||||
node._tempName.innerHTML=lib.config.cardtempname=='default'?get.verticalStr(tempname):tempname;
|
node._tempName.innerHTML=lib.config.cardtempname=='default'?get.verticalStr(tempname):tempname;
|
||||||
node._tempName.tempname=tempname;
|
node._tempName.tempname=tempname;
|
||||||
|
|
|
@ -4538,9 +4538,13 @@ div[data-decoration="bronze"]::after{
|
||||||
.card .tempname {
|
.card .tempname {
|
||||||
color: white !important;
|
color: white !important;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
left: 8px;
|
left: 6px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
top: 4px;
|
top: 6px;
|
||||||
|
}
|
||||||
|
.card .tempname.vertical {
|
||||||
|
left: 4px;
|
||||||
|
top: 8px;
|
||||||
writing-mode: vertical-rl;
|
writing-mode: vertical-rl;
|
||||||
-webkit-writing-mode: vertical-rl;
|
-webkit-writing-mode: vertical-rl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue