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
Show 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';
...
@@ -10,8 +10,6 @@ require GAME_ROOT.'./include/game.func.php';
//判断是否进入游戏
//判断是否进入游戏
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
unset
(
$pdata
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE name = '
$cuser
' AND type = 0"
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE name = '
$cuser
' AND type = 0"
);
if
(
!
$db
->
num_rows
(
$result
))
{
header
(
"Location: valid.php"
);
exit
();
}
if
(
!
$db
->
num_rows
(
$result
))
{
header
(
"Location: valid.php"
);
exit
();
}
...
@@ -41,11 +39,11 @@ if($gamestate == 0) {
...
@@ -41,11 +39,11 @@ if($gamestate == 0) {
}
}
//初始化各变量
//初始化各变量
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
extract
(
$pdata
,
EXTR_REFS
);
extract
(
$pdata
,
EXTR_REFS
);
$log
=
$cmd
=
$main
=
''
;
$log
=
$cmd
=
$main
=
''
;
$gamedata
=
array
();
$gamedata
=
array
();
init_playerdata
();
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"
);
$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){
...
@@ -94,6 +92,17 @@ if($hp > 0){
$nowmtime
=
floor
(
getmicrotime
()
*
1000
);
$nowmtime
=
floor
(
getmicrotime
()
*
1000
);
$rmcdtime
=
$nowmtime
>=
$cdover
?
0
:
$cdover
-
$nowmtime
;
$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'
)
if
((
strpos
(
$action
,
'chase'
)
!==
false
||
strpos
(
$action
,
'dfight'
)
!==
false
)
&&
$mode
!==
'revcombat'
)
{
{
...
@@ -106,6 +115,7 @@ if($hp > 0){
...
@@ -106,6 +115,7 @@ if($hp > 0){
$dialogue_id
=
$clbpara
[
'dialogue'
];
$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
)){
}
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>'
;
$log
.=
'<span class="yellow">冷却时间尚未结束!</span><br>'
;
cd_flag
:
$mode
=
'command'
;
$mode
=
'command'
;
}
else
{
}
else
{
//进入指令判断
//进入指令判断
...
@@ -582,6 +592,32 @@ if($hp > 0){
...
@@ -582,6 +592,32 @@ if($hp > 0){
upgradeclubskills
(
$command
);
upgradeclubskills
(
$command
);
calcskills
(
$skarr
);
calcskills
(
$skarr
);
$p12
[
1
]
=
1
;
$p12
[
2
]
=
2
;
$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'
)
{
}
elseif
(
$mode
==
'sp_pbomb'
)
{
include_once
GAME_ROOT
.
'./include/game/special.func.php'
;
include_once
GAME_ROOT
.
'./include/game/special.func.php'
;
if
(
$command
==
"YES"
)
press_bomb
();
if
(
$command
==
"YES"
)
press_bomb
();
...
@@ -638,8 +674,8 @@ if($hp > 0){
...
@@ -638,8 +674,8 @@ if($hp > 0){
}
}
//显示指令执行结果
//显示指令执行结果
$gamedata
[
'innerHTML'
][
'notice'
]
=
ob_get_contents
();
$gamedata
[
'innerHTML'
][
'notice'
]
=
ob_get_contents
();
if
(
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
if
(
(
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
)
||
isset
(
$dizzy_times
)
){
$gamedata
[
'timer'
]
=
$rmcdtime
;
$gamedata
[
'timer'
]
=
isset
(
$dizzy_times
)
?
$dizzy_times
:
$rmcdtime
;
}
}
if
(
$hp
>
0
&&
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
if
(
$hp
>
0
&&
$coldtimeon
&&
$showcoldtimer
&&
$rmcdtime
){
$log
.=
"行动冷却时间:<span id=
\"
timer
\"
class=
\"
yellow
\"
>0.0</span>秒<br>"
;
$log
.=
"行动冷却时间:<span id=
\"
timer
\"
class=
\"
yellow
\"
>0.0</span>秒<br>"
;
...
@@ -683,6 +719,8 @@ if($hp <= 0) {
...
@@ -683,6 +719,8 @@ if($hp <= 0) {
//$gamedata['cmd'] .= '<br><br><input type="button" id="submit" onClick="postCommand();return false;" value="提交">';
//$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
;}
if
(
isset
(
$url
)){
$gamedata
[
'url'
]
=
$url
;}
$gamedata
[
'innerHTML'
][
'pls'
]
=
(
!
isset
(
$plsinfo
[
$pls
])
&&
isset
(
$hplsinfo
[
$pgroup
]))
?
$hplsinfo
[
$pgroup
][
$pls
]
:
$plsinfo
[
$pls
];
$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) {
...
@@ -35,10 +35,10 @@ if($gamestate == 0) {
header
(
"Location: end.php"
);
exit
();
header
(
"Location: end.php"
);
exit
();
}
}
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
extract
(
$pdata
);
extract
(
$pdata
);
init_playerdata
();
init_playerdata
();
init_profile
();
init_profile
();
$clbpara
=
get_clbpara
(
$clbpara
);
$log
=
''
;
$log
=
''
;
//读取聊天信息
//读取聊天信息
...
@@ -132,6 +132,13 @@ elseif((strpos($action,'neut')===0)){
...
@@ -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
&&
$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
)
if
(
$club
==
0
)
{
{
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
...
...
gamedata/cache/clubskills_1.php
0 → 100644
View file @
efbe28ff
<?php
if
(
!
defined
(
'IN_GAME'
))
exit
(
'Access Denied'
);
# 技能相关配置文件:
# 社团变更时可获得的技能清单:
$club_skillslist
=
Array
(
1
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
,
'c1_def'
,
'c1_crit'
,
'c1_sneak'
,
'c1_burnsp'
,
'c1_bjack'
,
'c1_veteran'
),
#'铁拳无敌',
2
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'见敌必斩',
3
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'灌篮高手',
4
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'狙击鹰眼',
5
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'拆弹专家',
6
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'宛如疾风',
7
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'锡安成员',
8
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'黑衣组织',
9
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'超能力者',
10
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'高速成长',
11
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'富家子弟',
12
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'全能骑士',
13
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'根性兄贵',
14
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'肌肉兄贵',
15
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'<span class="L5">L5状态</span>',
16
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'全能骑士',
17
=>
Array
(
'f_heal'
),
#'走路萌物',
18
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'天赋异禀',
19
=>
Array
(
's_hp'
,
's_ad'
,
'f_heal'
),
#'晶莹剔透',
20
=>
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'
),
#'决死结界'
);
# 社团技能黑名单:(禁止特定社团升级/学习对应技能)
$cskills_blist
=
Array
(
# 走路萌物无法升级生命
's_hp'
=>
Array
(
0
,
17
),
# 走路萌物无法升级攻防
's_ad'
=>
Array
(
0
,
17
),
);
# 社团技能白名单:(允许特定社团升级/学习对应技能)
$cskills_wlist
=
Array
(
);
# 技能登记:
$cskills
=
Array
(
// 可以通过在此文件中填写配置项来创建一个新技能,系统会自动生成模板。如果配置文件不能满足需求,可以自己创建一个模板文件
/*'技能编号' => Array
(
'name' => '技能名', //(必填)技能名
'tags' => Array('battle','active','passive','inf','hidden'), //(非必填)定义一个技能带有的标签
// battle: 战斗技,会显示在战斗指令界面;
// active: 战斗技,但不能在追击/鏖战中使用;
// passive: 被动技能,在战斗中会自动判断是否生效;
// inf: 状态技能,在战斗中会自动判断是否生效。和被动技的区别暂时还没有……;
// hidden:隐藏技能,不会在面板中显示。暂时没有实现
'maxlvl' => 0, //(非必填)定义一个技能为可升级技能,并定义该技能的等级上限。注意:带有等级上限的技能如果设置了'cost','cost'的值必须是一个数组,对应每等级升级时需消耗的技能点
'desc' => '', //(非必填)技能介绍,显示在技能面板上,可以使用[: :]设置一些静态参数,会在生成时自动替换对应参数。
// [:cost:]:消耗的技能点
// [:effect:]:增加指定属性
// [:effect:]att :增加对应属性,可以将att替换为'effect'内定义过的键名
// [::]:还可以替换为任意'vars'内定义过的键名
'lockdesc' => '', //(需解锁技能必填)不满足解锁条件时的介绍
'bdesc' => '', //(战斗技必填)显示在战斗界面上的短介绍,战斗技必填
'log' => '', //(可升级/操作技能必填)升级/操作技能后显示的提示文本
'cost' => 1, //(可升级/操作技能必填)升级/操作技能要花费的技能点,如果设置过'maxlvl',这里应该设置成一个Array
'input' => '升级',//(可升级/操作技能必填)自动生成模板时,对应操作按钮的名字,不存在时不会生成按钮
'num_input' => 1,//(非必填)自动生成模板时,是否会为其生成数字输入框(便于快速提交多次升级)
'status' => Array('hp','mhp'),//(非必填)每次升级时,直接提升的玩家属性。
// 和头衔入场奖励类似,支持所有在数据库中登记过的字段名
// 如果输入了Array('para' => Array('lvl')),代表升级时会提升该技能的等级
'effect' => Array(0 => Array('att' => 4, 'def' => 6),13 => Array('att' => 9, 'def' => 12),),//(非必填)每次升级时,直接提升的玩家属性对应的值。
// 键名为 0 时,代表默认情况下会增加的对应属性值。键值可以是一个由字段名构成的数组。也可以只是一个数字——代表会增加所有'status'中登记的属性值
// 键名为 其他数字 时,代表该数字对应【社团】会增加的属性值
'events' => Array(''); //(非必填)每次升级时会触发的事件,目前只有一个'heal',代表全恢复
'unlock' => Array('lvl' => '[:lvl:] >= 3',), //(非必填)技能解锁条件,键名和键值[::]内的内容要相同。键值须为PHP支持的条件判断语句。支持“或”类型判断,请参考下方例子。
// Array('wepk+wep_kind' => "[:wepk:] == 'WP' || [:wep_kind:] == 'P'",), 键名中的+是分隔符,处理时会依此将条件分割为数组,替换键值内的判断语句
'vars' => Array(), //(非必填)技能内预设的静态参数,比如'ragecost'怒气消耗。预设的参数可以自动填充'desc'中对应[::]的内容
'svars' => Array(), //(非必填)初次获得技能时,保存在clbpara['skillpara']['技能编号']中的动态技能参数。可以用来定义技能的使用次数等。
'slast' => Array('lasttimes' => 0,'lastturns' => 0,), //(非必填)初次获得时效性技能时,保存在clbpara内的数据。暂时只支持以下参数:
// 'lasttimes' => 0, 代表技能持续的时间,保存在clbpara['lasttimes']['技能编号']中
// 'lastturns' => 0, 代表技能持续的回合,保存在clbpara['lastturns']['技能编号']中
// 时效性技能才初次霍德师,还会获得一个等于当前时间戳的'starttimes',保存在clbpara['starttimes']['技能编号']中
// 玩家在行动时会判断时效性技能是否结束,NPC敌人在被玩家发现时会判断时效性技能是否结束,并在战斗开始前保存状态
),*/
's_hp'
=>
Array
(
'name'
=>
'生命'
,
'desc'
=>
'每消耗<span class="lime">[:cost:]</span>技能点,生命上限<span class="yellow">+[:effect:]</span>点'
,
'log'
=>
'消耗了<span class="lime">[:cost:]</span>点技能点,你的生命上限增加了<span class="yellow">[:effect:]</span>点。<br>'
,
'cost'
=>
1
,
'input'
=>
'升级'
,
'num_input'
=>
1
,
'status'
=>
Array
(
'hp'
,
'mhp'
),
'effect'
=>
Array
(
0
=>
3
,
# 默认每消耗cost点技能点可增加3点生命值与最大生命值
13
=>
6
,
# 根性兄贵每消耗cost点技能点可增加6点生命值与最大生命值
),
),
's_ad'
=>
Array
(
'name'
=>
'攻防'
,
'desc'
=>
'每消耗<span class="lime">[:cost:]</span>技能点,基础攻击<span class="yellow">+[:effect:]att</span>点,基础防御<span class="yellow">+[:effect:]def</span>点'
,
'log'
=>
'消耗了<span class="lime">[:cost:]</span>点技能点,你的基础攻击增加了<span class="yellow">[:effect:]att</span>点,基础防御增加了<span class="yellow">[:effect:]def</span>点。<br>'
,
'cost'
=>
1
,
'input'
=>
'升级'
,
'num_input'
=>
1
,
'status'
=>
Array
(
'att'
,
'def'
),
'effect'
=>
Array
(
0
=>
Array
(
'att'
=>
4
,
'def'
=>
6
),
14
=>
Array
(
'att'
=>
9
,
'def'
=>
12
),
),
),
'f_heal'
=>
Array
(
'name'
=>
'自愈'
,
'desc'
=>
'消耗<span class="lime">[:cost:]</span>技能点,解除全部受伤与异常状态,并完全恢复生命与体力'
,
'log'
=>
'消耗了<span class="lime">[:cost:]</span>技能点。<br>'
,
'cost'
=>
1
,
'input'
=>
'治疗'
,
'events'
=>
Array
(
'heal'
),
),
'c1_def'
=>
Array
(
'name'
=>
'格挡'
,
'tags'
=>
Array
(
'passive'
),
'desc'
=>
'持殴系武器时,武器效果值的<span class="yellow">[:trans:]%</span>计入防御力(最多[:maxtrans:]点)<br>'
,
'lockdesc'
=>
'武器不适用,持<span class="yellow">殴系武器</span>时生效'
,
'log'
=>
'<br>'
,
'vars'
=>
Array
(
'trans'
=>
40
,
//效&防转化率
'maxtrans'
=>
2000
,
//转化上限
),
'unlock'
=>
Array
(
'wepk+wep_kind'
=>
"[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'"
,
),
),
'c1_crit'
=>
Array
(
'name'
=>
'猛击'
,
'tags'
=>
Array
(
'passive'
),
'maxlvl'
=>
2
,
'desc'
=>
'持殴系武器战斗时<span class="yellow">[:rate:]%</span>几率触发,触发则物理伤害增加<span class="yellow">[:attgain:]%</span>,<br>
且晕眩敌人<span class="cyan">[:stuntime:]</span>秒。晕眩状态下敌人无法进行任何行动或战斗。<br></span>'
,
'lockdesc'
=>
'武器不适用,持<span class="yellow">殴系武器</span>时可发动'
,
'log'
=>
'升级成功。<br>'
,
'cost'
=>
Array
(
10
,
11
,
-
1
),
'input'
=>
'升级'
,
'status'
=>
Array
(
'para'
=>
Array
(
'lvl'
)),
'effect'
=>
Array
(
0
=>
Array
(
'lvl'
=>
1
),
),
'vars'
=>
Array
(
'attgain'
=>
Array
(
20
,
50
,
80
),
//物理伤害增加
'stuntime'
=>
Array
(
1
,
1
,
2
),
//晕眩时间(单位:秒)
'rate'
=>
25
,
//触发率
),
'svars'
=>
Array
(
'lvl'
=>
0
,
//初次获得时等级为0
),
'unlock'
=>
Array
(
'wepk+wep_kind'
=>
"[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'"
,
),
),
'c1_sneak'
=>
Array
(
'name'
=>
'偷袭'
,
'tags'
=>
Array
(
'battle'
,
'active'
),
'desc'
=>
'本次攻击必定触发技能“<span class="yellow">猛击</span>”且不会被反击。<br>
持殴系武器方可发动,发动消耗<span class="yellow">[:ragecost:]</span>点怒气。<br>'
,
'bdesc'
=>
'必定触发技能“<span class="yellow">猛击</span>”且不会被反击。消耗<span class="red">[:ragecost:]</span>怒气'
,
'lockdesc'
=>
Array
(
'lvl'
=>
'3级时解锁'
,
'wepk+wep_kind'
=>
'武器不适用,持<span class="yellow">殴系武器</span>时可发动'
,
),
'log'
=>
'<br>'
,
'vars'
=>
Array
(
'ragecost'
=>
25
,
//消耗怒气
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 3'
,
'wepk+wep_kind'
=>
"[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'"
,
),
),
'c1_burnsp'
=>
Array
(
'name'
=>
'灭气'
,
'tags'
=>
Array
(
'passive'
),
'desc'
=>
'持殴系武器攻击后敌人体力减少<span class="yellow">伤害值的[:burnspr:]%</span>点<br>
被攻击时你额外获得<span class="yellow">[:mingrg:]~[:maxgrg:]点</span>怒气'
,
'lockdesc'
=>
Array
(
'lvl'
=>
'6级时解锁'
,
'wepk+wep_kind'
=>
'武器不适用,持<span class="yellow">殴系武器</span>时可发动'
,
),
'log'
=>
'<br>'
,
'vars'
=>
Array
(
'burnspr'
=>
33
,
//体力减少&伤害占比
'mingrg'
=>
1
,
//最小怒气增益
'maxgrg'
=>
2
,
//最大怒气增益
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 6'
,
'wepk+wep_kind'
=>
"[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'"
,
),
),
'c1_bjack'
=>
Array
(
'name'
=>
'闷棍'
,
'tags'
=>
Array
(
'battle'
),
'desc'
=>
'本次攻击必定触发技能“<span class="yellow">猛击</span>”,<br>
并对敌人额外造成(<span class="yellow">敌方体力上限减当前体力</span>)点的最终伤害。<br>
持钝器方可发动,发动消耗<span class="yellow">[:ragecost:]</span>点怒气。'
,
'bdesc'
=>
'必定触发技能“<span class="yellow">猛击</span>”,并附加(<span class="yellow">敌方体力上限减当前体力</span>)点伤害。消耗<span class="red">[:ragecost:]</span>怒气'
,
'lockdesc'
=>
Array
(
'lvl'
=>
'11级时解锁'
,
'wepk+wep_kind'
=>
'武器不适用,持<span class="yellow">殴系武器</span>时可发动'
,
),
'log'
=>
'<br>'
,
'vars'
=>
Array
(
'ragecost'
=>
85
,
//消耗怒气
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 11'
,
'wepk+wep_kind'
=>
"[:wepk:] == 'WP' || [:wepk:] == 'WCP' || [:wepk:] == 'WKP' || [:wep_kind:] == 'P'"
,
),
),
'c1_veteran'
=>
Array
(
# 这是一个使用固定模板的技能 在这里进行编辑不会有任何效果……等等,还是有点效果的……编辑下面提供的内容是会有效果的
'name'
=>
'百战'
,
'tags'
=>
Array
(
'passive'
),
'vars'
=>
Array
(
'defkind'
=>
Array
(
'P'
,
'K'
,
'C'
,
'G'
,
'F'
,
'D'
,
'I'
,
'U'
,
'q'
,
'W'
,
'E'
),
//可选择的单系防御类型
),
'svars'
=>
Array
(
'choice'
=>
''
,
//初始默认选择的单项防御
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 18'
,
),
),
'inf_dizzy'
=>
Array
(
'name'
=>
'眩晕'
,
'tags'
=>
Array
(
'inf'
),
'desc'
=>
'你感到头晕目眩,无法进行任何行动或战斗!<br>眩晕状态持续时间还剩<span class="red">[:lasttimes:]</span>秒'
,
'slast'
=>
Array
(
'lasttimes'
=>
0
,
//技能的持续时间由其他因素决定 这里仅留作占位
),
),
);
?>
gamedata/cache/gamecfg_1.php
View file @
efbe28ff
...
@@ -103,9 +103,9 @@ $active_obbs = 50;
...
@@ -103,9 +103,9 @@ $active_obbs = 50;
//基础反击率
//基础反击率
$counter_obbs
=
50
;
$counter_obbs
=
50
;
//(仅PVE触发)基础追击率 (等于0时为不启用追击机制)
//(仅PVE触发)基础追击率 (等于0时为不启用追击机制)
$chase_obbs
=
55
;
$chase_obbs
=
0
;
//(仅PVE触发)鏖战状态维持率 (等于0时为不启用鏖战机制)
//(仅PVE触发)鏖战状态维持率 (等于0时为不启用鏖战机制)
$dfight_obbs
=
65
;
$dfight_obbs
=
0
;
//(仅PVE触发)追击&鏖战状态默认先制率 (鏖战/追击的基础先制率不受姿态与天气影响)
//(仅PVE触发)追击&鏖战状态默认先制率 (鏖战/追击的基础先制率不受姿态与天气影响)
$chase_active_obbs
=
50
;
$chase_active_obbs
=
50
;
//(仅PVE触发)被追击&鏖战状态下默认逃跑成功率(鏖战/追击的基础先制率不受姿态与天气影响)
//(仅PVE触发)被追击&鏖战状态下默认逃跑成功率(鏖战/追击的基础先制率不受姿态与天气影响)
...
...
gamedata/cache/resources_1.php
View file @
efbe28ff
...
@@ -62,8 +62,8 @@ $wepeinfo = Array('不值一提','略有威胁','威力可观','无敌神器');
...
@@ -62,8 +62,8 @@ $wepeinfo = Array('不值一提','略有威胁','威力可观','无敌神器');
$poseinfo
=
Array
(
'通常'
,
'作战姿态'
,
'强袭姿态'
,
'探物姿态'
,
'偷袭姿态'
,
'治疗姿态'
,
'✧狂飙姿态✧'
,
'哨戒姿态'
);
$poseinfo
=
Array
(
'通常'
,
'作战姿态'
,
'强袭姿态'
,
'探物姿态'
,
'偷袭姿态'
,
'治疗姿态'
,
'✧狂飙姿态✧'
,
'哨戒姿态'
);
$tacinfo
=
Array
(
'通常'
,
''
,
'重视防御'
,
'重视反击'
,
'重视躲避'
);
$tacinfo
=
Array
(
'通常'
,
''
,
'重视防御'
,
'重视反击'
,
'重视躲避'
);
//可供玩家选择的姿态、策略
//可供玩家选择的姿态、策略
$apose
=
Array
(
0
,
1
,
3
,
4
,
5
,
6
);
$apose
=
Array
(
1
,
3
,
4
,
5
,
6
);
$atac
=
Array
(
0
,
2
,
3
,
4
);
$atac
=
Array
(
2
,
3
,
4
);
//不会生成在危险地图的NPC(执行官、女主)
//不会生成在危险地图的NPC(执行官、女主)
$hidding_typelist
=
Array
(
7
,
14
);
$hidding_typelist
=
Array
(
7
,
14
);
//不会因躲避禁区、追杀玩家等原因离开地图的NPC(红暮、■、执行官、英灵(没有巫师)、SCP、种火)
//不会因躲避禁区、追杀玩家等原因离开地图的NPC(红暮、■、执行官、英灵(没有巫师)、SCP、种火)
...
...
gamedata/cache/style_20190718.css
View file @
efbe28ff
...
@@ -438,13 +438,13 @@ span.drop:hover .dropdown-menu{
...
@@ -438,13 +438,13 @@ span.drop:hover .dropdown-menu{
/* 用dialog实现的气泡框 */
/* 用dialog实现的气泡框 */
dialog
{
dialog
{
position
:
fixed
;
position
:
fixed
;
left
:
0px
;
top
:
0px
;
max-width
:
5
0%
;
max-width
:
80%
;
max-height
:
8
0%
;
ma
x-height
:
75%
;
ma
rgin
:
auto
auto
;
padding
:
15px
;
font
:
10pt
微软雅黑
serif
;
font
:
10pt
微软雅黑
serif
;
text-align
:
left
;
overflow-x
:
hidden
;
overflow-y
:
auto
;
border
:
#000
0px
none
;
color
:
#fff
;
border-radius
:
4
px
;
border
:
#000
0px
none
;
color
:
#fff
;
border-radius
:
5
px
;
background-color
:
rgba
(
17
,
17
,
17
,
0.
85
);
background-color
:
rgba
(
17
,
17
,
17
,
0.
9
);
*
BACKGROUND
:
rgb
(
17
,
17
,
17
);
*
filter
:
alpha
(
opacity
=
50
);
box-shadow
:
0px
2px
6px
#999
;
box-shadow
:
0px
2px
6px
rgb
(
87
,
87
,
87
)
;
z-index
:
20
;
z-index
:
20
;
}
}
dialog
::backdrop
{
dialog
::backdrop
{
...
@@ -478,7 +478,7 @@ input.range{
...
@@ -478,7 +478,7 @@ input.range{
.eicon
{
.eicon
{
filter
:
grayscale
(
100%
)
brightness
(
133%
)
blur
(
0px
);
filter
:
grayscale
(
100%
)
brightness
(
133%
)
blur
(
0px
);
font-size
:
125%
;
font-size
:
125%
;
transition
:
all
0.3s
;
transition
:
0.3s
;
}
}
.eicon
:hover
{
.eicon
:hover
{
filter
:
grayscale
(
100%
)
brightness
(
166%
)
blur
(
0px
);
filter
:
grayscale
(
100%
)
brightness
(
166%
)
blur
(
0px
);
...
@@ -489,19 +489,19 @@ input.range{
...
@@ -489,19 +489,19 @@ input.range{
box-shadow
:
0px
2px
6px
#999
;
box-shadow
:
0px
2px
6px
#999
;
}
}
/* 子面板相关 */
.blurtext
{
.blurtext
{
align-self
:
center
;
align-self
:
center
;
filter
:
opacity
(
75%
)
blur
(
2
px
);
filter
:
opacity
(
20%
)
blur
(
3
px
);
}
}
.lockmap
{
.lockmap
{
background
:
url("../../img/lock.png")
center
;
background-color
:
rgba
(
17
,
17
,
17
,
0.5
);
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
;
transition
:
0.5s
;
}
}
.lockmap
:hover
{
.lockmap
:hover
{
filter
:
opacity
(
100%
)
brightness
(
1
00
%
);
filter
:
opacity
(
100%
)
brightness
(
1
25
%
);
}
}
.dangerbutton
{
.dangerbutton
{
padding
:
2rem
2rem
;
padding
:
2rem
2rem
;
border
:
0
;
border
:
0
;
...
@@ -514,10 +514,51 @@ input.range{
...
@@ -514,10 +514,51 @@ input.range{
background-color
:
rgba
(
255
,
0
,
0
,
0.45
);
background-color
:
rgba
(
255
,
0
,
0
,
0.45
);
letter-spacing
:
.1rem
;
letter-spacing
:
.1rem
;
transition
:
1s
;
transition
:
1s
;
}
}
.dangerbutton
:hover
{
.dangerbutton
:hover
{
filter
:
brightness
(
130%
);
filter
:
brightness
(
130%
);
box-shadow
:
0px
0px
40px
0px
red
;
box-shadow
:
0px
0px
40px
0px
red
;
background-color
:
rgba
(
255
,
0
,
0
,
0.75
);
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'){
...
@@ -40,8 +40,8 @@ if($command == 'wthedit'){
$cmd_info
=
'游戏状态数据错误,请重新输入!'
;
$cmd_info
=
'游戏状态数据错误,请重新输入!'
;
}
elseif
(
$gamestate
==
$igamestate
){
}
elseif
(
$gamestate
==
$igamestate
){
$cmd_info
=
'游戏当前已经处于此状态,请重新输入!'
;
$cmd_info
=
'游戏当前已经处于此状态,请重新输入!'
;
}
elseif
(
$gamestate
==
0
&&
$igamestate
!=
10
){
//
}elseif($gamestate == 0 && $igamestate != 10){
$cmd_info
=
'游戏未准备,不可进入后期状态!'
;
//
$cmd_info = '游戏未准备,不可进入后期状态!';
}
elseif
(
$gamestate
==
10
&&
$igamestate
>
20
){
}
elseif
(
$gamestate
==
10
&&
$igamestate
>
20
){
$cmd_info
=
'游戏未开始,不可进入后期状态!'
;
$cmd_info
=
'游戏未开始,不可进入后期状态!'
;
}
elseif
(
$igamestate
&&
$igamestate
<
$gamestate
){
}
elseif
(
$igamestate
&&
$igamestate
<
$gamestate
){
...
...
include/common.inc.php
View file @
efbe28ff
...
@@ -45,6 +45,7 @@ require GAME_ROOT.'./gamedata/system.php';
...
@@ -45,6 +45,7 @@ require GAME_ROOT.'./gamedata/system.php';
require
config
(
'resources'
,
$gamecfg
);
require
config
(
'resources'
,
$gamecfg
);
require
config
(
'gamecfg'
,
$gamecfg
);
require
config
(
'gamecfg'
,
$gamecfg
);
require
config
(
'combatcfg'
,
$gamecfg
);
require
config
(
'combatcfg'
,
$gamecfg
);
require
config
(
'clubskills'
,
$gamecfg
);
require
config
(
'dialogue'
,
$gamecfg
);
require
config
(
'dialogue'
,
$gamecfg
);
require
config
(
'audio'
,
$gamecfg
);
require
config
(
'audio'
,
$gamecfg
);
...
...
include/game.func.php
View file @
efbe28ff
...
@@ -40,10 +40,6 @@ function init_profile(){
...
@@ -40,10 +40,6 @@ function init_profile(){
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm0
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm0
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
global
$clbpara
,
$weather
,
$definfo
,
$atkinfo
,
$pdata
;
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
)
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
,
'itm0'
,
'itm1'
,
'itm2'
,
'itm3'
,
'itm4'
,
'itm5'
,
'itm6'
)
as
$value
)
{
{
global
$
{
$value
.
'_words'
};
global
$
{
$value
.
'_words'
};
...
@@ -127,6 +123,10 @@ function init_profile(){
...
@@ -127,6 +123,10 @@ function init_profile(){
$clbpara
=
get_clbpara
(
$clbpara
);
$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
;
return
;
}
}
...
@@ -534,7 +534,7 @@ function init_mapdata(){
...
@@ -534,7 +534,7 @@ function init_mapdata(){
$mpp
[
$position
[
0
]][
$position
[
1
]]
=
$i
;
$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 colspan="11" height="24" class=b1 align=center>战场地图</TD></TR>'
;
$mapcontent
.=
'<TR align="center">
$mapcontent
.=
'<TR align="center">
<TD width="42" height="36" class=map align=center><div class=nttx>坐标</div></TD>'
;
<TD width="42" height="36" class=map align=center><div class=nttx>坐标</div></TD>'
;
...
@@ -559,6 +559,107 @@ function init_mapdata(){
...
@@ -559,6 +559,107 @@ function init_mapdata(){
return
$mapcontent
;
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
){
function
get_remaincdtime
(
$pid
){
$psdata
=
get_pstate
(
$pid
);
$psdata
=
get_pstate
(
$pid
);
if
(
$psdata
){
if
(
$psdata
){
...
@@ -571,6 +672,39 @@ function get_remaincdtime($pid){
...
@@ -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数据
//通过pid抓取指定玩家/NPC数据
function
fetch_playerdata_by_pid
(
$pid
)
function
fetch_playerdata_by_pid
(
$pid
)
{
{
...
...
include/game/clubslct.func.php
View file @
efbe28ff
...
@@ -52,10 +52,28 @@ function getclub($who, &$c1, &$c2, &$c3)
...
@@ -52,10 +52,28 @@ function getclub($who, &$c1, &$c2, &$c3)
if
(
$c2
>
$c3
)
swap
(
$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
(
empty
(
$data
))
if
(
$club
==
1
)
$wp
+=
50
;
{
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
==
2
)
$wk
+=
50
;
if
(
$club
==
3
)
$wc
+=
50
;
if
(
$club
==
3
)
$wc
+=
50
;
if
(
$club
==
4
)
$wg
+=
50
;
if
(
$club
==
4
)
$wg
+=
50
;
...
@@ -65,6 +83,39 @@ function updateskill()
...
@@ -65,6 +83,39 @@ function updateskill()
if
(
$club
==
16
)
{
$wp
+=
25
;
$wk
+=
25
;
$wc
+=
25
;
$wg
+=
25
;
$wd
+=
25
;
$wf
+=
25
;
}
if
(
$club
==
16
)
{
$wp
+=
25
;
$wk
+=
25
;
$wc
+=
25
;
$wg
+=
25
;
$wd
+=
25
;
$wf
+=
25
;
}
if
(
$club
==
13
)
{
$mhp
+=
250
;
$hp
+=
250
;
}
if
(
$club
==
13
)
{
$mhp
+=
250
;
$hp
+=
250
;
}
if
(
$club
==
14
)
{
$att
+=
300
;
$def
+=
300
;
}
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
)
function
selectclub
(
$id
)
...
...
include/game/item.func.php
View file @
efbe28ff
...
@@ -5,6 +5,7 @@ if (! defined ( 'IN_GAME' )) {
...
@@ -5,6 +5,7 @@ if (! defined ( 'IN_GAME' )) {
}
}
include_once
GAME_ROOT
.
'./include/game/titles.func.php'
;
include_once
GAME_ROOT
.
'./include/game/titles.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubslct.func.php'
;
function
itemuse
(
$itmn
)
{
function
itemuse
(
$itmn
)
{
global
$mode
,
$log
,
$nosta
,
$pid
,
$name
,
$state
,
$now
,
$nick
,
$achievement
,
$club
;
global
$mode
,
$log
,
$nosta
,
$pid
,
$name
,
$state
,
$now
,
$nick
,
$achievement
,
$club
;
...
@@ -1336,7 +1337,7 @@ function itemuse($itmn) {
...
@@ -1336,7 +1337,7 @@ function itemuse($itmn) {
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$att
=
$def
=
13337
;
$att
=
$def
=
13337
;
$club
=
15
;
changeclub
(
15
)
;
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
$itm
=
$itmk
=
$itmsk
=
''
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
$itme
=
$itms
=
0
;
...
@@ -1422,7 +1423,7 @@ function itemuse($itmn) {
...
@@ -1422,7 +1423,7 @@ function itemuse($itmn) {
include_once
GAME_ROOT
.
'./include/state.func.php'
;
include_once
GAME_ROOT
.
'./include/state.func.php'
;
death
(
'SCP'
,
''
,
0
,
$itm
);
death
(
'SCP'
,
''
,
0
,
$itm
);
}
else
{
}
else
{
$club
=
17
;
changeclub
(
17
)
;
addnews
(
$now
,
'notworthit'
,
$nickinfo
.
' '
.
$name
);
addnews
(
$now
,
'notworthit'
,
$nickinfo
.
' '
.
$name
);
}
}
$itms
--
;
$itms
--
;
...
@@ -1802,7 +1803,7 @@ function itemuse($itmn) {
...
@@ -1802,7 +1803,7 @@ function itemuse($itmn) {
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$log
.=
'你突然感觉到一种不可思议的力量贯通全身!<br>'
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$wp
=
$wk
=
$wg
=
$wc
=
$wd
=
$wf
=
8010
;
$att
=
$def
=
13337
;
$att
=
$def
=
13337
;
$club
=
15
;
changeclub
(
15
)
;
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
addnews
(
$now
,
'suisidefail'
,
$nickinfo
.
' '
.
$name
);
}
}
elseif
(
$itme
==
17
||
$itme
>
22
){
//状态机社团以及不存在的社团
elseif
(
$itme
==
17
||
$itme
>
22
){
//状态机社团以及不存在的社团
...
@@ -1831,7 +1832,7 @@ function itemuse($itmn) {
...
@@ -1831,7 +1832,7 @@ function itemuse($itmn) {
【其之零】一切都是数字的假象而已。<br>
【其之零】一切都是数字的假象而已。<br>
正在你回味着这句话的时候,一切已经恢复如初。"
;
正在你回味着这句话的时候,一切已经恢复如初。"
;
//社团变更
//社团变更
$club
=
20
;
changeclub
(
20
)
;
//获取初始元素与第一条配方
//获取初始元素与第一条配方
$dice
=
rand
(
0
,
5
);
$dice
=
rand
(
0
,
5
);
global
$
{
'element'
.
$dice
},
$clbpara
;
global
$
{
'element'
.
$dice
},
$clbpara
;
...
@@ -1847,7 +1848,7 @@ function itemuse($itmn) {
...
@@ -1847,7 +1848,7 @@ function itemuse($itmn) {
$log
.=
"再等等吧……<br>"
;
$log
.=
"再等等吧……<br>"
;
}
}
else
{
//直接将社团卡的效果写入玩家club
else
{
//直接将社团卡的效果写入玩家club
$club
=
$itme
;
changeclub
(
$itme
)
;
$log
.=
"你的称号被改动了!"
;
$log
.=
"你的称号被改动了!"
;
}
}
//销毁物品
//销毁物品
...
@@ -1925,7 +1926,7 @@ function itemuse($itmn) {
...
@@ -1925,7 +1926,7 @@ function itemuse($itmn) {
$log
.=
"<br>获得了<span class='sparkle'>
{
$sparkle
}
元素口袋
{
$sparkle
}
</span>!<br>"
;
$log
.=
"<br>获得了<span class='sparkle'>
{
$sparkle
}
元素口袋
{
$sparkle
}
</span>!<br>"
;
$log
.=
"……这到底是怎么一回事呢?<br><br>"
;
$log
.=
"……这到底是怎么一回事呢?<br><br>"
;
//社团变更
//社团变更
$club
=
20
;
changeclub
(
20
)
;
//获取初始元素与第一条配方
//获取初始元素与第一条配方
$dice
=
rand
(
0
,
5
);
$dice
=
rand
(
0
,
5
);
global
$
{
'element'
.
$dice
};
global
$
{
'element'
.
$dice
};
...
...
include/game/revattr.func.php
View file @
efbe28ff
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubskills.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/itemmain.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr_extra.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr_extra.func.php'
;
...
@@ -40,18 +41,35 @@
...
@@ -40,18 +41,35 @@
$pa
[
'wep_kind'
]
=
'P'
;
$pa
[
'wep_kind'
]
=
'P'
;
$pa
[
'is_wpg'
]
=
1
;
$pa
[
'is_wpg'
]
=
1
;
}
}
return
;
return
$pa
[
'wep_kind'
];
//保险起见……
}
}
//获取武器射程
//获取武器射程
function
get_wep_range
(
&
$pa
)
function
get_wep_range
(
&
$pa
)
{
{
global
$rangeinfo
;
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
;
$range
=
isset
(
$rangeinfo
[
$pa
[
'wep_kind'
]])
?
$rangeinfo
[
$pa
[
'wep_kind'
]]
:
NULL
;
return
$range
;
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
)
function
get_equip_ex_array
(
&
$pa
)
...
@@ -97,9 +115,33 @@
...
@@ -97,9 +115,33 @@
return
$skarr
;
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次的事件。
//在初始化战斗阶段触发的事件。即:无论是否反击都只会触发1次的事件。
function
combat_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
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啦!'
))
if
((
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'是TSEROF啦!'
)
||
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
))
...
@@ -420,6 +462,7 @@
...
@@ -420,6 +462,7 @@
//空手 武器伤害=2/3熟练度
//空手 武器伤害=2/3熟练度
if
(
$pa
[
'wep_kind'
]
==
'N'
)
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
);
$pa
[
'wepe_t'
]
=
round
(
$pa
[
'wep_skill'
]
*
2
/
3
);
}
}
//射系 武器伤害=面板数值
//射系 武器伤害=面板数值
...
@@ -539,20 +582,34 @@
...
@@ -539,20 +582,34 @@
$pa
[
'charge_flag'
]
=
1
;
$pa
[
'charge_flag'
]
=
1
;
}
}
}
}
# 获取pd社团技能对防御力的加成
# 获取pd社团技能对防御力的加成
(旧)
if
(
!
empty
(
$pd
[
'skills'
]))
if
(
!
empty
(
$pd
[
'skills'
]))
{
{
rev_get_clubskill_bonus
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$att1
,
$def1
);
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
;
$total_def
=
$base_def
+
$equip_def
;
if
(
!
empty
(
$def1
))
$total_def
+=
$def1
;
if
(
!
empty
(
$sk_def
))
$total_def
+=
$sk_def
;
# 初始化tooltip
# 初始化tooltip
if
(
$tooltip
)
if
(
$tooltip
)
{
{
$tooltip
=
"<span tooltip=
\"
基础防御值:
{
$base_def
}
+
{
$equip_def
}
"
;
$tooltip
=
"<span tooltip=
\"
基础防御值:
{
$base_def
}
+
{
$equip_def
}
"
;
if
(
!
empty
(
$def1
))
$tooltip
.=
"+
{
$def1
}
"
;
if
(
!
empty
(
$def1
))
$tooltip
.=
"+
{
$def1
}
"
;
if
(
!
empty
(
$sk_def
))
$tooltip
.=
"
\r
「格挡」:+
{
$sk_def
}
"
;
$tooltip
.=
"
\r
"
;
$tooltip
.=
"
\r
"
;
}
}
# 计算防御力修正
# 计算防御力修正
...
@@ -670,7 +727,7 @@
...
@@ -670,7 +727,7 @@
//计算伤害倍率变化(攻击方)
//计算伤害倍率变化(攻击方)
function
get_damage_p_rev
(
&
$pa
,
&
$pd
,
$active
)
function
get_damage_p_rev
(
&
$pa
,
&
$pd
,
$active
)
{
{
global
$log
;
global
$log
,
$cskills
;
//每一条伤害倍率判定变化提示会以$dmg_p[]= $r;的形式放入伤害倍率数组内,
//每一条伤害倍率判定变化提示会以$dmg_p[]= $r;的形式放入伤害倍率数组内,
//在输出成log时会显示为:总计造成了100x0.5x1.2...=111点伤害 的形式
//在输出成log时会显示为:总计造成了100x0.5x1.2...=111点伤害 的形式
...
@@ -757,6 +814,18 @@
...
@@ -757,6 +814,18 @@
$log
.=
"
{
$pa
[
'hitrate_max_times'
]
}
次连续攻击命中<span class=
\"
yellow
\"
>
{
$pa
[
'hitrate_times'
]
}
</span>次!"
;
$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
;
return
$dmg_p
;
}
}
...
@@ -1110,6 +1179,21 @@
...
@@ -1110,6 +1179,21 @@
{
{
global
$log
;
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
)
if
(
in_array
(
'h'
,
$pd
[
'ex_keys'
])
&&
$fin_dmg
>=
1950
)
{
{
...
@@ -1179,6 +1263,32 @@
...
@@ -1179,6 +1263,32 @@
{
{
global
$log
,
$infatt_rev
,
$infinfo
;
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'
]
==
'蓝凝'
)
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'蓝凝'
)
{
{
...
@@ -1250,11 +1360,18 @@
...
@@ -1250,11 +1360,18 @@
return
0
;
return
0
;
}
}
//受到技能异常(眩晕、石化)
function
get_skill_inf
(
&
$pa
,
$sk
,
$times
,
$type
=
0
)
{
# 受到眩晕效果
}
//获取pa对pd的先制攻击概率,
//获取pa对pd的先制攻击概率,
// $mode 0-标准战斗 1-鏖战 2-追击(追击&鏖战基础先制率不受天气姿态影响)
// $mode 0-标准战斗 1-鏖战 2-追击(追击&鏖战基础先制率不受天气姿态影响)
function
get_active_r_rev
(
&
$pa
,
&
$pd
,
$mode
=
0
)
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
);
include
config
(
'combatcfg'
,
$gamecfg
);
if
(
!
$mode
)
if
(
!
$mode
)
{
{
...
@@ -1293,6 +1410,17 @@
...
@@ -1293,6 +1410,17 @@
$active_r
=
round
(
$active_r
*
$clbskill_ar
*
$inf_ar
);
$active_r
=
round
(
$active_r
*
$clbskill_ar
*
$inf_ar
);
# 计算先攻率上下限:
# 计算先攻率上下限:
$active_r
=
max
(
min
(
$active_r
,
96
),
4
);
$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>';
//echo 'active:'.$active_r.' <br>';
return
$active_r
;
return
$active_r
;
}
}
...
@@ -1300,9 +1428,24 @@
...
@@ -1300,9 +1428,24 @@
// 判断pd是否满足反击pa的基础条件(最高优先级)
// 判断pd是否满足反击pa的基础条件(最高优先级)
function
check_can_counter
(
&
$pa
,
&
$pd
,
$active
)
function
check_can_counter
(
&
$pa
,
&
$pd
,
$active
)
{
{
# 治疗姿态、哨戒姿态、躲避策略不能反击
# 治疗姿态、躲避策略不能反击
if
(
$pd
[
'pose'
]
==
5
||
$pd
[
'pose'
]
==
7
)
return
0
;
if
(
$pd
[
'pose'
]
==
5
||
$pd
[
'tactic'
]
==
4
)
if
(
$pd
[
'tactic'
]
==
4
)
return
0
;
{
$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
;
return
1
;
}
}
...
...
include/game/revattr_extra.func.php
View file @
efbe28ff
...
@@ -6,11 +6,76 @@
...
@@ -6,11 +6,76 @@
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/itemmain.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的特殊战斗机制都新建一个函数保存?
//Q:为什么要把每个NPC的特殊战斗机制都新建一个函数保存?
//A:也不是每个都要这么干……这个做法主要用于存在大段log、多段判定的机制,分离出来一是方便定位这个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
)
function
attr_extra_19_crimson
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
{
...
...
include/game/revbattle.func.php
View file @
efbe28ff
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
function
findenemy_rev
(
$edata
)
function
findenemy_rev
(
$edata
)
{
{
global
$db
,
$tablepre
;
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
();
$sdata
=
current_player_save
();
...
@@ -98,6 +98,39 @@
...
@@ -98,6 +98,39 @@
//检查是敌对或中立单位
//检查是敌对或中立单位
$neut_flag
=
$edata
[
'pose'
]
==
7
?
1
:
0
;
$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
);
$w1
=
substr
(
$s_wepk
,
1
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
...
...
include/game/revclubskills.func.php
0 → 100644
View file @
efbe28ff
<?php
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
}
# 新社团技能:
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
# 获得指定技能 $sk:技能名;$para:$clbpara
function
getclubskill
(
$sk
,
&
$para
=
NULL
)
{
global
$now
,
$cskills
;
if
(
!
$para
)
{
global
$clbpara
;
$para
=
&
$clbpara
;
}
if
(
isset
(
$cskills
[
$sk
])
&&
(
empty
(
$para
[
'skill'
])
||
!
in_array
(
$sk
,
$para
[
'skill'
])))
{
$para
[
'skill'
][]
=
$sk
;
# 获得指定技能时 定义预设参数(会覆盖原有参数)
if
(
!
empty
(
$cskills
[
$sk
][
'svars'
]))
{
foreach
(
$cskills
[
$sk
][
'svars'
]
as
$key
=>
$var
)
$para
[
'skillpara'
][
$sk
][
$key
]
=
$var
;
}
# 获得指定技能时 定义预设时长(会覆盖原有时长)
if
(
!
empty
(
$cskills
[
$sk
][
'slast'
]))
{
foreach
(
$cskills
[
$sk
][
'slast'
]
as
$ltkey
=>
$lt
)
{
# 定义初次获得时间戳
if
(
$ltkey
==
'lasttimes'
)
$para
[
'starttimes'
][
$sk
]
=
$now
;
# 防呆
if
(
$ltkey
==
'lasttimes'
||
$ltkey
==
'lastturns'
)
$para
[
$ltkey
][
$sk
]
=
$lt
;
}
}
}
return
;
}
# 失去指定技能 $sk:技能名;$para:$clbpara
function
lostclubskill
(
$sk
,
&
$para
=
NULL
)
{
if
(
!
$para
)
{
global
$clbpara
;
$para
=
&
$clbpara
;
}
if
(
in_array
(
$sk
,
$para
[
'skill'
]))
{
$sk_key
=
array_search
(
$sk
,
$para
[
'skill'
]);
unset
(
$para
[
'skill'
][
$sk_key
]);
# 失去指定技能时,注销对应技能参数
if
(
!
empty
(
$para
[
'skillpara'
][
$sk
]))
{
unset
(
$para
[
'skillpara'
][
$sk
]);
}
# 失去指定技能时,注销对应技能持续时间
if
(
!
empty
(
$para
[
'lasttimes'
][
$sk
]))
{
unset
(
$para
[
'lasttimes'
][
$sk
]);
unset
(
$para
[
'starttimes'
][
$sk
]);
}
# 失去指定技能时,注销对应技能持续回合
if
(
!
empty
(
$para
[
'lastturns'
][
$sk
]))
{
unset
(
$para
[
'lastturns'
][
$sk
]);
}
}
return
;
}
# 激活指定技能(技能名,额外参数)(这个做法还是太离谱,暂时废弃)
/*function actclbskills($data,$sk,$skpara=NULL)
{
global $log,$cskills;
if(isset($cskills[$sk]))
{
# 合法性检查
$flag = check_skill_unlock($sk,$data);
if($flag) return;
include_once GAME_ROOT.'./include/game/revclubskills_extra.func.php';
$sk_func = 'skill_'.$sk.'act';
if(function_exists($sk_func))
{
if(!empty($skpara))
eval("$sk_func($skpara);");
else
eval("$sk_func();");
}
}
}*/
# 升级指定技能 $sk:技能名;$nums:升级次数
function
upgclbskills
(
$sk
,
$nums
=
1
)
{
global
$log
,
$club
,
$clbpara
,
$skillpoint
,
$gamecfg
;
global
$cskills
;
# 合法性检查
$flag
=
check_can_upgclbskills
(
$sk
,
$nums
);
if
(
!
$flag
)
return
;
# 获取技能信息
$cskill
=
$cskills
[
$sk
];
# 检查技能是否存在等级
if
(
isset
(
$cskill
[
'maxlvl'
]))
{
$now_clvl
=
isset
(
$clbpara
[
'skillpara'
][
$sk
][
'lvl'
])
?
$clbpara
[
'skillpara'
][
$sk
][
'lvl'
]
:
0
;
if
(
$now_clvl
>=
$cskill
[
'maxlvl'
])
{
$log
.=
"该技能已到达等级上限!<br>"
;
return
;
}
}
# 获取技能此次升级需要消耗的技能点
$cost
=
isset
(
$now_clvl
)
?
$cskill
[
'cost'
][
$now_clvl
]
:
$cskill
[
'cost'
];
if
(
$nums
>
1
)
$cost
*=
$nums
;
if
(
$cost
>
$skillpoint
)
{
$log
.=
"技能点不足。<br>"
;
return
;
}
# 获取技能升级后文本
$clog
=
$cskill
[
'log'
];
$clog
=
str_replace
(
"[:cost:]"
,
$cost
,
$clog
);
# 检查技能升级后会触发的事件:
if
(
isset
(
$cskill
[
'events'
]))
{
foreach
(
$cskill
[
'events'
]
as
$event
)
{
$flag
=
upgclbskills_events
(
$event
);
}
# 会触发多个事件时,只要有一个事件成功触发就会继续升级流程
if
(
!
$flag
)
return
;
}
# 检查技能升级是否会直接影响属性:
if
(
isset
(
$cskill
[
'status'
]))
{
# 检查当前社团是否存在特殊效果判定
$ceffect
=
isset
(
$cskill
[
'effect'
][
$club
])
?
$cskill
[
'effect'
][
$club
]
:
$cskill
[
'effect'
][
0
];
# 遍历该技能关联属性
foreach
(
$cskill
[
'status'
]
as
$snm
)
{
# $snm为数组时,代表关联的属性是技能参数 - $clbpara['skillpara']['技能名']['参数名']
if
(
is_array
(
$snm
))
{
foreach
(
$snm
as
$skey
)
{
$clbpara
[
'skillpara'
][
$sk
][
$skey
]
+=
$ceffect
[
$skey
];
}
}
else
{
global
$$snm
;
# $ceffect为数组时,视为技能升级时会使多个属性增加不同值
if
(
is_array
(
$ceffect
))
{
$$snm
+=
$ceffect
[
$snm
]
*
$nums
;
$clog
=
str_replace
(
"[:effect:]"
.
$snm
,
$ceffect
[
$snm
]
*
$nums
,
$clog
);
}
# 否则技能所影响的属性都增加相同值
else
{
$$snm
+=
$ceffect
*
$nums
;
$clog
=
str_replace
(
"[:effect:]"
,
$ceffect
*
$nums
,
$clog
);
}
}
}
}
# 扣除技能点
$skillpoint
-=
$cost
;
$log
.=
$clog
;
# 存在复选框的技能,升级后重载技能页面
if
(
isset
(
$cskill
[
'num_input'
]))
{
global
$opendialog
;
$opendialog
=
'skillpage'
;
}
return
;
}
# 升级指定技能会触发的事件,返回0时代表无法升级技能
function
upgclbskills_events
(
$event
)
{
global
$log
;
if
(
$event
==
'heal'
)
{
# 升级治疗技能时,回复满生命、体力,并清空所有异常状态
global
$hp
,
$mhp
,
$sp
,
$msp
,
$inf
;
$heal_flag
=
0
;
if
(
!
empty
(
$inf
))
{
$inf
=
''
;
$heal_flag
=
1
;
$log
.=
"你的所有异常状态全部解除了!<br>"
;
}
if
(
$hp
<
$mhp
||
$sp
<
$msp
)
{
$hp
=
$mhp
;
$sp
=
$msp
;
$heal_flag
=
1
;
$log
.=
"你的生命与体力完全恢复了!<br>"
;
}
if
(
!
$heal_flag
)
{
$log
.=
"你不需要使用这个技能!<br>"
;
return
0
;
}
}
return
1
;
}
# 升级技能时的合法性检查
function
check_can_upgclbskills
(
$sk
,
$nums
)
{
global
$log
,
$gamecfg
;
global
$club
,
$clbpara
,
$skillpoint
;
global
$cskills
,
$cskills_blist
,
$cskills_wlist
;
if
(
$nums
<=
0
)
{
$log
.=
"输入了无效的升级指令。<br>"
;
return
0
;
}
if
(
!
in_array
(
$sk
,
$clbpara
[
'skill'
]))
{
$log
.=
"该技能不存在!<br>"
;
return
0
;
}
# 只有特定技能可以一次性升复数级
if
(
$nums
!=
1
&&
!
isset
(
$cskills
[
$sk
][
'num_input'
]))
{
$log
.=
"该技能每次只能提升1级。"
;
return
;
}
if
(
array_key_exists
(
$sk
,
$cskills_wlist
)
&&
!
in_array
(
$club
,
$cskills_wlist
[
$sk
]))
{
$log
.=
"你不能升级此技能。<br>"
;
return
0
;
}
if
(
array_key_exists
(
$sk
,
$cskills_blist
)
&&
in_array
(
$club
,
$cskills_blist
[
$sk
]))
{
$log
.=
"你不能升级此技能。<br>"
;
return
0
;
}
return
1
;
}
# 技能是否解锁,返回为0时解锁,否则返回对应的未满足条件 $sk:技能名;$data:角色数据
function
check_skill_unlock
(
$sk
,
$data
)
{
global
$cskills
;
$data
[
'clbpara'
]
=
get_clbpara
(
$data
[
'clbpara'
]);
if
(
!
in_array
(
$sk
,
$data
[
'clbpara'
][
'skill'
]))
{
return
1
;
}
if
(
!
empty
(
$cskills
[
$sk
][
'unlock'
]))
{
$unlock
=
$cskills
[
$sk
][
'unlock'
];
foreach
(
$unlock
as
$key
=>
$lock
)
{
if
(
strpos
(
$key
,
'+'
)
!==
false
)
{
$arr_key
=
explode
(
"+"
,
$key
);
foreach
(
$arr_key
as
$skey
)
{
$lock
=
str_replace
(
"[:"
.
$skey
.
":]"
,
"
\$
data['"
.
$skey
.
"']"
,
$lock
);
}
if
(
!
eval
(
"return (
$lock
);"
))
return
$key
;
}
else
{
$lock
=
str_replace
(
"[:"
.
$key
.
":]"
,
"
\$
data['"
.
$key
.
"']"
,
$lock
);
if
(
!
eval
(
"return (
$lock
);"
))
return
$key
;
}
}
}
return
0
;
}
# 技能是否可激活,返回0时为可激活,否则返回对应的未满足条件 $sk:技能名;$data:角色数据
function
check_skill_active
(
$sk
,
$data
)
{
global
$cskills
;
# 不满足激活条件输出的文本,先写在这里,之后挪到配置文件里
$cannot_active_log
=
Array
(
0
=>
'怒气不足,需要<span class="red">[:ragecost:]</span>点怒气'
,
);
# 检查技能需要消耗的怒气条件是否满足
$ragecost
=
get_skillvars
(
$sk
,
'ragecost'
);
if
(
$ragecost
&&
$data
[
'rage'
]
<
$ragecost
)
{
$clog
=
str_replace
(
'[:ragecost:]'
,
$ragecost
,
$cannot_active_log
[
0
]);
return
$clog
;
}
return
0
;
}
# 获取指定技能标签 $sk:技能名;$stag:要寻找的特定标签;(非必须)$para:$clbpara
function
get_skilltags
(
$sk
,
$stag
=
''
,
&
$para
=
NULL
)
{
global
$cskills
;
$cskill
=
$cskills
[
$sk
];
if
(
isset
(
$cskill
[
'tags'
]))
{
if
(
!
empty
(
$stag
))
{
if
(
in_array
(
$stag
,
$cskill
[
'tags'
]))
return
1
;
return
0
;
}
else
{
return
$cskill
[
'tags'
];
}
}
return
0
;
}
# 获取指定技能静态参数 $sk:技能名;$vars:要寻找的静态参数名;$sklvl:当前技能等级
function
get_skillvars
(
$sk
,
$vars
,
$sklvl
=
NULL
)
{
global
$cskills
;
if
(
isset
(
$cskills
[
$sk
][
'vars'
][
$vars
]))
{
$sk_var
=
$cskills
[
$sk
][
'vars'
][
$vars
];
if
(
is_array
(
$sk_var
)
&&
isset
(
$sklvl
))
$sk_var
=
$sk_var
[
$sklvl
];
return
$sk_var
;
}
return
0
;
}
# 获取保存在clbpara内的指定技能参数 $sk:技能名;$skpara:指定技能参数;$data:角色数据
function
get_skillpara
(
$sk
,
$skpara
,
$data
)
{
if
(
isset
(
$data
[
'clbpara'
][
'skillpara'
][
$sk
][
$skpara
]))
return
$data
[
'clbpara'
][
'skillpara'
][
$sk
][
$skpara
];
return
0
;
}
# 获取指定技能等级
function
get_skilllvl
(
$sk
,
$data
)
{
$sk_lvl
=
isset
(
$data
[
'clbpara'
][
'skillpara'
][
$sk
][
'lvl'
])
?
$data
[
'clbpara'
][
'skillpara'
][
$sk
][
'lvl'
]
:
0
;
return
$sk_lvl
;
}
# 格式化指定技能描述文本 $shortdesc:不显示等级、标签描述
function
parse_skilldesc
(
$sk
,
$data
,
$shortdesc
=
0
)
{
global
$cskills
;
# 初始化技能描述
$cskill
=
$cskills
[
$sk
];
$sk_desc
=
$shortdesc
&&
isset
(
$cskill
[
'bdesc'
])
?
$cskill
[
'bdesc'
]
:
$cskill
[
'desc'
];
# 技能存在标签时
if
(
isset
(
$cskill
[
'tags'
])
&&
!
$shortdesc
)
{
$tag_desc
=
''
;
foreach
(
$cskill
[
'tags'
]
as
$sk_tag
)
{
if
(
$sk_tag
==
'battle'
)
$tag_desc
.=
'<span tooltip="可以在战斗中主动使用" class="gold">【战斗技】</span>'
;
if
(
$sk_tag
==
'active'
)
$tag_desc
.=
'<span tooltip="不能在追击/鏖战状态下使用" class="gold">【先制】</span>'
;
if
(
$sk_tag
==
'passive'
)
$tag_desc
.=
'<span tooltip="满足条件时自动触发" class="gold">【被动技】</span>'
;
}
if
(
!
empty
(
$tag_desc
))
$tag_desc
.=
' '
;
}
# 技能存在等级时
if
(
isset
(
$cskill
[
'maxlvl'
]))
{
$max_lvl_flag
=
0
;
$now_clvl
=
get_skilllvl
(
$sk
,
$data
);
if
(
$now_clvl
>=
$cskill
[
'maxlvl'
])
{
$max_lvl_flag
=
1
;
if
(
!
$shortdesc
)
$lvl_desc
=
"<span class='lime'>当前级别
{
$now_clvl
}
/
{
$cskill
[
'maxlvl'
]
}
</span> <br>"
;
}
else
{
if
(
!
$shortdesc
)
$lvl_desc
=
"<span class='lime'>当前级别
{
$now_clvl
}
/
{
$cskill
[
'maxlvl'
]
}
</span> 消耗<span class='lime'>[:cost:]</span>点技能点升至下一级<br>"
;
}
}
# 格式化技能描述前缀
if
(
!
$shortdesc
&&
isset
(
$lvl_desc
))
$sk_desc
=
$lvl_desc
.
$sk_desc
;
if
(
!
$shortdesc
&&
isset
(
$tag_desc
))
$sk_desc
=
$tag_desc
.
$sk_desc
;
# 技能存在升级消耗时
if
(
isset
(
$cskill
[
'cost'
]))
{
$cost
=
isset
(
$now_clvl
)
?
$cskill
[
'cost'
][
$now_clvl
]
:
$cskill
[
'cost'
];
# 替换描述文本内的技能点消耗值
$sk_desc
=
str_replace
(
"[:cost:]"
,
$cost
,
$sk_desc
);
}
# 技能存在其他静态参数时
if
(
isset
(
$cskill
[
'vars'
]))
{
foreach
(
$cskill
[
'vars'
]
as
$key
=>
$var
)
{
# 静态参数是数组的情况下 选用当前等级对应的参数
if
(
is_array
(
$var
))
$var
=
$var
[
$now_clvl
];
# 替换描述文本
$sk_desc
=
str_replace
(
"[:"
.
$key
.
":]"
,
$var
,
$sk_desc
);
}
}
# 如果输入了玩家数据,则可以根据数据判定技能关联,否则关联默认属性
if
(
isset
(
$cskill
[
'status'
]))
{
# 检查技能升级是否会直接影响属性:
$ceffect
=
!
empty
(
$data
)
&&
isset
(
$cskill
[
'effect'
][
$data
[
'club'
]])
?
$cskill
[
'effect'
][
$data
[
'club'
]]
:
$cskill
[
'effect'
][
0
];
# 遍历技能关联属性,替换介绍文本内的数值
foreach
(
$cskill
[
'status'
]
as
$snm
)
{
if
(
!
is_array
(
$snm
))
{
# $ceffect为数组时,视为技能升级时会使多个属性增加不同值
if
(
is_array
(
$ceffect
))
{
$sk_desc
=
str_replace
(
"[:effect:]"
.
$snm
,
$ceffect
[
$snm
],
$sk_desc
);
}
# 否则技能所影响的属性都增加相同值
else
{
$sk_desc
=
str_replace
(
"[:effect:]"
,
$ceffect
,
$sk_desc
);
}
}
}
}
return
$sk_desc
;
}
?>
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 @@
...
@@ -85,7 +85,7 @@
if
(
$active
)
$pa
[
'action'
]
=
'chase'
.
$pd
[
'pid'
];
if
(
$active
)
$pa
[
'action'
]
=
'chase'
.
$pd
[
'pid'
];
else
$pd
[
'action'
]
=
'pchase'
.
$pa
[
'pid'
];
else
$pd
[
'action'
]
=
'pchase'
.
$pa
[
'pid'
];
$chase_flag
=
1
;
$chase_flag
=
1
;
$log
.=
"<span class='red'>但是
{
$pa
[
'nm'
]
}
紧
紧跟在
{
$pd
[
'nm'
]
}
身后
!</span><br>"
;
$log
.=
"<span class='red'>但是
{
$pa
[
'nm'
]
}
紧
追着
{
$pd
[
'nm'
]
}
不放
!</span><br>"
;
}
}
else
else
{
{
...
@@ -144,6 +144,13 @@
...
@@ -144,6 +144,13 @@
$main
=
'battle_rev'
;
$main
=
'battle_rev'
;
}
}
# 如果传入了主动技参数,在这里登记
if
(
strpos
(
$wep_kind
,
'bskill_'
)
===
0
)
{
$bskill
=
substr
(
$wep_kind
,
7
);
$pa
[
'bskill'
]
=
$bskill
;
}
# 初始化双方的真实攻击方式wep_kind,传入了攻击方式/主动技的情况下,在这里判断传入参数的合法性。
# 初始化双方的真实攻击方式wep_kind,传入了攻击方式/主动技的情况下,在这里判断传入参数的合法性。
get_wep_kind
(
$pa
,
$wep_kind
);
get_wep_kind
(
$pa
,
$wep_kind
);
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
...
@@ -314,7 +321,8 @@
...
@@ -314,7 +321,8 @@
elseif
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
)
elseif
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
)
{
{
$pd
[
'cannot_counter'
]
=
1
;
$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)在反击过程中未造成伤害就暴毙,可能是因为触发了武器直死。
# 存在暴毙标识:反击方(pd)在反击过程中未造成伤害就暴毙,可能是因为触发了武器直死。
...
@@ -358,12 +366,14 @@
...
@@ -358,12 +366,14 @@
if
(
$active
)
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>"
;
$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'
];
if
(
isset
(
$pd
[
'lvlup_log'
]))
$w_log
.=
$pd
[
'lvlup_log'
];
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
}
else
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>"
;
$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'
];
if
(
isset
(
$pa
[
'lvlup_log'
]))
$w_log
.=
$pa
[
'lvlup_log'
];
logsave
(
$pa
[
'pid'
],
$now
,
$w_log
,
'c'
);
logsave
(
$pa
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
}
...
@@ -496,6 +506,9 @@
...
@@ -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'
]);
$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'
]);
$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)在进攻前因为某种缘故受到伤害、甚至暴毙(直死、DOT结算等) 。判断是否继续进攻流程;
# 如果需要登记特殊的死法,请给死者(比如pa)赋一个$pa['gg_flag'] = '死法编号'; 这样在后续的流程里会自动判定特殊死亡事件,如果没有登记特殊死法,会按照正常的战死流程登记;
# 如果需要登记特殊的死法,请给死者(比如pa)赋一个$pa['gg_flag'] = '死法编号'; 这样在后续的流程里会自动判定特殊死亡事件,如果没有登记特殊死法,会按照正常的战死流程登记;
...
@@ -505,15 +518,9 @@
...
@@ -505,15 +518,9 @@
$flag
=
hitrate_prepare_events
(
$pa
,
$pd
,
$active
);
$flag
=
hitrate_prepare_events
(
$pa
,
$pd
,
$active
);
if
(
$flag
<
0
)
return
$flag
;
if
(
$flag
<
0
)
return
$flag
;
# 获取真实熟练度 保存在$pa['wep_skill']内。TODO:将熟练度计算汇总到一个函数内
# 获取pa真实熟练度 保存在$pa['wep_skill']内
if
(
$pa
[
'club'
]
==
18
)
$pa
[
'wep_skill'
]
=
get_wep_skill
(
$pa
);
{
$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'
]]];
}
# 应用技抽效果
# 应用技抽效果
if
(
isset
(
$pa
[
'skdr_flag'
])
||
isset
(
$pd
[
'skdr_flag'
]))
if
(
isset
(
$pa
[
'skdr_flag'
])
||
isset
(
$pd
[
'skdr_flag'
]))
{
{
...
@@ -656,7 +663,9 @@
...
@@ -656,7 +663,9 @@
//防守方(pd)受到伤害后的事件(防具耐久下降、受伤)
//防守方(pd)受到伤害后的事件(防具耐久下降、受伤)
get_hurt_events
(
$pa
,
$pd
,
$active
);
get_hurt_events
(
$pa
,
$pd
,
$active
);
//经验结算
//经验结算
exprgup_rev
(
$pa
,
$pd
,
$active
);
expup_rev
(
$pa
,
$pd
,
$active
);
//怒气结算
rgup_rev
(
$pa
,
$pd
,
$active
);
}
}
else
else
{
{
...
@@ -872,7 +881,7 @@
...
@@ -872,7 +881,7 @@
$revival_flag
=
99
;
//保存复活标记为通过称号复活
$revival_flag
=
99
;
//保存复活标记为通过称号复活
addnews
(
$now
,
'revival'
,
$dname
);
addnews
(
$now
,
'revival'
,
$dname
);
$pd
[
'hp'
]
=
$pd
[
'mhp'
];
$pd
[
'sp'
]
=
$pd
[
'msp'
];
$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>'
;
$log
.=
'<span class="yellow">但是,由于及时按下BOMB键,'
.
$pd
[
'nm'
]
.
'原地满血复活了!</span><br>'
;
return
$revival_flag
;
return
$revival_flag
;
}
}
...
@@ -946,8 +955,28 @@
...
@@ -946,8 +955,28 @@
return
;
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
;
global
$log
,
$baseexp
;
$expup
=
round
(
(
$pd
[
'lvl'
]
-
$pa
[
'lvl'
])
/
3
);
$expup
=
round
(
(
$pd
[
'lvl'
]
-
$pa
[
'lvl'
])
/
3
);
...
@@ -962,9 +991,6 @@
...
@@ -962,9 +991,6 @@
{
{
lvlup_rev
(
$pa
,
$pd
,
$active
);
lvlup_rev
(
$pa
,
$pd
,
$active
);
}
}
//大的打小的怒气反而涨的快 什么逻辑?狂扁小朋友喔?
$rgup
=
round
((
$pa
[
'lvl'
]
-
$pd
[
'lvl'
])
/
3
);
$pa
[
'rage'
]
+=
$rgup
>
0
?
$rgup
:
1
;
return
;
return
;
}
}
...
@@ -1139,8 +1165,9 @@
...
@@ -1139,8 +1165,9 @@
$pa
[
'itm'
.
$c
]
=
$pa
[
'wep'
];
$pa
[
'itmk'
.
$c
]
=
$pa
[
'wepk'
];
$pa
[
'itmsk'
.
$c
]
=
$pa
[
'wepsk'
];
$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
[
'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'
]
=
$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_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>"
;
$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) {
...
@@ -633,6 +633,8 @@ function discover($schmode = 0) {
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
//获取并保存当前玩家数据
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
$sdata
=
current_player_save
();
//刷新敌人时效性状态
if
(
!
empty
(
$edata
[
'clbpara'
][
'lasttimes'
]))
check_skilllasttimes
(
$edata
);
//计算先攻概率
//计算先攻概率
$active_r
=
get_active_r_rev
(
$sdata
,
$edata
);
$active_r
=
get_active_r_rev
(
$sdata
,
$edata
);
$bid
=
$edata
[
'pid'
];
$bid
=
$edata
[
'pid'
];
...
...
include/game20130526.js
View file @
efbe28ff
...
@@ -41,6 +41,7 @@ function demiSecTimer(){
...
@@ -41,6 +41,7 @@ function demiSecTimer(){
var
dsec
=
Math
.
floor
((
ms
%
1000
)
/
100
);
var
dsec
=
Math
.
floor
((
ms
%
1000
)
/
100
);
$
(
'
timer
'
).
innerHTML
=
sec
+
'
.
'
+
dsec
;
$
(
'
timer
'
).
innerHTML
=
sec
+
'
.
'
+
dsec
;
}
else
{
}
else
{
ms
=
0
;
clearInterval
(
timerid
);
clearInterval
(
timerid
);
delete
timerid
;
delete
timerid
;
}
}
...
@@ -295,6 +296,11 @@ function showData(sdata){
...
@@ -295,6 +296,11 @@ function showData(sdata){
{
{
$
(
'
dialogue
'
).
showModal
();
$
(
'
dialogue
'
).
showModal
();
}
}
if
(
$
(
'
open-dialog
'
))
{
dialogid
=
$
(
'
open-dialog
'
).
innerHTML
;
showModalDialog
(
$
(
dialogid
));
}
}
}
var
refchat
=
null
;
var
refchat
=
null
;
...
@@ -415,4 +421,40 @@ function changePages(nowpage,nextpage)
...
@@ -415,4 +421,40 @@ function changePages(nowpage,nextpage)
$
(
pp
).
style
.
display
=
"
block
"
;
$
(
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) {
...
@@ -124,6 +124,11 @@ function config($file = '', $cfg = 1) {
return
$cfgfile
;
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
)
{
function
dir_clear
(
$dir
)
{
$directory
=
dir
(
$dir
);
$directory
=
dir
(
$dir
);
while
(
$entry
=
$directory
->
read
())
{
while
(
$entry
=
$directory
->
read
())
{
...
@@ -388,6 +393,7 @@ function getchat($last,$team='',$limit=0) {
...
@@ -388,6 +393,7 @@ function getchat($last,$team='',$limit=0) {
//if(!$chatdata['lastcid']){$chatdata['lastcid'] = $chat['cid'];}
//if(!$chatdata['lastcid']){$chatdata['lastcid'] = $chat['cid'];}
if
(
$chatdata
[
'lastcid'
]
<
$chat
[
'cid'
]){
$chatdata
[
'lastcid'
]
=
$chat
[
'cid'
];}
if
(
$chatdata
[
'lastcid'
]
<
$chat
[
'cid'
]){
$chatdata
[
'lastcid'
]
=
$chat
[
'cid'
];}
$chat
[
'msg'
]
=
htmlspecialchars
(
$chat
[
'msg'
]);
$chat
[
'msg'
]
=
htmlspecialchars
(
$chat
[
'msg'
]);
$chat
[
'msg'
]
=
preg_replace
(
'/\[(\w+)\]/'
,
"<img src='img/emoticons/$1.png'>"
,
$chat
[
'msg'
]);
if
(
$chat
[
'type'
]
==
'0'
)
{
if
(
$chat
[
'type'
]
==
'0'
)
{
$msg
=
"【
{
$chatinfo
[
$chat
[
'type'
]]
}
】
{
$chat
[
'send'
]
}
:
{
$chat
[
'msg'
]
}
"
.
date
(
"\(H:i:s\)"
,
$chat
[
'time'
])
.
'<br>'
;
$msg
=
"【
{
$chatinfo
[
$chat
[
'type'
]]
}
】
{
$chat
[
'send'
]
}
:
{
$chat
[
'msg'
]
}
"
.
date
(
"\(H:i:s\)"
,
$chat
[
'time'
])
.
'<br>'
;
}
elseif
(
$chat
[
'type'
]
==
'1'
)
{
}
elseif
(
$chat
[
'type'
]
==
'1'
)
{
...
@@ -406,7 +412,7 @@ function getchat($last,$team='',$limit=0) {
...
@@ -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
=
"<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
;
$chatdata
[
'msg'
][
$chat
[
'cid'
]]
=
$msg
;
}
}
return
$chatdata
;
return
$chatdata
;
...
@@ -649,7 +655,7 @@ function get_itmsk_array($sk_value)
...
@@ -649,7 +655,7 @@ function get_itmsk_array($sk_value)
}
}
//还原itmsk为字符串 $max_length:字符串长度上限
//还原itmsk为字符串 $max_length:字符串长度上限
function
get_itmsk_strlen
(
$sk_value
,
$max_length
=
5
)
function
get_itmsk_strlen
(
$sk_value
,
$max_length
=
30
)
{
{
global
$itemspkinfo
;
global
$itemspkinfo
;
$ret
=
''
;
$sk_count
=
0
;
$ret
=
''
;
$sk_count
=
0
;
...
...
register.php
View file @
efbe28ff
...
@@ -45,7 +45,7 @@ if(!isset($cmd)){
...
@@ -45,7 +45,7 @@ if(!isset($cmd)){
$ustate
=
'check'
;
$ustate
=
'check'
;
gsetcookie
(
'user'
,
$username
);
gsetcookie
(
'user'
,
$username
);
gsetcookie
(
'pass'
,
$password
);
gsetcookie
(
'pass'
,
$password
);
gsetcookie
(
'volume'
,
20
,
86400
*
30
,
0
);
gsetcookie
(
'volume'
,
0.2
,
86400
*
30
,
0
);
}
else
{
}
else
{
$gamedata
[
'innerHTML'
][
'info'
]
=
$_ERROR
[
'db_failure'
];
$gamedata
[
'innerHTML'
][
'info'
]
=
$_ERROR
[
'db_failure'
];
$gamedata
[
'innerHTML'
][
'info'
]
.=
ob_get_contents
();
$gamedata
[
'innerHTML'
][
'info'
]
.=
ob_get_contents
();
...
...
templates/default/admin_gameinfomng.htm
View file @
efbe28ff
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
<td>
$gstate[$gamestate]
</td>
<td>
$gstate[$gamestate]
</td>
<td>
<td>
<!--{if $gamestate == 0}-->
<!--{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}-->
<!--{elseif $gamestate == 10}-->
<input
type=
"submit"
value=
"开始游戏"
onclick=
"$('command').value='gsedit_20'"
><br>
<input
type=
"submit"
value=
"开始游戏"
onclick=
"$('command').value='gsedit_20'"
><br>
<input
type=
"submit"
value=
"结束游戏"
onclick=
"$('command').value='gsedit_0'"
>
<input
type=
"submit"
value=
"结束游戏"
onclick=
"$('command').value='gsedit_0'"
>
...
...
templates/default/battlecmd_rev.htm
View file @
efbe28ff
...
@@ -2,24 +2,55 @@
...
@@ -2,24 +2,55 @@
向对手大喊:
<br><input
size=
"30"
type=
"text"
name=
"message"
maxlength=
"60"
><br><br>
向对手大喊:
<br><input
size=
"30"
type=
"text"
name=
"message"
maxlength=
"60"
><br><br>
<input
type=
"hidden"
name=
"mode"
value=
"revcombat"
>
<input
type=
"hidden"
name=
"mode"
value=
"revcombat"
>
<input
type=
"hidden"
id=
"command"
name=
"command"
value=
"back"
>
<input
type=
"hidden"
id=
"command"
name=
"command"
value=
"back"
>
<!--{if $neut_flag}-->
<div
id=
"enemy"
>
<div
id=
"neut"
>
<table
cellSpacing=
0
cellPadding=
0
width=
300px
style=
"table-layout:fixed;"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"showModalDialog($('attack_warning'));this.disabled=true;"
><br>
<!-- 第1行:常规攻击方式 -->
</div>
<tr>
<!--{else}-->
<!-- 第一攻击方式 -->
<div
id=
"enemy"
>
<td
width=
100px
align=
"center"
style=
"vertical-align:top"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"
>
<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}-->
<!--{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;"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:95"
value=
"切换
"
onclick=
"$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{/if}-->
<!--{/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>
<br>
<!--{if $w2}-->
<div
style=
"width:90%; text-align:center;"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
>
<span>
{$skar[2]}
</span>
<br>
<!--{/if}-->
</div>
</div>
<!--{/if}-->
</td>
<br><input
type=
"button"
class=
"cmdbutton"
name=
"back"
value=
"逃跑"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{if ($key == count($battle_skills)-1 || (!(($key+1)%3) && $key!=0))}-->
</tr>
<!--{/if}-->
<!--{/loop}-->
<!--{/if}-->
<!-- 空行 -->
<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%;"
>
<dialog
id=
"attack_warning"
style=
"max-width: 50%;max-height: 50%;"
>
<center>
<center>
...
...
templates/default/command.htm
View file @
efbe28ff
...
@@ -94,3 +94,7 @@
...
@@ -94,3 +94,7 @@
<!--{if isset($gamevars['apis'])}-->
<!--{if isset($gamevars['apis'])}-->
{template sp_console_search}
{template sp_console_search}
<!--{/if}-->
<!--{/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 @@
...
@@ -186,7 +186,7 @@
<TD
class=
b3
>
<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}-->
<!--{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>
<!--{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>
<TD
class=
b3
><span>
$wepsk_words
</span></TD>
<TD
class=
b3
><span>
$wepsk_words
</span></TD>
<TD
class=
b3
><span>
$wepe
</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%;"
>
<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)}-->
<!--{if !isset($bgmname)}-->
<!--{eval $nowbgmid = isset($_COOKIE["nowbgmid"]) ? filter_var($_COOKIE["nowbgmid"],FILTER_VALIDATE_INT) : 0; $bgmname = $bgmlist[$nowbgmid]['name'];}-->
<!--{eval $nowbgmid = isset($_COOKIE["nowbgmid"]) ? filter_var($_COOKIE["nowbgmid"],FILTER_VALIDATE_INT) : 0; $bgmname = $bgmlist[$nowbgmid]['name'];}-->
<!--{/if}-->
<!--{/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();}-->
<!--{eval $mapdata = init_mapdata();}-->
$mapdata
$mapdata
</div>
<!-- 控制菜单 -->
<!-- 控制菜单 -->
<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
;"
>
<div
style=
"width: 120px; float: right; margin-left: 5px
;"
>
<!-- 音乐控制指令 -->
<!-- 音乐控制指令 -->
<tr
align=
"center"
>
<table
border=
"1"
cellspacing=
"0"
cellpadding=
"0"
style=
"position:relative;"
>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
"b1"
align=
center
>
播放控制
</TD>
<tr>
<TD
colspan=
"2"
class=
"b1"
style=
"width: 120px; height: 24px;"
>
播放控制
</TD>
</tr>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
td
colspan=
"2"
>
<td
td
colspan=
"2"
>
<span
class=
"eicon"
onclick=
"changeBGM(-1);"
>
⏮️
</span>
<span
class=
"eicon"
onclick=
"changeBGM(-1);"
>
⏮️
</span>
<span
class=
"eicon"
onclick=
"$('gamebgm').play();"
>
▶️
</span>
<span
class=
"eicon"
onclick=
"$('gamebgm').play();"
>
▶️
</span>
...
@@ -21,31 +28,40 @@
...
@@ -21,31 +28,40 @@
<span
class=
"eicon"
onclick=
"changeBGM();"
>
⏭️
</span>
<span
class=
"eicon"
onclick=
"changeBGM();"
>
⏭️
</span>
</td>
</td>
</tr>
</tr>
<!-- <tr width="84" height="12" style="border: none;"></tr> -->
<tr
height=
"24"
>
<tr>
<TD
colspan=
"2"
class=
b1
>
音量调节
</TD>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
音量调节
</TD>
</tr>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
<span
class=
"eicon"
onmousedown=
"changeVolume(-0.05);"
>
⏬
</span>
<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
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>
<span
class=
"eicon"
onmousedown=
"changeVolume(0.05);"
>
⏫
</span>
</td>
</td>
</tr>
</tr>
</table>
<!-- 战场控制指令 -->
<!-- 战场控制指令 -->
<!--{if isset($clbpara['console'])}-->
<!--{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>
<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>
<tr
width=
"84"
height=
"28"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
<span
class=
"<!--{if $gamevars['api'] == 0}-->red<!--{else}-->lime<!--{/if}-->"
>
$gamevars['api']/$gamevars['apis']
</span>
<span
class=
"<!--{if $gamevars['api'] == 0}-->red<!--{else}-->lime<!--{/if}-->"
>
$gamevars['api']/$gamevars['apis']
</span>
</td>
</td>
</tr>
</tr>
<tr>
<tr
height=
"24"
>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
天气控制
</TD>
<TD
colspan=
"2"
class=
b1
>
天气控制
</TD>
</tr>
</tr>
<tr
width=
"84"
height=
"30"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
colspan=
"2"
>
<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');"
>
<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}-->
<!--{loop $wthinfo $n $wth}-->
...
@@ -54,10 +70,10 @@
...
@@ -54,10 +70,10 @@
</select>
</select>
</td>
</td>
</tr>
</tr>
<tr>
<tr
height=
"24"
>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
数据控制
</TD>
<TD
colspan=
"2"
class=
b1
>
数据控制
</TD>
</tr>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
width=
"42"
>
<td
width=
"42"
>
<input
type=
"button"
value=
"数据检索"
onclick=
"closeDialog($('terminal'));showModalDialog($('consle_search'));"
>
<input
type=
"button"
value=
"数据检索"
onclick=
"closeDialog($('terminal'));showModalDialog($('consle_search'));"
>
</td>
</td>
...
@@ -65,10 +81,10 @@
...
@@ -65,10 +81,10 @@
<input
type=
"button"
value=
"生命探测"
onclick=
"closeDialog($('terminal'));$('command').value='consle_radar';postCmd('gamecmd','command.php');this.disabled=true;"
>
<input
type=
"button"
value=
"生命探测"
onclick=
"closeDialog($('terminal'));$('command').value='consle_radar';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
</td>
</tr>
</tr>
<tr>
<tr
height=
"24"
>
<TD
colspan=
"2"
width=
"84"
height=
"24"
class=
b1
align=
center
>
禁区控制
</TD>
<TD
colspan=
"2"
class=
b1
>
禁区控制
</TD>
</tr>
</tr>
<tr
width=
"84"
height=
"36"
class=
"map
"
>
<tr
class=
"map"
height=
"32
"
>
<td
width=
"42"
>
<td
width=
"42"
>
<input
type=
"button"
value=
"增设禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl1';postCmd('gamecmd','command.php');this.disabled=true;"
>
<input
type=
"button"
value=
"增设禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl1';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
</td>
...
@@ -76,7 +92,7 @@
...
@@ -76,7 +92,7 @@
<input
type=
"button"
value=
"解除禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl0';postCmd('gamecmd','command.php');this.disabled=true;"
>
<input
type=
"button"
value=
"解除禁区"
onclick=
"closeDialog($('terminal'));$('command').value='consle_areactrl0';postCmd('gamecmd','command.php');this.disabled=true;"
>
</td>
</td>
</tr>
</tr>
<tr
width=
"84"
height=
"84"
class=
"map"
>
<tr
class=
"map"
>
<td
colspan=
"2"
>
<td
colspan=
"2"
>
<!--{if !isset($clbpara['nobutton'])}-->
<!--{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>
<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 @@
...
@@ -85,13 +101,19 @@
<!--{/if}-->
<!--{/if}-->
</td>
</td>
</tr>
</tr>
<!--{else}-->
</table>
<!--</div>
<div class="skill_unacquired_hint">
<table class="skilltable">
<tr width="84" height="318" rowspan="7" class="lockmap">
<tr width="84" height="318" rowspan="7" class="lockmap">
<TD
colspan=
"2"
width=
"72"
height=
"300"
align=
center
class=
"blurtext"
></TD
>
<td colspan="2" width="72" height="300" class="blurtext"></td
>
</tr>
</tr>
<!--{/if}-->
</table>
</table>
</center>
</div>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('terminal'))"
>
</div>-->
<!--{/if}-->
</div>
</div>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('terminal'))"
>
</dialog>
</dialog>
valid.php
View file @
efbe28ff
...
@@ -59,8 +59,8 @@ if($mode == 'enter') {
...
@@ -59,8 +59,8 @@ if($mode == 'enter') {
$exp
=
$areanum
*
20
;
$exp
=
$areanum
*
20
;
$money
=
20
;
$money
=
20
;
$rage
=
0
;
$rage
=
0
;
$pose
=
0
;
$pose
=
3
;
$tactic
=
0
;
$tactic
=
2
;
$icon
=
$icon
?
$icon
:
rand
(
1
,
$iconlimit
);
$icon
=
$icon
?
$icon
:
rand
(
1
,
$iconlimit
);
$club
=
0
;
$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