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
31d3191b
Commit
31d3191b
authored
Feb 05, 2020
by
wildfirecode
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
3e5b465a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
MainScene.ts
egret/src/mainScene/MainScene.ts
+2
-1
jellyMonsterAI.ts
egret/src/mainScene/jellyMonsterAI.ts
+4
-1
Tool.ts
egret/src/something/Tool.ts
+1
-0
AiControl.ts
egret/src/something/logic/AiControl.ts
+5
-1
No files found.
egret/src/mainScene/MainScene.ts
View file @
31d3191b
...
...
@@ -1798,7 +1798,8 @@ export default class MainScene extends Scene {
}
//其中一个是魔力鸟
if
(
s
.
effectType
==
EffectType
.
MAGICLION
||
o
.
effectType
==
EffectType
.
MAGICLION
)
{
if
(
s
.
type
==
ElementType
.
LOLLIPOP
||
o
.
type
==
ElementType
.
LOLLIPOP
)
{
if
(
s
.
type
==
ElementType
.
LOLLIPOP
||
o
.
type
==
ElementType
.
LOLLIPOP
||
s
.
monster
||
o
.
monster
)
{
return
false
}
else
{
this
.
isManual
=
true
;
...
...
egret/src/mainScene/jellyMonsterAI.ts
View file @
31d3191b
...
...
@@ -73,7 +73,10 @@ function judgeActionIndex(index: number, lattices: Lattice[]): number {
var
rand
=
Math
.
floor
(
Math
.
random
()
*
arr
.
length
);
//随机4个方向
var
i
=
arr
.
splice
(
rand
,
1
)[
0
];
if
(
Tool
.
judgeBaseEle
(
lattices
[
i
])
&&
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
element
.
candy
)
{
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
element
.
candy
&&
!
lattices
[
i
].
element
.
monster
)
{
return
i
}
}
...
...
egret/src/something/Tool.ts
View file @
31d3191b
...
...
@@ -465,6 +465,7 @@ export class Tool {
ele
.
hasState
(
StateType
.
LOCK
)
||
ele
.
hasState
(
StateType
.
HAIRBALLGREY
)
||
ele
.
hasState
(
StateType
.
BLOCK_LOCK
)
||
ele
.
monster
||
ele
.
hasState
(
StateType
.
HAIRBALLBLACK
)
||
ele
.
hasState
(
StateType
.
HAIRBALLBROWN
)
)
{
...
...
egret/src/something/logic/AiControl.ts
View file @
31d3191b
...
...
@@ -319,6 +319,7 @@ export class AiControl {
//是基础元素,但是不能有任何状态,去掉鸡
if
(
Tool
.
judgeBaseEle
(
lat
)
&&
!
lat
.
element
.
hasAnyState
()
&&
!
lat
.
element
.
monster
&&
lat
.
element
.
type
!==
ElementType
.
CHICKEN
)
{
chickenIndexs
.
push
(
a
);
...
...
@@ -736,7 +737,10 @@ function judgeActionIndex(index: number, lattices: Lattice[]): number {
var
rand
=
Math
.
floor
(
Math
.
random
()
*
arr
.
length
);
var
i
=
arr
.
splice
(
rand
,
1
)[
0
];
if
(
Tool
.
judgeBaseEle
(
lattices
[
i
])
&&
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
element
.
candy
)
{
!
lattices
[
i
].
element
.
hasAnyState
()
&&
!
lattices
[
i
].
element
.
candy
&&
!
lattices
[
i
].
element
.
monster
)
{
return
i
}
}
...
...
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