Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
phpdts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nemo Ma
phpdts
Commits
fa8a95d5
Commit
fa8a95d5
authored
Jul 24, 2023
by
satsuki8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了club20的快速投料功能
parent
6e139f12
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
0 deletions
+82
-0
include/game/elementmix.func.php
include/game/elementmix.func.php
+46
-0
include/game20130526.js
include/game20130526.js
+31
-0
templates/default/elementmix.htm
templates/default/elementmix.htm
+5
-0
No files found.
include/game/elementmix.func.php
View file @
fa8a95d5
...
...
@@ -129,6 +129,52 @@
return
$smhint
;
}
# 根据元素笔记中的已知公式快速投料
function
quick_add_mix_elements
(
$data
)
{
global
$elements_info
,
$r_elements_info
,
$gamecfg
,
$gamevars
,
$iteminfo
,
$itemspkinfo
;
include
config
(
'elementmix'
,
$gamecfg
);
extract
(
$data
,
EXTR_REFS
);
include_once
GAME_ROOT
.
'./include/game/itemplace.func.php'
;
if
(
!
empty
(
$clbpara
[
'elements'
][
'info'
][
'd'
]))
{
foreach
(
$emix_fixlist
as
$key
=>
$list
)
{
if
(
!
empty
(
$clbpara
[
'elements'
][
'info'
][
'd'
][
'd'
.
$key
]))
{
$emix_arr
=
json_encode
(
$list
[
'stuff'
]);
$quickmix
.=
'<input type="button" value="投入" onclick="AddMixElements('
.
$emix_arr
.
');"> '
;
$quickmix
.=
"<span class=''>"
.
parse_itemmix_resultshow
(
$list
[
'result'
])
.
"</span><br>"
;
}
}
$quickmix
.=
'</ul>'
;
}
if
(
!
empty
(
$clbpara
[
'elements'
][
'info'
][
'hd'
]))
{
foreach
(
$gamevars
[
'rand_emixfixres'
]
as
$key
=>
$list
)
{
if
(
!
empty
(
$clbpara
[
'elements'
][
'info'
][
'hd'
][
'h'
.
$key
]))
{
$flag_complete
=
1
;
foreach
(
$list
[
'stuff'
]
as
$skey
=>
$slist
)
{
if
(
empty
(
$clbpara
[
'elements'
][
'info'
][
'hd'
][
'h'
.
$key
][
's'
.
$skey
]))
{
$flag_complete
=
0
;
break
;
}
}
if
(
$flag_complete
==
0
)
break
;
$emix_arr
=
json_encode
(
$list
[
'stuff'
]);
$quickmix
.=
'<input type="button" value="投入" onclick="AddMixElements('
.
$emix_arr
.
');"> '
;
$quickmix
.=
"<span class=''>"
.
parse_itemmix_resultshow
(
$rand_emix_fixlist
[
$key
][
'result'
])
.
"</span><br>"
;
}
}
$quickmix
.=
'</ul>'
;
}
return
$quickmix
;
}
/********拆解元素部分********/
# 把尸体打散成元素
function
split_corpse_to_elements
(
&
$edata
,
$emode
)
...
...
include/game20130526.js
View file @
fa8a95d5
...
...
@@ -481,6 +481,37 @@ function AddElementsToList(ekey,enums)
$
(
'
emixinfotop
'
).
style
.
display
=
'
block
'
;
}
function
AddMixElements
(
emix_arr
)
{
var
list
=
$
(
'
emixlist
'
).
value
;
var
nums
=
$
(
'
emixnums
'
).
value
;
var
desc
=
$
(
'
emixinfo
'
).
innerHTML
;
var
keyarr
=
[];
var
numsarr
=
[];
var
descarr
=
[];
const
esum
=
[];
for
(
let
i
=
0
;
i
<
emix_arr
.
length
;
i
++
)
{
esum
[
emix_arr
[
i
][
0
]]
=
(
esum
[
emix_arr
[
i
][
0
]]
||
0
)
+
emix_arr
[
i
][
1
];
}
for
(
let
i
=
0
;
i
<
emix_arr
.
length
;
i
++
)
{
if
(
$
(
'
maxe
'
+
emix_arr
[
i
][
0
]
+
'
num
'
)
===
null
||
(
$
(
'
maxe
'
+
emix_arr
[
i
][
0
]
+
'
num
'
).
value
-
esum
[
emix_arr
[
i
][
0
]])
<
0
)
{
window
.
alert
(
"
合成所需的元素数量不足。
"
);
return
;
}
}
for
(
let
i
=
0
;
i
<
emix_arr
.
length
;
i
++
)
{
$
(
'
maxe
'
+
emix_arr
[
i
][
0
]
+
'
num
'
).
value
-=
emix_arr
[
i
][
1
];
$
(
'
e
'
+
emix_arr
[
i
][
0
]
+
'
num
'
).
value
=
$
(
'
maxe
'
+
emix_arr
[
i
][
0
]
+
'
num
'
).
value
;
keyarr
.
push
(
emix_arr
[
i
][
0
]);
numsarr
.
push
(
emix_arr
[
i
][
1
]);
descarr
.
push
(
emix_arr
[
i
][
1
]
+
'
份
'
+
$
(
'
edesc
'
+
emix_arr
[
i
][
0
]).
innerHTML
);
}
$
(
'
emixlist
'
).
value
=
keyarr
.
join
(
'
+
'
);
$
(
'
emixnums
'
).
value
=
numsarr
.
join
(
'
+
'
);
$
(
'
emixinfo
'
).
innerHTML
=
descarr
.
join
(
'
、
'
);
$
(
'
emixinfotop
'
).
style
.
display
=
'
block
'
;
}
function
changeVolume
(
cv
){
var
v
=
$
(
'
gamebgm
'
).
volume
;
v
=
v
+
cv
;
...
...
templates/default/elementmix.htm
View file @
fa8a95d5
...
...
@@ -59,6 +59,11 @@
</div>
<br>
<!--根据元素笔记中已知的合成公式进行快速投料-->
<!--{eval include_once GAME_ROOT.'./include/game/elementmix.func.php';$quickmix = quick_add_mix_elements($pdata);}-->
<span
class=
"yellow"
>
【快速合成】
</span><br>
{$quickmix}
<br>
<!--自带:通过投入元素数量的奇偶决定道具类别-->
<span
class=
"yellow"
>
【数术】
</span><br>
› 投入份数
<span
class=
"lime"
>
最多(±10)
</span>
的一种或多种元素
<br>
...
...
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