Commit 2e1423fa authored by zjz1994's avatar zjz1994

草坪功能暂存

parent 3a8b4f9d
This diff is collapsed.
...@@ -1340,5 +1340,27 @@ export class Tool { ...@@ -1340,5 +1340,27 @@ export class Tool {
return true; return true;
} }
//草坪能否铺上去 //草坪能否铺上去
public static judgeTurfto(lat:Lattice){
if(!lat||!lat.element){
return false;
}
if(lat.ice&&lat.ice.alpha!=0){
return false;
}
if(lat.block && lat.block.ice && lat.block.canIceBroken && lat.block.ice.alpha!=0) {
return false;
}
if(lat.sand){
return false;
}
let ele = lat.element;
let canChosen = this.judgeChosen(ele);
if(!canChosen){
return false;
}
if(lat.grass){
return false;
}
return true;
}
} }
\ No newline at end of file
...@@ -2,5 +2,41 @@ import { ChapterData } from "../interface/ChapterData"; ...@@ -2,5 +2,41 @@ import { ChapterData } from "../interface/ChapterData";
//676-700 //676-700
export const Chapters27: ChapterData[] = [ export const Chapters27: ChapterData[] = [
{
baseElementTypes: [ 0, 3, 4, 2 ], bubbleProbability: 0, stepCount: 27,
passTarget: { type: 1, elements: [ { type: 1, count: 62 }, { type: 0, count: 102 }, { type: 34, count: 10 } ] }, starScores: [ 15000, 20000, 25000 ],
map: {
lattices: [
1, 1, 1, 1, 0, 1, 1, 1, 1,
1, 8, 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,
41, 1, 41, 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 ],
connectedLats: [ [ 41, 59 ], [ 42, 60 ], [ 43, 61 ], [ 44, 62 ] ],
conveyor: [], conveyorConnectedLats: [], WORMHOLE: [],
elements: [
2, 1, 2, 1, 1, 2, 1, 2, 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,
16, 2, 16, 2, 1, 6, 6, 6, 6,
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: 58, type: null } ] } },
] ]
...@@ -78,7 +78,7 @@ chapters.forEach((chapter,index) => { ...@@ -78,7 +78,7 @@ chapters.forEach((chapter,index) => {
*/ */
export function getChapterData(index: number): ChapterData { export function getChapterData(index: number): ChapterData {
//没有数据就返回第一关数据 //没有数据就返回第一关数据
return chapters[658]; return chapters[676];
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