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
de6ef708
Commit
de6ef708
authored
Jan 25, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update item.func.php
adjusted ratio for shop presents. added tracks for opened presents.
parent
a29abb27
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
include/game/item.func.php
include/game/item.func.php
+12
-4
No files found.
include/game/item.func.php
View file @
de6ef708
...
...
@@ -817,6 +817,13 @@ function itemuse($itmn) {
list
(
$in
,
$ik
,
$ie
,
$is
,
$isk
)
=
explode
(
','
,
$itemflag
[
$rand
]);
}
}
elseif
(
strpos
(
$itmk
,
'p0'
)
===
0
){
//新福袋·VOL1
global
$statuse
;
// 用这个数值记录打开福袋的次数,目前只有VOL1所以只需要判断非0状况,以后如果加入更多的福袋则需要修改。
global
$db
,
$tablepre
;
/* if($statuse){
$log.="似乎你本轮已经打开过福袋,因此不能再打开更多的福袋!<br>";
$db->query("INSERT INTO {$tablepre}shopitem (kind,num,price,area,item,itmk,itme,itms,itmsk) VALUES ('17','1','20','0','$itm','$itmk','$itme','$itms','$itmsk')");
$log.="<span class=\"yellow\">$itm</span>从你的手中飞出,向商店的方向飞去。<br>";
} */
if
(
strpos
(
$itmk
,
'p0P'
)
===
0
){
include_once
config
(
'randomWP'
,
$gamecfg
);
}
elseif
(
strpos
(
$itmk
,
'p0K'
)
===
0
){
...
...
@@ -840,12 +847,12 @@ function itemuse($itmn) {
include_once
config
(
'randomO1'
,
$gamecfg
);
}
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
$dice
=
diceroll
(
100
);
if
(
$dice
<=
55
){
//一般物品
$dice
=
diceroll
(
100
0
);
if
(
$dice
<=
55
0
){
//一般物品
$itemflag
=
$itmlow
;
}
elseif
(
$dice
<=
8
5
){
//中级道具
}
elseif
(
$dice
<=
8
88
){
//中级道具
$itemflag
=
$itmmedium
;
}
elseif
(
$dice
<=
9
8
){
//神装
}
elseif
(
$dice
<=
9
95
){
//神装
$itemflag
=
$itmhigh
;
}
else
{
$itemflag
=
$antimeta
;
...
...
@@ -854,6 +861,7 @@ function itemuse($itmn) {
$itemflag
=
explode
(
"
\r\n
"
,
$itemflag
);
$rand
=
rand
(
0
,
count
(
$itemflag
)
-
1
);
list
(
$in
,
$ik
,
$ie
,
$is
,
$isk
)
=
explode
(
','
,
$itemflag
[
$rand
]);
$statuse
++
;
//记录打开福袋+1
}
}
else
{
//一般礼品盒
$file
=
config
(
'present'
,
$gamecfg
);
...
...
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