make captureInstantRemove not only about pivots

This commit is contained in:
mig 2017-05-05 17:34:11 +02:00
parent 45c861cb33
commit 5e77e63b7a
2 changed files with 4 additions and 2 deletions

View file

@ -1681,8 +1681,10 @@
xdv.updateGadget("piece#"+captPiece,{
"2d": {
opacity : 0.3,
visible: !aGame.g.captureInstantRemove
},
"3d" : {
visible: !aGame.g.captureInstantRemove,
materials: {
"base" : {
opacity: .3,

View file

@ -322,7 +322,7 @@
}
if(aGame.g.canCaptureBackward || forward==true) {
var pos1=aGame.g.Graph[pos0][dir];
if(pos1!=null && ($this.board[pos1]==-1 || pos1==poss[0])) {
if(pos1!=null && ($this.board[pos1]==-1 || pos1==poss[0] || (pos1!==null && aGame.g.captureInstantRemove && capts.indexOf(pos1)>=0))) {
var keep=true;
for(var i=0;i<dirs.length;i++)
if((aGame.g.captureInstantRemove && capts[i]==pos0) ||
@ -370,7 +370,7 @@
pos0=aGame.g.Graph[pos0][dir];
}
} else {
while($this.board[pos0]==-1 || pos0==poss[0]) {
while($this.board[pos0]==-1 || pos0==poss[0] || (pos0!==null && aGame.g.captureInstantRemove && capts.indexOf(pos0)>=0)) {
var keep=true;
for(var i=0;i<dirs.length;i++)
if((aGame.g.captureInstantRemove && capts[i]==caught) ||