This commit is contained in:
libccy 2017-02-11 10:12:41 +08:00
parent d398bb9041
commit 824c9a02a2
2 changed files with 85 additions and 78 deletions

View File

@ -1320,8 +1320,6 @@ character.shenhua={
direct:true,
content:function(){
"step 0"
game.delay();
"step 1"
event.cards=trigger.cards.slice(0);
for(var i=0;i<event.cards.length;i++){
if(get.position(event.cards[i])!='d'){
@ -1339,8 +1337,9 @@ character.shenhua={
}
return 0;
}).set('check',check);
"step 2"
"step 1"
if(result.bool){
game.delay(0.5);
player.logSkill('guzheng',trigger.player);
trigger.player.gain(result.links[0]);
trigger.player.$gain2(result.links[0]);

View File

@ -31159,12 +31159,12 @@
}
}
if(e.button==2) return;
if(!Array.isArray(e.path)) return;
var dialogs=document.querySelectorAll('#window>.dialog.popped:not(.static)');
for(var i=0;i<dialogs.length;i++){
dialogs[i].delete();
}
var node=_status.currentmouseenter;
var sourceitem=document.elementFromPoint(e.clientX,e.clientY);
if(_status.mousedragging){
e.preventDefault();
if(lib.config.enable_dragline){
@ -31200,8 +31200,9 @@
}
}
for(var i=0;i<e.path.length;i++){
if(e.path[i]==_status.mousedragorigin){
var item=sourceitem;
while(item){
if(item==_status.mousedragorigin){
if(_status.mouseleft){
_status.mousedragging=null;
_status.mousedragorigin=null;
@ -31212,10 +31213,9 @@
}
return;
}
var itemtype=get.itemtype(e.path[i]);
var itemtype=get.itemtype(item);
if(itemtype=='card'||itemtype=='button'||itemtype=='player'){
_status.mouseleft=true;
var item=e.path[i];
var ex=e.clientX/game.documentZoom-ui.arena.offsetLeft;
var ey=e.clientY/game.documentZoom-ui.arena.offsetTop;
var exx=ex,eyy=ey;
@ -31240,7 +31240,7 @@
if(item.classList.contains('selected')){
if(notbefore){
_status.lastdragchange.push(item);
e.path[i]._lastdragchange=[exx,eyy];
item._lastdragchange=[exx,eyy];
}
}
else{
@ -31260,12 +31260,15 @@
}
return;
}
item=item.parentNode;
}
_status.mouseleft=true;
_status.dragstatuschanged=null;
}
else{
if(e.path.contains(node)&&!node._mouseentercreated){
var item=sourceitem;
while(item){
if(item==node&&!node._mouseentercreated){
ui.click.mouseentercancel();
var hoveration;
if(typeof node._hoveration=='number'){
@ -31298,6 +31301,9 @@
}
}
},hoveration);
break;
}
item=item.parentNode;
}
if(_status.draggingdialog){
var ddialog=_status.draggingdialog;
@ -31328,14 +31334,15 @@
for(var i=0;i<dialogs.length;i++){
dialogs[i].delete();
}
if(e.path){
for(var i=0;i<e.path.length;i++){
var itemtype=get.itemtype(e.path[i]);
var sourceitem=document.elementFromPoint(e.clientX,e.clientY);
var item=sourceitem;
while(item){
var itemtype=get.itemtype(item);
if(itemtype=='button') break;
if(itemtype=='dialog'&&
!e.path[i].classList.contains('popped')&&
!e.path[i].classList.contains('fixed')){
var ddialog=e.path[i];
!item.classList.contains('popped')&&
!item.classList.contains('fixed')){
var ddialog=item;
_status.draggingdialog=ddialog;
ddialog._dragorigin=e;
if(!ddialog._dragtransform){
@ -31343,40 +31350,42 @@
}
return;
}
if(e.path[i]==ui.roundmenu){
if(item==ui.roundmenu){
_status.draggingroundmenu=true;
ui.roundmenu._dragorigin=e;
if(!ui.roundmenu._dragtransform){
ui.roundmenu._dragtransform=[0,0];
}
return;
}
}
item=item.parentNode;
}
var evt=_status.event;
if(!lib.config.enable_drag) return;
if(!ui.arena.classList.contains('selecting')) return;
if(!evt.isMine()) return;
if(!Array.isArray(e.path)) return;
for(var i=0;i<e.path.length;i++){
var itemtype=get.itemtype(e.path[i]);
item=sourceitem;
while(item){
var itemtype=get.itemtype(item);
if(itemtype=='card'||itemtype=='button'||itemtype=='player'){
if(e.path[i].classList.contains('selectable')&&
!e.path[i].classList.contains('selected')&&
!e.path[i].classList.contains('noclick')){
if(item.classList.contains('selectable')&&
!item.classList.contains('selected')&&
!item.classList.contains('noclick')){
_status.clicked=false;
ui.click[itemtype].call(e.path[i]);
if(e.path[i].classList.contains('selected')){
ui.click[itemtype].call(item);
if(item.classList.contains('selected')){
_status.mousedragging=e;
_status.mousedragorigin=e.path[i];
_status.mousedragorigin=item;
_status.mouseleft=false;
_status.selectionfull=false;
_status.multitarget=false;
// if(ui.confirm&&ui.confirm.str=='c') ui.confirm.close();
}
}
return;
}
item=item.parentNode;
}
},
cardtouchstart:function(e){
@ -34654,7 +34663,8 @@
}
}
var modepack=lib.characterPack['mode_'+get.mode()];
if(lib.config.show_favourite&&lib.character[node.name]&&game.players.contains(node)&&(!modepack||!modepack[node.name])){
if(lib.config.show_favourite&&lib.character[node.name]&&game.players.contains(node)&&
(!modepack||!modepack[node.name])&&(!simple||get.is.phoneLayout())){
var addFavourite=ui.create.div('.text.center');
addFavourite.link=node.link;
if(lib.config.favouriteCharacter.contains(node.name)){
@ -34698,9 +34708,7 @@
uiintro.content.appendChild(table);
}
if(lib.config.change_skin&&
(!node.classList.contains('unseen')||!node.classList.contains('unseen2'))
){
if(lib.config.change_skin&&(!node.classList.contains('unseen')||!node.classList.contains('unseen2'))){
var num=1;
var introadded=false;
var loadImage=function(avatar2){
@ -35042,7 +35050,7 @@
}
var modepack=lib.characterPack['mode_'+get.mode()];
if((node.parentNode.classList.contains('menu-buttons')||lib.config.show_favourite)&&
lib.character[node.link]&&(!modepack||!modepack[node.link])){
lib.character[node.link]&&(!modepack||!modepack[node.link])&&(!simple||get.is.phoneLayout())){
var addFavourite=ui.create.div('.text.center');
addFavourite.link=node.link;
addFavourite.style.marginBottom='15px';
@ -35058,7 +35066,7 @@
else{
uiintro.add(ui.create.div('.placeholder.slim'));
}
if(lib.config.change_skin||(lib.skin&&node.parentNode.classList.contains('menu-buttons'))){
if((lib.config.change_skin||(lib.skin&&node.parentNode.classList.contains('menu-buttons')))&&(!simple||get.is.phoneLayout())){
var num=1;
var introadded=false;
var createButtons=function(num){