Commit fb03a06e authored by zjz1994's avatar zjz1994

传送带下移棒棒糖不会消除问题

parent 87160ec3
...@@ -2720,11 +2720,38 @@ export default class MainScene extends Scene { ...@@ -2720,11 +2720,38 @@ export default class MainScene extends Scene {
// return; // return;
// } // }
if (this._converyorTag) { if (this._converyorTag) {
await doConveyorAI(this); await doConveyorAI(this);
this._converyorTag = false; this._converyorTag = false;
} }
//棒棒糖消除
var recoverlp:number = 0;
for(var lp=0;lp<this.recycleIndexs.length;lp++){
var lpidx = this.recycleIndexs[lp];
var lplat = this.lattices[lpidx];
if(lplat&&lplat.element&&lplat.element.type==ElementType.LOLLIPOP){
recoverlp += 1;
this.recoverEle(lpidx);
this.lollipopCount--;
//通关目标还有棒棒糖,并且,图中不足,下次需要生成
if(this.passElements &&
this.passElements[ElementType.LOLLIPOP] &&
this.lollipopCount < this.passElements[ElementType.LOLLIPOP]) {
this.lollipopMark = true
}
}
}
if(recoverlp>0){
console.log("传送带棒棒糖消除");
this.fall(()=>{
this.fallCallback();
})
return;
}
await doSandAI(this); await doSandAI(this);
const doHoneyPotAIResult = await doHoneyPotAI(this); const doHoneyPotAIResult = await doHoneyPotAI(this);
if(doHoneyPotAIResult.length > 0) {//如果有激活的罐子被消除,那么表示可以自动消除,则不需要进行下一步 if(doHoneyPotAIResult.length > 0) {//如果有激活的罐子被消除,那么表示可以自动消除,则不需要进行下一步
......
...@@ -75,7 +75,85 @@ export const Chapters24: ChapterData[] = [ ...@@ -75,7 +75,85 @@ export const Chapters24: ChapterData[] = [
//611 //611
{ baseElementTypes: [ 3, 4, 0, 2 ], bubbleProbability: 0, stepCount: 23, passTarget: { type: 1, elements: [ { type: 9, count: 65 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 0, 0, 0, 0, 3, 3, 3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0 ], connectedLats: [], conveyor: [], conveyorConnectedLats: [], elements: [ 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 14, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0, 1, 2, 1, 2, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 10, type: null }, { index: 11, type: null }, { index: 12, type: null }, { index: 18, type: null } ] } }, { baseElementTypes: [ 3, 4, 0, 2 ], bubbleProbability: 0, stepCount: 23, passTarget: { type: 1, elements: [ { type: 9, count: 65 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 0, 0, 0, 0, 3, 3, 3, 3, 3, 0, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 3, 3, 0, 3, 3, 0, 3, 3, 3, 3, 3, 0, 3, 0, 3, 3, 3, 3, 3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 0, 0 ], connectedLats: [], conveyor: [], conveyorConnectedLats: [], elements: [ 1, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 14, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 2, 1, 1, 2, 1, 2, 0, 0, 0, 0, 1, 2, 1, 2, 0, 0, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 4, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 10, type: null }, { index: 11, type: null }, { index: 12, type: null }, { index: 18, type: null } ] } },
//612 //612
{ baseElementTypes: [ 1, 2, 0, 3 ], bubbleProbability: 0, stepCount: 25, passTarget: { type: 1, elements: [ { type: 6, count: 8 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0 ], connectedLats: [ [ 27, 45 ], [ 28, 46 ], [ 29, 47 ], [ 30, 48 ], [ 32, 50 ], [ 33, 51 ], [ 34, 52 ], [ 35, 53 ] ], conveyor: [ [ 71, 66 ], [ 65, 74 ], [ 62, 56 ], [ 55, 73 ], [ 53, 46 ], [ 45, 72 ] ], conveyorConnectedLats: [ [ 66, 65 ], [ 74, 71 ], [ 56, 55 ], [ 73, 62 ], [ 46, 45 ], [ 72, 53 ] ], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 1, type: null }, { index: 2, type: null }, { index: 3, type: null }, { index: 5, type: null }, { index: 6, type: null }, { index: 7, type: null }, { index: 8, type: null }, { index: 49, type: null } ] } }, {
baseElementTypes: [ 1, 2, 0, 3 ],
bubbleProbability: 0, stepCount: 25,
passTarget: {
type: 1,
elements: [ { type: 6, count: 8 } ] },
starScores: [ 15000, 20000, 25000 ],
map: {
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, type: null },
{ index: 1, type: null },
{ index: 2, type: null },
{ index: 3, type: null },
{ index: 5, type: null },
{ index: 6, type: null },
{ index: 7, type: null },
{ index: 8, type: null },
{ index: 49, type: null }
] } },
//613 //613
{ baseElementTypes: [ 1, 0, 3, 4 ], bubbleProbability: 0, stepCount: 27, passTarget: { type: 1, elements: [ { type: 9, count: 61 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3 ], connectedLats: [], conveyor: [], conveyorConnectedLats: [], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 23, 23, 4, 23, 23, 1, 1, 1, 1, 23, 23, 4, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 8, type: null }, { index: 10, type: null }, { index: 11, type: null }, { index: 12, type: null }, { index: 13, type: null }, { index: 14, type: null }, { index: 15, type: null }, { index: 16, type: null }, { index: 72, type: null }, { index: 80, type: null } ] } }, { baseElementTypes: [ 1, 0, 3, 4 ], bubbleProbability: 0, stepCount: 27, passTarget: { type: 1, elements: [ { type: 9, count: 61 } ] }, starScores: [ 15000, 20000, 25000 ], map: { lattices: [ 3, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3, 3, 3, 3, 3, 3, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 3 ], connectedLats: [], conveyor: [], conveyorConnectedLats: [], elements: [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 23, 23, 4, 23, 23, 1, 1, 1, 1, 23, 23, 4, 23, 23, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ], baseElements: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ], recycles: [], generateLats: [ { index: 0, type: null }, { index: 8, type: null }, { index: 10, type: null }, { index: 11, type: null }, { index: 12, type: null }, { index: 13, type: null }, { index: 14, type: null }, { index: 15, type: null }, { index: 16, type: null }, { index: 72, type: null }, { index: 80, type: null } ] } },
//614 //614
......
...@@ -73,7 +73,7 @@ chapters.forEach((chapter,index) => { ...@@ -73,7 +73,7 @@ chapters.forEach((chapter,index) => {
*/ */
export function getChapterData(index: number): ChapterData { export function getChapterData(index: number): ChapterData {
//没有数据就返回第一关数据 //没有数据就返回第一关数据
// return chapters[604]; // return chapters[612];
return chapters[index] || chapters[1]; return chapters[index] || chapters[1];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment