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
b0607318
Commit
b0607318
authored
Jun 28, 2023
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增游戏内容 Club21
parent
3d363c43
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
151 additions
and
27 deletions
+151
-27
command.php
command.php
+31
-0
gamedata/cache/clubskills_1.php
gamedata/cache/clubskills_1.php
+1
-1
gamedata/cache/resources_1.php
gamedata/cache/resources_1.php
+1
-1
gamedata/cache/shopitem_1.php
gamedata/cache/shopitem_1.php
+2
-1
include/game/item.func.php
include/game/item.func.php
+45
-24
include/game/special.func.php
include/game/special.func.php
+37
-0
templates/default/command.htm
templates/default/command.htm
+8
-0
templates/default/sp_extract_trait.htm
templates/default/sp_extract_trait.htm
+26
-0
No files found.
command.php
View file @
b0607318
...
...
@@ -260,6 +260,37 @@ if($hp > 0){
}
$mode
=
'command'
;
}
//码语行人提取
}
elseif
(
$sp_cmd
==
'sp_extract_trait'
)
{
$position
=
0
;
if
(
$club
==
21
)
{
foreach
(
array
(
1
,
2
,
3
,
4
,
5
,
6
)
as
$imn
)
//遍历所有武器装备
if
(
strpos
(
$
{
'itmk'
.
$imn
},
'D'
)
===
0
||
strpos
(
$
{
'itmk'
.
$imn
},
'W'
)
===
0
)
{
$position
=
$imn
;
break
;
}
if
(
!
$position
)
{
$log
.=
'<span class="red">你没有武器或者装备,无法提取要素!</span><br />'
;
$mode
=
'command'
;
}
else
$mode
=
'sp_extract_trait'
;
}
else
{
$log
.=
'<span class="red">你不懂得如何提取要素!</span><br />'
;
$mode
=
'command'
;
}
}
elseif
(
$sp_cmd
==
'sp_extract_trait_selected'
)
{
if
(
!
isset
(
$choice
)
||
$choice
==
'menu'
)
{
$mode
=
'command'
;
}
else
{
$choice
=
(
int
)
$choice
;
if
(
$choice
<
1
||
$choice
>
6
)
$log
.=
'<span class="red">无此物品。</span><br />'
;
else
{
include_once
GAME_ROOT
.
'./include/game/special.func.php'
;
item_extract_trait
(
$choice
);
}
$mode
=
'command'
;
}
}
elseif
(
$sp_cmd
==
'sp_pbomb'
){
$mode
=
'sp_pbomb'
;
}
elseif
(
$sp_cmd
==
'sp_weapon'
){
...
...
gamedata/cache/clubskills_1.php
View file @
b0607318
...
...
@@ -27,7 +27,7 @@ $club_skillslist = Array
//18 => Array('s_hp','s_ad','f_heal'), #'天赋异禀',
19
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
,
'c19_nirvana'
,
'c19_reincarn'
,
'c19_purity'
,
'c19_crystal'
,
'c19_redeem'
,
'c19_dispel'
,
'c19_woesea'
),
#'晶莹剔透', //晶莹剔透、决死结界合并为晶莹剔透
20
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
,
'c20_fertile'
,
'c20_windfall'
,
'c20_lighting'
,
'c20_zombie'
,
'c20_sparkle'
,
'c20_lotus'
),
#'元素大师', #商店购买社团卡
21
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'
灵子梦魇', #暂定名,商店购买社团卡
21
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'
码语行人'
22
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'偶像大师', #暂定名,「除错大师」头衔奖励
98
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'换装迷宫',
99
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'第一形态'
...
...
gamedata/cache/resources_1.php
View file @
b0607318
...
...
@@ -62,7 +62,7 @@ $clubinfo = Array(
//18=>'天赋异禀',
19
=>
'晶莹剔透'
,
//决死结界、晶莹剔透合并为晶莹剔透
20
=>
'元素大师'
,
#商店购买社团卡
21
=>
'
灵子梦魇'
,
#暂定名,
商店购买社团卡
21
=>
'
码语行人'
,
#
商店购买社团卡
22
=>
'偶像大师'
,
#暂定名,「除错大师」头衔奖励
98
=>
'换装迷宫'
,
99
=>
'第一形态'
...
...
gamedata/cache/shopitem_1.php
View file @
b0607318
...
...
@@ -199,4 +199,5 @@
17,1,20,0,BORN FROM WISH 「幻想啼音」,p0F,1,1,,
17,1,20,1,提示纸条D,Y,1,1,,
0,18,,,上级者向·测试,,,,,
18,1,20,0,「元素大师」称号卡,ZB,20,1,,
\ No newline at end of file
18,1,20,0,「元素大师」称号卡,ZB,20,1,,
18,1,20,0,「码语行人」称号卡,ZB,21,1,,
\ No newline at end of file
include/game/item.func.php
View file @
b0607318
...
...
@@ -1148,9 +1148,13 @@ function itemuse($itmn,&$data=NULL) {
}
}
elseif
(
preg_match
(
"/钉$/"
,
$itm
)
||
preg_match
(
"/钉\[/"
,
$itm
))
{
//global $wep, $wepk, $wepe, $weps, $wepsk;
if
((
strpos
(
$wep
,
'棍棒'
)
!==
false
)
&&
(
$wepk
==
'WP'
))
{
if
(
strpos
(
$wepsk
,
'j'
)
!==
false
){
$log
.=
'多重武器不能改造。<br>'
;
//码语行人,$club==21的时候不能使用钉子
if
(
$club
==
21
)
{
$log
.=
'<span class="yellow">码语行人,$club==21的时候不能使用针线包<br>'
;
return
;
}
elseif
((
strpos
(
$wep
,
'棍棒'
)
!==
false
)
&&
(
$wepk
==
'WP'
))
{
if
(
strpos
(
$wepsk
,
'j'
)
!==
false
)
{
$log
.=
'多重武器不能改造。<br>'
;
return
;
}
$dice
=
rand
(
0
,
100
);
...
...
@@ -1177,7 +1181,11 @@ function itemuse($itmn,&$data=NULL) {
}
}
elseif
(
$itm
==
'针线包'
)
{
//global $arb, $arbk, $arbe, $arbs, $arbsk, $noarb;
if
((
$arb
==
$noarb
)
||
!
$arb
)
{
//码语行人,$club==21的时候不能使用针线包
if
(
$club
==
21
)
{
$log
.=
'<span class="yellow">码语行人,$club==21的时候不能使用针线包<br>'
;
return
;
}
elseif
((
$arb
==
$noarb
)
||
!
$arb
)
{
$log
.=
'你没有装备防具,不能使用针线包。<br>'
;
}
elseif
(
strpos
(
$arbsk
,
'^'
)
!==
false
){
$log
.=
'<span class="yellow">你不能对背包使用针线包。<br>'
;
...
...
@@ -1247,16 +1255,21 @@ function itemuse($itmn,&$data=NULL) {
$itms
--
;
}
elseif
(
$itm
==
'天然呆四面的奖赏'
)
{
//global $wep, $wepk, $wepe, $weps, $wepsk;
if
(
!
$weps
||
!
$wepe
)
{
//码语行人,$club==21的时候不能使用天然呆四面的奖赏
if
(
$club
==
21
)
{
$log
.=
'<span class="yellow">码语行人,$club==21的时候不能使用武器师安雅的奖赏<br>'
;
return
;
}
if
(
!
$weps
||
!
$wepe
)
{
$log
.=
'请先装备武器。<br>'
;
return
;
}
if
(
strpos
(
$wepsk
,
'j'
)
!==
false
)
{
$log
.=
'多重武器不能改造。<br>'
;
if
(
strpos
(
$wepsk
,
'j'
)
!==
false
)
{
$log
.=
'多重武器不能改造。<br>'
;
return
;
}
if
(
strpos
(
$wepsk
,
'O'
)
!==
false
)
{
$log
.=
'进化武器不能改造。<br>'
;
if
(
strpos
(
$wepsk
,
'O'
)
!==
false
)
{
$log
.=
'进化武器不能改造。<br>'
;
return
;
}
$log
.=
"使用了<span class='yellow'>天然呆四面的奖赏</span>。<br>"
;
...
...
@@ -1295,7 +1308,11 @@ function itemuse($itmn,&$data=NULL) {
}
}
elseif
(
$itm
==
'武器师安雅的奖赏'
)
{
//global $wep, $wepk, $wepe, $weps, $wepsk, $wp, $wk, $wg, $wc, $wd, $wf;
if
(
!
$weps
||
!
$wepe
)
{
//码语行人,$club==21的时候不能使用武器师安雅的奖赏
if
(
$club
==
21
)
{
$log
.=
'<span class="yellow">码语行人,$club==21的时候不能使用武器师安雅的奖赏<br>'
;
return
;
}
elseif
(
!
$weps
||
!
$wepe
)
{
$log
.=
'请先装备武器。<br>'
;
return
;
}
...
...
@@ -2000,18 +2017,17 @@ function itemuse($itmn,&$data=NULL) {
$clbpara
[
'elements'
][
'tags'
]
=
Array
(
$dice
=>
Array
(
'dom'
=>
Array
(
0
=>
1
),
'sub'
=>
Array
(
0
=>
1
)));
$clbpara
[
'elements'
][
'info'
][
'd'
][
'd1'
]
=
1
;
//初始化元素合成缓存文件
include_once
GAME_ROOT
.
'./include/game/elementmix.func.php'
;
include_once
GAME_ROOT
.
'./include/game/elementmix.func.php'
;
emix_spawn_info
();
}
elseif
(
$itme
==
21
){
//灵子梦魇特殊处理
$log
.=
"再等等吧……<br>"
;
}
elseif
(
$itme
==
22
){
//偶像大师特殊处理
$log
.=
"再等等吧……<br>"
;
}
else
{
//直接将社团卡的效果写入玩家club
changeclub
(
$itme
,
$data
);
$log
.=
"你的称号被改动了!"
;
}
elseif
(
$itme
==
21
)
{
//码语行人特殊处理
$log
.=
"码语行人特殊处理<br>"
;
//社团变更
changeclub
(
21
,
$data
);
}
elseif
(
$itme
==
22
)
{
//偶像大师特殊处理
$log
.=
"再等等吧……<br>"
;
}
else
{
//直接将社团卡的效果写入玩家club
changeclub
(
$itme
,
$data
);
$log
.=
"你的称号被改动了!"
;
}
//销毁物品
$itm
=
$itmk
=
$itmsk
=
''
;
...
...
@@ -2197,12 +2213,17 @@ function itemuse($itmn,&$data=NULL) {
}
}
elseif
(
$itm
==
'『灵魂宝石』'
||
$itm
==
'『祝福宝石』'
)
{
//global $cmd;
//码语行人,$club==21的时候不能使用宝石
if
(
$club
==
21
)
{
$log
.=
'<span class="yellow">码语行人,$club==21的时候不能使用宝石<br>'
;
return
;
}
$cmd
=
'<input type="hidden" name="mode" value="item"><input type="hidden" name="usemode" value="qianghua"><input type="hidden" name="itmp" value="'
.
$itmn
.
'">你想强化哪一件装备?<br><input type="radio" name="command" id="menu" value="menu" checked><a onclick=sl("menu"); href="javascript:void(0);" >返回</a><br><br><br>'
;
for
(
$i
=
1
;
$i
<=
6
;
$i
++
)
{
for
(
$i
=
1
;
$i
<=
6
;
$i
++
)
{
//global ${'itmsk' . $i};
if
((
strpos
(
$
{
'itmsk'
.
$i
},
'Z'
)
!==
false
)
&&
(
strpos
(
$
{
'itm'
.
$i
},
'宝石』'
)
===
false
))
{
if
((
strpos
(
$
{
'itmsk'
.
$i
},
'Z'
)
!==
false
)
&&
(
strpos
(
$
{
'itm'
.
$i
},
'宝石』'
)
===
false
))
{
//global ${'itm' . $i}, ${'itme' . $i}, ${'itms' . $i};
$cmd
.=
'<input type="radio" name="command" id="itm'
.
$i
.
'" value="itm'
.
$i
.
'"><a onclick=sl("itm'
.
$i
.
'"); href="javascript:void(0);" >'
.
"
{${
'itm'
.
$i
}}
/
{${
'itme'
.
$i
}}
/
{${
'itms'
.
$i
}}
"
.
'</a><br>'
;
$cmd
.=
'<input type="radio" name="command" id="itm'
.
$i
.
'" value="itm'
.
$i
.
'"><a onclick=sl("itm'
.
$i
.
'"); href="javascript:void(0);" >'
.
"
{${
'itm'
.
$i
}}
/
{${
'itme'
.
$i
}}
/
{${
'itms'
.
$i
}}
"
.
'</a><br>'
;
$flag
=
true
;
}
}
...
...
include/game/special.func.php
View file @
b0607318
...
...
@@ -478,6 +478,43 @@ function press_bomb(){
return
;
}
//提取代码片段逻辑
//——创建一个新的函数【ItemExtractTrait(...)】,读取物品的itm、itme、itms和itmsk属性,并清除其中的无效部分(例如排除不应该被提取的属性,如下毒者ID等),将其对应的值赋予一个新的itmk为"代码片段"的物品,并替代(摧毁)原物品。可以考虑为新物品添加一些额外的字段。
function
item_extract_trait
(
$which
){
//var_dump($itmn);
global
$log
,
$mode
,
$club
;
if
(
$club
!=
21
){
$log
.=
'你的称号不能使用该技能。'
;
$mode
=
'command'
;
return
;
}
if
(
$which
<
1
||
$which
>
6
)
{
$log
.=
'此道具不存在,请重新选择。'
;
$mode
=
'command'
;
return
;
}
global
$
{
'itm'
.
$which
},
$
{
'itmk'
.
$which
},
$
{
'itme'
.
$which
},
$
{
'itms'
.
$which
},
$
{
'itmsk'
.
$which
};
$itm
=
&
$
{
'itm'
.
$which
};
$itmk
=
&
$
{
'itmk'
.
$which
};
$itme
=
&
$
{
'itme'
.
$which
};
$itms
=
&
$
{
'itms'
.
$which
};
$itmsk
=
&
$
{
'itmsk'
.
$which
};
// 判断itmk是否以'D'或'W'开头
if
(
strpos
(
$itmk
,
'D'
)
===
0
||
strpos
(
$itmk
,
'W'
)
===
0
)
{
// 将itmk替换为代码片段的itmk
$itmk
=
'代码片段'
;
// 给代码片段命名
$itm
=
$itm
.
'代码片段'
;
$log
.=
'成功将物品转换为代码片段。<br>'
;
}
else
{
$log
.=
'该物品无法转换为代码片段。<br>'
;
}
}
function
shoplist
(
$sn
,
$getlist
=
NULL
)
{
global
$gamecfg
,
$mode
,
$itemdata
,
$areanum
,
$areaadd
,
$iteminfo
,
$itemspkinfo
,
$club
;
global
$db
,
$tablepre
;
...
...
templates/default/command.htm
View file @
b0607318
...
...
@@ -155,6 +155,14 @@
<input
type=
"button"
class=
"cmdbutton"
id=
"sp_poison"
name=
"sp_poison"
value=
"检查毒物"
onclick=
"$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_poison';postCmd('gamecmd','command.php');this.disabled=true;"
>
</span>
<br
/>
<!--{elseif $club == 21}-->
<span
tooltip=
"可以通过消耗体力,将武器·装备上的「要素」取出成为物品"
>
<input
type=
"button"
class=
"cmdbutton"
id=
"sp_extract_trait"
name=
"sp_extract_trait"
value=
"提取代码片段"
onclick=
"$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_extract_trait';postCmd('gamecmd','command.php');this.disabled=true;"
>
</span>
<span
tooltip=
"插回其他物品让其他物品获得这些属性"
>
<input
type=
"button"
class=
"cmdbutton"
id=
"sp_add_trait"
name=
"sp_add_trait"
value=
"插入代码片段"
onclick=
"$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_add_trait';postCmd('gamecmd','command.php');this.disabled=true;"
>
</span>
<br
/>
<!--{elseif $club == 99}-->
<span
tooltip=
"舍弃当前称号,使属性大副提升"
>
<input
type=
"button"
class=
"cmdbutton"
id=
"sp_pbomb"
name=
"sp_pbomb"
value=
"X 按钮"
onclick=
"$('command').value='special';$('subcmd').name='sp_cmd';$('subcmd').value='sp_pbomb';postCmd('gamecmd','command.php');this.disabled=true;"
>
...
...
templates/default/sp_extract_trait.htm
0 → 100644
View file @
b0607318
<input
type=
"hidden"
name=
"mode"
value=
"command"
>
<input
type=
"hidden"
name=
"command"
value=
"special"
>
<input
type=
"hidden"
name=
"sp_cmd"
value=
"sp_extract_trait_selected"
>
<input
type=
"hidden"
id=
"choice"
name=
"choice"
value=
"menu"
>
你想提取哪个的要素?
<br>
<br>
<!--{if (strpos ( $itmk1, 'D' ) === 0 ) || (strpos ( $itmk1, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='1';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm1/$itme1/$itms1"
><br>
<!--{/if}-->
<!--{if (strpos ( $itmk2, 'D' ) === 0 ) || (strpos ( $itmk2, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='2';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm2/$itme2/$itms2"
><br>
<!--{/if}-->
<!--{if (strpos ( $itmk3, 'D' ) === 0 ) || (strpos ( $itmk3, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='3';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm3/$itme3/$itms3"
><br>
<!--{/if}-->
<!--{if (strpos ( $itmk4, 'D' ) === 0 ) || (strpos ( $itmk4, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='4';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm4/$itme4/$itms4"
><br>
<!--{/if}-->
<!--{if (strpos ( $itmk5, 'D' ) === 0 ) || (strpos ( $itmk5, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='5';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm5/$itme5/$itms5"
><br>
<!--{/if}-->
<!--{if (strpos ( $itmk6, 'D' ) === 0 ) || (strpos ( $itmk6, 'W' ) === 0) }-->
<input
type=
"button"
onclick=
"$('choice').value='6';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"$itm6/$itme6/$itms6"
><br>
<!--{/if}-->
<br>
<input
type=
"button"
class=
"cmdbutton"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
value=
"放弃"
>
\ No newline at end of file
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