Skip to content

Commit 3739214

Browse files
committed
Use Cobra from team-mate everywhere
2 parents 1161ec2 + 84817d1 commit 3739214

37 files changed

Lines changed: 2056 additions & 121 deletions

src/games/chessbase/base-model.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@
404404
this.board[pos]=-1;
405405
this.pieces.forEach(function(piece,index) {
406406
piece.i=index;
407+
if(piece.p<0) return;
407408
$this.board[piece.p]=index;
408409
var pType=aGame.g.pTypes[piece.t];
409410
if(pType.isKing)

src/games/chessbase/fairy-piece-model.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323
var path = [], f = iflags, corner = geometry.Graph(start, vec), brouhaha=0;
2424
while(f < -1 && corner) corner = geometry.Graph(corner, vec), f++; // negative iflags jump to corner
2525
if(corner != null) {
26-
f=(iflags<0 ? flags : iflags);
26+
f=(iflags<-1 ? flags : iflags);
2727
if(confine) {
2828
if(!(corner in confine)) return;
2929
if(confine[corner]=='b') f &= ~(brouhaha=c.FLAG_MOVE|c.FLAG_SPECIAL); // not to empty brouhaha squares
3030
}
3131
var vec2 = Rotate(vec, bend);
32-
if(f && iflags != c.FLAG_STOP) // defer adding stop until something follows it
33-
path.push(corner | f); // use iflags on 1st square if it did not indikate skipping
32+
if(f>=0 && iflags != c.FLAG_STOP) // defer adding stop until something follows it
33+
path.push(corner | f); // use iflags on 1st square if it did not indicate skipping
3434
if(brouhaha) return; // never past occupied brouhaha square
3535
for(var n=1; n<range; n++) {
3636
var delta = [n*vec2[0], n*vec2[1]], pos = geometry.Graph(corner, delta);

src/games/chessbase/fairy-set-view.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,11 @@
463463
clipx: 7400,
464464
},
465465
},
466+
"fr-spider": {
467+
"2d": {
468+
clipx: 7500,
469+
},
470+
},
466471
},modifier);
467472
}
468473

@@ -2412,5 +2417,26 @@
24122417
}
24132418
},
24142419
},
2420+
"fr-spider": {
2421+
mesh: {
2422+
jsFile:"/res/fairy/critters/spider.js"
2423+
},
2424+
materials: {
2425+
mat0: {
2426+
channels: {
2427+
diffuse: {
2428+
texturesImg: {
2429+
diffImg : "/res/fairy/critters/spider-diffusemap.jpg",
2430+
}
2431+
},
2432+
normal: {
2433+
texturesImg: {
2434+
normalImg: "/res/fairy/critters/spider-normalmap.jpg",
2435+
}
2436+
}
2437+
}
2438+
}
2439+
},
2440+
},
24152441
});
24162442
})();

src/games/chessbase/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,7 +2331,7 @@ exports.games = (function () {
23312331
"en": "res/rules/shako/shako-credits.html",
23322332
"fr": "res/rules/shako/shako-credits-fr.html"
23332333
},
2334-
"gameOptions": config_model_gameOptions_2,
2334+
"gameOptions": config_model_gameOptions,
23352335
"js": modelScripts_13,
23362336
"description": {
23372337
"en": "res/rules/shako/shako-description.html",
@@ -6288,7 +6288,7 @@ exports.games = (function () {
62886288
"credits": {
62896289
"en": "res/rules/team-mate/team-mate-credits.html"
62906290
},
6291-
"gameOptions": config_model_gameOptions_2,
6291+
"gameOptions": config_model_gameOptions,
62926292
"js": modelScripts_100,
62936293
"description": {
62946294
"en": "res/rules/team-mate/team-mate-description.html"

src/games/chessbase/minjiku-shogi-model.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@
302302
23: {
303303
name : 'ninja',
304304
abbrev : '+L',
305-
aspect : 'fr-ship',
305+
aspect : 'fr-gate',
306306
graph : this.cbMergeGraphs(geometry,
307307
this.cbSkiGraph(geometry,[[1,0],[-1,0]],0,-1),
308308
this.cbShortRangeGraph(geometry,[[1,0],[0,-1],[-1,0],[0,1]],area,rifle),
51.2 KB
Loading
14.4 KB
Loading

0 commit comments

Comments
 (0)