Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xiaoxiaole
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wildfirecode13
xiaoxiaole
Commits
e7adeb9c
Commit
e7adeb9c
authored
Mar 26, 2020
by
zjz1994
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整炮台逻辑
parent
7062d043
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
57 deletions
+106
-57
MainScene.ts
egret/src/mainScene/MainScene.ts
+3
-2
Tool.ts
egret/src/something/Tool.ts
+15
-0
Chapter22.ts
egret/src/something/chapters/Chapter22.ts
+88
-55
No files found.
egret/src/mainScene/MainScene.ts
View file @
e7adeb9c
...
...
@@ -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
;
}
...
...
egret/src/something/Tool.ts
View file @
e7adeb9c
...
...
@@ -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
;
}
}
/**
* 判断格子上是基础元素,包括各种状态的
...
...
egret/src/something/chapters/Chapter22.ts
View file @
e7adeb9c
...
...
@@ -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
}]
}
}
]
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment