Lode Runner version 2.11a, AI_VERSION=4
(1) Modified for AI VERSION = 4
(1.1) When guard failing in hole, will drop gold before guard failing into hole totally
(1.2) Shake time extension when guard in hole.
NOW the runner can dig three hold for three guards and pass through them. (MUST quickly)
==> The behavior almost same as original lode runner (APPLE-II version).
Modified files: LodeRunner/lodeRunner.guard.js
(2) New Demo Data all ai_version = 4
modified files: lodeRunner.demoData1.js
(3) Slow down play speed:
//slow normal fast
change from speedMode = [15, 20, 25, 30, 35];
to speedMode = [14, 18, 23, 29, 35];
Modified files: lodeRunner.main.js
(4) Keep ai version don't overflow:
Modified files: lodeRunner.preload.js
Cette révision appartient à :
@@ -209,8 +209,25 @@ function guardMoveStep( id, action)
|
||||
}
|
||||
|
||||
if(action == ACT_IN_HOLE) { //check in hole or still falling
|
||||
if (yOffset < 0) action = ACT_FALL; //still falling
|
||||
else { //fall into hole (yOffset MUST = 0)
|
||||
if (yOffset < 0) {
|
||||
action = ACT_FALL; //still falling
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//For AI version >= 4, drop gold before guard failing into hole totally
|
||||
if(curAiVersion >= 4 && curGuard.hasGold > 0) {
|
||||
if(map[x][y-1].base == EMPTY_T) {
|
||||
//drop gold above
|
||||
addGold(x, y-1);
|
||||
} else
|
||||
decGold(); //gold disappear
|
||||
curGuard.hasGold = 0;
|
||||
}
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
} else { //fall into hole (yOffset MUST = 0)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
//For AI version < 4, drop gold after guard failing into hole totally
|
||||
if( curGuard.hasGold > 0 ) {
|
||||
if(map[x][y-1].base == EMPTY_T) {
|
||||
//drop gold above
|
||||
@@ -219,6 +236,8 @@ function guardMoveStep( id, action)
|
||||
decGold(); //gold disappear
|
||||
}
|
||||
curGuard.hasGold = 0;
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
if( curShape == "fallRight") newShape = "shakeRight";
|
||||
else newShape = "shakeLeft";
|
||||
themeSoundPlay("trap");
|
||||
@@ -403,6 +422,15 @@ function initStillFrameVariable()
|
||||
function initGuardShakeVariable()
|
||||
{
|
||||
shakingGuardList = [];
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
// Shake time extension when guard in hole,
|
||||
// so the runner can dig three hold for three guards and pass through them.
|
||||
// The behavior almost same as original lode runner (APPLE-II version).
|
||||
// 2016/06/04
|
||||
//-------------------------------------------------------------------------
|
||||
if(curAiVersion <= 3) shakeTime = [ 36, 3, 3, 3, 3, 3 ]; //for AI VERSION = 3
|
||||
else shakeTime = [ 51, 3, 3, 3, 3, 3 ]; //for AI VERSION > 3
|
||||
}
|
||||
|
||||
function add2GuardShakeQueue(id, shape)
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur