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
64959d55
Commit
64959d55
authored
May 25, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
变化: - 游戏内主界面、进行界面内不再显示头衔样式(颜色),只保留悬浮信息; - 在当前幸存界面加入了头衔列; 修正: - NPC有时会刷新在怪位置的问题;
parent
2fb5c4b7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
108 additions
and
134 deletions
+108
-134
alive.php
alive.php
+1
-0
include/game.func.php
include/game.func.php
+1
-1
include/game/search.func.php
include/game/search.func.php
+94
-125
include/game/titles.func.php
include/game/titles.func.php
+2
-2
include/news.func.php
include/news.func.php
+7
-5
templates/default/alivelist.htm
templates/default/alivelist.htm
+2
-0
templates/default/profile.htm
templates/default/profile.htm
+1
-1
No files found.
alive.php
View file @
64959d55
...
...
@@ -31,6 +31,7 @@ while($apdata = $db->fetch_array($result))
}
else
{
$apdata
[
'apm'
]
=
0
;
}
$apdata
[
'nick'
]
=
titles_get_desc
(
$apdata
[
'nick'
]);
// $result3 = $db->query("SELECT motto FROM {$gtablepre}users WHERE username = '".$apdata['name']."'");
// $apdata['motto'] = $db->result($result3, 0);
...
...
include/game.func.php
View file @
64959d55
...
...
@@ -696,7 +696,7 @@ function check_player_misc_states(&$data)
function
get_safe_plslist
(
$mode
=
1
)
{
global
$areanum
,
$arealist
,
$hack
,
$deepzones
;
$r
=
$hack
?
array_slice
(
$arealist
,
$areanum
+
1
)
:
$arealist
;
$r
=
$hack
?
$arealist
:
array_slice
(
$arealist
,
$areanum
+
1
)
;
if
(
$mode
)
$r
=
array_diff
(
$r
,
$deepzones
);
return
$r
;
}
...
...
include/game/search.func.php
View file @
64959d55
...
...
@@ -47,10 +47,8 @@ function check_can_move($pls,$pgroup,$moveto)
return
1
;
}
function
move
(
$moveto
=
99
,
&
$data
=
NULL
)
{
//global $lvl,$log,$pls,$pgroup,$plsinfo,$hplsinfo,$inf,$hp,$mhp,$sp,$def,$club,$arealist,$areanum,$hack,$areainfo,$gamestate,$pose,$weather;
//global $gamestate,$gamecfg,$pdata;
function
move
(
$moveto
=
99
,
&
$data
=
NULL
)
{
global
$log
,
$weather
,
$plsinfo
,
$hplsinfo
,
$arealist
,
$areanum
,
$hack
,
$areainfo
,
$gamestate
,
$gamecfg
;
global
$inf_move_sp
,
$infwords
,
$inf_move_hp
;
...
...
@@ -103,8 +101,6 @@ function move($moveto = 99,&$data=NULL) {
if
(
strpos
(
$inf
,
$inf_ky
)
!==
false
){
$movesp
+=
$sp_down
;}
}
}
//if(strpos($inf, 'f') !== false){ $movesp += 5; }
//if(strpos($inf, 'i') !== false){ $movesp += 15; }
if
(
$club
==
6
){
if
(
$lvl
>=
20
){
$movesp
-=
14
;
...
...
@@ -113,104 +109,24 @@ function move($moveto = 99,&$data=NULL) {
}
}
if
(
$sp
<=
$movesp
){
$log
.=
"体力不足,不能移动!<br>还是先睡会儿吧!<br>"
;
return
;
}
$sp
-=
$movesp
;
$moved
=
false
;
if
(
$weather
==
11
)
{
//龙卷风
if
(
$hpls_flag
)
{
$pls
=
array_rand
(
$hplsinfo
[
$pgroup
]);
$moveto_info
=
$hplsinfo
[
$pgroup
][
$pls
];
}
else
{
if
(
$hack
){
$pls
=
rand
(
0
,
sizeof
(
$plsinfo
)
-
1
);}
else
{
$pls
=
rand
(
$areanum
+
1
,
sizeof
(
$plsinfo
)
-
1
);
$pls
=
$arealist
[
$pls
];}
$moveto_info
=
$plsinfo
[
$pls
];
}
$log
=
(
$log
.
"龙卷风把你吹到了<span class=
\"
yellow
\"
>
$moveto_info
</span>!<br>"
);
$moved
=
true
;
}
elseif
(
$weather
==
13
)
{
//冰雹
$damage
=
round
(
$mhp
/
12
)
+
rand
(
0
,
20
);
$hp
-=
$damage
;
$log
.=
"被<span class=
\"
blue
\"
>冰雹</span>击中,生命减少了<span class=
\"
red
\"
>
$damage
</span>点!<br>"
;
if
(
$hp
<=
0
)
{
death
(
'hsmove'
,
''
,
0
,
''
,
$data
);
return
;
// } else {
// $pls = $moveto;
// $log .= "消耗<span class=\"yellow\">{$movesp}</span>点体力,移动到了<span class=\"yellow\">$plsinfo[$pls]</span>。<br>";
}
}
elseif
(
$weather
==
14
){
//离子暴
$dice
=
rand
(
0
,
8
);
if
(
$dice
==
0
&&
strpos
(
$inf
,
'e'
)
===
false
){
$log
.=
"空气中充斥着的<span class=
\"
linen
\"
>狂暴电磁波</span>导致你<span class=
\"
yellow
\"
>身体麻痹</span>了!<br>"
;
$inf
=
str_replace
(
'e'
,
''
,
$inf
);
$inf
.=
'e'
;
}
elseif
(
$dice
==
1
&&
strpos
(
$inf
,
'w'
)
===
false
){
$log
.=
"空气中充斥着的<span class=
\"
linen
\"
>狂暴电磁波</span>导致你<span class=
\"
grey
\"
>混乱</span>了!<br>"
;
$inf
=
str_replace
(
'w'
,
''
,
$inf
);
$inf
.=
'w'
;
}
elseif
(
$dice
==
2
&&
(
strpos
(
$inf
,
'w'
)
===
false
||
strpos
(
$inf
,
'e'
)
===
false
)){
if
(
strpos
(
$inf
,
'w'
)
===
false
)
{
$log
.=
"空气中充斥着的<span class=
\"
linen
\"
>狂暴电磁波</span>导致你<span class=
\"
grey
\"
>混乱</span>了!<br>"
;
$inf
=
str_replace
(
'w'
,
''
,
$inf
);
$inf
.=
'w'
;
}
if
(
strpos
(
$inf
,
'e'
)
===
false
)
{
$log
.=
"空气中充斥着的<span class=
\"
linen
\"
>狂暴电磁波</span>导致你<span class=
\"
yellow
\"
>身体麻痹</span>了!<br>"
;
$inf
=
str_replace
(
'e'
,
''
,
$inf
);
$inf
.=
'e'
;
}
}
else
{
$log
.=
"空气中充斥着狂暴的电磁波……<br>"
;
}
}
elseif
(
$weather
==
15
){
//辐射尘
$dice
=
rand
(
0
,
3
);
if
(
$dice
==
0
){
$mhpdown
=
rand
(
4
,
8
);
if
(
$mhp
>
$mhpdown
){
$log
.=
"空气中弥漫着的<span class=
\"
green
\"
>放射性尘埃</span>导致你的生命上限减少了<span class=
\"
red
\"
>
{
$mhpdown
}
</span>点!<br>"
;
$mhp
-=
$mhpdown
;
if
(
$hp
>
$mhp
){
$hp
=
$mhp
;}
}
}
elseif
(
$dice
==
1
&&
strpos
(
$inf
,
'p'
)
===
false
){
$log
.=
"空气中弥漫着的<span class=
\"
green
\"
>放射性尘埃</span>导致你<span class=
\"
purple
\"
>中毒</span>了!<br>"
;
$inf
=
str_replace
(
'p'
,
''
,
$inf
);
$inf
.=
'p'
;
}
else
{
$log
.=
"空气中弥漫着放射性尘埃……<br>"
;
}
}
elseif
(
$weather
==
16
){
//臭氧洞
$dice
=
rand
(
0
,
7
);
if
(
$dice
<=
3
){
$defdown
=
rand
(
4
,
8
);
if
(
$def
>
$defdown
){
$log
.=
"高强度的<span class=
\"
purple
\"
>紫外线照射</span>导致你的防御力减少了<span class=
\"
red
\"
>
{
$defdown
}
</span>点!<br>"
;
$def
-=
$defdown
;
}
}
elseif
(
$dice
<=
5
&&
strpos
(
$inf
,
'u'
)
===
false
){
$log
.=
"高强度的<span class=
\"
purple
\"
>紫外线照射</span>导致你<span class=
\"
red
\"
>烧伤</span>了!<br>"
;
$inf
=
str_replace
(
'u'
,
''
,
$inf
);
$inf
.=
'u'
;
}
else
{
$log
.=
"高强度的紫外线灼烧着大地……<br>"
;
}
}
if
(
!
$moved
)
{
# 预移动、探索阶段事件结算
$moved
=
pre_move_search_events
(
$data
,
'move'
);
if
(
$hp
<=
0
)
return
;
if
(
!
$moved
)
{
if
(
!
$hpls_flag
)
$pgroup
=
0
;
$pls
=
$moveto
;
$moveto_info
=
$hpls_flag
?
$hplsinfo
[
$pgroup
][
$pls
]
:
$plsinfo
[
$pls
];
$log
.=
"消耗<span class=
\"
yellow
\"
>
{
$movesp
}
</span>点体力,移动到了<span class=
\"
yellow
\"
>
{
$moveto_info
}
</span>。<br>"
;
}
else
{
$f
=
false
;}
}
$log
.=
$areainfo
[
$pls
]
.
'<br>'
;
...
...
@@ -219,14 +135,12 @@ function move($moveto = 99,&$data=NULL) {
if
(
$hp
<=
0
)
return
;
$enemyrate
=
\revbattle\calc_meetman_rate
(
$data
);
//echo "enemyrate = {$enemyrate}%";
discover
(
$enemyrate
,
$data
);
return
;
}
function
search
(
&
$data
=
NULL
){
//global $pdata,$lvl,$log,$pls,$pgroup,$arealist,$areanum,$hack,$plsinfo,$hplsinfo,$club,$sp,$gamestate,$pose,$weather,$hp,$mhp,$def,$inf;
function
search
(
&
$data
=
NULL
)
{
global
$log
,
$weather
,
$arealist
,
$areanum
,
$hack
,
$plsinfo
,
$hplsinfo
,
$gamestate
;
global
$inf_search_sp
,
$infwords
,
$inf_search_hp
;
...
...
@@ -258,8 +172,6 @@ function search(&$data=NULL){
if
(
strpos
(
$inf
,
$inf_ky
)
!==
false
){
$schsp
+=
$sp_down
;}
}
}
//if(strpos($inf, 'a') !== false){ $schsp += 5; }
//if(strpos($inf, 'i') !== false){ $schsp += 15; }
if
(
$club
==
6
){
if
(
$lvl
>=
20
){
$schsp
-=
14
;
...
...
@@ -268,13 +180,47 @@ function search(&$data=NULL){
}
}
if
(
$sp
<=
$schsp
){
$log
.=
"体力不足,不能探索!<br>还是先睡会儿吧!<br>"
;
return
;
}
if
(
$weather
==
11
)
{
//龙卷风
# 预移动、探索阶段事件结算
$moved
=
pre_move_search_events
(
$data
,
'search'
);
if
(
$hp
<=
0
)
return
;
$sp
-=
$schsp
;
$log
.=
"消耗<span class=
\"
yellow
\"
>
{
$schsp
}
</span>点体力,你搜索着周围的一切。。。<br>"
;
# 探索指定地点,结算探索事件
move_search_events
(
$data
,
'search'
);
if
(
$hp
<=
0
)
return
;
$enemyrate
=
\revbattle\calc_meetman_rate
(
$data
);
discover
(
$enemyrate
,
$data
);
return
;
}
# 预探索、移动阶段事件
function
pre_move_search_events
(
&
$data
,
$act
)
{
global
$log
,
$inf_move_hp
,
$inf_move_sp
,
$infwords
,
$now
,
$elements_info
;
global
$hpls_flag
,
$moveto
,
$hack
,
$areanum
,
$arealist
,
$plsinfo
,
$weather
,
$gamevars
;
if
(
!
isset
(
$data
))
{
global
$pdata
;
$data
=
&
$pdata
;
}
extract
(
$data
,
EXTR_REFS
);
$moved
=
0
;
# 天气事件
# 龙卷风
if
(
$weather
==
11
)
{
if
(
$hpls_flag
)
{
$pls
=
array_rand
(
$hplsinfo
[
$pgroup
]);
...
...
@@ -282,24 +228,28 @@ function search(&$data=NULL){
}
else
{
if
(
$hack
){
$pls
=
rand
(
0
,
sizeof
(
$plsinfo
)
-
1
);}
else
{
$pls
=
rand
(
$areanum
+
1
,
sizeof
(
$plsinfo
)
-
1
);
$pls
=
$arealist
[
$pls
];}
$safepls
=
get_safe_plslist
(
0
);
$pls
=
$safepls
[
array_rand
(
$safepls
)];
$moveto_info
=
$plsinfo
[
$pls
];
}
$log
=
(
$log
.
"龙卷风把你吹到了<span class=
\"
yellow
\"
>
$moveto_info
</span>!<br>"
);
$moved
=
true
;
}
elseif
(
$weather
==
13
)
{
//冰雹
}
# 冰雹
elseif
(
$weather
==
13
)
{
$damage
=
round
(
$mhp
/
12
)
+
rand
(
0
,
20
);
$hp
-=
$damage
;
$log
.=
"被<span class=
\"
blue
\"
>冰雹</span>击中,生命减少了<span class=
\"
red
\"
>
$damage
</span>点!<br>"
;
if
(
$hp
<=
0
)
{
if
(
$hp
<=
0
)
{
death
(
'hsmove'
,
''
,
0
,
''
,
$data
);
return
;
// } else {
// $pls = $moveto;
// $log .= "消耗<span class=\"yellow\">{$movesp}</span>点体力,移动到了<span class=\"yellow\">$plsinfo[$pls]</span>。<br>";
return
$moved
;
}
}
elseif
(
$weather
==
14
){
//离子暴
}
# 离子暴
elseif
(
$weather
==
14
)
{
$dice
=
rand
(
0
,
8
);
if
(
$dice
==
0
&&
strpos
(
$inf
,
'e'
)
===
false
){
$log
.=
"空气中充斥着的<span class=
\"
linen
\"
>狂暴电磁波</span>导致你<span class=
\"
yellow
\"
>身体麻痹</span>了!<br>"
;
...
...
@@ -325,7 +275,10 @@ function search(&$data=NULL){
}
else
{
$log
.=
"空气中充斥着狂暴的电磁波……<br>"
;
}
}
elseif
(
$weather
==
15
){
//辐射尘
}
//辐射尘
elseif
(
$weather
==
15
)
{
$dice
=
rand
(
0
,
3
);
if
(
$dice
==
0
){
$mhpdown
=
rand
(
4
,
8
);
...
...
@@ -341,7 +294,10 @@ function search(&$data=NULL){
}
else
{
$log
.=
"空气中弥漫着放射性尘埃……<br>"
;
}
}
elseif
(
$weather
==
16
){
//臭氧洞
}
//臭氧洞
elseif
(
$weather
==
16
)
{
$dice
=
rand
(
0
,
7
);
if
(
$dice
<=
3
){
$defdown
=
rand
(
4
,
8
);
...
...
@@ -357,20 +313,33 @@ function search(&$data=NULL){
$log
.=
"高强度的紫外线灼烧着大地……<br>"
;
}
}
$sp
-=
$schsp
;
$log
.=
"消耗<span class=
\"
yellow
\"
>
{
$schsp
}
</span>点体力,你搜索着周围的一切。。。<br>"
;
# 探索指定地点,结算探索事件
move_search_events
(
$data
,
'search'
);
if
(
$hp
<=
0
)
return
;
$enemyrate
=
\revbattle\calc_meetman_rate
(
$data
);
//echo "enemyrate = {$enemyrate}%";
discover
(
$enemyrate
,
$data
);
return
;
# 「霉运」效果:移动/探索时有概率迷路到其他地图
if
(
!
$moved
&&
!
check_skill_unlock
(
'inf_cursed'
,
$data
))
{
# 迷路概率13%
$sk_obbs
=
13
;
$sk_dice
=
diceroll
(
99
);
if
(
$sk_dice
<=
$sk_obbs
)
{
if
(
$hpls_flag
)
{
$pls
=
array_rand
(
$hplsinfo
[
$pgroup
]);
$moveto_info
=
$hplsinfo
[
$pgroup
][
$pls
];
}
else
{
$safepls
=
get_safe_plslist
(
0
);
$pls
=
$safepls
[
array_rand
(
$safepls
)];
$moveto_info
=
$plsinfo
[
$pls
];
}
$meta_act
=
$act
==
'move'
?
"走在前往
{
$plsinfo
[
$moveto
]
}
的路上"
:
"在附近探索"
;
$log
.=
"<span class='red'>你正哼着小曲
{
$meta_act
}
,忽然眼前一黑!<br>回过神来时,你发现自己竟然走到了<span class=
\"
yellow
\"
>
$moveto_info
</span>!</span><br>……<br>"
;
$moved
=
true
;
}
}
return
$moved
;
}
# 探索或移动行为会触发的事件
...
...
include/game/titles.func.php
View file @
64959d55
...
...
@@ -105,8 +105,8 @@ function titles_get_desc($tkey,$mode=0)
{
$n_desc
=
"<span "
;
}
# 存在样式,赋予一个样式:
if
(
isset
(
$title_desc
[
$tkey
][
'class'
]))
# 存在样式
、且允许输出样式
,赋予一个样式:
if
(
!
$mode
&&
isset
(
$title_desc
[
$tkey
][
'class'
]))
{
$n_class
=
"class=
\"
{
$title_desc
[
$tkey
][
'class'
]
}
\"
"
;
$n_desc
.=
$n_class
;
...
...
include/news.func.php
View file @
64959d55
...
...
@@ -72,7 +72,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
{
$name
=
is_array
(
$old_nicknews
[
$news
])
?
$old_nicknews
[
$news
][
0
]
:
'a'
;
$nick
=
is_array
(
$old_nicknews
[
$news
])
?
$old_nicknews
[
$news
][
1
]
:
$old_nicknews
[
$news
];
if
(
!
empty
(
$$nick
)
||
$$nick
==
0
)
$$nick
=
titles_get_desc
(
$$nick
);
if
(
!
empty
(
$$nick
)
||
$$nick
==
0
)
$$nick
=
titles_get_desc
(
$$nick
,
1
);
$$name
=
$$nick
.
' '
.
$$name
;
unset
(
$name
);
unset
(
$nick
);
}
...
...
@@ -141,13 +141,14 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
if
(
!
empty
(
$a
)
&&
strpos
(
$a
,
'|'
)
!==
false
)
{
$arr
=
explode
(
'|'
,
$a
);
$a
=
titles_get_desc
(
$arr
[
0
])
.
' '
.
$arr
[
1
];
$old_a
=
$a
;
$a
=
titles_get_desc
(
$arr
[
0
],
1
)
.
' '
.
$arr
[
1
];
unset
(
$arr
);
}
if
(
!
empty
(
$c
)
&&
strpos
(
$c
,
'|'
)
!==
false
)
{
$arr
=
explode
(
'|'
,
$c
);
$c
=
titles_get_desc
(
$arr
[
0
])
.
' '
.
$arr
[
1
];
$c
=
titles_get_desc
(
$arr
[
0
]
,
1
)
.
' '
.
$arr
[
1
];
unset
(
$arr
);
}
if
(
$news
==
'death11'
)
{
...
...
@@ -221,8 +222,9 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
}
else
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>不明原因</span>死亡"
;
}
if
(
$b
)
$dname
=
$typeinfo
[
$b
]
.
' '
.
$a
;
else
$dname
=
$a
;
if
(
!
isset
(
$old_a
))
$old_a
=
$a
;
if
(
$b
)
$dname
=
$typeinfo
[
$b
]
.
' '
.
$old_a
;
else
$dname
=
$typeinfo
[
0
]
.
' '
.
$old_a
;
// if($b == 0) {
// //$dname = $a;
// $lwresult = $db->query("SELECT lastword FROM {$gtablepre}users WHERE username = '$a'");
...
...
templates/default/alivelist.htm
View file @
64959d55
<TABLE
border=
"1"
>
<tr
align=
"center"
class=
"b1"
>
<td
class=
"b1"
><span>
名字
&
编号
</span></td>
<td
class=
"b1"
><span>
头衔
</span></td>
<td
width=
"140"
class=
"b1"
><span>
头像
</span></td>
<td
class=
"b1"
><span>
等级
</span></td>
<td
class=
"b1"
><span>
杀害玩家数
</span></td>
...
...
@@ -18,6 +19,7 @@
<tr
class=
"b3"
>
<td
align=
"center"
class=
"b3"
><span><u><a
href=
"user_profile.php?playerID=$alive['name']"
>
$alive['name']
</a></u><br>
$sexinfo[$alive['gd']] $alive['sNo'] 号
</span></td>
<td
class=
"b3"
style=
"padding: 5px;"
><span>
$alive['nick']
</span></td>
<td
align=
"center"
class=
"b3"
><span><IMG
src=
"img/$alive['iconImg']"
width=
"140"
height=
"80"
border=
"0"
align=
"absmiddle"
></span></td>
<td
class=
"b3"
><span>
$alive['lvl']
</span></td>
<td
class=
"b3"
><span>
$alive['killnum']
</span></td>
...
...
templates/default/profile.htm
View file @
64959d55
...
...
@@ -11,7 +11,7 @@
<td>
<table
border=
"0"
width=
"720"
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<tr>
<!--{eval $nickinfo = titles_get_desc($nick);}-->
<!--{eval $nickinfo = titles_get_desc($nick
,1
);}-->
<td
width=
"210"
colspan=
"3"
class=
"b1"
><span>
{$nickinfo} {$name}
</span></td>
<td
width=
"100"
colspan=
"1"
class=
"b1"
><span>
{$sexinfo[$gd]}{$sNo}号
</span></td>
<td
width=
"95"
colspan=
"2"
class=
"b1"
><span>
{lang weather}:$wthinfo[$weather]
</span></td>
...
...
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