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
c148ee16
Commit
c148ee16
authored
Feb 24, 2023
by
Nemo Ma
Committed by
GitHub
Feb 24, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39 from hikawiier/waaagh
Update & Fix
parents
8ffc5c02
7a937915
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
374 additions
and
167 deletions
+374
-167
command.php
command.php
+29
-17
game.php
game.php
+10
-0
gamedata/cache/combatcfg_1.php
gamedata/cache/combatcfg_1.php
+13
-3
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+1
-14
include/admin/gamecheck.php
include/admin/gamecheck.php
+2
-2
include/game.func.php
include/game.func.php
+24
-9
include/game/dice.func.php
include/game/dice.func.php
+6
-1
include/game/elementmix.func.php
include/game/elementmix.func.php
+7
-1
include/game/itemplace.func.php
include/game/itemplace.func.php
+10
-7
include/game/revattr.func.php
include/game/revattr.func.php
+81
-1
include/game/revbattle.func.php
include/game/revbattle.func.php
+86
-15
include/game/revcombat.func.php
include/game/revcombat.func.php
+48
-35
include/game/search.func.php
include/game/search.func.php
+12
-7
include/game20130526.js
include/game20130526.js
+26
-26
register.php
register.php
+1
-0
templates/default/game.htm
templates/default/game.htm
+3
-1
templates/default/help.htm
templates/default/help.htm
+0
-14
templates/default/sp_terminal.htm
templates/default/sp_terminal.htm
+4
-4
templates/default/templates.lang.php
templates/default/templates.lang.php
+1
-1
templates/default/useradvdata.htm
templates/default/useradvdata.htm
+2
-1
templates/default/vn_records.htm
templates/default/vn_records.htm
+5
-5
user.php
user.php
+3
-2
valid.php
valid.php
+0
-1
No files found.
command.php
View file @
c148ee16
...
...
@@ -12,6 +12,8 @@ include config('dialogue',$gamecfg);
//判断是否进入游戏
if
(
!
$cuser
||!
$cpass
)
{
gexit
(
$_ERROR
[
'no_login'
],
__file__
,
__line__
);
}
unset
(
$pdata
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE name = '
$cuser
' AND type = 0"
);
if
(
!
$db
->
num_rows
(
$result
))
{
header
(
"Location: valid.php"
);
exit
();
}
...
...
@@ -94,7 +96,12 @@ if($hp > 0){
$nowmtime
=
floor
(
getmicrotime
()
*
1000
);
$rmcdtime
=
$nowmtime
>=
$cdover
?
0
:
$cdover
-
$nowmtime
;
}
//执行动作前,身上存在追击标记时,直接进入追击判定
if
(
strpos
(
$action
,
'chase'
)
!==
false
&&
$mode
!==
'revcombat'
)
{
$command
=
'chase'
;
goto
chase_flag
;
}
//执行动作前检查是否有无法跳过且未阅览过的对话框
if
(
isset
(
$clbpara
[
'noskip_dialogue'
])
&&
strpos
(
$command
,
'end_dialogue'
)
===
false
)
{
...
...
@@ -104,7 +111,7 @@ if($hp > 0){
$mode
=
'command'
;
}
else
{
//进入指令判断
if
(
$mode
!==
'combat'
&&
$mode
!==
'revcombat'
&&
$mode
!==
'corpse'
&&
strpos
(
$action
,
'pacorpse'
)
===
false
&&
$mode
!==
'senditem'
){
if
(
strpos
(
$action
,
'chase'
)
===
false
&&
$mode
!==
'combat'
&&
$mode
!==
'revcombat'
&&
$mode
!==
'corpse'
&&
strpos
(
$action
,
'pacorpse'
)
===
false
&&
$mode
!==
'senditem'
){
$action
=
''
;
}
if
(
$command
==
'menu'
)
{
...
...
@@ -431,11 +438,11 @@ if($hp > 0){
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
combat
(
1
,
$command
);
}
elseif
(
$mode
==
'revcombat'
){
if
(
strpos
(
$action
,
'enemy'
)
===
0
)
{
$enemyid
=
str_replace
(
'enemy'
,
''
,
$action
);
}
if
(
!
$enemyid
||
(
strpos
(
$action
,
'enemy'
)
===
false
)
)
chase_flag
:
$enemyid
=
NULL
;
if
(
strpos
(
$action
,
'enemy'
)
===
0
)
$enemyid
=
str_replace
(
'enemy'
,
''
,
$action
);
if
(
strpos
(
$action
,
'chase'
)
===
0
)
$enemyid
=
str_replace
(
'chase'
,
''
,
$action
);
if
(
!
$enemyid
)
{
$log
.=
"<span class=
\"
yellow b
\"
>你没有遇到敌人,或已经离开战场!</span>
{
$enemyid
}
<br>"
;
goto
back_flag
;
...
...
@@ -445,19 +452,24 @@ if($hp > 0){
$log
.=
"对方不存在!<br>"
;
goto
back_flag
;
}
$edata
=
$db
->
fetch_array
(
$result
);
if
(
$edata
[
'pls'
]
!=
$pls
)
{
$log
.=
"<span class=
\"
yellow b
\"
>"
.
$edata
[
'name'
]
.
"</span>已经离开了<span class=
\"
yellow b
\"
>
$plsinfo[$pls]
</span>。<br>"
;
goto
back_flag
;
}
else
if
(
$edata
[
'hp'
]
<=
0
)
if
(
$edata
[
'hp'
]
<=
0
)
{
$log
.=
"<span class=
\"
red b
\"
>"
.
$edata
[
'name'
]
.
"</span>已经死亡,不能被攻击。<br>"
;
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
$action
=
'corpse'
.
$edata
[
'pid'
];
findcorpse
(
$edata
);
}
elseif
(
$command
==
'chase'
)
{
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
}
elseif
(
$command
==
'back'
)
{
$log
.=
"你逃跑了。"
;
...
...
game.php
View file @
c148ee16
...
...
@@ -105,6 +105,16 @@ if((strpos($action,'corpse')===0 || strpos($action,'pacorpse')===0) && $gamestat
}
}
}
elseif
((
strpos
(
$action
,
'chase'
)
!==
false
)){
$enemyid
=
str_replace
(
'chase'
,
''
,
$action
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$enemyid
' AND hp>0 AND pls='
$pls
'"
);
if
(
$db
->
num_rows
(
$result
)
>
0
){
$edata
=
$db
->
fetch_array
(
$result
);
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
$main
=
'battle_rev'
;
}
}
elseif
((
strpos
(
$action
,
'neut'
)
===
0
)){
$nid
=
str_replace
(
'neut'
,
''
,
$action
);
if
(
$nid
){
...
...
gamedata/cache/combatcfg_1.php
View file @
c148ee16
<?php
//基础反击率
$counter_obbs
=
Array
(
'N'
=>
60
,
'P'
=>
65
,
'K'
=>
65
,
'G'
=>
50
,
'C'
=>
35
,
'D'
=>
0
,
'F'
=>
35
,
'J'
=>
2
0
);
$counter_obbs
=
Array
(
'N'
=>
75
,
'P'
=>
85
,
'K'
=>
85
,
'G'
=>
50
,
'C'
=>
75
,
'D'
=>
0
,
'F'
=>
95
,
'J'
=>
5
0
);
//各种攻击方式的射程,射程大者可以反击射程小者,此外射程为0则代表不能反击任何系但也不能被任何系反击
$rangeinfo
=
Array
(
'N'
=>
3
,
'P'
=>
3
,
'K'
=>
3
,
'G'
=>
7
,
'C'
=>
5
,
'D'
=>
0
,
'F'
=>
1
,
'J'
=>
8
);
//各种攻击方式的基础命中率
...
...
@@ -36,15 +36,21 @@ $weather_find_r = Array(10,20,0,-2,-3,-10,-7,5,-10,-20,0,-7,-5,-30,-5,-20,0,20);
//天气对先制率的影响
$weather_active_r
=
Array
(
10
,
20
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
-
7
,
-
10
,
-
10
,
-
5
,
0
,
-
5
,
-
20
,
-
5
,
0
,
20
);
//'通常','作战姿态','强袭姿态','探物姿态','偷袭姿态','治疗姿态','✧狂飙姿态✧','哨戒姿态'
//姿态对攻击力的影响始终生效(1:只在作出先制攻击时生效)
$pose_attack_active
=
0
;
//姿态对攻击力的影响(单位:百分比加算)
$pose_attack_modifier
=
Array
(
0
,
100
,
0
,
-
25
,
25
,
-
50
,
50
);
$pose_attack_modifier
=
Array
(
0
,
100
,
0
,
-
25
,
25
,
-
50
,
50
,
-
777
);
//姿态对防御力的影响始终生效(1:只在受到先制攻击伤害时生效)
$pose_defend_active
=
0
;
//姿态对防御力的影响(单位:百分比加算)
$pose_defend_modifier
=
Array
(
0
,
25
,
0
,
-
25
,
-
50
,
-
50
,
-
466
);
$pose_defend_modifier
=
Array
(
0
,
25
,
0
,
-
25
,
-
50
,
-
50
,
-
466
,
777
);
//姿态对先制率的影响(单位:百分比加算)(计算方式:进攻方姿态先制率-防守方姿态先制率)
$pose_active_modifier
=
Array
(
0
,
0
,
50
,
0
,
25
,
-
25
,
5
,
-
100
);
//姿态对反击率的影响(单位:百分比加算)
$pose_counter_modifier
=
Array
(
0
,
0
,
0
,
0
,
0
,
-
100
,
0
,
-
100
);
//'通常','','重视防御','重视反击','重视躲避'
//应战策略对攻击力的影响始终生效(1:只在作出反击时生效)
$tactic_attack_active
=
0
;
//应战策略对攻击力的加成(单位:百分比加算)
...
...
@@ -53,6 +59,10 @@ $tactic_attack_modifier = Array(0,20,-25,25,-50);
$tactic_defend_active
=
0
;
//应战策略对防御力的加成(单位:百分比加算)
$tactic_defend_modifier
=
Array
(
0
,
-
20
,
50
,
-
25
,
0
);
//应战策略对先制率的影响(单位:百分比加算)
$tactic_active_modifier
=
Array
(
0
,
0
,
0
,
0
,
0
);
//应战策略对反击率的影响(单位:百分比加算)
$tactic_counter_modifier
=
Array
(
0
,
0
,
30
,
0
,
0
);
//场景对攻击力的加成(单位:百分比加算) wtf
$pls_attack_modifier
=
Array
(
...
...
gamedata/cache/style_20190718.css
View file @
c148ee16
...
...
@@ -369,20 +369,7 @@ span[tooltip] {
span
[
tooltip
]
:hover:before
{
content
:
attr
(
tooltip
);
padding
:
5px
;
font
:
bold
10pt
"微软雅黑"
serif
;
color
:
white
;
white-space
:
pre-line
;
text-shadow
:
3px
3px
3px
#3b3535
;
text-align
:
center
;
text-fill-color
:
white
;
-webkit-text-fill-color
:
white
;
background-size
:
0
;
background-clip
:
border-box
;
background-color
:
rgba
(
198
,
114
,
199
,
0.8
);
border-radius
:
4px
;
z-index
:
50
;
transform
:
translate
(
-5px
,
20px
);
width
:
160px
;
max-width
:
160px
;
position
:
fixed
;
}
span
[
tooltip2
]
{
position
:
relative
;
}
span
[
tooltip2
]
:hover:before
{
content
:
attr
(
tooltip2
);
padding
:
5px
;
overflow
:
visible
;
font
:
bold
10pt
"微软雅黑"
serif
;
color
:
white
;
white-space
:
pre-line
;
text-shadow
:
3px
3px
3px
#3b3535
;
text-align
:
center
;
text-fill-color
:
white
;
-webkit-text-fill-color
:
white
;
...
...
include/admin/gamecheck.php
View file @
c148ee16
...
...
@@ -52,9 +52,9 @@ if(!$db->num_rows($result)) $db->query("ALTER TABLE {$tablepre}winners ADD mss s
$result
=
$db
->
query
(
"DESCRIBE
{
$tablepre
}
winners skillpoint"
);
if
(
!
$db
->
num_rows
(
$result
))
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners ADD skillpoint smallint unsigned NOT NULL default '0' AFTER nick"
);
//user表
新增字段
//user表
结构变动
$result
=
$db
->
query
(
"DESCRIBE
{
$tablepre
}
users volume"
);
if
(
!
$db
->
num_rows
(
$result
))
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
users ADD volume smallint(3) unsigned NOT NULL default '20' AFTER nicks
"
);
if
(
$db
->
num_rows
(
$result
))
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
users DROP volume
"
);
//game表结构变动
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
game DROP gamevars"
);
...
...
include/game.func.php
View file @
c148ee16
...
...
@@ -422,8 +422,6 @@ function init_bgm($force_update=0)
global
$pls
,
$command
,
$clbpara
,
$gamecfg
;
include
config
(
'audio'
,
$gamecfg
);
//$clbpara = get_clbpara($clbpara);
# 初始化
$event_flag
=
0
;
$bgmname
=
$bgmlink
=
$bgmtype
=
$bgmplayer
=
$bgmnums
=
''
;
...
...
@@ -484,8 +482,8 @@ function init_bgm($force_update=0)
$bgmlink
=
$bgmarr
[
0
][
'url'
];
$bgmtype
=
$bgmarr
[
0
][
'type'
];
#初始化默认音量
$volume
=
isset
(
$
clbpara
[
'volume'
])
?
$clbpara
[
'volume'
]
:
$default_volume
;
$volume_r
=
round
(
$
volume
/
100
,
2
);
$volume
=
isset
(
$
_COOKIE
[
"volume"
])
?
filter_var
(
$_COOKIE
[
"volume"
],
FILTER_VALIDATE_FLOAT
)
*
100
:
$default_volume
;
$volume_r
=
isset
(
$volume
)
?
round
(
$volume
/
100
,
2
)
:
round
(
$default_
volume
/
100
,
2
);
# 生成播放器与播放队列 太野蛮了……嘻嘻……
if
(
!
empty
(
$bgmlink
)
&&
!
empty
(
$bgmtype
))
{
...
...
@@ -571,18 +569,34 @@ function get_remaincdtime($pid){
}
}
//用于将当前玩家数据保存至数据库
function
current_player_save
(){
//通过pid抓取指定玩家/NPC数据
function
fetch_playerdata_by_pid
(
$pid
)
{
global
$db
,
$tablepre
;
$pdata
=
Array
();
$result
=
$db
->
query
(
"SELECT pid FROM
{
$tablepre
}
players WHERE pid = '
$pid
'"
);
if
(
!
$db
->
num_rows
(
$result
))
return
NULL
;
$pdata
=
$db
->
fetch_array
(
$result
);
if
(
!
empty
(
$pdata
[
'clbpara'
]))
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
return
$pdata
;
}
//用于读取当前玩家数据的数组结构(不进行过滤)
function
current_player_load
(){
$data
=
update_db_player_structure
();
foreach
(
$data
as
$key
)
{
global
$$key
;
$
p
data
[
$key
]
=
$$key
;
$data
[
$key
]
=
$$key
;
}
return
$data
;
}
//用于将当前玩家数据保存至数据库(会进行过滤)
function
current_player_save
(){
global
$db
,
$tablepre
;
$pdata
=
current_player_load
();
$pdata
=
player_format_with_db_structure
(
$pdata
);
$pid
=
$pdata
[
'pid'
];
$db
->
array_update
(
"
{
$tablepre
}
players"
,
$pdata
,
"pid='
$pid
'"
);
if
(
!
empty
(
$pdata
[
'clbpara'
]))
$pdata
[
'clbpara'
]
=
get_clbpara
(
$pdata
[
'clbpara'
]);
return
$pdata
;
}
//用于将指定player数据存回数据库
...
...
@@ -597,7 +611,7 @@ function player_save($data){
}
return
;
}
//用于刷新当前玩家数据
//用于刷新当前玩家数据
(待修改)
function
player_load
(
$data
)
{
$ndata
=
player_format_with_db_structure
(
$data
);
...
...
@@ -605,6 +619,7 @@ function player_load($data)
{
global
$$key
;
$$key
=
$value
;
if
(
$key
==
'clbpara'
&&
!
empty
(
$$key
))
$$key
=
get_clbpara
(
$$key
);
}
return
;
}
...
...
include/game/dice.func.php
View file @
c148ee16
...
...
@@ -16,7 +16,12 @@ function diceroll($dice){
global
$rp
,
$nick
;
global
$log
;
global
$nikstatusa
,
$nikstatuse
;
if
(
version_compare
(
PHP_VERSION
,
'7.0.0'
,
'<'
)){
$result
=
rand
(
0
,
$dice
);
}
else
{
//强壮随机数!
$result
=
random_int
(
0
,
$dice
);
}
//process 孤注一掷
if
(
$nikstatusa
==
1
){
...
...
include/game/elementmix.func.php
View file @
c148ee16
...
...
@@ -174,11 +174,17 @@
//把道具打散成元素 改下传入的参数其实也可以拆装备
function
split_item_to_elements
(
$iid
=
NULL
)
{
global
$club
,
$log
,
$rp
,
$mode
,
$name
;
if
(
$club
!=
20
)
{
$log
.=
"你的手突然掐住了你的头左右摇摆!<br><span class='yellow'>“你还想要干什么,啊?你还想要干什么!!”</span><br>看来你的手和脑子之间起了一点小摩擦。<br><br>"
;
$mode
=
'command'
;
return
;
}
$i_arr
=
Array
();
if
(
isset
(
$iid
))
{
global
$elements_info
,
$itmk_to_e_list
;
global
$log
,
$rp
,
$mode
;
global
$
{
'itm'
.
$iid
},
$
{
'itmk'
.
$iid
},
$
{
'itme'
.
$iid
},
$
{
'itms'
.
$iid
},
$
{
'itmsk'
.
$iid
};
if
(
!
$
{
'itms'
.
$iid
})
{
...
...
include/game/itemplace.func.php
View file @
c148ee16
...
...
@@ -199,6 +199,8 @@ function get_item_place($which)
break
;
}
}
if
(
file_exists
(
config
(
'vnmixitem'
,
$gamecfg
)))
{
include
config
(
'vnmixitem'
,
$gamecfg
);
foreach
(
$vn_mixinfo
as
$vlst
)
{
...
...
@@ -212,6 +214,7 @@ function get_item_place($which)
break
;
}
}
}
$file
=
config
(
'synitem'
,
$gamecfg
);
$synlist
=
openfile
(
$file
);
foreach
(
$synlist
as
$lst
)
...
...
include/game/revattr.func.php
View file @
c148ee16
...
...
@@ -43,6 +43,31 @@
return
;
}
//获取武器射程
function
get_wep_range
(
&
$pa
)
{
global
$rangeinfo
;
$range
=
isset
(
$rangeinfo
[
$pa
[
'wep_kind'
]])
?
$rangeinfo
[
$pa
[
'wep_kind'
]]
:
-
1
;
return
$range
;
}
//获取战斗轮次:仅供追击/鏖战机制使用
function
get_battle_turns
(
&
$pa
,
&
$pd
,
$active
)
{
$turns
=
$pa
[
'clbpara'
][
'battle_turns'
]
==
$pd
[
'clbpara'
][
'battle_turns'
]
?
$pa
[
'clbpara'
][
'battle_turns'
]
:
max
(
$pa
[
'clbpara'
][
'battle_turns'
],
$pd
[
'clbpara'
][
'battle_turns'
]);
return
$turns
;
}
//计算战场距离:仅供追击/鏖战机制使用
function
get_battle_range
(
&
$pa
,
&
$pd
,
$active
)
{
//战场距离 = (双方射程差值 - 战斗回合数) * 10
$range
=
abs
(
$pa
[
'wep_range'
]
-
$pd
[
'wep_range'
]);
$turns
=
get_battle_turns
(
$pa
,
$pd
,
$active
);
$range
=
max
(
0
,
$range
-
$turns
);
return
$range
;
}
//获取防具上的属性
//如果你想设计一个在战斗中能临时获得属性的机制,请在这两个函数执行完毕后,把属性加入返回的结果内。除非你希望技能的机制优先级高于三抽的判定。
function
get_equip_ex_array
(
&
$pa
)
...
...
@@ -684,6 +709,10 @@
$log_sp_cost
=
round
(
$sp_cost
);
$log
.=
"消耗
{
$log_sp_cost
}
点体力,"
;
}
else
{
$sp_cost
=
0
;
}
//获取威力系数:NPC固定为50%
$factor
=
$pa
[
'type'
]
?
0.5
:
0.5
+
round
((
$sp_cost
/
$sp_cost_max
)
/
2
,
1
);
//获取伤害变化倍率并扣除体力
...
...
@@ -1135,7 +1164,7 @@
}
//攻击方(pa)在造成伤害后触发的事件
function
attack_finish_events
(
$pa
,
$pd
,
$active
)
function
attack_finish_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
...
...
@@ -1237,4 +1266,55 @@
return
0
;
}
//判断pd是否满足反击pa的基础条件(姿态)
function
check_can_counter
(
&
$pa
,
&
$pd
,
$active
)
{
# 治疗姿态、哨戒姿态、躲避策略不能反击
if
(
$pd
[
'pose'
]
==
5
||
$pd
[
'pose'
]
==
7
)
return
0
;
if
(
$pd
[
'tactic'
]
==
4
)
return
0
;
return
1
;
}
//判断pa是否处于pd的反击射程内
function
check_in_counter_range
(
&
$pa
,
&
$pd
,
$active
)
{
if
(
$pd
[
'wep_range'
]
>=
$pa
[
'wep_range'
]
&&
$pa
[
'wep_range'
]
!=
0
)
return
1
;
return
0
;
}
//获取pd成功对pa发起反击的概率
function
get_counter_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$counter_obbs
,
$inf_counter_p
,
$pose_counter_modifier
,
$tactic_counter_modifier
;
# 获取攻击方式的基础反击率:
$counter
=
$counter_obbs
[
$pd
[
'wep_kind'
]];
# 获取姿态、策略对反击率的修正:
$counter
+=
$pose_counter_modifier
[
$pd
[
'pose'
]];
$counter
+=
$tactic_counter_modifier
[
$pd
[
'tactic'
]];
# 计算双方射程差对反击率的影响:(高射程武器受低射程武器攻击时,反击率下降(双方射程差x10)%,最低不会低于8%)
if
(
$pd
[
'wep_range'
]
>
$pa
[
'wep_range'
]
&&
$counter
>
8
)
{
$counter
=
$counter
-
((
$pd
[
'wep_range'
]
-
$pa
[
'wep_range'
])
*
10
);
$counter
=
max
(
8
,
$counter
);
}
# 获取社团技能对反击率的修正
$counter
*=
rev_get_clubskill_bonus_counter
(
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
,
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
);
# 获取异常状态对反击率的影响
if
(
!
empty
(
$pd
[
'inf'
]))
{
foreach
(
$inf_counter_p
as
$inf_ky
=>
$value
)
{
if
(
strpos
(
$pd
[
'inf'
],
$inf_ky
)
!==
false
)
$counter
*=
$value
;
}
}
//echo "{$pd['nm']}对{$pa['nm']}的反击率是{$counter}%<br>";
return
$counter
;
}
?>
\ No newline at end of file
include/game/revbattle.func.php
View file @
c148ee16
...
...
@@ -4,20 +4,53 @@
exit
(
'Access Denied'
);
}
//获取pa对pd的先制攻击概率
function
get_active_r_rev
(
&
$pa
,
&
$pd
)
{
global
$active_obbs
,
$weather
,
$gamecfg
;
include
config
(
'combatcfg'
,
$gamecfg
);
# 获取基础先攻率:
$active_r
=
$active_obbs
;
# 计算天气对先攻率的修正:
$wth_ar
=
$weather_active_r
[
$weather
]
?:
0
;
# 计算pa姿态对于先攻率的修正:
$a_pose_ar
=
$pose_active_modifier
[
$pa
[
'pose'
]]
?:
0
;
# 计算pd姿态对于先攻率的修正:
$d_pose_ar
=
$pose_active_modifier
[
$pd
[
'pose'
]]
?:
0
;
# 基础汇总:
$active_r
+=
$wth_ar
+
$a_pose_ar
-
$d_pose_ar
;
# 计算pa身上的异常状态对先攻率的修正:(pd身上的异常状态不会影响pa的先制率,这个机制以后考虑改掉)
$inf_ar
=
1
;
if
(
!
empty
(
$pa
[
'inf'
]))
{
foreach
(
$inf_active_p
as
$inf_ky
=>
$value
)
{
if
(
strpos
(
$pa
[
'inf'
],
$inf_ky
)
!==
false
){
$inf_ar
*=
$value
;}
}
}
# 计算社团技能对于先攻率的修正:
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
$clbskill_ar
=
1
;
$clbskill_ar
*=
get_clubskill_bonus_active
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pd
[
'club'
],
$pd
[
'skills'
]);
# 修正汇总:
$active_r
=
round
(
$active_r
*
$clbskill_ar
*
$inf_ar
);
# 计算先攻率上下限:
$active_r
=
max
(
min
(
$active_r
,
96
),
4
);
//echo 'active:'.$active_r.' <br>';
return
$active_r
;
}
//发现敌人
function
findenemy_rev
(
$edata
)
{
global
$db
,
$tablepre
;
global
$fog
,
$pid
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
;
$battle_title
=
'发现敌人'
;
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
//格式化双方clbpara
$sdata
[
'clbpara'
]
=
get_clbpara
(
$sdata
[
'clbpara'
]);
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
//格式化对战双方数据
$init_data
=
update_db_player_structure
();
foreach
(
Array
(
'w_'
,
's_'
)
as
$p
)
...
...
@@ -25,19 +58,14 @@
foreach
(
$init_data
as
$i
)
global
$
{
$p
.
$i
};
}
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
init_rev_battle
();
//初始化界面与log
$battle_title
=
init_battle_title
(
$sdata
,
$edata
);
$log
.=
init_battle_log
(
$sdata
,
$edata
);
if
(
strpos
(
$sdata
[
'action'
],
'chase'
)
!==
false
)
init_rev_battle
(
1
);
else
init_rev_battle
();
//检查是敌对或中立单位
if
(
$edata
[
'pose'
]
==
7
)
{
$log
.=
"你发现了<span class=
\"
lime
\"
>
{
$w_name
}
</span>!<br>对方看起来对你没有敌意。<br>"
;
$neut_flag
=
1
;
}
else
{
$log
.=
"你发现敌人了<span class=
\"
red
\"
>
{
$w_name
}
</span>!<br>对方好像完全没有注意到你!<br>"
;
$neut_flag
=
0
;
}
$neut_flag
=
$edata
[
'pose'
]
==
7
?
1
:
0
;
//初始化玩家攻击方式信息
$w1
=
substr
(
$s_wepk
,
1
,
1
);
...
...
@@ -109,4 +137,47 @@
$main
=
'battle_rev'
;
return
;
}
// 初始化战斗界面标题
function
init_battle_title
(
$pa
,
$pd
)
{
if
(
strpos
(
$pa
[
'action'
],
'chase'
)
!==
false
)
{
if
(
strpos
(
$pa
[
'action'
],
'pchase'
)
!==
false
)
$title
=
'陷入鏖战'
;
else
$title
=
'乘胜追击'
;
}
else
{
$title
=
'发现敌人'
;
}
return
$title
;
}
// 初始化战斗界面log
function
init_battle_log
(
$pa
,
$pd
)
{
if
(
strpos
(
$pa
[
'action'
],
'chase'
)
!==
false
)
{
if
(
strpos
(
$pa
[
'action'
],
'pchase'
)
!==
false
)
{
$battle_log
=
"但是<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>在你身后紧追不舍!<br>"
;
}
else
{
$battle_log
=
"你再度锁定了<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>!<br>"
;
}
}
else
{
if
(
$pd
[
'pose'
]
==
7
)
{
$battle_log
=
"你发现了<span class=
\"
lime
\"
>
{
$pd
[
'name'
]
}
</span>!<br>对方看起来对你没有敌意。<br>"
;
}
else
{
$battle_log
=
"你发现敌人了<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>!<br>对方好像完全没有注意到你!<br>"
;
}
}
return
$battle_log
;
}
?>
\ No newline at end of file
include/game/revcombat.func.php
View file @
c148ee16
...
...
@@ -132,16 +132,16 @@
}
# 反击流程判断:$att_result>0,且敌人非治疗姿态或重视躲藏才会触发反击。 TODO:为反击条件新建一个函数
if
(
(
$pd
[
'hp'
]
>
0
)
&&
(
$pd
[
'pose'
]
!=
5
)
&&
(
$pd
[
'tactic'
]
!=
4
)
&&
$att_result
>
0
)
if
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
&&
check_can_counter
(
$pa
,
$pd
,
$active
)
)
{
global
$rangeinfo
;
# 通过武器射程判断是否满足反击条件。 TODO:为武器射程判断新建一个函数
if
(
$rangeinfo
[
$pa
[
'wep_kind'
]]
<=
$rangeinfo
[
$pd
[
'wep_kind'
]]
&&
$rangeinfo
[
$pa
[
'wep_kind'
]]
!==
0
)
# 反击者是NPC时,进行换装判断
if
(
$pd
[
'type'
])
npc_changewep_rev
(
$pd
,
$pa
,
$active
);
# 初始化pa、pd射程:
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
$pd
[
'wep_range'
]
=
get_wep_range
(
$pd
);
if
(
check_in_counter_range
(
$pa
,
$pd
,
$active
))
{
# 计算基础反击率
$counter
=
get_counter
(
$pd
[
'wep_kind'
],
$pd
[
'tactic'
],
$pd
[
'club'
],
$pd
[
'inf'
]);
# 计算社团技能对基础反击率的修正
$counter
*=
rev_get_clubskill_bonus_counter
(
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
,
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
);
# 计算反击率
$counter
=
get_counter_rev
(
$pa
,
$pd
,
$active
);
# 掷骰
$counter_dice
=
diceroll
(
99
);
if
(
$counter_dice
<
$counter
)
...
...
@@ -155,13 +155,15 @@
}
else
{
$pd
[
'cannot_counter'
]
=
1
;
$log
.=
npc_chat_rev
(
$pd
,
$pa
,
'escape'
);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
处于无法反击的状态
,逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
没能抓住机会反击
,逃跑了!</span><br>"
;
}
}
# 不满足射程
else
{
$pd
[
'cannot_counter'
]
=
1
;
$log
.=
npc_chat_rev
(
$pd
,
$pa
,
'cannot'
);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
攻击范围不足,不能反击,逃跑了!</span><br>"
;
}
...
...
@@ -169,9 +171,16 @@
# 不满足基础反击条件
elseif
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
)
{
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
没有反击,转身逃开了!</span><br>"
;
$pd
[
'cannot_counter'
]
=
1
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
转身逃开了!</span><br>"
;
}
# pd为NPC,且不满足反击条件时,判断pa是否进行追击
/*if(isset($pd['cannot_counter']) && (($pd['type']&&!$pa['type'])||($pa['type']&&!$pd['type'])))
{
$pa['action'] = 'chase'.$pd['pid'];
}*/
# 存在暴毙标识:反击方(pd)在反击过程中未造成伤害就暴毙,可能是因为触发了武器直死。
if
(
isset
(
$pd
[
'gg_flag'
]))
{
...
...
@@ -245,14 +254,6 @@
}
}
# 主视角不是玩家,可能是玩家召唤的NPC帮手。将身上的印记传给玩家。
if
(
!
$pa
[
'type'
]
&&
$active
)
{
//主视角-pa是NPC的情况下,把身上的标记传递给玩家
global
$action
;
$action
=
$pa
[
'action'
];
}
# 保存双方状态
if
(
$active
)
{
...
...
@@ -269,6 +270,8 @@
# 刷新玩家状态
if
(
!
$sdata
[
'type'
])
player_load
(
$sdata
);
# 主视角不是玩家,可能是玩家召唤的NPC帮手。将身上的印记传给玩家。
elseif
(
$sdata
[
'type'
]
&&
$active
)
$action
=
$sdata
[
'action'
];
# 刷新界面显示 蛋疼度+233
$init_data
=
update_db_player_structure
();
...
...
@@ -283,11 +286,16 @@
# 根据玩家身上的标记($action) 判断接下来要跳转的页面
if
(
substr
(
$action
,
0
,
6
)
==
'corpse'
)
{
// 发现尸体
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
findcorpse
(
$edata
);
}
else
{
// 转入追击状态
if
(
strpos
(
$action
,
'chase'
)
!==
false
)
$chase_flag
=
1
;
// 否则脱离战斗状态 清空标记
else
$action
=
''
;
include
template
(
'battleresult'
);
$cmd
=
ob_get_contents
();
ob_clean
();
...
...
@@ -672,7 +680,7 @@
//发送news
$kname
=
$pa
[
'type'
]
?
$pa
[
'name'
]
:
get_title_desc
(
$pa
[
'nick'
])
.
' '
.
$pa
[
'name'
];
$dname
=
$pd
[
'type'
]
?
$pd
[
'name'
]
:
get_title_desc
(
$pd
[
'nick'
])
.
' '
.
$pd
[
'name'
];
//
$dname = $pd['type'] ? $pd['name'] : get_title_desc($pd['nick']).' '.$pd['name'];
addnews
(
$now
,
'death'
.
$pd
[
'state'
],
$dname
,
$dtype
,
$kname
,
$pa
[
'wep_name'
],
$lastword
);
return
$lastword
;
...
...
@@ -818,7 +826,7 @@
{
$sklanginfo
=
Array
(
'wp'
=>
'殴熟'
,
'wk'
=>
'斩熟'
,
'wg'
=>
'射熟'
,
'wc'
=>
'投熟'
,
'wd'
=>
'爆熟'
,
'wf'
=>
'灵熟'
,
'all'
=>
'全系熟练度'
);
$sknlist
=
Array
(
1
=>
'wp'
,
2
=>
'wk'
,
3
=>
'wc'
,
4
=>
'wg'
,
5
=>
'wd'
,
9
=>
'wf'
,
16
=>
'all'
);
$skname
=
$sknlist
[
$pa
[
'club'
]]
;
$skname
=
isset
(
$sknlist
[
$pa
[
'club'
]])
?
$sknlist
[
$pa
[
'club'
]]
:
0
;
//升级判断
$lvup
=
1
+
floor
((
$pa
[
'exp'
]
-
$up_exp_temp
)
/
$baseexp
/
2
);
$lvup
=
$lvup
>
255
-
$pa
[
'lvl'
]
?
255
-
$pa
[
'lvl'
]
:
$lvup
;
...
...
@@ -864,6 +872,8 @@
$pa
[
'att'
]
+=
$lvupatt
;
$pa
[
'def'
]
+=
$lvupdef
;
$pa
[
'skillpoint'
]
+=
$lvup
;
if
(
!
empty
(
$skname
))
{
if
(
$skname
==
'all'
)
{
$pa
[
'wp'
]
+=
$lvupskill
;
$pa
[
'wk'
]
+=
$lvupskill
;
...
...
@@ -874,12 +884,15 @@
}
elseif
(
$skname
)
{
$pa
[
$skname
]
+=
$lvupskill
;
}
}
$pa
[
'sp'
]
=
min
(
$lvupspref
+
$pa
[
'sp'
],
$pa
[
'msp'
]);
if
(
$skname
)
{
$sklog
=
",
{
$sklanginfo
[
$skname
]
}
+
{
$lvupskill
}
"
;
}
$lvlup_log
=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
升了
{
$lvup
}
级!生命上限+
{
$lvuphp
}
,体力上限+
{
$lvupsp
}
,攻击+
{
$lvupatt
}
,防御+
{
$lvupdef
}{
$sklog
}
,体力恢复了
{
$lvupspref
}
,获得了
{
$lvup
}
点技能点!</span><br>"
;
$lvlup_log
=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
升了
{
$lvup
}
级!生命上限+
{
$lvuphp
}
,体力上限+
{
$lvupsp
}
,攻击+
{
$lvupatt
}
,防御+
{
$lvupdef
}
"
;
if
(
isset
(
$sklog
))
$lvlup_log
.=
$sklog
;
$lvlup_log
.=
",体力恢复了
{
$lvupspref
}
,获得了
{
$lvup
}
点技能点!</span><br>"
;
if
(
!
$pa
[
'type'
])
{
if
(
$pa
[
'nm'
]
==
'你'
)
$log
.=
$lvlup_log
;
...
...
@@ -995,10 +1008,10 @@
switch
(
$mode
)
{
case
'attack'
:
if
(
!
isset
(
$pa
[
'first_meet
'
]))
if
(
empty
(
$pa
[
'itmsk0
'
]))
{
$npcwords
.=
"
{
$nchat
[
0
]
}
"
;
$pa
[
'
first_meet
'
]
=
1
;
$pa
[
'
itmsk0
'
]
=
1
;
}
elseif
(
$pa
[
'hp'
]
>
(
$pa
[
'mhp'
]
/
2
))
{
...
...
@@ -1012,10 +1025,10 @@
}
break
;
case
'defend'
:
if
(
!
isset
(
$pa
[
'first_meet'
]))
if
(
empty
(
$pa
[
'itmsk0'
]))
{
$npcwords
.=
"
{
$nchat
[
0
]
}
"
;
$pa
[
'
first_meet
'
]
=
1
;
$pa
[
'
itmsk0
'
]
=
1
;
}
elseif
(
$pa
[
'hp'
]
>
(
$pa
[
'mhp'
]
/
2
))
{
...
...
include/game/search.func.php
View file @
c148ee16
...
...
@@ -623,19 +623,24 @@ function discover($schmode = 0) {
else
{
battle_flag
:
$active_r
=
get_active_r
(
$weather
,
$pls
,
$pose
,
$tactic
,
$club
,
$inf
,
$edata
[
'pose'
]);
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
$active_r
*=
get_clubskill_bonus_active
(
$club
,
$skills
,
$edata
[
'club'
],
$edata
[
'skills'
]);
if
(
$active_r
>
96
)
$active_r
=
96
;
//$active_r = get_active_r($weather,$pls,$pose,$tactic,$club,$inf,$edata['pose']);
//include_once GAME_ROOT.'./include/game/clubskills.func.php';
//$active_r *= get_clubskill_bonus_active($club,$skills,$edata['club'],$edata['skills']);
//if ($active_r>96) $active_r=96;
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
//计算先攻概率
$active_r
=
get_active_r_rev
(
$sdata
,
$edata
);
$bid
=
$edata
[
'pid'
];
$active_dice
=
rand
(
0
,
99
);
$active_dice
=
diceroll
(
99
);
//先制
if
(
$active_dice
<
$active_r
)
{
$action
=
'enemy'
.
$edata
[
'pid'
];
#include_once GAME_ROOT.'./include/game/battle.func.php';
#findenemy($edata);
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
return
;
}
...
...
@@ -652,7 +657,7 @@ function discover($schmode = 0) {
#include_once GAME_ROOT.'./include/game/combat.func.php';
#combat(0);
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$edata
,
NULL
,
0
);
rev_combat_prepare
(
$edata
,
$sdata
,
0
);
return
;
}
}
...
...
include/game20130526.js
View file @
c148ee16
...
...
@@ -224,16 +224,26 @@ function sl(id) {
// alive = alivedata.parseJSON();
// $('alivelist').innerHTML = alive;
//}
var
lastRun
=
0
;
var
delay
=
50
;
function
postCmd
(
formName
,
sendto
){
var
oXmlHttp
=
zXmlHttp
.
createRequest
();
var
sBody
=
getRequestBody
(
document
.
forms
[
formName
]);
oXmlHttp
.
open
(
"
post
"
,
sendto
,
true
);
oXmlHttp
.
setRequestHeader
(
"
Content-Type
"
,
"
application/x-www-form-urlencoded
"
);
const
now
=
Date
.
now
();
if
(
lastRun
&&
now
-
lastRun
<
delay
)
{
//console.log('上次响应时间:' + lastRun + ' ' + delay + '毫秒内无法重复执行。' + '当前时间刻:' + now);
return
;
}
lastRun
=
now
;
//console.log('执行了一次指令,当前时间:' + now);
oXmlHttp
.
onreadystatechange
=
function
()
{
if
(
oXmlHttp
.
readyState
==
4
)
{
if
(
oXmlHttp
.
status
==
200
)
{
if
(
oXmlHttp
.
responseText
!=
''
)
{
showData
(
oXmlHttp
.
responseText
);
}
}
else
{
showNotice
(
oXmlHttp
.
statusText
);
}
...
...
@@ -281,10 +291,6 @@ function showData(sdata){
{
window
.
location
.
reload
();
}
if
(
$
(
'
nowbgm
'
))
{
getBgmVolume
();
}
if
(
$
(
'
dialogue
'
))
{
$
(
'
dialogue
'
).
showModal
();
...
...
@@ -368,24 +374,25 @@ function getEmitmeR(type=0) {
}
}
function
upVolume
(){
var
v
=
$
(
'
gamebgm
'
).
volume
;
$
(
'
gamebgm
'
).
volume
=
Math
.
min
(
1
,
v
+
0.05
);
$
(
'
gamebgm
'
).
volume
=
$
(
'
gamebgm
'
).
volume
.
toFixed
(
2
);
}
function
downVolume
(){
var
v
=
$
(
'
gamebgm
'
).
volume
;
$
(
'
gamebgm
'
).
volume
=
Math
.
max
(
0
,
v
-
0.05
);
$
(
'
gamebgm
'
).
volume
=
$
(
'
gamebgm
'
).
volume
.
toFixed
(
2
);
}
function
showVolume
(){
function
changeVolume
(
cv
){
var
v
=
$
(
'
gamebgm
'
).
volume
;
v
=
v
+
cv
;
v
=
Math
.
min
(
1
,
v
);
v
=
Math
.
max
(
0
,
v
);
v
=
v
.
toFixed
(
2
);
Cookie
.
setCookie
(
"
volume
"
,
v
,
{
expireHours
:
24
*
30
,
path
:
"
/
"
,
});
s
=
Math
.
round
(
v
*
100
);
$
(
'
gamebgm
'
).
volume
=
v
;
$
(
'
volume_num
'
).
innerHTML
=
s
+
'
%
'
;
}
function
showBGMname
(){
var
nowid
=
$
(
'
nowbgm
'
).
innerHTML
;
var
bname
=
'
bnm
'
+
nowid
;
$
(
'
bgmname
'
).
innerHTML
=
$
(
bname
).
innerHTML
;
}
//查了下才发现可以用parseJSON()……但是这样不也挺好吗^ ^
function
changeBGM
(
mode
=
1
){
x
=
Math
.
floor
(
$
(
'
nowbgm
'
).
innerHTML
)
+
Math
.
floor
(
mode
);
...
...
@@ -404,13 +411,6 @@ function changeBGM(mode=1){
$
(
'
gamebgm
'
).
play
();
}
function
getBgmVolume
(){
var
nowid
=
$
(
'
nowbgm
'
).
innerHTML
;
var
bname
=
'
bnm
'
+
nowid
;
$
(
'
bgmname
'
).
innerHTML
=
$
(
bname
).
innerHTML
;
$
(
'
volume_num
'
).
innerHTML
=
$
(
'
gamebgm
'
).
volume
*
100
+
'
%
'
;
}
function
changePages
(
nowpage
,
nextpage
)
{
var
np
=
'
d
'
+
nowpage
;
...
...
register.php
View file @
c148ee16
...
...
@@ -45,6 +45,7 @@ if(!isset($cmd)){
$ustate
=
'check'
;
gsetcookie
(
'user'
,
$username
);
gsetcookie
(
'pass'
,
$password
);
gsetcookie
(
'volume'
,
20
,
86400
*
30
,
0
);
}
else
{
$gamedata
[
'innerHTML'
][
'info'
]
=
$_ERROR
[
'db_failure'
];
$gamedata
[
'innerHTML'
][
'info'
]
.=
ob_get_contents
();
...
...
templates/default/game.htm
View file @
c148ee16
...
...
@@ -11,6 +11,8 @@
<div
id=
"main"
>
<!--{if $main=='battle'}-->
{template battle}
<!--{elseif $main=='battle_rev'}-->
{template battle_rev}
<!--{else}-->
{template profile}
<!--{/if}-->
...
...
@@ -31,7 +33,7 @@
</td>
</tr>
<tr>
<td
valign=
"top"
class=
"b3"
height=
"540"
style=
"text-align: left;overflow:
auto;overflow-x:hidden
;"
>
<td
valign=
"top"
class=
"b3"
height=
"540"
style=
"text-align: left;overflow:
visible;overflow-x:visible
;"
>
<div
id=
"log"
>
$log
</div>
<div>
<form
method=
"post"
id=
"gamecmd"
name=
"gamecmd"
style=
"margin: 0px"
>
...
...
templates/default/help.htm
View file @
c148ee16
...
...
@@ -3329,20 +3329,6 @@ insert into acbra2_game (gamenum) values (0);
</div>
<a
href=
"https://bbs.brdts.online/?forum-2.htm"
>
更新履历
</a><br>
<script>
// 你杀了我吧
// 获取所有带有'span[tooltip]'样式的元素
var
tooltipElements
=
document
.
querySelectorAll
(
'
span[tooltip]
'
);
// 循环迭代每个元素
for
(
var
i
=
0
;
i
<
tooltipElements
.
length
;
i
++
)
{
var
tooltipElement
=
tooltipElements
[
i
];
// 将样式更改为'span[tooltip2]'
tooltipElement
.
setAttribute
(
'
tooltip2
'
,
tooltipElement
.
getAttribute
(
'
tooltip
'
));
tooltipElement
.
removeAttribute
(
'
tooltip
'
);
}
</script>
<form
method=
"post"
name=
"backindex"
action=
"index.php"
><input
type=
"submit"
name=
"enter"
value=
"{lang backindex}"
></form>
{template footer}
templates/default/sp_terminal.htm
View file @
c148ee16
...
...
@@ -24,9 +24,9 @@
</tr>
<tr
width=
"84"
height=
"36"
class=
"map"
>
<td
colspan=
"2"
>
<span
class=
"eicon"
onmousedown=
"
downVolume();showVolume(
);"
>
⏬
</span>
<span
id=
"volume_num"
>
{$clbpara['volume']}%
</span>
<span
class=
"eicon"
onmousedown=
"
upVolume();showVolume(
);"
>
⏫
</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
class=
"eicon"
onmousedown=
"
changeVolume(0.05
);"
>
⏫
</span>
</td>
</tr>
<!-- 战场控制指令 -->
...
...
@@ -90,7 +90,7 @@
</table>
</center>
<script>
getBgmVolu
me
();
showBGMna
me
();
</script>
<img
class=
"dialog-background"
src=
"img/profile.gif"
onclick=
"closeDialog($('terminal'))"
>
</dialog>
...
...
templates/default/templates.lang.php
View file @
c148ee16
...
...
@@ -57,7 +57,7 @@ $language = array
'motto_comment'
=>
'写下彰显个性的台词,30个字以内。'
,
'killmsg_comment'
=>
'写下你杀死对手的留言,30个字以内'
,
'lastword_comment'
=>
'写下你不幸被害时的台词,30个字以内'
,
'bgmvolume_comment'
=>
'设置游戏内背景音乐的默认音量,
下局游戏
生效'
,
'bgmvolume_comment'
=>
'设置游戏内背景音乐的默认音量,
刷新页面后
生效'
,
'credits'
=>
'战斗力'
,
'credits2'
=>
'切糕'
,
'lastgame'
=>
'最后游戏'
,
...
...
templates/default/useradvdata.htm
View file @
c148ee16
...
...
@@ -44,6 +44,7 @@
</tr>
<tr>
<td>
{lang bgmvolume}
</td>
<td><input
style=
"width: 45px;"
size=
"2"
type=
"number"
name=
"volume"
min=
"0"
max=
"100"
value=
"{$volume}"
>
% {lang bgmvolume_comment}
</td>
<!--{eval $volume = isset($_COOKIE["volume"]) ? filter_var($_COOKIE["volume"],FILTER_VALIDATE_FLOAT)*100 : 20; $v = isset($volume) ? $volume : 20;}-->
<td><input
style=
"width: 45px;"
size=
"2"
type=
"number"
name=
"volume"
min=
"0"
max=
"100"
value=
"{$v}"
>
% {lang bgmvolume_comment}
</td>
</tr>
</table>
\ No newline at end of file
templates/default/vn_records.htm
View file @
c148ee16
...
...
@@ -11,11 +11,11 @@
<tr>
<td
class=
"b1"
height=
20px
width=
"100px"
>
$log_tips[1]
</td>
<td
class=
"b1"
width=
"60px"
>
$result_tips[9]
</td>
<td
class=
"b1"
style=
"max-width: 120px; padding-left: 5px; padding-right: 5px;
"
>
$stuff_tips[0]
</td>
<td
class=
"b1"
style=
"max-width: 120px; padding-left: 5px; padding-right: 5px;
"
>
$stuff_tips[1]
</td>
<td
class=
"b1"
style=
"max-width: 120px; padding-left: 5px; padding-right: 5px;
"
>
$stuff_tips[2]
</td>
<td
class=
"b1"
style=
"max-width: 120px; padding-left: 5px; padding-right: 5px;
"
>
$stuff_tips[3]
</td>
<td
class=
"b1"
style=
"max-width: 120px; padding-left: 5px; padding-right: 5px;
"
>
$stuff_tips[4]
</td>
<td
class=
"b1"
width=
"100px
"
>
$stuff_tips[0]
</td>
<td
class=
"b1"
width=
"100px
"
>
$stuff_tips[1]
</td>
<td
class=
"b1"
width=
"100px
"
>
$stuff_tips[2]
</td>
<td
class=
"b1"
width=
"100px
"
>
$stuff_tips[3]
</td>
<td
class=
"b1"
width=
"100px
"
>
$stuff_tips[4]
</td>
<td
class=
"b1"
width=
"25px"
></td>
<td
class=
"b1"
style=
"padding-left: 5px; padding-right: 5px;"
>
$result_tips[0]
</td>
<td
class=
"b1"
width=
"45px"
>
编辑
</td>
...
...
user.php
View file @
c148ee16
...
...
@@ -73,8 +73,9 @@ if($mode == 'edit') {
}
}
if
(
$icon
>
$iconlimit
)
$icon
=
0
;
$volume
=
round
(
min
(
100
,
max
(
0
,
$volume
)));
$db
->
query
(
"UPDATE
{
$tablepre
}
users SET gender='
$gender
', icon='
$icon
',
{
$passqry
}
motto='
$motto
', killmsg='
$killmsg
', lastword='
$lastword
', credits='
$credits
', credits2='
$credits2
' ,nick='
$nick
', volume='
$volume
' WHERE username='
$cuser
'"
);
$volume
=
round
(
$volume
/
100
,
2
);
$volume
=
round
(
min
(
1
,
max
(
0
,
$volume
)),
2
);
gsetcookie
(
'volume'
,
$volume
,
86400
*
30
,
0
);
$db
->
query
(
"UPDATE
{
$tablepre
}
users SET gender='
$gender
', icon='
$icon
',
{
$passqry
}
motto='
$motto
', killmsg='
$killmsg
', lastword='
$lastword
', credits='
$credits
', credits2='
$credits2
' ,nick='
$nick
' WHERE username='
$cuser
'"
);
if
(
$db
->
affected_rows
()){
$gamedata
[
'innerHTML'
][
'info'
]
.=
$_INFO
[
'data_success'
];
}
else
{
...
...
valid.php
View file @
c148ee16
...
...
@@ -202,7 +202,6 @@ if($mode == 'enter') {
include_once
config
(
'audio'
,
$gamecfg
);
$clbpara
[
'valid_bgmbook'
]
=
$regular_bgm
;
$clbpara
[
'bgmbook'
]
=
$clbpara
[
'valid_bgmbook'
];
$clbpara
[
'volume'
]
=
isset
(
$udata
[
'volume'
])
?
$udata
[
'volume'
]
:
20
;
//$nick=$udata['nick'];
$nicks
=
$udata
[
'nicks'
];
if
((
$nicks
==
''
)
||
(
$nick
==
''
)){
...
...
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