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
efbe28ff
Commit
efbe28ff
authored
Mar 05, 2023
by
Nemo Ma
Committed by
GitHub
Mar 05, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #42 from hikawiier/waaagh
rev combat phase 3.14
parents
793c046b
1810c047
Changes
30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1646 additions
and
129 deletions
+1646
-129
command.php
command.php
+43
-5
game.php
game.php
+8
-1
gamedata/cache/clubskills_1.php
gamedata/cache/clubskills_1.php
+267
-0
gamedata/cache/gamecfg_1.php
gamedata/cache/gamecfg_1.php
+2
-2
gamedata/cache/resources_1.php
gamedata/cache/resources_1.php
+2
-2
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+55
-14
include/admin/gameinfomng.php
include/admin/gameinfomng.php
+2
-2
include/common.inc.php
include/common.inc.php
+1
-0
include/game.func.php
include/game.func.php
+139
-5
include/game/clubslct.func.php
include/game/clubslct.func.php
+54
-3
include/game/item.func.php
include/game/item.func.php
+7
-6
include/game/revattr.func.php
include/game/revattr.func.php
+152
-9
include/game/revattr_extra.func.php
include/game/revattr_extra.func.php
+66
-1
include/game/revbattle.func.php
include/game/revbattle.func.php
+34
-1
include/game/revclubskills.func.php
include/game/revclubskills.func.php
+432
-0
include/game/revclubskills_extra.func.php
include/game/revclubskills_extra.func.php
+32
-0
include/game/revcombat.func.php
include/game/revcombat.func.php
+45
-18
include/game/search.func.php
include/game/search.func.php
+2
-0
include/game20130526.js
include/game20130526.js
+43
-1
include/global.func.php
include/global.func.php
+8
-2
register.php
register.php
+1
-1
templates/default/admin_gameinfomng.htm
templates/default/admin_gameinfomng.htm
+2
-1
templates/default/battlecmd_rev.htm
templates/default/battlecmd_rev.htm
+48
-17
templates/default/command.htm
templates/default/command.htm
+5
-1
templates/default/profile.htm
templates/default/profile.htm
+1
-1
templates/default/skill_c1_veteran.htm
templates/default/skill_c1_veteran.htm
+56
-0
templates/default/skill_sample/skill_技能编号.htm
templates/default/skill_sample/skill_技能编号.htm
+46
-0
templates/default/skillpage.htm
templates/default/skillpage.htm
+35
-0
templates/default/sp_terminal.htm
templates/default/sp_terminal.htm
+56
-34
valid.php
valid.php
+2
-2
No files found.
command.php
View file @
efbe28ff
...
...
@@ -10,8 +10,6 @@ require GAME_ROOT.'./include/game.func.php';
//判断是否进入游戏
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
unset
(
$pdata
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE name = '
$cuser
' AND type = 0"
);
if
(
!
$db
->
num_rows
(
$result
))
{
header
(
"Location: valid.php"
);
exit
();
}
...
...
@@ -41,11 +39,11 @@ if($gamestate == 0) {
}
//初始化各变量
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
extract
(
$pdata
,
EXTR_REFS
);
$log
=
$cmd
=
$main
=
''
;
$gamedata
=
array
();
init_playerdata
();
$clbpara
=
get_clbpara
(
$clbpara
);
//读取玩家互动信息
$result
=
$db
->
query
(
"SELECT lid,time,log FROM
{
$tablepre
}
log WHERE toid = '
$pid
' AND prcsd = 0 ORDER BY time,lid"
);
...
...
@@ -94,6 +92,17 @@ if($hp > 0){
$nowmtime
=
floor
(
getmicrotime
()
*
1000
);
$rmcdtime
=
$nowmtime
>=
$cdover
?
0
:
$cdover
-
$nowmtime
;
}
//如果身上存在时效性技能,检查技能是否超时
if
(
$hp
>
0
&&
!
empty
(
$clbpara
[
'lasttimes'
]))
check_skilllasttimes
();
//应用眩晕状态效果
if
(
$hp
>
0
&&
in_array
(
'inf_dizzy'
,
$clbpara
[
'skill'
]))
{
$dizzy_times
=
((
$clbpara
[
'starttimes'
][
'inf_dizzy'
]
+
$clbpara
[
'lasttimes'
][
'inf_dizzy'
])
-
$now
)
*
1000
;
$log
.=
'<span class="yellow">你现在处于眩晕状态,什么都做不了!</span><br>眩晕状态持续时间还剩:<span id="timer" class="yellow">'
.
$dizzy_times
.
'</span>秒<br><script type="text/javascript">demiSecTimerStarter('
.
$dizzy_times
.
');</script>'
;
goto
cd_flag
;
}
//执行动作前,身上存在追击标记时,直接进入追击判定
if
((
strpos
(
$action
,
'chase'
)
!==
false
||
strpos
(
$action
,
'dfight'
)
!==
false
)
&&
$mode
!==
'revcombat'
)
{
...
...
@@ -106,6 +115,7 @@ if($hp > 0){
$dialogue_id
=
$clbpara
[
'dialogue'
];
}
elseif
(
$coldtimeon
&&
$rmcdtime
>
0
&&
(
strpos
(
$command
,
'move'
)
===
0
||
strpos
(
$command
,
'search'
)
===
0
||
(
strpos
(
$command
,
'itm'
)
===
0
)
&&
(
$command
!=
'itemget'
)
||
strpos
(
$sp_cmd
,
'sp_weapon'
)
===
0
||
strpos
(
$command
,
'song'
)
===
0
)){
$log
.=
'<span class="yellow">冷却时间尚未结束!</span><br>'
;
cd_flag
:
$mode
=
'command'
;
}
else
{
//进入指令判断
...
...
@@ -582,6 +592,32 @@ if($hp > 0){
upgradeclubskills
(
$command
);
calcskills
(
$skarr
);
$p12
[
1
]
=
1
;
$p12
[
2
]
=
2
;
$mode
=
'command'
;
}
elseif
(
$mode
==
'revskpts'
)
{
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
if
(
strpos
(
$command
,
'upgskill_'
)
!==
false
)
{
$sk
=
substr
(
$command
,
9
);
if
(
isset
(
$
{
$command
.
'_nums'
}))
{
$
{
$command
.
'_nums'
}
=
(
int
)
$
{
$command
.
'_nums'
};
upgclbskills
(
$sk
,
$
{
$command
.
'_nums'
});
}
else
{
upgclbskills
(
$sk
);
}
}
elseif
(
strpos
(
$command
,
'actskill_'
)
!==
false
)
{
$sk
=
substr
(
$command
,
9
);
if
(
isset
(
$cskills
[
$sk
])
&&
!
check_skill_unlock
(
$sk
,
$pdata
))
{
include_once
GAME_ROOT
.
'./include/game/revclubskills_extra.func.php'
;
if
(
$sk
==
'c1_veteran'
)
skill_c1_veteran_act
(
$c1_veteran_choice
);
}
}
$mode
=
'command'
;
}
elseif
(
$mode
==
'sp_pbomb'
)
{
include_once
GAME_ROOT
.
'./include/game/special.func.php'
;
if
(
$command
==
"YES"
)
press_bomb
();
...
...
@@ -638,8 +674,8 @@ if($hp > 0){
}
//显示指令执行结果
$gamedata
[
'innerHTML'
][
'notice'
]
=
ob_get_contents
();
if
(
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
$gamedata
[
'timer'
]
=
$rmcdtime
;
if
(
(
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
)
||
isset
(
$dizzy_times
)
){
$gamedata
[
'timer'
]
=
isset
(
$dizzy_times
)
?
$dizzy_times
:
$rmcdtime
;
}
if
(
$hp
>
0
&&
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
$log
.=
"行动冷却时间:<span id=
\"
timer
\"
class=
\"
yellow
\"
>0.0</span>秒<br>"
;
...
...
@@ -683,6 +719,8 @@ if($hp <= 0) {
//$gamedata['cmd'] .= '<br><br><input type="button" id="submit" onClick="postCommand();return false;" value="提交">';
}
//存在 $opendialog 时 尝试打开id为 $opendialog 值的悬浮窗口
if
(
isset
(
$opendialog
)){
$log
.=
"<span style=
\"
display:none
\"
id=
\"
open-dialog
\"
>
{
$opendialog
}
</span>"
;}
if
(
isset
(
$url
)){
$gamedata
[
'url'
]
=
$url
;}
$gamedata
[
'innerHTML'
][
'pls'
]
=
(
!
isset
(
$plsinfo
[
$pls
])
&&
isset
(
$hplsinfo
[
$pgroup
]))
?
$hplsinfo
[
$pgroup
][
$pls
]
:
$plsinfo
[
$pls
];
...
...
game.php
View file @
efbe28ff
...
...
@@ -35,10 +35,10 @@ if($gamestate == 0) {
header
(
"Location: end.php"
);
exit
();
}
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
extract
(
$pdata
);
init_playerdata
();
init_profile
();
$clbpara
=
get_clbpara
(
$clbpara
);
$log
=
''
;
//读取聊天信息
...
...
@@ -132,6 +132,13 @@ elseif((strpos($action,'neut')===0)){
}
}
if
(
$hp
>
0
&&
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
$log
.=
"行动冷却时间:<span id=
\"
timer
\"
class=
\"
yellow
\"
>0.0</span>秒<script type=
\"
text/javascript
\"
>demiSecTimerStarter(
$rmcdtime
);</script><br>"
;}
//如果身上存在时效性技能,检查技能是否超时
if
(
$hp
>
0
&&
!
empty
(
$clbpara
[
'lasttimes'
]))
check_skilllasttimes
();
if
(
$hp
>
0
&&
in_array
(
'inf_dizzy'
,
$clbpara
[
'skill'
]))
{
$dizzy_times
=
((
$clbpara
[
'starttimes'
][
'inf_dizzy'
]
+
$clbpara
[
'lasttimes'
][
'inf_dizzy'
])
-
$now
)
*
1000
;
$log
.=
'<span class="yellow">你现在处于眩晕状态,什么都做不了!</span><br>眩晕状态持续时间还剩:<span id="timer" class="yellow">'
.
$dizzy_times
.
'.0</span>秒<br><script type="text/javascript">demiSecTimerStarter('
.
$dizzy_times
.
');</script>'
;
}
if
(
$club
==
0
)
{
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
...
...
gamedata/cache/clubskills_1.php
0 → 100644
View file @
efbe28ff
This diff is collapsed.
Click to expand it.
gamedata/cache/gamecfg_1.php
View file @
efbe28ff
...
...
@@ -103,9 +103,9 @@ $active_obbs = 50;
//基础反击率
$counter_obbs
=
50
;
//(仅PVE触发)基础追击率 (等于0时为不启用追击机制)
$chase_obbs
=
55
;
$chase_obbs
=
0
;
//(仅PVE触发)鏖战状态维持率 (等于0时为不启用鏖战机制)
$dfight_obbs
=
65
;
$dfight_obbs
=
0
;
//(仅PVE触发)追击&鏖战状态默认先制率 (鏖战/追击的基础先制率不受姿态与天气影响)
$chase_active_obbs
=
50
;
//(仅PVE触发)被追击&鏖战状态下默认逃跑成功率(鏖战/追击的基础先制率不受姿态与天气影响)
...
...
gamedata/cache/resources_1.php
View file @
efbe28ff
...
...
@@ -62,8 +62,8 @@ $wepeinfo = Array('不值一提','略有威胁','威力可观','无敌神器');
$poseinfo
=
Array
(
'通常'
,
'作战姿态'
,
'强袭姿态'
,
'探物姿态'
,
'偷袭姿态'
,
'治疗姿态'
,
'✧狂飙姿态✧'
,
'哨戒姿态'
);
$tacinfo
=
Array
(
'通常'
,
''
,
'重视防御'
,
'重视反击'
,
'重视躲避'
);
//可供玩家选择的姿态、策略
$apose
=
Array
(
0
,
1
,
3
,
4
,
5
,
6
);
$atac
=
Array
(
0
,
2
,
3
,
4
);
$apose
=
Array
(
1
,
3
,
4
,
5
,
6
);
$atac
=
Array
(
2
,
3
,
4
);
//不会生成在危险地图的NPC(执行官、女主)
$hidding_typelist
=
Array
(
7
,
14
);
//不会因躲避禁区、追杀玩家等原因离开地图的NPC(红暮、■、执行官、英灵(没有巫师)、SCP、种火)
...
...
gamedata/cache/style_20190718.css
View file @
efbe28ff
...
...
@@ -438,13 +438,13 @@ span.drop:hover .dropdown-menu{
/* 用dialog实现的气泡框 */
dialog
{
position
:
fixed
;
max-width
:
5
0%
;
ma
x-height
:
75%
;
font
:
10pt
微软雅黑
serif
;
border
:
#000
0px
none
;
color
:
#fff
;
border-radius
:
4
px
;
background-color
:
rgba
(
17
,
17
,
17
,
0.
85
);
box-shadow
:
0px
2px
6px
#999
;
position
:
fixed
;
left
:
0px
;
top
:
0px
;
max-width
:
80%
;
max-height
:
8
0%
;
ma
rgin
:
auto
auto
;
padding
:
15px
;
font
:
10pt
微软雅黑
serif
;
text-align
:
left
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
border
:
#000
0px
none
;
color
:
#fff
;
border-radius
:
5
px
;
background-color
:
rgba
(
17
,
17
,
17
,
0.
9
);
*
BACKGROUND
:
rgb
(
17
,
17
,
17
);
*
filter
:
alpha
(
opacity
=
50
);
box-shadow
:
0px
2px
6px
rgb
(
87
,
87
,
87
)
;
z-index
:
20
;
}
dialog
::backdrop
{
...
...
@@ -478,7 +478,7 @@ input.range{
.eicon
{
filter
:
grayscale
(
100%
)
brightness
(
133%
)
blur
(
0px
);
font-size
:
125%
;
transition
:
all
0.3s
;
transition
:
0.3s
;
}
.eicon
:hover
{
filter
:
grayscale
(
100%
)
brightness
(
166%
)
blur
(
0px
);
...
...
@@ -489,19 +489,19 @@ input.range{
box-shadow
:
0px
2px
6px
#999
;
}
/* 子面板相关 */
.blurtext
{
align-self
:
center
;
filter
:
opacity
(
75%
)
blur
(
2
px
);
filter
:
opacity
(
20%
)
blur
(
3
px
);
}
.lockmap
{
background
:
url("../../img/lock.png")
center
;
background-color
:
rgba
(
17
,
17
,
17
,
0.5
);
filter
:
opacity
(
75
%
)
brightness
(
75%
);
BORDER
:
#111
1px
solid
;
text-align
:
center
;
font
:
bold
10pt
"微软雅黑"
serif
;
filter
:
opacity
(
90
%
)
brightness
(
75%
);
BORDER
:
#111
1px
solid
;
text-align
:
center
;
font
:
bold
10pt
"微软雅黑"
serif
;
transition
:
0.5s
;
}
.lockmap
:hover
{
filter
:
opacity
(
100%
)
brightness
(
1
00
%
);
filter
:
opacity
(
100%
)
brightness
(
1
25
%
);
}
.dangerbutton
{
padding
:
2rem
2rem
;
border
:
0
;
...
...
@@ -514,10 +514,51 @@ input.range{
background-color
:
rgba
(
255
,
0
,
0
,
0.45
);
letter-spacing
:
.1rem
;
transition
:
1s
;
}
}
.dangerbutton
:hover
{
filter
:
brightness
(
130%
);
box-shadow
:
0px
0px
40px
0px
red
;
background-color
:
rgba
(
255
,
0
,
0
,
0.75
);
}
/* 技能(移植) */
table
.skilltable
{
height
:
100%
;
width
:
100%
;
border
:
0
;
margin
:
0
;
border-collapse
:
collapse
;
border-spacing
:
0
;
}
table
.skilltable
td
{
padding
:
0
;}
td
.skilldesc_left
{}
td
.skilldesc_right
{
width
:
96px
;}
span
.skilldesc
{
margin
:
8px
auto
;
display
:
block
;
}
div
.skilldesc
{
margin
:
8px
auto
;
display
:
block
;}
div
.skill_unacquired
{
position
:
relative
;
left
:
0px
;
top
:
0px
;
background-color
:
#ffffff
;
height
:
100%
;
width
:
100%
;
filter
:
alpha
(
opacity
=
18
);
-moz-opacity
:
0.18
;
opacity
:
0.18
;
-khtml-opacity
:
0.18
;
}
div
.skill_unacquired_transparent
{
position
:
relative
;
left
:
0px
;
top
:
0px
;
height
:
100%
;
width
:
100%
;
}
div
.skill_unacquired_hint
{
position
:
absolute
;
left
:
0px
;
top
:
0px
;
height
:
100%
;
width
:
100%
;
}
div
.skill_unacquired_hint_transparent
{
position
:
absolute
;
left
:
0px
;
top
:
0px
;
height
:
100%
;
width
:
100%
;
background-color
:
#000000
;
filter
:
alpha
(
opacity
=
0.1
);
-moz-opacity
:
0.1
;
opacity
:
0.1
;
-khtml-opacity
:
0.1
;
}
div
.skilllearn_desc_container
{
text-align
:
center
;
width
:
420px
;
z-index
:
100
;
position
:
fixed
;
filter
:
alpha
(
opacity
=
95
);
opacity
:
0.95
;
background-color
:
#000000
}
\ No newline at end of file
include/admin/gameinfomng.php
View file @
efbe28ff
...
...
@@ -40,8 +40,8 @@ if($command == 'wthedit'){
$cmd_info
=
'游戏状态数据错误,请重新输入!'
;
}
elseif
(
$gamestate
==
$igamestate
){
$cmd_info
=
'游戏当前已经处于此状态,请重新输入!'
;
}
elseif
(
$gamestate
==
0
&&
$igamestate
!=
10
){
$cmd_info
=
'游戏未准备,不可进入后期状态!'
;
//
}elseif($gamestate == 0 && $igamestate != 10){
//
$cmd_info = '游戏未准备,不可进入后期状态!';
}
elseif
(
$gamestate
==
10
&&
$igamestate
>
20
){
$cmd_info
=
'游戏未开始,不可进入后期状态!'
;
}
elseif
(
$igamestate
&&
$igamestate
<
$gamestate
){
...
...
include/common.inc.php
View file @
efbe28ff
...
...
@@ -45,6 +45,7 @@ require GAME_ROOT.'./gamedata/system.php';
require
config
(
'resources'
,
$gamecfg
);
require
config
(
'gamecfg'
,
$gamecfg
);
require
config
(
'combatcfg'
,
$gamecfg
);
require
config
(
'clubskills'
,
$gamecfg
);
require
config
(
'dialogue'
,
$gamecfg
);
require
config
(
'audio'
,
$gamecfg
);
...
...
include/game.func.php
View file @
efbe28ff
...
...
@@ -40,10 +40,6 @@ function init_profile(){
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm0
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
global
$clbpara
,
$weather
,
$definfo
,
$atkinfo
,
$pdata
;
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
$atkinfo
=
get_base_att
(
$pdata
,
$pdata
,
1
,
1
);
$definfo
=
get_base_def
(
$pdata
,
$pdata
,
1
,
1
);
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
,
'itm0'
,
'itm1'
,
'itm2'
,
'itm3'
,
'itm4'
,
'itm5'
,
'itm6'
)
as
$value
)
{
global
$
{
$value
.
'_words'
};
...
...
@@ -127,6 +123,10 @@ function init_profile(){
$clbpara
=
get_clbpara
(
$clbpara
);
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
$atkinfo
=
get_base_att
(
$pdata
,
$pdata
,
1
,
1
);
$definfo
=
get_base_def
(
$pdata
,
$pdata
,
1
,
1
);
return
;
}
...
...
@@ -534,7 +534,7 @@ function init_mapdata(){
$mpp
[
$position
[
0
]][
$position
[
1
]]
=
$i
;
}
$mapcontent
=
'<TABLE border="1" cellspacing="0" cellpadding="0" background="map/neomap.jpg" style="
padding-left: 5px; float:left;
background-size:478px 418px;position:relative;background-repeat:no-repeat;background-position:right bottom;">'
;
$mapcontent
=
'<TABLE border="1" cellspacing="0" cellpadding="0" background="map/neomap.jpg" style="background-size:478px 418px;position:relative;background-repeat:no-repeat;background-position:right bottom;">'
;
$mapcontent
.=
'<TR align="center"><TD colspan="11" height="24" class=b1 align=center>战场地图</TD></TR>'
;
$mapcontent
.=
'<TR align="center">
<TD width="42" height="36" class=map align=center><div class=nttx>坐标</div></TD>'
;
...
...
@@ -559,6 +559,107 @@ function init_mapdata(){
return
$mapcontent
;
}
function
init_clubskillsdata
(
$sk
,
$data
)
{
$sk_dir
=
'skill_'
.
$sk
;
# 本地存在对应的技能模板,返回模板
if
(
file_exists
(
GAME_ROOT
.
"./templates/default/"
.
$sk_dir
.
".htm"
))
{
return
Array
(
$sk_dir
);
}
# 本地不存在模板,按照预设信息生成一个
else
{
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
global
$cskills
;
# 要检查的技能没有登记过 视为无效技能
if
(
!
array_key_exists
(
$sk
,
$cskills
))
return
0
;
if
(
!
empty
(
$data
))
$data
[
'clbpara'
]
=
get_clbpara
(
$data
[
'clbpara'
]);
# 获取技能信息
$cskill
=
$cskills
[
$sk
];
$sk_name
=
$cskill
[
'name'
];
# 技能存在等级时
if
(
isset
(
$cskill
[
'maxlvl'
]))
{
$max_lvl_flag
=
0
;
$now_clvl
=
get_skilllvl
(
$sk
,
$data
);
if
(
$now_clvl
>=
$cskill
[
'maxlvl'
])
$max_lvl_flag
=
1
;
}
# 获取技能描述
$sk_desc
=
parse_skilldesc
(
$sk
,
$data
);
# 生成技能模板
$sk_temp
=
<<<EOT
<tr>
<td class="b1" width="40">
<span>{$sk_name}</span>
</td>
<td>
EOT;
# 检查技能是否存在解锁条件
if
(
!
empty
(
$cskill
[
'unlock'
]))
{
# 检查技能是否解锁,返回值不为0则未解锁
$unlock_flag
=
check_skill_unlock
(
$sk
,
$data
);
if
(
$unlock_flag
)
{
$unlock_flag
=
is_array
(
$cskill
[
'lockdesc'
])
?
$cskill
[
'lockdesc'
][
$unlock_flag
]
:
$cskill
[
'lockdesc'
];
$sk_temp
.=
<<<EOT
<div style="position:relative; height:100%; width:100%;" onmouseover="skill_unacquired_mouseover.call(this,event)" onmouseout="skill_unacquired_mouseout.call(this,event)">
<div class="skill_unacquired">
EOT;
}
}
$sk_temp
.=
<<<EOT
<table class="skilltable">
<tr>
<td class="skilldesc_left b3">
<span class="skilldesc">
{$sk_desc}
</span>
</td>
<td class="skilldesc_right b3"> \r
EOT;
# 检查技能是否存在复数输入框
if
(
!
empty
(
$cskill
[
'num_input'
])
&&
empty
(
$max_lvl_flag
))
{
$sk_temp
.=
"<input type=
\"
number
\"
name=
\"
upgskill_
{
$sk
}
_nums
\"
style=
\"
width:40px
\"
value=
\"
1
\"
>
\r
"
;
}
# 检查技能是否存在操作按钮
if
(
!
empty
(
$cskill
[
'input'
])
&&
empty
(
$max_lvl_flag
))
{
$sk_input
=
$cskill
[
'input'
];
$sk_temp
.=
"<input type=
\"
button
\"
onclick=
\"
$('mode').value='revskpts';$('command').value='upgskill_
{
$sk
}
';postCmd('gamecmd','command.php');this.disabled=true;
\"
value=
\"
{
$sk_input
}
\"
>
\r
"
;
}
$sk_temp
.=
<<<EOT
</td>
</tr>
</table>
EOT;
if
(
!
empty
(
$cskill
[
'unlock'
])
&&
$unlock_flag
)
{
$sk_temp
.=
<<<EOT
</div>
<div class="skill_unacquired_hint">
<table class="skilltable">
<tr>
<td valign="center" align="center"><span class="yellow">{$unlock_flag}</span></td>
</tr>
</table>
</div>
</div>
EOT;
}
$sk_temp
.=
<<<EOT
</tr>
EOT;
//$htm_sk_dir = GAME_ROOT.TPLDIR.'/'.$sk_dir.'.htm';
//writeover($htm_sk_dir,$sk_temp);
//return $sk_dir;
return
$sk_temp
;
}
return
0
;
}
function
get_remaincdtime
(
$pid
){
$psdata
=
get_pstate
(
$pid
);
if
(
$psdata
){
...
...
@@ -571,6 +672,39 @@ function get_remaincdtime($pid){
}
}
// 检查时效性技能是否达到时限
function
check_skilllasttimes
(
&
$data
=
NULL
)
{
global
$cskills
,
$log
,
$now
,
$name
;
if
(
empty
(
$data
))
{
global
$clbpara
;
$para
=
&
$clbpara
;
$nm
=
'你'
;
}
else
{
$para
=
&
$data
[
'clbpara'
];
$nm
=
&
$data
[
'name'
];
}
if
(
!
empty
(
$para
[
'lasttimes'
]))
{
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
foreach
(
$para
[
'lasttimes'
]
as
$sk
=>
$lts
)
{
$stm
=
isset
(
$para
[
'starttimes'
][
$sk
])
?
$para
[
'starttimes'
][
$sk
]
:
0
;
# 技能已达到时效,失去该技能,并清空相关内容
if
(
$now
>
$lts
+
$stm
)
{
lostclubskill
(
$sk
,
$para
);
$sk_name
=
$cskills
[
$sk
][
'name'
];
$log
.=
"<span class='yellow'>
{
$nm
}
从
{
$sk_name
}
状态中恢复了!</span><br>"
;
}
}
}
return
;
}
//通过pid抓取指定玩家/NPC数据
function
fetch_playerdata_by_pid
(
$pid
)
{
...
...
include/game/clubslct.func.php
View file @
efbe28ff
...
...
@@ -52,10 +52,28 @@ function getclub($who, &$c1, &$c2, &$c3)
if
(
$c2
>
$c3
)
swap
(
$c2
,
$c3
);
}
function
updateskill
(
)
function
changeclub
(
$clb
,
&
$data
=
NULL
)
{
global
$club
,
$wp
,
$wk
,
$wc
,
$wg
,
$wd
,
$wf
,
$money
,
$hp
,
$mhp
,
$att
,
$def
;
if
(
$club
==
1
)
$wp
+=
50
;
if
(
empty
(
$data
))
{
global
$club
;
lostclub
();
$club
=
$clb
;
updateskill
();
}
else
{
lostclub
(
$data
);
$data
[
'club'
]
=
$clb
;
updateskill
(
$data
);
}
}
function
updateskill
(
&
$data
=
NULL
)
{
global
$club
,
$wp
,
$wk
,
$wc
,
$wg
,
$wd
,
$wf
,
$money
,
$hp
,
$mhp
,
$att
,
$def
,
$clbpara
,
$club_skillslist
;
if
(
$club
==
1
)
{
$wp
+=
50
;}
if
(
$club
==
2
)
$wk
+=
50
;
if
(
$club
==
3
)
$wc
+=
50
;
if
(
$club
==
4
)
$wg
+=
50
;
...
...
@@ -65,6 +83,39 @@ function updateskill()
if
(
$club
==
16
)
{
$wp
+=
25
;
$wk
+=
25
;
$wc
+=
25
;
$wg
+=
25
;
$wd
+=
25
;
$wf
+=
25
;
}
if
(
$club
==
13
)
{
$mhp
+=
250
;
$hp
+=
250
;
}
if
(
$club
==
14
)
{
$att
+=
300
;
$def
+=
300
;
}
# 变更社团时 获取社团技能
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
if
(
empty
(
$data
))
{
$cks
=
$club_skillslist
[
$club
];
foreach
(
$cks
as
$sk
)
getclubskill
(
$sk
,
$clbpara
);
}
else
{
$cks
=
$club_skillslist
[
$data
[
'club'
]];
foreach
(
$cks
as
$sk
)
getclubskill
(
$sk
,
$data
[
'clbpara'
]);
}
}
function
lostclub
(
&
$data
=
NULL
)
{
global
$club
,
$clbpara
,
$club_skillslist
;
if
(
!
$club
)
return
0
;
# 丢失原社团时 注销社团技能
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
if
(
empty
(
$data
))
{
$cks
=
$club_skillslist
[
$club
];
foreach
(
$cks
as
$sk
)
lostclubskill
(
$sk
,
$clbpara
);
$club
=
0
;
}
else
{
$cks
=
$club_skillslist
[
$data
[
'club'
]];
foreach
(
$cks
as
$sk
)
lostclubskill
(
$sk
,
$data
[
'clbpara'
]);
$data
[
'club'
]
=
0
;
}
}
function
selectclub
(
$id
)
...
...
include/game/item.func.php
View file @
efbe28ff
...
...
@@ -5,6 +5,7 @@ if (! defined ( 'IN_GAME' )) {
}
include_once
GAME_ROOT
.
'./include/game/titles.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
function
itemuse
(
$itmn
)
{
global
$mode
,
$log
,
$nosta
,
$pid
,
$name
,
$state
,
$now
,
$nick
,
$achievement
,
$club
;
...
...
@@ -1336,7 +1337,7 @@ function itemuse($itmn) {
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$att
=
$def
=
13337
;
$club
=
15
;
changeclub
(
15
)
;
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
...
...
@@ -1422,7 +1423,7 @@ function itemuse($itmn) {
include_once
GAME_ROOT
.
'./include/state.func.php'
;
death
(
'SCP'
,
''
,
0
,
$itm
);
}
else
{
$club
=
17
;
changeclub
(
17
)
;
addnews
(
$now
,
'notworthit'
,
$nickinfo
.
' '
.
$name
);
}
$itms
--
;
...
...
@@ -1802,7 +1803,7 @@ function itemuse($itmn) {
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$att
=
$def
=
13337
;
$club
=
15
;
changeclub
(
15
)
;
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
}
elseif
(
$itme
==
17
||
$itme
>
22
){
//状态机社团以及不存在的社团
...
...
@@ -1831,7 +1832,7 @@ function itemuse($itmn) {
【其之零】一切都是数字的假象而已。<br>
正在你回味着这句话的时候,一切已经恢复如初。"
;
//社团变更
$club
=
20
;
changeclub
(
20
)
;
//获取初始元素与第一条配方
$dice
=
rand
(
0
,
5
);
global
$
{
'element'
.
$dice
},
$clbpara
;
...
...
@@ -1847,7 +1848,7 @@ function itemuse($itmn) {
$log
.=
"再等等吧……<br>"
;
}
else
{
//直接将社团卡的效果写入玩家club
$club
=
$itme
;
changeclub
(
$itme
)
;
$log
.=
"你的称号被改动了!"
;
}
//销毁物品
...
...
@@ -1925,7 +1926,7 @@ function itemuse($itmn) {
$log
.=
"<br>获得了<span class='sparkle'>
{
$sparkle
}
元素口袋
{
$sparkle
}
</span>!<br>"
;
$log
.=
"……这到底是怎么一回事呢?<br><br>"
;
//社团变更
$club
=
20
;
changeclub
(
20
)
;
//获取初始元素与第一条配方
$dice
=
rand
(
0
,
5
);
global
$
{
'element'
.
$dice
};
...
...
include/game/revattr.func.php
View file @
efbe28ff
...
...
@@ -6,6 +6,7 @@
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr_extra.func.php'
;
...
...
@@ -40,18 +41,35 @@
$pa
[
'wep_kind'
]
=
'P'
;
$pa
[
'is_wpg'
]
=
1
;
}
return
;
return
$pa
[
'wep_kind'
];
//保险起见……
}
//获取武器射程
function
get_wep_range
(
&
$pa
)
{
global
$rangeinfo
;
if
(
empty
(
$pa
[
'wep_kind'
]))
$pa
[
'wep_kind'
]
=
get_wep_kind
(
$pa
);
if
(
empty
(
$pa
[
'wep_kind'
]))
get_wep_kind
(
$pa
);
$range
=
isset
(
$rangeinfo
[
$pa
[
'wep_kind'
]])
?
$rangeinfo
[
$pa
[
'wep_kind'
]]
:
NULL
;
return
$range
;
}
//获取武器对应熟练度
function
get_wep_skill
(
&
$pa
)
{
global
$skillinfo
;
if
(
empty
(
$pa
[
'wep_kind'
]))
get_wep_kind
(
$pa
);
# 获取真实熟练度 保存在$pa['wep_skill']内
if
(
$pa
[
'club'
]
==
18
)
{
$wep_skill
=
round
(
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
*
0.7
+
(
$pa
[
'wp'
]
+
$pa
[
'wk'
]
+
$pa
[
'wc'
]
+
$pa
[
'wg'
]
+
$pa
[
'wd'
]
+
$pa
[
'wf'
])
*
0.3
);
}
else
{
$wep_skill
=
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]];
}
return
$wep_skill
;
}
//获取防具上的属性
//如果你想设计一个在战斗中能临时获得属性的机制,请在这两个函数执行完毕后,把属性加入返回的结果内。除非你希望技能的机制优先级高于三抽的判定。
function
get_equip_ex_array
(
&
$pa
)
...
...
@@ -97,9 +115,33 @@
return
$skarr
;
}
//获取额外属性,该属性不受三抽影响
function
get_extra_ex_array
(
&
$pa
)
{
global
$log
;
# 百战技能特效
if
(
isset
(
$pa
[
'skill_c1_veteran'
]))
{
$sk_def
=
get_skillpara
(
'c1_veteran'
,
'choice'
,
$pa
);
if
(
$sk_def
)
{
global
$itemspkinfo
;
$pa
[
'ex_keys'
][]
=
$sk_def
;
//$log .= "百战使{$pa['nm']}拥有了【{$itemspkinfo[$sk_def]}】属性!<br>";
}
}
return
;
}
//在初始化战斗阶段触发的事件。即:无论是否反击都只会触发1次的事件。
function
combat_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
{
# 社团技能初始化(主动型/战斗技)
if
(
isset
(
$pa
[
'bskill'
]))
attr_extra_active_skills
(
$pa
,
$pd
,
$active
);
if
(
isset
(
$pd
[
'bskill'
]))
attr_extra_active_skills
(
$pd
,
$pa
,
$active
);
//这可能吗……?总之先写上没错……
# 社团技能初始化(被动型)(最好不要在这个阶段输出log,把log和成功触发的标记保存进对应角色里,到实际结算效果时再显示。)
if
(
!
empty
(
$pa
[
'clbpara'
][
'skill'
]))
attr_extra_passive_skills
(
$pa
,
$pd
,
$active
);
if
(
!
empty
(
$pd
[
'clbpara'
][
'skill'
]))
attr_extra_passive_skills
(
$pd
,
$pa
,
$active
);
# 百命猫 初始化事件: 每次初始化战斗时都会提升等级与怒气
if
((
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'是TSEROF啦!'
)
||
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
))
...
...
@@ -420,6 +462,7 @@
//空手 武器伤害=2/3熟练度
if
(
$pa
[
'wep_kind'
]
==
'N'
)
{
if
(
!
isset
(
$pa
[
'wep_skill'
]))
$pa
[
'wep_skill'
]
=
get_wep_skill
(
$pa
);
$pa
[
'wepe_t'
]
=
round
(
$pa
[
'wep_skill'
]
*
2
/
3
);
}
//射系 武器伤害=面板数值
...
...
@@ -539,20 +582,34 @@
$pa
[
'charge_flag'
]
=
1
;
}
}
# 获取pd社团技能对防御力的加成
# 获取pd社团技能对防御力的加成
(旧)
if
(
!
empty
(
$pd
[
'skills'
]))
{
rev_get_clubskill_bonus
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$att1
,
$def1
);
$base_def
+=
$def1
;
}
# 获取pd社团技能对防御力的加成(新)
if
(
!
empty
(
$pd
[
'clbpara'
][
'skill'
]))
{
# 「格挡」技能加成
if
(
!
check_skill_unlock
(
'c1_def'
,
$pd
))
{
global
$cskills
;
$def_trans_rate
=
$cskills
[
'c1_def'
][
'vars'
][
'trans'
];
$def_maxtrans
=
$cskills
[
'c1_def'
][
'vars'
][
'maxtrans'
];
$sk_def
=
min
(
$def_maxtrans
,
$def_trans_rate
*
$pd
[
'wepe'
]
/
100
);
}
}
# 汇总:
$total_def
=
$base_def
+
$equip_def
;
if
(
!
empty
(
$def1
))
$total_def
+=
$def1
;
if
(
!
empty
(
$sk_def
))
$total_def
+=
$sk_def
;
# 初始化tooltip
if
(
$tooltip
)
{
$tooltip
=
"<span tooltip=
\"
基础防御值:
{
$base_def
}
+
{
$equip_def
}
"
;
if
(
!
empty
(
$def1
))
$tooltip
.=
"+
{
$def1
}
"
;
if
(
!
empty
(
$sk_def
))
$tooltip
.=
"
\r
「格挡」:+
{
$sk_def
}
"
;
$tooltip
.=
"
\r
"
;
}
# 计算防御力修正
...
...
@@ -670,7 +727,7 @@
//计算伤害倍率变化(攻击方)
function
get_damage_p_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
global
$log
,
$cskills
;
//每一条伤害倍率判定变化提示会以$dmg_p[]= $r;的形式放入伤害倍率数组内,
//在输出成log时会显示为:总计造成了100x0.5x1.2...=111点伤害 的形式
...
...
@@ -757,6 +814,18 @@
$log
.=
"
{
$pa
[
'hitrate_max_times'
]
}
次连续攻击命中<span class=
\"
yellow
\"
>
{
$pa
[
'hitrate_times'
]
}
</span>次!"
;
}
#「猛击」判定:
if
(
isset
(
$pa
[
'skill_c1_crit'
]))
{
// 获取猛击技能等级……整个函数吧
$sk_lvl
=
get_skilllvl
(
'c1_crit'
,
$pa
);
// 获取猛击倍率
$sk_p
=
1
+
(
get_skillvars
(
'c1_crit'
,
'attgain'
,
$sk_lvl
)
/
100
);
$dmg_p
[]
=
$sk_p
;
//输出log
$log
.=
$pa
[
'skill_c1_crit_log'
];
}
return
$dmg_p
;
}
...
...
@@ -1110,6 +1179,21 @@
{
global
$log
;
# 「闷棍」技能效果:
if
(
isset
(
$pa
[
'skill_c1_bjack'
]))
{
if
(
$pd
[
'sp'
]
<
$pd
[
'msp'
])
{
$sk_dmg
=
$pd
[
'msp'
]
-
$pd
[
'sp'
];
$log
.=
"闷棍对体力不支的
{
$pd
[
'nm'
]
}
造成了<span class=
\"
yellow
\"
>
{
$sk_dmg
}
</span>点额外伤害!<br>"
;
$fin_dmg
+=
$sk_dmg
;
}
else
{
$log
.=
"闷棍没有造成额外伤害!<br>"
;
}
}
# 伤害制御判定:
if
(
in_array
(
'h'
,
$pd
[
'ex_keys'
])
&&
$fin_dmg
>=
1950
)
{
...
...
@@ -1179,6 +1263,32 @@
{
global
$log
,
$infatt_rev
,
$infinfo
;
# 「灭气」技能效果
if
(
isset
(
$pa
[
'skill_c1_burnsp'
]))
{
$pd
[
'sp'
]
=
max
(
$pd
[
'sp'
]
-
round
(
$pa
[
'final_damage'
]
*
2
/
3
),
1
);
//$log .= "<span class='yellow'>「灭气」使{$pd['nm']}的体力降低了!</span><br>";
}
# 「猛击」眩晕效果
if
(
isset
(
$pa
[
'skill_c1_crit'
]))
{
$sk_lvl
=
get_skilllvl
(
'c1_crit'
,
$pa
);
$sk_lst
=
get_skillvars
(
'c1_crit'
,
'stuntime'
,
$sk_lvl
);
getclubskill
(
'inf_dizzy'
,
$pd
[
'clbpara'
]);
$pd
[
'clbpara'
][
'lasttimes'
][
'inf_dizzy'
]
=
$sk_lst
;
// 猛击logsave……先放这,以后再整理
global
$now
;
if
(
!
$pd
[
'type'
]
&&
$pd
[
'nm'
]
!=
'你'
)
{
$pd
[
'logsave'
]
.=
"并且
{
$pa
[
'nm'
]
}
凶猛的一击直接将你打晕了过去!<br>"
;
}
elseif
(
!
$pa
[
'type'
]
&&
$pa
[
'nm'
]
!=
'你'
)
{
$pa
[
'logsave'
]
.=
"你凶猛的一击直接将
{
$pd
[
'nm'
]
}
打晕了过去!</span><br>"
;
}
}
# 真蓝凝防守事件:
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'蓝凝'
)
{
...
...
@@ -1250,11 +1360,18 @@
return
0
;
}
//受到技能异常(眩晕、石化)
function
get_skill_inf
(
&
$pa
,
$sk
,
$times
,
$type
=
0
)
{
# 受到眩晕效果
}
//获取pa对pd的先制攻击概率,
// $mode 0-标准战斗 1-鏖战 2-追击(追击&鏖战基础先制率不受天气姿态影响)
function
get_active_r_rev
(
&
$pa
,
&
$pd
,
$mode
=
0
)
{
global
$active_obbs
,
$weather
,
$gamecfg
,
$chase_active_obbs
;
global
$
log
,
$
active_obbs
,
$weather
,
$gamecfg
,
$chase_active_obbs
;
include
config
(
'combatcfg'
,
$gamecfg
);
if
(
!
$mode
)
{
...
...
@@ -1293,6 +1410,17 @@
$active_r
=
round
(
$active_r
*
$clbskill_ar
*
$inf_ar
);
# 计算先攻率上下限:
$active_r
=
max
(
min
(
$active_r
,
96
),
4
);
# 计算pd身上的特殊异常(技能类)对先攻率的修正:
if
(
!
empty
(
$pd
[
'clbpara'
][
'skill'
]))
{
# 眩晕状态下必被先手
if
(
in_array
(
'inf_dizzy'
,
$pd
[
'clbpara'
][
'skill'
]))
{
$log
.=
"
{
$pd
[
'name'
]
}
正处于眩晕状态!<br>"
;
$active_r
=
100
;
}
}
//echo 'active:'.$active_r.' <br>';
return
$active_r
;
}
...
...
@@ -1300,9 +1428,24 @@
// 判断pd是否满足反击pa的基础条件(最高优先级)
function
check_can_counter
(
&
$pa
,
&
$pd
,
$active
)
{
# 治疗姿态、哨戒姿态、躲避策略不能反击
if
(
$pd
[
'pose'
]
==
5
||
$pd
[
'pose'
]
==
7
)
return
0
;
if
(
$pd
[
'tactic'
]
==
4
)
return
0
;
# 治疗姿态、躲避策略不能反击
if
(
$pd
[
'pose'
]
==
5
||
$pd
[
'tactic'
]
==
4
)
{
$pd
[
'cannot_counter_log'
]
=
"
{
$pd
[
'nm'
]
}
处于无法反击的状态!转身逃开了!"
;
return
0
;
}
# 哨戒姿态不会反击,但是会生气……
if
(
$pd
[
'pose'
]
==
7
)
{
$pd
[
'cannot_counter_log'
]
=
"
{
$pd
[
'nm'
]
}
看起来非常生气!还是离他远点吧……"
;
return
0
;
}
# 被「偷袭」技能攻击、或正处于眩晕状态时,无法反击
if
(
isset
(
$pa
[
'skill_c1_sneak'
])
||
isset
(
$pd
[
'skill_inf_dizzy'
]))
{
$pd
[
'cannot_counter_log'
]
=
"
{
$pd
[
'nm'
]
}
正处于眩晕状态,无法反击!"
;
return
0
;
}
return
1
;
}
...
...
include/game/revattr_extra.func.php
View file @
efbe28ff
...
...
@@ -6,11 +6,76 @@
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
//revattr_extra.func.php: 记录NPC特殊战斗机制
//revattr_extra.func.php: 记录NPC特殊战斗机制
...玩家战斗技也先放这里了 嘻嘻
//Q:为什么要把每个NPC的特殊战斗机制都新建一个函数保存?
//A:也不是每个都要这么干……这个做法主要用于存在大段log、多段判定的机制,分离出来一是方便定位这个NPC的相关机制在哪个阶段执行,二是确保原流程的可读性;
# 技能判定(主动型)
function
attr_extra_active_skills
(
&
$pa
,
&
$pd
,
$active
,
$sk
=
''
)
{
global
$log
,
$cskills
;
# 检查主动技合法性
if
(
isset
(
$pa
[
'bskill'
]))
{
if
(
!
check_skill_unlock
(
$pa
[
'bskill'
],
$pa
)
&&
!
check_skill_active
(
$pa
[
'bskill'
],
$pa
))
{
$bsk
=
$pa
[
'bskill'
];
$bsk_name
=
$cskills
[
$bsk
][
'name'
];
# 扣除怒气
$bsk_cost
=
get_skillvars
(
$bsk
,
'ragecost'
);
if
(
$bsk_cost
)
$pa
[
'rage'
]
-=
$bsk_cost
;
# 成功释放主动技,应用标记
$pa
[
'skill_'
.
$bsk
]
=
1
;
$log
.=
"<span class=
\"
lime
\"
>
{
$pa
[
'nm'
]
}
消耗
{
$bsk_cost
}
点怒气,对
{
$pd
[
'nm'
]
}
发动了技能「
{
$bsk_name
}
」!</span><br>"
;
}
else
{
# 主动技不满足使用条件或来源非法,直接注销标记
unset
(
$pa
[
'bskill'
]);
}
}
return
;
}
# 技能判定(被动型):这里通常只判定技能是否生效,如生效,提供一个标记
function
attr_extra_passive_skills
(
&
$pa
,
&
$pd
,
$active
,
$sk
=
''
)
{
global
$cskills
;
if
(
!
empty
(
$pa
[
'clbpara'
][
'skill'
]))
{
# 遍历pa技能队列 检查是否解锁
foreach
(
$pa
[
'clbpara'
][
'skill'
]
as
$sk
)
{
# 对于解锁技能,如果有特殊触发条件,在这里加入判定,否则会默认给一个触发标记
if
(
!
check_skill_unlock
(
$sk
,
$pa
)
&&
(
get_skilltags
(
$sk
,
'passive'
)
||
get_skilltags
(
$sk
,
'inf'
)))
{
# 「猛击」特殊判定
if
(
$sk
==
'c1_crit'
)
{
$sk_dice
=
diceroll
(
99
);
# 「偷袭」或「闷棍」技能生效时,「猛击」必定触发;
$sk_obbs
=
isset
(
$pa
[
'skill_c1_sneak'
])
||
isset
(
$pa
[
'skill_c1_bjack'
])
?
100
:
get_skillvars
(
'c1_crit'
,
'rate'
);
# 成功触发时
if
(
$sk_dice
<
$sk_obbs
)
{
$pa
[
'skill_c1_crit'
]
=
1
;
$pa
[
'skill_c1_crit_log'
]
=
"<span class=
\"
yellow b
\"
>
{
$pa
[
'nm'
]
}
朝着
{
$pd
[
'nm'
]
}
打出了凶猛的一击!<span class=
\"
cyan b
\"
>
{
$pd
[
'nm'
]
}
被打晕了过去!</span></span><br>"
;
}
}
# 其他非特判技能,默认给一个触发标记
else
{
$pa
[
'skill_'
.
$sk
]
=
1
;
//$pa['skill_'.$sk.'_log'] = "";
}
}
}
}
return
;
}
# 真红暮特殊判定
function
attr_extra_19_crimson
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
...
...
include/game/revbattle.func.php
View file @
efbe28ff
...
...
@@ -76,7 +76,7 @@
function
findenemy_rev
(
$edata
)
{
global
$db
,
$tablepre
;
global
$fog
,
$pid
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
;
global
$fog
,
$pid
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
,
$cskills
;
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
...
...
@@ -98,6 +98,39 @@
//检查是敌对或中立单位
$neut_flag
=
$edata
[
'pose'
]
==
7
?
1
:
0
;
//初始化玩家战斗技列表
if
(
!
empty
(
$sdata
[
'clbpara'
][
'skill'
]))
{
include_once
GAME_ROOT
.
'./include/game/revclubskills.func.php'
;
$battle_skills
=
Array
();
$sk_nums
=
0
;
foreach
(
$sdata
[
'clbpara'
][
'skill'
]
as
$sk
)
{
//遍历玩家技能,寻找带有战斗技标签的技能
if
(
get_skilltags
(
$sk
,
'battle'
))
{
$sk_desc
=
''
;
//先检查技能是否满足解锁条件
$unlock
=
check_skill_unlock
(
$sk
,
$sdata
);
if
(
$unlock
)
{
$sk_desc
.=
is_array
(
$cskills
[
$sk
][
'lockdesc'
])
?
$cskills
[
$sk
][
'lockdesc'
][
$unlock
]
:
$cskills
[
$sk
][
'lockdesc'
];
}
//再检查技能是否满足激活条件
else
{
$unlock
=
check_skill_active
(
$sk
,
$sdata
);
if
(
$unlock
)
$sk_desc
.=
$unlock
;
}
//技能可以使用,输出介绍文本
if
(
empty
(
$sk_desc
))
$sk_desc
=
parse_skilldesc
(
$sk
,
$sdata
,
1
);
//存入可使用战斗技队列,顺序:是否可使用、技能名、技能介绍文本
$battle_skills
[
$sk_nums
]
=
Array
(
$unlock
,
$sk
,
$sk_desc
);
$sk_nums
++
;
}
}
}
//初始化玩家攻击方式信息
$w1
=
substr
(
$s_wepk
,
1
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
...
...
include/game/revclubskills.func.php
0 → 100644
View file @
efbe28ff
This diff is collapsed.
Click to expand it.
include/game/revclubskills_extra.func.php
0 → 100644
View file @
efbe28ff
<?php
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
}
# 新社团技能 - 特殊社团技能处理:
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
# 「百战」技能判定
function
skill_c1_veteran_act
(
$choice
)
{
global
$log
,
$cskills
,
$club
,
$clbpara
,
$itemspkinfo
;
$c_arr
=
get_skillvars
(
'c1_veteran'
,
'defkind'
);
$cvar
=
&
$clbpara
[
'skillpara'
][
'c1_veteran'
][
'choice'
];
if
(
empty
(
$choice
)
||
!
in_array
(
$choice
,
$c_arr
))
{
$log
.=
"选定的防御属性不存在!<br>"
;
return
;
}
if
(
$choice
==
$cvar
)
{
$log
.=
"不能重复选择属性。<br>"
;
return
;
}
$cvar
=
$choice
;
$log
.=
"「百战」的防御属性变更为
{
$itemspkinfo
[
$choice
]
}
。<br>"
;
return
;
}
?>
include/game/revcombat.func.php
View file @
efbe28ff
...
...
@@ -85,7 +85,7 @@
if
(
$active
)
$pa
[
'action'
]
=
'chase'
.
$pd
[
'pid'
];
else
$pd
[
'action'
]
=
'pchase'
.
$pa
[
'pid'
];
$chase_flag
=
1
;
$log
.=
"<span class='red'>但是
{
$pa
[
'nm'
]
}
紧
紧跟在
{
$pd
[
'nm'
]
}
身后
!</span><br>"
;
$log
.=
"<span class='red'>但是
{
$pa
[
'nm'
]
}
紧
追着
{
$pd
[
'nm'
]
}
不放
!</span><br>"
;
}
else
{
...
...
@@ -144,6 +144,13 @@
$main
=
'battle_rev'
;
}
# 如果传入了主动技参数,在这里登记
if
(
strpos
(
$wep_kind
,
'bskill_'
)
===
0
)
{
$bskill
=
substr
(
$wep_kind
,
7
);
$pa
[
'bskill'
]
=
$bskill
;
}
# 初始化双方的真实攻击方式wep_kind,传入了攻击方式/主动技的情况下,在这里判断传入参数的合法性。
get_wep_kind
(
$pa
,
$wep_kind
);
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
...
...
@@ -314,7 +321,8 @@
elseif
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
)
{
$pd
[
'cannot_counter'
]
=
1
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
转身逃开了!</span><br>"
;
if
(
isset
(
$pd
[
'cannot_counter_log'
]))
$log
.=
"<span class=
\"
red
\"
>"
.
$pd
[
'cannot_counter_log'
]
.
"</span><br>"
;
else
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
转身逃开了!</span><br>"
;
}
# 存在暴毙标识:反击方(pd)在反击过程中未造成伤害就暴毙,可能是因为触发了武器直死。
...
...
@@ -358,12 +366,14 @@
if
(
$active
)
{
$w_log
=
"手持<span class=
\"
red
\"
>
{
$pa
[
'wep_name'
]
}
</span>的<span class=
\"
yellow
\"
>
{
$pa
[
'name'
]
}
</span>向你袭击!<br>你受到其<span class=
\"
yellow
\"
>
$att_dmg
</span>点攻击,对其做出了<span class=
\"
yellow
\"
>
$def_dmg
</span>点反击。<br>"
;
if
(
isset
(
$pd
[
'logsave'
]))
$w_log
.=
$pd
[
'logsave'
];
if
(
isset
(
$pd
[
'lvlup_log'
]))
$w_log
.=
$pd
[
'lvlup_log'
];
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
else
{
$w_log
=
"你发现了手持<span class=
\"
red
\"
>
{
$pd
[
'wep_name'
]
}
</span>的<span class=
\"
yellow
\"
>
{
$pd
[
'name'
]
}
</span>并且先发制人!<br>你对其做出<span class=
\"
yellow
\"
>
$att_dmg
</span>点攻击,受到其<span class=
\"
yellow
\"
>
$def_dmg
</span>点反击。<br>"
;
if
(
isset
(
$pa
[
'logsave'
]))
$w_log
.=
$pa
[
'logsave'
];
if
(
isset
(
$pa
[
'lvlup_log'
]))
$w_log
.=
$pa
[
'lvlup_log'
];
logsave
(
$pa
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
...
...
@@ -496,6 +506,9 @@
$pa
[
'ex_keys'
]
=
array_merge
(
$pa
[
'ex_wep_keys'
],
$pa
[
'ex_equip_keys'
]);
unset
(
$pa
[
'ex_wep_keys'
]);
unset
(
$pa
[
'ex_equip_keys'
]);
$pd
[
'ex_keys'
]
=
array_merge
(
$pd
[
'ex_wep_keys'
],
$pd
[
'ex_equip_keys'
]);
unset
(
$pd
[
'ex_wep_keys'
]);
unset
(
$pd
[
'ex_equip_keys'
]);
# 检查是否存在额外属性(可能来源于技能)
get_extra_ex_array
(
$pa
);
get_extra_ex_array
(
$pd
);
# 在计算命中流程开始前判定的事件,分两种:(以后看情况要不要分成两个函数)
# 第一种:进攻方(pa)在进攻前因为某种缘故受到伤害、甚至暴毙(直死、DOT结算等) 。判断是否继续进攻流程;
# 如果需要登记特殊的死法,请给死者(比如pa)赋一个$pa['gg_flag'] = '死法编号'; 这样在后续的流程里会自动判定特殊死亡事件,如果没有登记特殊死法,会按照正常的战死流程登记;
...
...
@@ -505,15 +518,9 @@
$flag
=
hitrate_prepare_events
(
$pa
,
$pd
,
$active
);
if
(
$flag
<
0
)
return
$flag
;
# 获取真实熟练度 保存在$pa['wep_skill']内。TODO:将熟练度计算汇总到一个函数内
if
(
$pa
[
'club'
]
==
18
)
{
$pa
[
'wep_skill'
]
=
round
(
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
*
0.7
+
(
$pa
[
'wp'
]
+
$pa
[
'wk'
]
+
$pa
[
'wc'
]
+
$pa
[
'wg'
]
+
$pa
[
'wd'
]
+
$pa
[
'wf'
])
*
0.3
);
}
else
{
$pa
[
'wep_skill'
]
=
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]];
}
# 获取pa真实熟练度 保存在$pa['wep_skill']内
$pa
[
'wep_skill'
]
=
get_wep_skill
(
$pa
);
# 应用技抽效果
if
(
isset
(
$pa
[
'skdr_flag'
])
||
isset
(
$pd
[
'skdr_flag'
]))
{
...
...
@@ -656,7 +663,9 @@
//防守方(pd)受到伤害后的事件(防具耐久下降、受伤)
get_hurt_events
(
$pa
,
$pd
,
$active
);
//经验结算
exprgup_rev
(
$pa
,
$pd
,
$active
);
expup_rev
(
$pa
,
$pd
,
$active
);
//怒气结算
rgup_rev
(
$pa
,
$pd
,
$active
);
}
else
{
...
...
@@ -872,7 +881,7 @@
$revival_flag
=
99
;
//保存复活标记为通过称号复活
addnews
(
$now
,
'revival'
,
$dname
);
$pd
[
'hp'
]
=
$pd
[
'mhp'
];
$pd
[
'sp'
]
=
$pd
[
'msp'
];
$pd
[
'state'
]
=
0
;
$pd
[
'club'
]
=
17
;
$pd
[
'state'
]
=
0
;
changeclub
(
17
,
$pd
)
;
$log
.=
'<span class="yellow">但是,由于及时按下BOMB键,'
.
$pd
[
'nm'
]
.
'原地满血复活了!</span><br>'
;
return
$revival_flag
;
}
...
...
@@ -946,8 +955,28 @@
return
;
}
# 战斗怒气结算
function
rgup_rev
(
&
$pa
,
&
$pd
,
$active
)
{
# 计算pa(攻击方)因攻击行为获得的怒气
# pa(攻击方)拥有重击辅助属性,每次攻击额外获得1~2点怒气
if
(
!
empty
(
$pa
[
'ex_keys'
])
&&
in_array
(
'c'
,
$pa
[
'ex_keys'
]))
{
$pa_rgup
=
rand
(
1
,
2
);
$pa
[
'rage'
]
=
min
(
255
,
$pa
[
'rage'
]
+
$pa_rgup
);
}
# 计算pd(防守方)因挨打获得的怒气
$rgup
=
round
((
$pa
[
'lvl'
]
-
$pd
[
'lvl'
])
/
3
);
# 单次获得怒气上限:15
$rgup
=
min
(
15
,
max
(
1
,
$rgup
));
# 「灭气」技能效果
if
(
isset
(
$pd
[
'skill_c1_burnsp'
]))
$rgup
+=
rand
(
1
,
2
);
$pd
[
'rage'
]
=
min
(
255
,
$pd
[
'rage'
]
+
$rgup
);
return
;
}
# 战斗经验结算
function
exp
rg
up_rev
(
&
$pa
,
&
$pd
,
$active
)
function
expup_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$baseexp
;
$expup
=
round
(
(
$pd
[
'lvl'
]
-
$pa
[
'lvl'
])
/
3
);
...
...
@@ -962,9 +991,6 @@
{
lvlup_rev
(
$pa
,
$pd
,
$active
);
}
//大的打小的怒气反而涨的快 什么逻辑?狂扁小朋友喔?
$rgup
=
round
((
$pa
[
'lvl'
]
-
$pd
[
'lvl'
])
/
3
);
$pa
[
'rage'
]
+=
$rgup
>
0
?
$rgup
:
1
;
return
;
}
...
...
@@ -1139,8 +1165,9 @@
$pa
[
'itm'
.
$c
]
=
$pa
[
'wep'
];
$pa
[
'itmk'
.
$c
]
=
$pa
[
'wepk'
];
$pa
[
'itmsk'
.
$c
]
=
$pa
[
'wepsk'
];
$pa
[
'itme'
.
$c
]
=
$pa
[
'wepe'
];
$pa
[
'itms'
.
$c
]
=
$pa
[
'weps'
];
$pa
[
'wep'
]
=
$chosen
[
1
];
$pa
[
'wepk'
]
=
$chosen
[
2
];
$pa
[
'wepe'
]
=
$chosen
[
3
];
$pa
[
'weps'
]
=
$chosen
[
4
];
$pa
[
'wepsk'
]
=
$chosen
[
5
];
$pa
[
'wep_kind'
]
=
get_wep_kind
(
$pa
);
get_wep_kind
(
$pa
);
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
$pa
[
'wep_skill'
]
=
get_wep_skill
(
$pa
);
$pa
[
'change_wep_log'
]
=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
</span>将手中的<span class=
\"
yellow
\"
>
{
$oldwep
}
</span>卸下,装备了<span class=
\"
yellow
\"
>
{
$pa
[
'wep'
]
}
</span>!<br>"
;
}
}
...
...
include/game/search.func.php
View file @
efbe28ff
...
...
@@ -633,6 +633,8 @@ function discover($schmode = 0) {
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
//刷新敌人时效性状态
if
(
!
empty
(
$edata
[
'clbpara'
][
'lasttimes'
]))
check_skilllasttimes
(
$edata
);
//计算先攻概率
$active_r
=
get_active_r_rev
(
$sdata
,
$edata
);
$bid
=
$edata
[
'pid'
];
...
...
include/game20130526.js
View file @
efbe28ff
...
...
@@ -41,6 +41,7 @@ function demiSecTimer(){
var
dsec
=
Math
.
floor
((
ms
%
1000
)
/
100
);
$
(
'
timer
'
).
innerHTML
=
sec
+
'
.
'
+
dsec
;
}
else
{
ms
=
0
;
clearInterval
(
timerid
);
delete
timerid
;
}
...
...
@@ -295,6 +296,11 @@ function showData(sdata){
{
$
(
'
dialogue
'
).
showModal
();
}
if
(
$
(
'
open-dialog
'
))
{
dialogid
=
$
(
'
open-dialog
'
).
innerHTML
;
showModalDialog
(
$
(
dialogid
));
}
}
var
refchat
=
null
;
...
...
@@ -415,4 +421,40 @@ function changePages(nowpage,nextpage)
$
(
pp
).
style
.
display
=
"
block
"
;
}
//1
////////////////////////////////////////////////////////////////////////
///////////////////////////称号技能鼠标悬浮特效////////////////////////////
////////////////////////////////////////////////////////////////////////
function
skill_unacquired_mouseover
(
e
)
{
var
children
=
this
.
childNodes
;
for
(
var
i
=
0
;
i
<
children
.
length
;
i
++
)
{
var
child
=
children
[
i
];
if
(
child
.
className
==
'
skill_unacquired
'
)
{
child
.
className
=
'
skill_unacquired_transparent
'
;
}
if
(
child
.
className
==
'
skill_unacquired_hint
'
)
{
child
.
className
=
'
skill_unacquired_hint_transparent
'
;
}
}
}
function
skill_unacquired_mouseout
(
e
)
{
var
children
=
this
.
childNodes
;
for
(
var
i
=
0
;
i
<
children
.
length
;
i
++
)
{
var
child
=
children
[
i
];
if
(
child
.
className
==
'
skill_unacquired_transparent
'
)
{
child
.
className
=
'
skill_unacquired
'
;
}
if
(
child
.
className
==
'
skill_unacquired_hint_transparent
'
)
{
child
.
className
=
'
skill_unacquired_hint
'
;
}
}
}
include/global.func.php
View file @
efbe28ff
...
...
@@ -124,6 +124,11 @@ function config($file = '', $cfg = 1) {
return
$cfgfile
;
}
function
tempfile
(
$file
=
''
)
{
$tempfile
=
file_exists
(
GAME_ROOT
.
"./templates/default/
{
$file
}
.htm"
)
?
GAME_ROOT
.
"./templates/default/
{
$file
}
.htm"
:
0
;
return
$tempfile
;
}
function
dir_clear
(
$dir
)
{
$directory
=
dir
(
$dir
);
while
(
$entry
=
$directory
->
read
())
{
...
...
@@ -388,6 +393,7 @@ function getchat($last,$team='',$limit=0) {
//if(!$chatdata['lastcid']){$chatdata['lastcid'] = $chat['cid'];}
if
(
$chatdata
[
'lastcid'
]
<
$chat
[
'cid'
]){
$chatdata
[
'lastcid'
]
=
$chat
[
'cid'
];}
$chat
[
'msg'
]
=
htmlspecialchars
(
$chat
[
'msg'
]);
$chat
[
'msg'
]
=
preg_replace
(
'/\[(\w+)\]/'
,
"<img src='img/emoticons/$1.png'>"
,
$chat
[
'msg'
]);
if
(
$chat
[
'type'
]
==
'0'
)
{
$msg
=
"【
{
$chatinfo
[
$chat
[
'type'
]]
}
】
{
$chat
[
'send'
]
}
:
{
$chat
[
'msg'
]
}
"
.
date
(
"\(H:i:s\)"
,
$chat
[
'time'
])
.
'<br>'
;
}
elseif
(
$chat
[
'type'
]
==
'1'
)
{
...
...
@@ -406,7 +412,7 @@ function getchat($last,$team='',$limit=0) {
$msg
=
"<span class=
\"
yellow
\"
>【
{
$chatinfo
[
$chat
[
'type'
]]
}
】
{
$chat
[
'msg'
]
}
"
.
date
(
"\(H:i:s\)"
,
$chat
[
'time'
])
.
'</span><br>'
;
}
//表情
$msg
=
preg_replace
(
'/\[(\w+)\]/'
,
"<img src='img/emoticons/$1.png'>"
,
$msg
);
//
$msg = preg_replace('/\[(\w+)\]/', "<img src='img/emoticons/$1.png'>", $msg);
$chatdata
[
'msg'
][
$chat
[
'cid'
]]
=
$msg
;
}
return
$chatdata
;
...
...
@@ -649,7 +655,7 @@ function get_itmsk_array($sk_value)
}
//还原itmsk为字符串 $max_length:字符串长度上限
function
get_itmsk_strlen
(
$sk_value
,
$max_length
=
5
)
function
get_itmsk_strlen
(
$sk_value
,
$max_length
=
30
)
{
global
$itemspkinfo
;
$ret
=
''
;
$sk_count
=
0
;
...
...
register.php
View file @
efbe28ff
...
...
@@ -45,7 +45,7 @@ if(!isset($cmd)){
$ustate
=
'check'
;
gsetcookie
(
'user'
,
$username
);
gsetcookie
(
'pass'
,
$password
);
gsetcookie
(
'volume'
,
20
,
86400
*
30
,
0
);
gsetcookie
(
'volume'
,
0.2
,
86400
*
30
,
0
);
}
else
{
$gamedata
[
'innerHTML'
][
'info'
]
=
$_ERROR
[
'db_failure'
];
$gamedata
[
'innerHTML'
][
'info'
]
.=
ob_get_contents
();
...
...
templates/default/admin_gameinfomng.htm
View file @
efbe28ff
...
...
@@ -19,7 +19,8 @@
<td>
$gstate[$gamestate]
</td>
<td>
<!--{if $gamestate == 0}-->
<input
type=
"submit"
value=
"准备开始"
onclick=
"$('command').value='gsedit_10'"
>
<input
type=
"submit"
value=
"准备开始"
onclick=
"$('command').value='gsedit_10'"
><br>
<input
type=
"submit"
value=
"开始游戏"
onclick=
"$('command').value='gsedit_20'"
>
<!--{elseif $gamestate == 10}-->
<input
type=
"submit"
value=
"开始游戏"
onclick=
"$('command').value='gsedit_20'"
><br>
<input
type=
"submit"
value=
"结束游戏"
onclick=
"$('command').value='gsedit_0'"
>
...
...
templates/default/battlecmd_rev.htm
View file @
efbe28ff
...
...
@@ -2,24 +2,55 @@
向对手大喊:
<br><input
size=
"30"
type=
"text"
name=
"message"
maxlength=
"60"
><br><br>
<input
type=
"hidden"
name=
"mode"
value=
"revcombat"
>
<input
type=
"hidden"
id=
"command"
name=
"command"
value=
"back"
>
<!--{if $neut_flag}-->
<div
id=
"neut"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"showModalDialog($('attack_warning'));this.disabled=true;"
><br>
</div>
<!--{else}-->
<div
id=
"enemy"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{if $s_wep2s}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"padding-left: 5px; width:100"
name=
"w1"
value=
"切换副武器"
onclick=
"$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;"
>
<div
id=
"enemy"
>
<table
cellSpacing=
0
cellPadding=
0
width=
300px
style=
"table-layout:fixed;"
>
<!-- 第1行:常规攻击方式 -->
<tr>
<!-- 第一攻击方式 -->
<td
width=
100px
align=
"center"
style=
"vertical-align:top"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:95"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
<!-- 第二攻击方式 -->
<!--{if $w2}-->
<td
width=
100px
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:95"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
<!--{/if}-->
<td
width=
100px
>
<!-- 切换副武器 -->
<!--{if $s_wep2s}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"width:95"
value=
"切换"
onclick=
"$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{/if}-->
</td>
</tr>
<!-- 第2~n行:战斗技(每行3个) -->
<!--{if !empty($battle_skills)}-->
<!--{loop $battle_skills $key $skar}-->
<!--{if !$key%3}-->
<tr>
<!--{/if}-->
<td
width=
100px
align=
"center"
style=
"vertical-align:top"
>
<input
type=
"button"
class=
"cmdbutton"
name=
"back"
style=
"width:95"
value=
"「{$cskills[$skar[1]]['name']}」"
<!
--
{
if
$
skar
[
0
]}
--
>
disabled
<!--{/if}-->
onclick="$('command').value='bskill_{$skar[1]}';postCmd('gamecmd','command.php');this.disabled=true;">
<br>
<div
style=
"width:90%; text-align:center;"
>
<span>
{$skar[2]}
</span>
</div>
</td>
<!--{if ($key == count($battle_skills)-1 || (!(($key+1)%3) && $key!=0))}-->
</tr>
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->
<br>
<!--{if $w2}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
>
<br>
<!--{/if}-->
</div>
<!--{/if}-->
<br><input
type=
"button"
class=
"cmdbutton"
name=
"back"
value=
"逃跑"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
>
<!-- 空行 -->
<tr><td><br></td></tr>
<!-- 末行:逃跑、坚守 -->
<tr>
<td
width=
100px
align=
"center"
style=
"vertical-align:top"
>
<input
type=
"button"
class=
"cmdbutton"
name=
"back"
style=
"width:95"
value=
"逃跑"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
<td>
</td>
<td>
</td>
</tr>
</table>
</div>
<dialog
id=
"attack_warning"
style=
"max-width: 50%;max-height: 50%;"
>
<center>
...
...
templates/default/command.htm
View file @
efbe28ff
...
...
@@ -93,4 +93,8 @@
{template sp_terminal}
<!--{if isset($gamevars['apis'])}-->
{template sp_console_search}
<!--{/if}-->
\ No newline at end of file
<!--{/if}-->
<!-- 技能面板 -->
<input
type=
"button"
class=
"cmdbutton"
id=
"skillstable"
name=
"skillstable"
value=
"技能表"
onclick=
"showModalDialog($('skillpage'));"
>
{template skillpage}
\ No newline at end of file
templates/default/profile.htm
View file @
efbe28ff
...
...
@@ -186,7 +186,7 @@
<TD
class=
b3
>
<!--{if CURSCRIPT == 'game' && $mode == 'command' && $wepe}-->
<span><input
type=
"button"
value=
"卸下"
onclick=
"$('mode').value='itemmain';$('command').value='offwep';postCmd('gamecmd','command.php');return false;"
</
span
>
<!--{/if}-->
<span>
<!--{if $weps}-->
$wep_words
<!--{else}-->
$nowep
<!--{/if}-->
</span>
<
span
class=
"eicon"
onclick=
"$('mode').value='itemmain';$('command').value='changewep';postCmd('gamecmd','command.php');return false;"
>
🔃
</span
>
<
!--{if CURSCRIPT == 'game' && $mode == 'command'}-->
<span
class=
"eicon"
onclick=
"$('mode').value='itemmain';$('command').value='changewep';postCmd('gamecmd','command.php');return false;"
>
🔃
</span>
<!--{/if}--
>
</TD>
<TD
class=
b3
><span>
$wepsk_words
</span></TD>
<TD
class=
b3
><span>
$wepe
</span></TD>
...
...
templates/default/skill_c1_veteran.htm
0 → 100644
View file @
efbe28ff
<tr>
<td
class=
"b1"
width=
"40"
>
<span>
百战
</span>
</td>
<td>
<!--{eval $unlock_c1_veteran_flag = check_skill_unlock('c1_veteran',$pdata);}-->
<!--{eval $para = get_clbpara($pdata['clbpara']); $nchoice = $para['skillpara']['c1_veteran']['choice'];}-->
<!--{if $unlock_c1_veteran_flag}-->
<div
style=
"position:relative; height:100%; width:100%;"
onmouseover=
"skill_unacquired_mouseover.call(this,event)"
onmouseout=
"skill_unacquired_mouseout.call(this,event)"
>
<div
class=
"skill_unacquired"
>
<!--{/if}-->
<table
class=
"skilltable"
>
<tr>
<td
class=
"skilldesc_left b3"
>
<span
class=
"skilldesc"
>
<span
tooltip=
"满足条件时自动触发"
class=
"gold"
>
【被动技】
</span>
选择任一单体减半防御属性,你视为具有它。
<br>
当前选择是:
<span
class=
"yellow b"
>
<!--{if !empty($nchoice)}-->
$itemspkinfo[$nchoice]
<!--{else}-->
无
<!--{/if}-->
</span>
变更选择为:
<select
name=
"c1_veteran_choice"
id=
"c1_veteran_choice"
onchange=
"$('mode').value='revskpts';$('command').value='actskill_c1_veteran';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{if empty($nchoice)}-->
<option
value=
""
selected
>
无
<br
/>
<!--{/if}-->
<!--{loop $cskills['c1_veteran']['vars']['defkind'] $key}-->
<!--{if $key != $nchoice}-->
<option
value=
"$key"
>
$itemspkinfo[$key]
<br
/>
<!--{else}-->
<option
value=
"$key"
selected
>
$itemspkinfo[$key]
<br
/>
<!--{/if}-->
<!--{/loop}-->
</select>
可随时改变
<br>
</span>
</td>
<td
class=
"skilldesc_right b3"
>
</td>
</tr>
</table>
<!--{if $unlock_c1_veteran_flag}-->
</div>
<div
class=
"skill_unacquired_hint"
>
<table
class=
"skilltable"
>
<tr>
<td
valign=
"center"
align=
"center"
>
<span
class=
"yellow b"
>
18级时解锁
</span>
</td>
</tr>
</table>
</div>
</div>
<!--{/if}-->
</td>
</tr>
\ No newline at end of file
templates/default/skill_sample/skill_技能编号.htm
0 → 100644
View file @
efbe28ff
<!-- 注意:大部分技能可以直接通过编辑配置文件完成 -->
<!-- 可能的、需要新建模板的情况:你的技能需要在面板内执行比较复杂的、单靠配置文件无法实现的操作 -->
<tr>
<td
class=
"b1"
width=
"40"
>
<span>
技能名
</span>
</td>
<td>
<!-- ↓↓↓ 存在解锁条件的技能才需要有这一部分 ↓↓↓ -->
<!--{eval $unlock_技能编号_flag = check_skill_unlock('技能编号',$pdata);}-->
<!--{if $unlock_技能编号_flag}-->
<div
style=
"position:relative; height:100%; width:100%;"
onmouseover=
"skill_unacquired_mouseover.call(this,event)"
onmouseout=
"skill_unacquired_mouseout.call(this,event)"
>
<div
class=
"skill_unacquired"
>
<!--{/if}-->
<!-- ↑↑↑ 存在解锁条件的技能才需要有这一部分 ↑↑↑ -->
<table
class=
"skilltable"
>
<tr>
<td
class=
"skilldesc_left b3"
>
<span
class=
"skilldesc"
>
<span
tooltip=
"关于标签的介绍"
class=
"gold"
>
【技能标签 没有不需要写】
</span>
技能介绍
</span>
</td>
<td
class=
"skilldesc_right b3"
>
<input
type=
"number"
name=
"技能编号_nums"
style=
"width:40px"
value=
"1"
>
<input
type=
"button"
onclick=
"$('mode').value='revskpts';$('command').value='技能编号';postCmd('gamecmd','command.php');this.disabled=true;"
value=
"技能操作按钮名"
>
</td>
</tr>
</table>
<!-- ↓↓↓ 存在解锁条件的技能才需要有这一部分 ↓↓↓ -->
<!--{if $unlock_技能编号_flag}-->
</div>
<div
class=
"skill_unacquired_hint"
>
<table
class=
"skilltable"
>
<tr>
<td
valign=
"center"
align=
"center"
>
<span
class=
"yellow"
>
未满足解锁条件时显示的文本
</span>
</td>
</tr>
</table>
</div>
</div>
<!--{/if}-->
<!-- ↑↑↑ 存在解锁条件的技能才需要有这一部分 ↑↑↑ -->
</td>
</tr>
\ No newline at end of file
templates/default/skillpage.htm
0 → 100644
View file @
efbe28ff
<dialog
id=
"skillpage"
style=
"width: 568px; max-width: 90%;max-height: 80%;"
>
<p
style=
"margin-left:0px; margin-top:0px; margin-right:0px; margin-bottom:0px;"
>
<!--{if !empty($pdata['clbpara']['skill'])}-->
你目前有
<span
class=
"lime b"
>
$skillpoint
</span>
点技能点供自由分配,升级时可以获取新的技能点。
<br>
以下是你的技能列表。
<br><br>
<table
class=
"skilltable"
style=
"width:559px"
>
<tr>
<td
class=
"b1"
width=
"40"
>
<span>
名称
</span>
</td>
<td
class=
"b1"
>
<span>
技能详情
</span>
</td>
</tr>
<!--{loop $clbpara['skill'] $sknm}-->
<!--{eval $skdata = init_clubskillsdata($sknm,$pdata);}-->
<!--{if is_array($skdata)}-->
<!--{eval include template($skdata[0]);}-->
<!--{elseif !empty($skdata)}-->
$skdata
<!--{/if}-->
<!--{/loop}-->
</table>
<!--{else}-->
<br>
你目前没有任何技能,先选择一个内定称号吧!
<br>
<!--{/if}-->
<br>
提示:点击技能界面外任意位置或按ESC键即可返回主界面
<br>
</p>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('skillpage'));this.disabled=true;"
>
</dialog>
\ No newline at end of file
templates/default/sp_terminal.htm
View file @
efbe28ff
<dialog
id=
"terminal"
style=
"max-width: 90%;max-height: 80%;"
>
<center>
<!-- 宽度设计:战场地图478px 控制菜单120px 间距10px-->
<div
style=
"text-align: center; width: 608px;"
>
<!-- 背景音乐 -->
<div>
<!--{if !isset($bgmname)}-->
<!--{eval $nowbgmid = isset($_COOKIE["nowbgmid"]) ? filter_var($_COOKIE["nowbgmid"],FILTER_VALIDATE_INT) : 0; $bgmname = $bgmlist[$nowbgmid]['name'];}-->
<!--{/if}-->
<div><span
class=
"grey"
>
正在播放:~
<span
id=
"bgmname"
>
$bgmname
</span>
~
</span></div>
<!-- 战场地图 -->
<span
class=
"grey"
>
正在播放:~
<span
id=
"bgmname"
>
$bgmname
</span>
~
</span>
</div>
<!-- 战场地图 -->
<div
style=
"width: 478px; float: left; margin-right: 5px;"
>
<!--{eval $mapdata = init_mapdata();}-->
$mapdata
<!-- 控制菜单 -->
<table
border=
"1"
cellspacing=
"0"
cellpadding=
"0"
width=
"120px"
height=
"24px"
style=
"padding-left: 10px; padding-right: 5px; padding-bottom: 5px;float:right;position:relative;"
>
<!-- 音乐控制指令 -->
<tr
align=
"center"
>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
"b1"
align=
center
>
播放控制
</TD>
</div>
<!-- 控制菜单 -->
<div
style=
"width: 120px; float: right; margin-left: 5px;"
>
<!-- 音乐控制指令 -->
<table
border=
"1"
cellspacing=
"0"
cellpadding=
"0"
style=
"position:relative;"
>
<tr>
<TD
colspan=
"2"
class=
"b1"
style=
"width: 120px; height: 24px;"
>
播放控制
</TD>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
td
colspan=
"2"
>
<span
class=
"eicon"
onclick=
"changeBGM(-1);"
>
⏮️
</span>
<span
class=
"eicon"
onclick=
"$('gamebgm').play();"
>
▶️
</span>
...
...
@@ -21,31 +28,40 @@
<span
class=
"eicon"
onclick=
"changeBGM();"
>
⏭️
</span>
</td>
</tr>
<!-- <tr width="84" height="12" style="border: none;"></tr> -->
<tr>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
音量调节
</TD>
<tr
height=
"24"
>
<TD
colspan=
"2"
class=
b1
>
音量调节
</TD>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<span
class=
"eicon"
onmousedown=
"changeVolume(-0.05);"
>
⏬
</span>
<span
id=
"volume_num"
>
<!--{eval $volume = isset($_COOKIE["volume"]) ? filter_var($_COOKIE["volume"],FILTER_VALIDATE_FLOAT)*100 : 20; $v = isset($volume) ? $volume.'%' : '20%';}-->
$v
</span>
<span
class=
"eicon"
onmousedown=
"changeVolume(0.05);"
>
⏫
</span>
</td>
</tr>
<!-- 战场控制指令 -->
<!--{if isset($clbpara['console'])}-->
</table>
<!-- 战场控制指令 -->
<!--{if !isset($clbpara['console'])}-->
<!--<div style="position:relative; height:100%; width:100%;">
<div class="blurtext">-->
<table
border=
"1"
cellspacing=
"0"
cellpadding=
"0"
style=
"position:relative;"
>
<tr
width=
"120"
height=
"328"
rowspan=
"7"
class=
"map"
>
<td
colspan=
"2"
width=
"120"
height=
"328"
class=
"lockmap"
></td>
</tr>
</table>
<!--{else}-->
<table
border=
"1"
cellspacing=
"0"
cellpadding=
"0"
style=
"position:relative;"
>
<tr>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
可用信道
</TD>
<TD
colspan=
"2"
class=
b1
style=
"width: 120px; height: 24px;"
>
可用信道
</TD>
</tr>
<tr
width=
"84"
height=
"28"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<span
class=
"<!--{if $gamevars['api'] == 0}-->red<!--{else}-->lime<!--{/if}-->"
>
$gamevars['api']/$gamevars['apis']
</span>
</td>
</tr>
<tr>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
天气控制
</TD>
<tr
height=
"24"
>
<TD
colspan=
"2"
class=
b1
>
天气控制
</TD>
</tr>
<tr
width=
"84"
height=
"30"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<select
id=
"cwth"
name=
"cwth"
style=
"width:72px"
onchange=
"closeDialog($('terminal'));$('mode').value='command';$('command').value='consle_wthchange';postCmd('gamecmd','command.php');"
>
<!--{loop $wthinfo $n $wth}-->
...
...
@@ -54,10 +70,10 @@
</select>
</td>
</tr>
<tr>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
数据控制
</TD>
<tr
height=
"24"
>
<TD
colspan=
"2"
class=
b1
>
数据控制
</TD>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
width=
"42"
>
<input
type=
"button"
value=
"数据检索"
onclick=
"closeDialog($('terminal'));showModalDialog($('consle_search'));"
>
</td>
...
...
@@ -65,10 +81,10 @@
<input
type=
"button"
value=
"生命探测"
onclick=
"closeDialog($('terminal'));$('command').value='consle_radar';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
</tr>
<tr>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
禁区控制
</TD>
<tr
height=
"24"
>
<TD
colspan=
"2"
class=
b1
>
禁区控制
</TD>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
width=
"42"
>
<input
type=
"button"
value=
"增设禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl1';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
...
...
@@ -76,7 +92,7 @@
<input
type=
"button"
value=
"解除禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl0';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
</tr>
<tr
width=
"84"
height=
"84"
class=
"map"
>
<tr
class=
"map"
>
<td
colspan=
"2"
>
<!--{if !isset($clbpara['nobutton'])}-->
<div
class=
"dangerbutton"
onclick=
"closeDialog($('terminal'));$('command').value='consle_dbutton';postCmd('gamecmd','command.php');this.disabled=true;"
>
DON'T PUSH
<br>
危险勿触
</div>
...
...
@@ -85,13 +101,19 @@
<!--{/if}-->
</td>
</tr>
<!--{else}-->
<tr
width=
"84"
height=
"318"
rowspan=
"7"
class=
"lockmap"
>
<TD
colspan=
"2"
width=
"72"
height=
"300"
align=
center
class=
"blurtext"
></TD>
</tr>
<!--{/if}-->
</table>
</center>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('terminal'))"
>
<!--</div>
<div class="skill_unacquired_hint">
<table class="skilltable">
<tr width="84" height="318" rowspan="7" class="lockmap">
<td colspan="2" width="72" height="300" class="blurtext"></td>
</tr>
</table>
</div>
</div>-->
<!--{/if}-->
</div>
</div>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('terminal'))"
>
</dialog>
valid.php
View file @
efbe28ff
...
...
@@ -59,8 +59,8 @@ if($mode == 'enter') {
$exp
=
$areanum
*
20
;
$money
=
20
;
$rage
=
0
;
$pose
=
0
;
$tactic
=
0
;
$pose
=
3
;
$tactic
=
2
;
$icon
=
$icon
?
$icon
:
rand
(
1
,
$iconlimit
);
$club
=
0
;
...
...
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