check
This commit is contained in:
parent
1cdf9da9a8
commit
eab6e63f3c
25
game/game.js
25
game/game.js
|
@ -23631,12 +23631,19 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arguments.length==0){
|
var argc=arguments.length;
|
||||||
while(document.getElementsByClassName('selectable').length>0){
|
var args=new Array(argc);
|
||||||
document.getElementsByClassName('selectable')[0].classList.remove('selectable');
|
for(var i=0;i<argc;i++){
|
||||||
|
args[i]=arguments[i];
|
||||||
|
}
|
||||||
|
if(args.length==0){
|
||||||
|
var selectable=document.getElementsByClassName('selectable');
|
||||||
|
var selected=document.getElementsByClassName('selected');
|
||||||
|
while(selectable.length>0){
|
||||||
|
selectable[0].classList.remove('selectable');
|
||||||
}
|
}
|
||||||
while(document.getElementsByClassName('selected').length>0){
|
while(selected.length>0){
|
||||||
document.getElementsByClassName('selected')[0].classList.remove('selected');
|
selected[0].classList.remove('selected');
|
||||||
}
|
}
|
||||||
if(_status.event.player){
|
if(_status.event.player){
|
||||||
var cards=_status.event.player.get('hej');
|
var cards=_status.event.player.get('hej');
|
||||||
|
@ -23650,8 +23657,8 @@
|
||||||
ui.selected.targets.length=0;
|
ui.selected.targets.length=0;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
for(i=0;i<arguments.length;i++){
|
for(i=0;i<args.length;i++){
|
||||||
if(arguments[i]=='target'){
|
if(args[i]=='target'){
|
||||||
for(j=0;j<game.players.length;j++){
|
for(j=0;j<game.players.length;j++){
|
||||||
game.players[j].classList.remove('selected');
|
game.players[j].classList.remove('selected');
|
||||||
game.players[j].classList.remove('selectable');
|
game.players[j].classList.remove('selectable');
|
||||||
|
@ -23662,7 +23669,7 @@
|
||||||
}
|
}
|
||||||
ui.selected.targets.length=0;
|
ui.selected.targets.length=0;
|
||||||
}
|
}
|
||||||
else if(arguments[i]=='card'){
|
else if(args[i]=='card'){
|
||||||
var cards=_status.event.player.get('hej');
|
var cards=_status.event.player.get('hej');
|
||||||
for(j=0;j<cards.length;j++){
|
for(j=0;j<cards.length;j++){
|
||||||
cards[j].classList.remove('selected');
|
cards[j].classList.remove('selected');
|
||||||
|
@ -23672,7 +23679,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arguments[0]!='target'&&arguments[0]!='card'&&arguments[0]!='button'){
|
if(args[0]!='target'&&args[0]!='card'&&args[0]!='button'){
|
||||||
ui.arena.classList.remove('selecting');
|
ui.arena.classList.remove('selecting');
|
||||||
_status.imchoosing=false;
|
_status.imchoosing=false;
|
||||||
_status.lastdragchange.length=0;
|
_status.lastdragchange.length=0;
|
||||||
|
|
Loading…
Reference in New Issue