Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
new_taobao
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
new_taobao
Commits
9e93f972
Commit
9e93f972
authored
Oct 16, 2020
by
zhangjinzhou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码暂存
parent
b1e7847a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
pagegamemain.js
taobao_jn/client/pages/pagegamemain/pagegamemain.js
+16
-5
No files found.
taobao_jn/client/pages/pagegamemain/pagegamemain.js
View file @
9e93f972
...
@@ -273,10 +273,12 @@ Page({
...
@@ -273,10 +273,12 @@ Page({
if
(
chawd
+
taskwarm
<
0
)
{
if
(
chawd
+
taskwarm
<
0
)
{
let
maxadd
=
Math
.
floor
((
-
1
-
chawd
)
/
taskwarm
);
let
maxadd
=
Math
.
floor
((
-
1
-
chawd
)
/
taskwarm
);
if
(
maxadd
>
0
)
{
if
(
maxadd
>
0
)
{
let
addwarm
=
maxadd
*
toolwarm
;
if
(
maxadd
>
ainum
)
{
if
(
maxadd
>
ainum
)
{
maxadd
=
ainum
;
maxadd
=
ainum
;
addwarm
=
aiwarm
}
}
cando
.
push
([
"task"
,
Math
.
round
(
Math
.
random
()
*
maxadd
)]);
cando
.
push
([
"task"
,
Math
.
round
(
Math
.
random
()
*
maxadd
)
,
addwarm
]);
}
}
}
}
...
@@ -322,10 +324,12 @@ Page({
...
@@ -322,10 +324,12 @@ Page({
if
(
type
==
"task"
)
{
if
(
type
==
"task"
)
{
let
chatask
=
(
1
-
chawd
);
let
chatask
=
(
1
-
chawd
);
let
chanum
=
Math
.
floor
(
chatask
/
taskwarm
);
let
chanum
=
Math
.
floor
(
chatask
/
taskwarm
);
let
addchawarm
=
chanum
*
taskwarm
;
if
(
chanum
>
ainum
)
{
if
(
chanum
>
ainum
)
{
chanum
=
ainum
;
chanum
=
ainum
;
addchawarm
=
aiwarm
;
}
}
let
tonum
=
chanum
*
task
warm
+
iwd
;
let
tonum
=
addcha
warm
+
iwd
;
if
(
tonum
<=
mywd
)
{
if
(
tonum
<=
mywd
)
{
let
randivite1
=
Math
.
round
(
Math
.
random
()
*
1
)
+
1
+
Math
.
ceil
((
mywd
-
tonum
)
/
invitewarm
);
let
randivite1
=
Math
.
round
(
Math
.
random
()
*
1
)
+
1
+
Math
.
ceil
((
mywd
-
tonum
)
/
invitewarm
);
if
(
randivite1
>
0
)
{
if
(
randivite1
>
0
)
{
...
@@ -333,7 +337,7 @@ Page({
...
@@ -333,7 +337,7 @@ Page({
}
}
}
}
if
(
chanum
>
0
)
{
if
(
chanum
>
0
)
{
bido
.
push
([
"task"
,
chanum
]);
bido
.
push
([
"task"
,
chanum
,
addchawarm
]);
}
}
}
}
if
(
type
==
"invite"
)
{
if
(
type
==
"invite"
)
{
...
@@ -380,6 +384,7 @@ Page({
...
@@ -380,6 +384,7 @@ Page({
addOneAiWarm
(
data
,
i
)
{
addOneAiWarm
(
data
,
i
)
{
let
type
=
data
[
0
];
let
type
=
data
[
0
];
let
nums
=
data
[
1
];
let
nums
=
data
[
1
];
let
aiwarm
=
data
[
2
];
let
othername
=
this
.
data
.
othername
;
let
othername
=
this
.
data
.
othername
;
if
(
type
==
"tool"
)
{
if
(
type
==
"tool"
)
{
let
itxt
=
othername
[
i
]
+
"使用道具一次获得了"
+
toolwarm
+
"温度值"
;
let
itxt
=
othername
[
i
]
+
"使用道具一次获得了"
+
toolwarm
+
"温度值"
;
...
@@ -389,7 +394,13 @@ Page({
...
@@ -389,7 +394,13 @@ Page({
inwd
+=
toolwarm
;
inwd
+=
toolwarm
;
this
.
updateRolewd
(
i
+
1
,
inwd
);
this
.
updateRolewd
(
i
+
1
,
inwd
);
}
else
if
(
type
==
"task"
)
{
}
else
if
(
type
==
"task"
)
{
let
itxt
=
othername
[
i
]
+
"完成了"
+
nums
+
"个任务,获得了"
+
taskwarm
*
nums
+
"温度值"
;
let
addwarm
=
0
;
if
(
aiwarm
){
addwarm
=
aiwarm
;
}
else
{
addwarm
=
taskwarm
*
nums
;
}
let
itxt
=
othername
[
i
]
+
"完成了"
+
nums
+
"个任务,获得了"
+
addwarm
+
"温度值"
;
this
.
addAttionTxt
(
itxt
);
this
.
addAttionTxt
(
itxt
);
let
inroomidx
=
i
;
let
inroomidx
=
i
;
let
inwd
=
this
.
data
.
roomdata
[
inroomidx
][
"wd"
];
let
inwd
=
this
.
data
.
roomdata
[
inroomidx
][
"wd"
];
...
@@ -892,7 +903,7 @@ Page({
...
@@ -892,7 +903,7 @@ Page({
}
}
}
}
if
(
taskcount
>
0
&&
taskwarm
>
0
)
{
if
(
taskcount
>
0
&&
taskwarm
>
0
)
{
this
.
newAiControl
(
"task"
,
taskcount
);
this
.
newAiControl
(
"task"
,
taskcount
,
taskwarm
);
let
tasktxt
=
"你完成了"
+
taskcount
+
"个任务,获得了"
+
taskwarm
+
"温度值"
;
let
tasktxt
=
"你完成了"
+
taskcount
+
"个任务,获得了"
+
taskwarm
+
"温度值"
;
this
.
addAttionTxt
(
tasktxt
);
this
.
addAttionTxt
(
tasktxt
);
}
}
...
...
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