Commit e7adeb9c authored by zjz1994's avatar zjz1994

调整炮台逻辑

parent 7062d043
......@@ -2320,12 +2320,13 @@ export default class MainScene extends Scene {
var jemitidx = cannoFireArr[j];
var lat = this.lattices[jemitidx];
var caneliminate = Tool.judgeEliminate(lat);
if(lat&&(caneliminate||lat.element.type==ElementType.CANNO_BLOCK)){
var iscannoblock = Tool.judgeIscannoBlock(lat);
if(lat&&(caneliminate||iscannoblock)){
if(this.eliminatedElements.indexOf(jemitidx)==-1){
this.eliminatedElements.push(jemitidx);
}
//加分
if(lat.element.type==ElementType.CANNO_BLOCK){
if(iscannoblock){
// console.log("炮台石头消除");
break;
}
......
......@@ -372,6 +372,21 @@ export class Tool {
return true
}
}
/**
* 判断是否是炮台石头
* @param lat
*/
public static judgeIscannoBlock(lat:Lattice){
if(!lat||!lat.element){
return false;
}
else if(lat.element.type==ElementType.CANNO_BLOCK){
return true;
}
else{
return false;
}
}
/**
* 判断格子上是基础元素,包括各种状态的
......
......@@ -6,59 +6,92 @@ import { ElementType } from "../enum/ElementType";
export const Chapters22: ChapterData[] = [
//551
{
baseElementTypes: [0, 1, 2, 3],
bubbleProbability: 0,
stepCount: 25,
passTarget: {
type: PassType.ELEMENT_TARGET,
elements: [
{
type: ElementType.CHICKEN,
count: 45,
},
],
},
starScores: [1000, 5000, 10000],
map: {
lattices: [
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 1, 0, 0,
0, 1, 1, 1, 0, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 0,
0, 0, 1, 1, 1, 1, 1, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0,
],
generateLats: [
{ index: 11, type: [0], cus: [] },
{ index: 15, type: [0], cus: [] },
],
// connectedLats: [[0, 18], [1, 19], [2, 20]],
elements: [
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 1, 0, 0, 0, 1, 0, 0,
0, 1, 1, 1, 0, 1, 1, 1, 0,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 18, 1, 1,
0, 1, 1, 1, 1, 1, 1, 1, 0,
0, 0, 1, 19, 1, 18, 1, 0, 0,
0, 0, 0, 1, 1, 1, 0, 0, 0,
0, 0, 0, 0, 1, 0, 0, 0, 0,
],
baseElements: [
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 20, 0, 0, 0, 20, 0, 0,
0, 20, 10, 20, 0, 20, 10, 20, 0,
20, 10, 20, 10, 20, 10, 20, 10, 20,
20, 10, 20, 20, 10, 20, 20, 10, 20,
0, 20, 10, 20, 10, 20, 10, 20, 0,
0, 0, 20, 10, 20, 10, 20, 0, 0,
0, 0, 0, 20, 10, 20, 0, 0, 0,
0, 0, 0, 0, 20, 0, 0, 0, 0,
],
// recycles: [70, 71, 72, 73]
},
}
baseElementTypes: [0, 1, 2, 3, 4],
bubbleProbability: 0,
stepCount: 35,
passTarget: {
type: 1,
elements: [{
type: 1,
count: 155
}, {
type: 34,
count: 15
}]
},
starScores: [15000, 20000, 25000],
map: {
lattices: [
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 1, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 0, 1, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 4, 1, 0, 1, 0, 1, 4, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 1, 1, 0, 1
],
connectedLats: [],
conveyor: [
[9, 63],
[17, 71]
],
conveyorConnectedLats: [
[63, 9],
[71, 17]
],
elements: [
1, 18, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 1, 1, 18, 1,
1, 1, 1, 2, 2, 2, 1, 1, 1,
1, 6, 1, 1, 1, 1, 1, 6, 1,
1, 1, 1, 1, 16, 1, 1, 1, 1,
1, 1, 1, 1, 16, 1, 1, 1, 1,
1, 1, 1, 1, 16, 1, 1, 1, 1,
5, 6, 1, 1, 2, 1, 1, 6, 5,
1, 1, 1, 2, 2, 2, 1, 1, 1
],
baseElements: [
0, 40, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 10, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 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: 4,
type: null
}, {
index: 5,
type: null
}, {
index: 6,
type: null
}, {
index: 7,
type: null
}, {
index: 8,
type: null
}]
}
}
]
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