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
469b5908
Commit
469b5908
authored
Dec 30, 2023
by
Nemo Ma
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Haruka's Box
A box that give you various items... before it self-destruct!
parent
32e0ab69
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
151 additions
and
1 deletion
+151
-1
gamedata/cache/randomFSW_1.php
gamedata/cache/randomFSW_1.php
+1
-0
gamedata/cache/tooltip_1.php
gamedata/cache/tooltip_1.php
+1
-0
include/game/dice.func.php
include/game/dice.func.php
+1
-1
include/game/item.func.php
include/game/item.func.php
+140
-0
include/game/itemmain.func.php
include/game/itemmain.func.php
+8
-0
No files found.
gamedata/cache/randomFSW_1.php
View file @
469b5908
...
...
@@ -17,6 +17,7 @@ $jokeonothers = <<<EOT
[D6],🎲,1,1,,
✦【自律AI呼唤器】,Y,1,1,,
鱼眼凸,Y,1,1,,
小叶子的妙妙箱,Z,1,1,0,
EOT;
$superjoke
=
<<<EOT
...
...
gamedata/cache/tooltip_1.php
View file @
469b5908
...
...
@@ -50,6 +50,7 @@ $tps_name = Array
'武器师安雅的奖赏'
=>
Array
(
'title'
=>
"强化手中武器的效果值、耐久值,或者将类型转变为你更擅长的系别"
),
'凸眼鱼'
=>
Array
(
'title'
=>
"使用后可以销毁整个战场现有的尸体"
),
'鱼眼凸'
=>
Array
(
'title'
=>
"使用后可以将整个战场的尸体吸到你的位置,但后果自负!"
),
'小叶子的妙妙箱'
=>
Array
(
'title'
=>
"可以从这个箱子中翻出各种各样能作为陷阱的东西,但不要太贪心,否则后果自负!"
),
'杏仁豆腐的ID卡'
=>
Array
(
'title'
=>
"连斗后使用可以让全场NPC消失并进入『死斗阶段』"
),
'水果刀'
=>
Array
(
'title'
=>
"可以切水果。如果不会用可能会切到自己"
),
'探测器电池'
=>
Array
(
'title'
=>
"使用后可以为探测仪器供电"
),
...
...
include/game/dice.func.php
View file @
469b5908
...
...
@@ -40,7 +40,7 @@ function diceroll($dice){
}
if
(
$nick
==
69
){
$log
.=
"
你本次骰子的检定结果为:<br
><span class=
\"
red
\"
>
$result
</span>\<span class=
\"
yellow
\"
>
$dice
</span>!<br>"
;
$log
.=
"
<span class=
\"
lime
\"
>你本次骰子的检定结果为:</span
><span class=
\"
red
\"
>
$result
</span>\<span class=
\"
yellow
\"
>
$dice
</span>!<br>"
;
}
//$log .= "【DEBUG】你本次骰子的检定结果为:<br><span class=\"red\">$result</span>\<span class=\"yellow\">$dice</span>!<br>";
return
$result
;
...
...
include/game/item.func.php
View file @
469b5908
...
...
@@ -3247,6 +3247,146 @@ function itemuse($itmn,&$data=NULL) {
//销毁物品
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
}
elseif
(
$itm
==
'小叶子的妙妙箱'
){
// A multiuse item that will provide various of items for you, mainly traps.
// However, there will be an increasing possibity that this item will self-explode.
// And when it does, there will also be a possibity that you'll lose HP and SP.
// Very low chance of insta-death.
//init itm0.
$itm0
=
''
;
$itmk0
=
''
;
$itme0
=
0
;
$itms0
=
0
;
$itmsk0
=
''
;
//Par 低维生物's suggestion, the explode-rate will be stored in its $itmsk.
$log
.=
"你下定决心,打开了这个可疑的<span class='yellow'>
$itm
</span>,开始翻找起来……<br>"
;
//Getting the item's current self-destruct rate.
$harukaBoxExplodeRate
=
intval
(
$itmsk
);
//Generate a random number based on the user's 1st Yume value.
$harukaBoxCheck
=
diceroll
(
$clbpara
[
'randver1'
]);
if
(
$harukaBoxCheck
<=
17
){
//Get random low-mid effect trap.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>略微有趣的陷阱</span>的东西!<br>"
;
$itm0
=
'略微有趣的玻璃珠'
;
$itmk0
=
'TN'
;
$itme0
=
diceroll
(
$clbpara
[
'randver1'
]);
$itms0
=
diceroll
(
5
);
$itmsk0
=
''
;
}
elseif
(
$harukaBoxCheck
<=
23
){
//Get random HB item.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>有趣的补给</span>的东西!<br>"
;
$itm0
=
'有趣的零食'
;
$itmk0
=
'HB'
;
$itme0
=
diceroll
(
$clbpara
[
'randver1'
])
*
diceroll
(
3
);
$itms0
=
diceroll
(
17
);
$itmsk0
=
'z'
;
}
elseif
(
$harukaBoxCheck
<=
42
){
// Get random mid effect true damage trap.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>精心制作的陷阱</span>的东西!<br>"
;
$itm0
=
'精心制作的玻璃珠阵'
;
$itmk0
=
'TNt'
;
$itme0
=
diceroll
(
$clbpara
[
'randver2'
]);
$itms0
=
diceroll
(
5
);
$itmsk0
=
''
;
}
elseif
(
$harukaBoxCheck
<=
61
){
// Get random high effect trap.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>非常有趣的陷阱</span>的东西!<br>"
;
$itm0
=
'非常有趣的玻璃珠'
;
$itmk0
=
'TN'
;
$itme0
=
diceroll
(
$clbpara
[
'randver3'
]);
$itms0
=
diceroll
(
5
);
$itmsk0
=
''
;
}
elseif
(
$harukaBoxCheck
<=
80
){
// Get random percent damage trap.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>十分强力的陷阱</span>的东西!<br>"
;
$itm0
=
'强而有力的玻璃珠'
;
$itmk0
=
'TN8'
;
$itme0
=
1
;
$itms0
=
diceroll
(
2
);
$itmsk0
=
'x'
;
}
elseif
(
$harukaBoxCheck
<=
109
){
// Get high true damage trap.
$log
.=
"你从里面翻找出了看起来能作为<span class='yellow'>精心制作的可怕陷阱</span>的东西!<br>"
;
$itm0
=
'精心制作的可怕玻璃珠阵'
;
$itmk0
=
'TNt'
;
$itme0
=
diceroll
(
$clbpara
[
'randver3'
]);
$itms0
=
diceroll
(
5
);
$itmsk0
=
''
;
}
else
{
// Get Chaos Normal Trap.
$log
.=
"你从里面翻找出了一些<span class='yellow'>不可名状</span>的东西!<br>它似乎可以当作陷阱使用……<br>"
;
$itm0
=
'不可名状之物'
;
$itmk0
=
'TN'
;
$itme0
=
diceroll
(
114514
);
$itms0
=
diceroll
(
69
);
$itmsk0
=
''
;
}
//Troll the player if itms0 somehow rolled an 0. YSK: I encountered that 4 times in a row.
if
(
$itms0
==
0
){
$log
.=
"然而,<span class='yellow'>
$itm0
</span>却伴随着一阵少女银铃般的笑声,<br>在你的手上化作一阵青烟消失了!<br>靠!<br>"
;
$itm0
=
''
;
$itmk0
=
''
;
$itme0
=
0
;
$itms0
=
0
;
$itmsk0
=
''
;
//Refund some of explode rate.
//$harukaBoxCheck -= 30;
}
//Add to explode rate.
$harukaBoxExplodeRate
+=
$harukaBoxCheck
;
if
(
$harukaBoxExplodeRate
<
667
){
$log
.=
"<span class='yellow'>妙妙箱不怀好意地颤抖了一下。</span>但最终什么都没发生!<br>"
;
//Write explode rate back to itmsk.
$itmsk
=
strval
(
$harukaBoxExplodeRate
);
}
else
{
//BOOM!!
$log
.=
"<span class='yellow'>妙妙箱不怀好意地颤抖了一下。</span>然后华丽地在你的手上炸开了!<br>"
;
//Destroy this item.
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
//Also Destroy item0.
$itm0
=
$itmk0
=
$itmsk0
=
''
;
$itme0
=
$itms0
=
0
;
//Get damage.
$harukaBoxDamage
=
diceroll
(
$clbpara
[
'randver2'
])
*
(
diceroll
(
3
)
+
1
);
//Calculate Damage.
if
(
$hp
<
$harukaBoxDamage
){
$dflag
=
diceroll
(
1024
);
if
(
$dflag
>
1020
){
//YOU WA SHOCK!!
include_once
GAME_ROOT
.
'./include/state.func.php'
;
$log
.=
'你在一片火焰中失去了知觉。<br>'
;
death
(
'event'
,
''
,
0
,
$itm
);
}
else
{
$log
.=
"你受到了<span class='yellow'>巨大的</span>伤害!你感觉你整个人都要折在这里了!<br>"
;
$hp
=
1
;
$sp
=
1
;
}
}
else
{
$hp
-=
$harukaBoxDamage
;
$sp
-=
$harukaBoxDamage
;
if
(
$sp
<
1
){
$sp
=
1
;
}
$log
.=
"你受到了<span class='yellow'>
$harukaBoxDamage
</span>点伤害!<br>"
;
$inf
.=
'a'
;
$log
.=
"你的双手也被炸得血肉模糊!真是不幸啊!<br>"
;
}
}
}
elseif
(
$itm
==
'随机数之神的庇佑'
){
//global $wp, $wk, $wg, $wc, $wd, $wf, $club, $bid, $att, $def;
$log
.=
"你将<span class='yellow'>
$itm
</span>捧在手心……<br>
...
...
include/game/itemmain.func.php
View file @
469b5908
...
...
@@ -109,6 +109,14 @@ function calc_trap_damage(&$pa,$pd=NULL,$playerflag=0,$selflag=0)
$damage
=
$pa
[
'hp'
]
/
8
;
return
$damage
;
}
// TRUE DAMAGE!
if
(
$pa
[
'itmk0'
]
==
'TOt'
)
{
$log
.=
"<br>可能是因为制作陷阱的人的熟练度过于高强,<br>
<span class=
\"
yellow
\"
>这个陷阱对你造成了等同于其效果的真实伤害!</span><br>"
;
$damage
=
$pa
[
'itme0'
];
return
$damage
;
}
$damage
=
round
(
rand
(
0
,
$pa
[
'itme0'
]
/
2
)
+
(
$pa
[
'itme0'
]
/
2
));
...
...
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