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
b9dc240c
Commit
b9dc240c
authored
Mar 01, 2023
by
Nemo Ma
Committed by
GitHub
Mar 01, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #41 from hikawiier/waaagh
rev combat phase 3
parents
7aaac468
5aeb0772
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
876 additions
and
241 deletions
+876
-241
alive.php
alive.php
+3
-3
command.php
command.php
+30
-8
game.php
game.php
+4
-2
gamedata/cache/achievement_1.php
gamedata/cache/achievement_1.php
+197
-0
gamedata/cache/combatcfg_1.php
gamedata/cache/combatcfg_1.php
+1
-1
gamedata/cache/gamecfg_1.php
gamedata/cache/gamecfg_1.php
+9
-1
gamedata/sql/all.sql
gamedata/sql/all.sql
+57
-52
gamedata/sql/players.sql
gamedata/sql/players.sql
+90
-85
include/admin/gamecheck.php
include/admin/gamecheck.php
+82
-0
include/game/revattr.func.php
include/game/revattr.func.php
+118
-28
include/game/revbattle.func.php
include/game/revbattle.func.php
+71
-32
include/game/revcombat.func.php
include/game/revcombat.func.php
+178
-26
include/game/search.func.php
include/game/search.func.php
+2
-1
templates/default/battle.htm
templates/default/battle.htm
+8
-0
templates/default/battle_rev.htm
templates/default/battle_rev.htm
+13
-0
templates/default/battlecmd_rev.htm
templates/default/battlecmd_rev.htm
+7
-2
templates/default/profile.htm
templates/default/profile.htm
+1
-0
user_profile.php
user_profile.php
+4
-0
valid.php
valid.php
+1
-0
No files found.
alive.php
View file @
b9dc240c
...
...
@@ -30,7 +30,7 @@ while($apdata = $db->fetch_array($result)) {
$alivedata
[
$apdata
[
'pid'
]]
=
$apdata
;
}
$adata
=
Array
();
$adata
=
Array
();
if
(
!
isset
(
$gbmode
))
$gbmode
=
'none'
;
if
(
$gamblingon
){
global
$gshoplist
,
$credits2_values
,
$no_self_sponsored
,
$sponsor_title
,
$gnpctype
,
$gnpcsub
;
//初始化赌局变量
...
...
@@ -121,7 +121,7 @@ if($gamblingon){
if
(
$gbmode
==
'gsponsor'
)
{
//使用切糕点外卖
if
(
$gbudata
[
'bitm'
]
||
$gbudata
[
'bnid'
]
)
if
(
!
empty
(
$gbudata
[
'bitm'
])
||
!
empty
(
$gbudata
[
'bnid'
])
)
{
$gbinfo
.=
'你派出去的快递员还没回来,耐心等等吧!<br>'
;
goto
gb_result
;
...
...
@@ -248,7 +248,7 @@ if($gamblingon){
}
}
}
$adata
[
'innerHTML'
][
'gbinfo'
]
.
=
$gbinfo
;
$adata
[
'innerHTML'
][
'gbinfo'
]
=
$gbinfo
;
}
else
{
$gbinfo
.=
$_ERROR
[
'no_login'
];
}
...
...
command.php
View file @
b9dc240c
...
...
@@ -95,7 +95,7 @@ if($hp > 0){
$rmcdtime
=
$nowmtime
>=
$cdover
?
0
:
$cdover
-
$nowmtime
;
}
//执行动作前,身上存在追击标记时,直接进入追击判定
if
(
strpos
(
$action
,
'chase'
)
!==
false
&&
$mode
!==
'revcombat'
)
if
(
(
strpos
(
$action
,
'chase'
)
!==
false
||
strpos
(
$action
,
'dfight'
)
!==
false
)
&&
$mode
!==
'revcombat'
)
{
$command
=
'chase'
;
goto
chase_flag
;
...
...
@@ -109,12 +109,12 @@ if($hp > 0){
$mode
=
'command'
;
}
else
{
//进入指令判断
if
(
strpos
(
$action
,
'chase'
)
===
false
&&
$mode
!==
'combat'
&&
$mode
!==
'revcombat'
&&
$mode
!==
'corpse'
&&
strpos
(
$action
,
'pacorpse'
)
===
false
&&
$mode
!==
'senditem'
){
if
(
strpos
(
$action
,
'chase'
)
===
false
&&
strpos
(
$action
,
'dfight'
)
===
false
&&
$mode
!==
'combat'
&&
$mode
!==
'revcombat'
&&
$mode
!==
'corpse'
&&
strpos
(
$action
,
'pacorpse'
)
===
false
&&
$mode
!==
'senditem'
){
$action
=
''
;
}
if
(
$command
==
'menu'
)
{
$mode
=
'command'
;
$action
=
''
;
//
$action = '';
}
elseif
(
$mode
==
'command'
)
{
if
(
$command
==
'move'
)
{
include_once
GAME_ROOT
.
'./include/game/search.func.php'
;
...
...
@@ -384,6 +384,10 @@ if($hp > 0){
}
else
{
$log
.=
"<span class='red'>你身上没有背包,或是没有将背包装备上!<br>"
;
}
}
elseif
(
strpos
(
$command
,
'changewep'
)
!==
false
)
{
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
change_wep_in_battle
();
$mode
=
'command'
;
}
}
elseif
(
$mode
==
'special'
)
{
include_once
GAME_ROOT
.
'./include/game/special.func.php'
;
...
...
@@ -440,6 +444,8 @@ if($hp > 0){
$enemyid
=
NULL
;
if
(
strpos
(
$action
,
'enemy'
)
===
0
)
$enemyid
=
str_replace
(
'enemy'
,
''
,
$action
);
if
(
strpos
(
$action
,
'chase'
)
===
0
)
$enemyid
=
str_replace
(
'chase'
,
''
,
$action
);
if
(
strpos
(
$action
,
'pchase'
)
===
0
)
$enemyid
=
str_replace
(
'pchase'
,
''
,
$action
);
if
(
strpos
(
$action
,
'dfight'
)
===
0
)
$enemyid
=
str_replace
(
'dfight'
,
''
,
$action
);
if
(
!
$enemyid
)
{
$log
.=
"<span class=
\"
yellow b
\"
>你没有遇到敌人,或已经离开战场!</span>
{
$enemyid
}
<br>"
;
...
...
@@ -463,6 +469,12 @@ if($hp > 0){
$action
=
'corpse'
.
$edata
[
'pid'
];
findcorpse
(
$edata
);
}
elseif
(
$command
==
'changewep'
)
{
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
change_wep_in_battle
();
findenemy_rev
(
$edata
);
}
elseif
(
$command
==
'chase'
)
{
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
...
...
@@ -470,15 +482,25 @@ if($hp > 0){
}
elseif
(
$command
==
'back'
)
{
$log
.=
"你逃跑了。"
;
$action
=
''
;
back_flag
:
$mode
=
'command'
;
//$log .= "你逃跑了。";
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
$flag
=
escape_from_enemy
(
$pdata
,
$edata
);
if
(
$flag
)
{
back_flag
:
$mode
=
'command'
;
}
else
{
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$pdata
,
$edata
,
0
);
}
}
else
{
if
(
!
empty
(
$message
))
$pdata
[
'message'
]
=
$message
;
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$pdata
,
$edata
,
1
,
$command
,
$message
);
rev_combat_prepare
(
$pdata
,
$edata
,
1
,
$command
);
}
}
elseif
(
$mode
==
'rest'
)
{
include_once
GAME_ROOT
.
'./include/state.func.php'
;
...
...
game.php
View file @
b9dc240c
...
...
@@ -105,8 +105,10 @@ if((strpos($action,'corpse')===0 || strpos($action,'pacorpse')===0) && $gamestat
}
}
}
elseif
((
strpos
(
$action
,
'chase'
)
!==
false
)){
$enemyid
=
str_replace
(
'chase'
,
''
,
$action
);
elseif
(
strpos
(
$action
,
'chase'
)
!==
false
||
strpos
(
$action
,
'dfight'
)
!==
false
){
if
(
strpos
(
$action
,
'chase'
)
===
0
)
$enemyid
=
str_replace
(
'chase'
,
''
,
$action
);
if
(
strpos
(
$action
,
'pchase'
)
===
0
)
$enemyid
=
str_replace
(
'pchase'
,
''
,
$action
);
if
(
strpos
(
$action
,
'dfight'
)
===
0
)
$enemyid
=
str_replace
(
'dfight'
,
''
,
$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
);
...
...
gamedata/cache/achievement_1.php
0 → 100644
View file @
b9dc240c
<?php
if
(
!
defined
(
'IN_GAME'
))
exit
(
'Access Denied'
);
# 成就登记列表:
$ach_list
=
Array
(
0
=>
Array
(
# 成就各阶段名称
'name'
=>
Array
(
'永恒世界的住人'
,
'幻想世界的往人'
,
'永恒的覆唱'
),
# 达成阶段成就的头衔奖励
'title'
=>
Array
(
''
,
'幻想'
,
'流星'
),
# 达成阶段成就的积分奖励
'c1'
=>
Array
(
0
,
200
,
700
),
# 达成阶段成就的切糕奖励
'c2'
=>
Array
(
10
,
0
,
0
),
),
1
=>
Array
(
'name'
=>
Array
(
'清水池之王'
),
'title'
=>
Array
(
'KEY男'
),
'c1'
=>
Array
(
30
),
'c2'
=>
Array
(
16
),
),
2
=>
Array
(
'name'
=>
Array
(
'Run With Wolves'
,
'Day Game'
,
'Thousand Enemies'
),
'title'
=>
Array
(
''
,
'二度打'
,
'G.D.M'
),
'c1'
=>
Array
(
10
,
500
,
0
),
'c2'
=>
Array
(
0
,
0
,
200
),
),
3
=>
Array
(
),
4
=>
Array
(
),
5
=>
Array
(
),
6
=>
Array
(
),
7
=>
Array
(
),
8
=>
Array
(
),
9
=>
Array
(
),
10
=>
Array
(
),
11
=>
Array
(
),
12
=>
Array
(
),
13
=>
Array
(
),
14
=>
Array
(
),
15
=>
Array
(
),
16
=>
Array
(
),
17
=>
Array
(
),
18
=>
Array
(
),
19
=>
Array
(
),
20
=>
Array
(
),
21
=>
Array
(
),
22
=>
Array
(
),
23
=>
Array
(
),
24
=>
Array
(
),
25
=>
Array
(
),
26
=>
Array
(
),
27
=>
Array
(
),
28
=>
Array
(
),
29
=>
Array
(
),
30
=>
Array
(
),
31
=>
Array
(
),
32
=>
Array
(
),
33
=>
Array
(
),
34
=>
Array
(
),
35
=>
Array
(
),
36
=>
Array
(
),
37
=>
Array
(
),
38
=>
Array
(
),
39
=>
Array
(
),
40
=>
Array
(
),
41
=>
Array
(
),
42
=>
Array
(
),
43
=>
Array
(
),
44
=>
Array
(
),
45
=>
Array
(
),
46
=>
Array
(
),
47
=>
Array
(
),
48
=>
Array
(
),
49
=>
Array
(
),
50
=>
Array
(
),
51
=>
Array
(
),
52
=>
Array
(
),
53
=>
Array
(
),
54
=>
Array
(
),
55
=>
Array
(
),
56
=>
Array
(
),
57
=>
Array
(
),
999
=>
Array
(
''
),
);
?>
gamedata/cache/combatcfg_1.php
View file @
b9dc240c
...
...
@@ -19,7 +19,7 @@ $skill_dmg = Array('N' => 0.6, 'P' => 0.6, 'K' => 0.65, 'G' => 0.6, 'C' => 0.4,
//$skill_dmg = Array('N' => 0.5, 'P' => 0.5, 'K' => 0.5, 'G' => 0.6, 'C' => 0.3, 'D' => 0.4, 'F'=> 1.2);
//各攻击方式对应的防御属性
$def_kind
=
Array
(
'P'
=>
'P'
,
'P'
=>
'P'
,
'N'
=>
'P'
,
'K'
=>
'K'
,
'G'
=>
'G'
,
'J'
=>
'G'
,
'C'
=>
'C'
,
...
...
gamedata/cache/gamecfg_1.php
View file @
b9dc240c
...
...
@@ -2,7 +2,7 @@
/*Game Config*/
//禁区间隔时间,单位 小时
$areahour
=
3
5
;
$areahour
=
2
5
;
//每次间隔增加的禁区数量
$areaadd
=
4
;
//聊天记录里的禁区提示时间,单位秒
...
...
@@ -102,6 +102,14 @@ $corpse_obbs = 50;
$active_obbs
=
50
;
//基础反击率
$counter_obbs
=
50
;
//(仅PVE触发)基础追击率 (等于0时为不启用追击机制)
$chase_obbs
=
55
;
//(仅PVE触发)鏖战状态维持率 (等于0时为不启用鏖战机制)
$dfight_obbs
=
65
;
//(仅PVE触发)追击&鏖战状态默认先制率 (鏖战/追击的基础先制率不受姿态与天气影响)
$chase_active_obbs
=
50
;
//(仅PVE触发)被追击&鏖战状态下默认逃跑成功率(鏖战/追击的基础先制率不受姿态与天气影响)
$chase_escape_obbs
=
50
;
//受伤状态的设定
//h-头部受伤,b-身体受伤,a-手腕受伤,f-足部受伤,p-中毒,u-烧伤,i-冻结,e-麻痹
...
...
gamedata/sql/all.sql
View file @
b9dc240c
...
...
@@ -225,70 +225,75 @@ CREATE TABLE `acbra2_players` (
itmnum
smallint
unsigned
NOT
NULL
default
'0'
,
itmnumlimit
smallint
unsigned
NOT
NULL
default
'0'
,
wep
char
(
30
)
NOT
NULL
default
''
,
wepk
char
(
5
)
not
null
default
''
,
wepe
mediumint
unsigned
NOT
NULL
default
'0'
,
weps
char
(
5
)
not
null
default
'0'
,
wepsk
char
(
5
)
not
null
default
''
,
wepk
char
(
40
)
not
null
default
''
,
wepe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
weps
char
(
10
)
not
null
default
'0'
,
wepsk
char
(
40
)
not
null
default
''
,
wep2
char
(
30
)
NOT
NULL
default
''
,
wep2k
char
(
40
)
not
null
default
''
,
wep2e
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
wep2s
char
(
10
)
not
null
default
'0'
,
wep2sk
char
(
40
)
not
null
default
''
,
arb
char
(
30
)
NOT
NULL
default
''
,
arbk
char
(
5
)
not
null
default
''
,
arbe
mediumint
unsigned
NOT
NULL
default
'0'
,
arbs
char
(
5
)
not
null
default
'0'
,
arbsk
char
(
5
)
not
null
default
''
,
arbk
char
(
40
)
not
null
default
''
,
arbe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arbs
char
(
10
)
not
null
default
'0'
,
arbsk
char
(
40
)
not
null
default
''
,
arh
char
(
30
)
NOT
NULL
default
''
,
arhk
char
(
5
)
not
null
default
''
,
arhe
mediumint
unsigned
NOT
NULL
default
'0'
,
arhs
char
(
5
)
not
null
default
'0'
,
arhsk
char
(
5
)
not
null
default
''
,
arhk
char
(
40
)
not
null
default
''
,
arhe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arhs
char
(
10
)
not
null
default
'0'
,
arhsk
char
(
40
)
not
null
default
''
,
ara
char
(
30
)
NOT
NULL
default
''
,
arak
char
(
5
)
not
null
default
''
,
arae
mediumint
unsigned
NOT
NULL
default
'0'
,
aras
char
(
5
)
not
null
default
'0'
,
arask
char
(
5
)
not
null
default
''
,
arak
char
(
40
)
not
null
default
''
,
arae
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
aras
char
(
10
)
not
null
default
'0'
,
arask
char
(
40
)
not
null
default
''
,
arf
char
(
30
)
NOT
NULL
default
''
,
arfk
char
(
5
)
not
null
default
''
,
arfe
mediumint
unsigned
NOT
NULL
default
'0'
,
arfs
char
(
5
)
not
null
default
'0'
,
arfsk
char
(
5
)
not
null
default
''
,
arfk
char
(
40
)
not
null
default
''
,
arfe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arfs
char
(
10
)
not
null
default
'0'
,
arfsk
char
(
40
)
not
null
default
''
,
art
char
(
30
)
NOT
NULL
default
''
,
artk
char
(
5
)
not
null
default
''
,
arte
mediumint
unsigned
NOT
NULL
default
'0'
,
arts
char
(
5
)
not
null
default
'0'
,
artsk
char
(
5
)
not
null
default
''
,
artk
char
(
40
)
not
null
default
''
,
arte
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arts
char
(
10
)
not
null
default
'0'
,
artsk
char
(
40
)
not
null
default
''
,
itm0
char
(
30
)
NOT
NULL
default
''
,
itmk0
char
(
5
)
not
null
default
''
,
itme0
mediumint
unsigned
NOT
NULL
default
'0'
,
itms0
char
(
5
)
not
null
default
'0'
,
itmsk0
char
(
5
)
not
null
default
''
,
itmk0
char
(
40
)
not
null
default
''
,
itme0
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms0
char
(
10
)
not
null
default
'0'
,
itmsk0
char
(
40
)
not
null
default
''
,
itm1
char
(
30
)
NOT
NULL
default
''
,
itmk1
char
(
5
)
not
null
default
''
,
itme1
mediumint
unsigned
NOT
NULL
default
'0'
,
itms1
char
(
5
)
not
null
default
'0'
,
itmsk1
char
(
5
)
not
null
default
''
,
itmk1
char
(
40
)
not
null
default
''
,
itme1
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms1
char
(
10
)
not
null
default
'0'
,
itmsk1
char
(
40
)
not
null
default
''
,
itm2
char
(
30
)
NOT
NULL
default
''
,
itmk2
char
(
5
)
not
null
default
''
,
itme2
mediumint
unsigned
NOT
NULL
default
'0'
,
itms2
char
(
5
)
not
null
default
'0'
,
itmsk2
char
(
5
)
not
null
default
''
,
itmk2
char
(
40
)
not
null
default
''
,
itme2
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms2
char
(
10
)
not
null
default
'0'
,
itmsk2
char
(
40
)
not
null
default
''
,
itm3
char
(
30
)
NOT
NULL
default
''
,
itmk3
char
(
5
)
not
null
default
''
,
itme3
mediumint
unsigned
NOT
NULL
default
'0'
,
itms3
char
(
5
)
not
null
default
'0'
,
itmsk3
char
(
5
)
not
null
default
''
,
itmk3
char
(
40
)
not
null
default
''
,
itme3
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms3
char
(
10
)
not
null
default
'0'
,
itmsk3
char
(
40
)
not
null
default
''
,
itm4
char
(
30
)
NOT
NULL
default
''
,
itmk4
char
(
5
)
not
null
default
''
,
itme4
mediumint
unsigned
NOT
NULL
default
'0'
,
itms4
char
(
5
)
not
null
default
'0'
,
itmsk4
char
(
5
)
not
null
default
''
,
itmk4
char
(
40
)
not
null
default
''
,
itme4
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms4
char
(
10
)
not
null
default
'0'
,
itmsk4
char
(
40
)
not
null
default
''
,
itm5
char
(
30
)
NOT
NULL
default
''
,
itmk5
char
(
5
)
not
null
default
''
,
itme5
mediumint
unsigned
NOT
NULL
default
'0'
,
itms5
char
(
5
)
not
null
default
'0'
,
itmsk5
char
(
5
)
not
null
default
''
,
itmk5
char
(
40
)
not
null
default
''
,
itme5
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms5
char
(
10
)
not
null
default
'0'
,
itmsk5
char
(
40
)
not
null
default
''
,
itm6
char
(
30
)
NOT
NULL
default
''
,
itmk6
char
(
5
)
not
null
default
''
,
itme6
mediumint
unsigned
NOT
NULL
default
'0'
,
itms6
char
(
5
)
not
null
default
'0'
,
itmsk6
char
(
5
)
not
null
default
''
,
itmk6
char
(
40
)
not
null
default
''
,
itme6
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms6
char
(
10
)
not
null
default
'0'
,
itmsk6
char
(
40
)
not
null
default
''
,
flare
int
(
10
)
NOT
NULL
default
'0'
,
dcloak
int
(
10
)
NOT
NULL
default
'0'
,
auraa
int
(
10
)
NOT
NULL
default
'0'
,
...
...
gamedata/sql/players.sql
View file @
b9dc240c
...
...
@@ -7,7 +7,7 @@ DROP TABLE IF EXISTS bra_players;
CREATE
TABLE
bra_players
(
pid
smallint
unsigned
NOT
NULL
auto_increment
,
type
tinyint
NOT
NULL
default
'0'
,
name
char
(
15
)
NOT
NULL
default
''
,
name
char
(
40
)
not
null
default
''
,
pass
char
(
32
)
NOT
NULL
default
''
,
gd
char
(
1
)
NOT
NULL
default
'm'
,
race
char
(
32
)
NOT
NULL
default
'0'
,
...
...
@@ -25,22 +25,22 @@ CREATE TABLE bra_players (
skills
smallint
unsigned
NOT
NULL
default
'0'
,
cdsec
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
cdmsec
smallint
(
3
)
unsigned
NOT
NULL
default
'0'
,
cdtime
mediumint
unsigned
NOT
NULL
default
'0'
,
cdtime
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
action
char
(
12
)
NOT
NULL
default
''
,
hp
mediumint
unsigned
NOT
NULL
default
'0'
,
mhp
mediumint
unsigned
NOT
NULL
default
'0'
,
sp
mediumint
unsigned
NOT
NULL
default
'0'
,
msp
mediumint
unsigned
NOT
NULL
default
'0'
,
ss
mediumint
unsigned
NOT
NULL
default
'0'
,
mss
mediumint
unsigned
NOT
NULL
default
'0'
,
att
mediumint
unsigned
NOT
NULL
default
'0'
,
def
mediumint
unsigned
NOT
NULL
default
'0'
,
hp
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
mhp
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
sp
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
msp
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
ss
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
mss
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
att
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
def
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
pgroup
tinyint
unsigned
NOT
NULL
DEFAULT
'0'
,
pls
tinyint
unsigned
NOT
NULL
default
'0'
,
lvl
tinyint
unsigned
NOT
NULL
default
'0'
,
`exp`
smallint
unsigned
NOT
NULL
default
'0'
,
money
mediumint
unsigned
NOT
NULL
default
'0'
,
rp
mediumint
unsigned
NOT
NULL
default
'0'
,
money
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
rp
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
bid
smallint
unsigned
NOT
NULL
default
'0'
,
`inf`
char
(
10
)
not
null
default
''
,
rage
tinyint
unsigned
NOT
NULL
default
'0'
,
...
...
@@ -54,77 +54,82 @@ CREATE TABLE bra_players (
`wc`
smallint
unsigned
not
null
default
'0'
,
`wd`
smallint
unsigned
not
null
default
'0'
,
`wf`
smallint
unsigned
not
null
default
'0'
,
`teamID`
char
(
15
)
not
null
default
''
,
`teamPass`
char
(
15
)
not
null
default
''
,
`teamID`
char
(
40
)
not
null
default
''
,
`teamPass`
char
(
40
)
not
null
default
''
,
getitem
text
NOT
NULL
default
''
,
itembag
text
NOT
NULL
default
''
,
itmnum
smallint
unsigned
NOT
NULL
default
'0'
,
itmnumlimit
smallint
unsigned
NOT
NULL
default
'0'
,
wep
char
(
250
)
NOT
NULL
default
''
,
wepk
char
(
5
)
not
null
default
''
,
wepe
mediumint
unsigned
NOT
NULL
default
'0'
,
weps
char
(
5
)
not
null
default
'0'
,
wepsk
char
(
5
)
not
null
default
''
,
arb
char
(
250
)
NOT
NULL
default
''
,
arbk
char
(
5
)
not
null
default
''
,
arbe
mediumint
unsigned
NOT
NULL
default
'0'
,
arbs
char
(
5
)
not
null
default
'0'
,
arbsk
char
(
5
)
not
null
default
''
,
arh
char
(
250
)
NOT
NULL
default
''
,
arhk
char
(
5
)
not
null
default
''
,
arhe
mediumint
unsigned
NOT
NULL
default
'0'
,
arhs
char
(
5
)
not
null
default
'0'
,
arhsk
char
(
5
)
not
null
default
''
,
ara
char
(
250
)
NOT
NULL
default
''
,
arak
char
(
5
)
not
null
default
''
,
arae
mediumint
unsigned
NOT
NULL
default
'0'
,
aras
char
(
5
)
not
null
default
'0'
,
arask
char
(
5
)
not
null
default
''
,
arf
char
(
250
)
NOT
NULL
default
''
,
arfk
char
(
5
)
not
null
default
''
,
arfe
mediumint
unsigned
NOT
NULL
default
'0'
,
arfs
char
(
5
)
not
null
default
'0'
,
arfsk
char
(
5
)
not
null
default
''
,
art
char
(
250
)
NOT
NULL
default
''
,
artk
char
(
5
)
not
null
default
''
,
arte
mediumint
unsigned
NOT
NULL
default
'0'
,
arts
char
(
5
)
not
null
default
'0'
,
artsk
char
(
5
)
not
null
default
''
,
itm0
char
(
250
)
NOT
NULL
default
''
,
itmk0
char
(
5
)
not
null
default
''
,
itme0
mediumint
unsigned
NOT
NULL
default
'0'
,
itms0
char
(
5
)
not
null
default
'0'
,
itmsk0
char
(
5
)
not
null
default
''
,
itm1
char
(
250
)
NOT
NULL
default
''
,
itmk1
char
(
5
)
not
null
default
''
,
itme1
mediumint
unsigned
NOT
NULL
default
'0'
,
itms1
char
(
5
)
not
null
default
'0'
,
itmsk1
char
(
5
)
not
null
default
''
,
itm2
char
(
250
)
NOT
NULL
default
''
,
itmk2
char
(
5
)
not
null
default
''
,
itme2
mediumint
unsigned
NOT
NULL
default
'0'
,
itms2
char
(
5
)
not
null
default
'0'
,
itmsk2
char
(
5
)
not
null
default
''
,
itm3
char
(
250
)
NOT
NULL
default
''
,
itmk3
char
(
5
)
not
null
default
''
,
itme3
mediumint
unsigned
NOT
NULL
default
'0'
,
itms3
char
(
5
)
not
null
default
'0'
,
itmsk3
char
(
5
)
not
null
default
''
,
itm4
char
(
250
)
NOT
NULL
default
''
,
itmk4
char
(
5
)
not
null
default
''
,
itme4
mediumint
unsigned
NOT
NULL
default
'0'
,
itms4
char
(
5
)
not
null
default
'0'
,
itmsk4
char
(
5
)
not
null
default
''
,
itm5
char
(
250
)
NOT
NULL
default
''
,
itmk5
char
(
5
)
not
null
default
''
,
itme5
mediumint
unsigned
NOT
NULL
default
'0'
,
itms5
char
(
5
)
not
null
default
'0'
,
itmsk5
char
(
5
)
not
null
default
''
,
itm6
char
(
250
)
NOT
NULL
default
''
,
itmk6
char
(
5
)
not
null
default
''
,
itme6
mediumint
unsigned
NOT
NULL
default
'0'
,
itms6
char
(
5
)
not
null
default
'0'
,
itmsk6
char
(
5
)
not
null
default
''
,
wep
char
(
30
)
NOT
NULL
default
''
,
wepk
char
(
40
)
not
null
default
''
,
wepe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
weps
char
(
10
)
not
null
default
'0'
,
wepsk
char
(
40
)
not
null
default
''
,
wep2
char
(
30
)
NOT
NULL
default
''
,
wep2k
char
(
40
)
not
null
default
''
,
wep2e
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
wep2s
char
(
10
)
not
null
default
'0'
,
wep2sk
char
(
40
)
not
null
default
''
,
arb
char
(
30
)
NOT
NULL
default
''
,
arbk
char
(
40
)
not
null
default
''
,
arbe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arbs
char
(
10
)
not
null
default
'0'
,
arbsk
char
(
40
)
not
null
default
''
,
arh
char
(
30
)
NOT
NULL
default
''
,
arhk
char
(
40
)
not
null
default
''
,
arhe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arhs
char
(
10
)
not
null
default
'0'
,
arhsk
char
(
40
)
not
null
default
''
,
ara
char
(
30
)
NOT
NULL
default
''
,
arak
char
(
40
)
not
null
default
''
,
arae
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
aras
char
(
10
)
not
null
default
'0'
,
arask
char
(
40
)
not
null
default
''
,
arf
char
(
30
)
NOT
NULL
default
''
,
arfk
char
(
40
)
not
null
default
''
,
arfe
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arfs
char
(
10
)
not
null
default
'0'
,
arfsk
char
(
40
)
not
null
default
''
,
art
char
(
30
)
NOT
NULL
default
''
,
artk
char
(
40
)
not
null
default
''
,
arte
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
arts
char
(
10
)
not
null
default
'0'
,
artsk
char
(
40
)
not
null
default
''
,
itm0
char
(
30
)
NOT
NULL
default
''
,
itmk0
char
(
40
)
not
null
default
''
,
itme0
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms0
char
(
10
)
not
null
default
'0'
,
itmsk0
char
(
40
)
not
null
default
''
,
itm1
char
(
30
)
NOT
NULL
default
''
,
itmk1
char
(
40
)
not
null
default
''
,
itme1
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms1
char
(
10
)
not
null
default
'0'
,
itmsk1
char
(
40
)
not
null
default
''
,
itm2
char
(
30
)
NOT
NULL
default
''
,
itmk2
char
(
40
)
not
null
default
''
,
itme2
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms2
char
(
10
)
not
null
default
'0'
,
itmsk2
char
(
40
)
not
null
default
''
,
itm3
char
(
30
)
NOT
NULL
default
''
,
itmk3
char
(
40
)
not
null
default
''
,
itme3
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms3
char
(
10
)
not
null
default
'0'
,
itmsk3
char
(
40
)
not
null
default
''
,
itm4
char
(
30
)
NOT
NULL
default
''
,
itmk4
char
(
40
)
not
null
default
''
,
itme4
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms4
char
(
10
)
not
null
default
'0'
,
itmsk4
char
(
40
)
not
null
default
''
,
itm5
char
(
30
)
NOT
NULL
default
''
,
itmk5
char
(
40
)
not
null
default
''
,
itme5
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms5
char
(
10
)
not
null
default
'0'
,
itmsk5
char
(
40
)
not
null
default
''
,
itm6
char
(
30
)
NOT
NULL
default
''
,
itmk6
char
(
40
)
not
null
default
''
,
itme6
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
itms6
char
(
10
)
not
null
default
'0'
,
itmsk6
char
(
40
)
not
null
default
''
,
flare
int
(
10
)
NOT
NULL
default
'0'
,
dcloak
int
(
10
)
NOT
NULL
default
'0'
,
auraa
int
(
10
)
NOT
NULL
default
'0'
,
...
...
@@ -153,12 +158,12 @@ CREATE TABLE bra_players (
nikstatusc
int
(
10
)
NOT
NULL
default
'0'
,
nikstatusd
int
(
10
)
NOT
NULL
default
'0'
,
nikstatuse
int
(
10
)
NOT
NULL
default
'0'
,
element0
mediumint
unsigned
NOT
NULL
default
'0'
,
element1
mediumint
unsigned
NOT
NULL
default
'0'
,
element2
mediumint
unsigned
NOT
NULL
default
'0'
,
element3
mediumint
unsigned
NOT
NULL
default
'0'
,
element4
mediumint
unsigned
NOT
NULL
default
'0'
,
element5
mediumint
unsigned
NOT
NULL
default
'0'
,
element0
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
element1
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
element2
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
element3
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
element4
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
element5
int
(
10
)
unsigned
NOT
NULL
DEFAULT
'0'
,
PRIMARY
KEY
(
pid
),
INDEX
TYPE
(
type
,
sNo
),
...
...
include/admin/gamecheck.php
View file @
b9dc240c
...
...
@@ -52,9 +52,91 @@ 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"
);
//以下内容均为chatGPT生成,让我们对新时代的赛博苦力致以敬意:
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY wep char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY wepk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY wepe int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY weps char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY wepsk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arb char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arbk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arbe int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arbs char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arbsk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arh char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arhk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arhe int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arhs char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arhsk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY ara char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arak char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arae int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY aras char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arask char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arf char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arfk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arfe int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arfs char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arfsk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY art char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY artk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arte int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY arts char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY artsk char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm0 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk0 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme0 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms0 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk0 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm1 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk1 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme1 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms1 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk1 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm2 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk2 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme2 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms2 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk2 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm3 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk3 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme3 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms3 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk3 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm4 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk4 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme4 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms4 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk4 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm5 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk5 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme5 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms5 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk5 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itm6 char(30) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmk6 char(40) NOT NULL default ''"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itme6 int(10) unsigned NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itms6 char(10) NOT NULL DEFAULT '0'"
);
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
winners MODIFY itmsk6 char(40) NOT NULL default ''"
);
//user表结构变动
$result
=
$db
->
query
(
"DESCRIBE
{
$tablepre
}
users volume"
);
if
(
$db
->
num_rows
(
$result
))
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
users DROP volume"
);
$result
=
$db
->
query
(
"DESCRIBE
{
$tablepre
}
users achrev"
);
if
(
!
$db
->
num_rows
(
$result
))
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
users ADD achrev text NOT NULL default '' AFTER achievement"
);
//game表结构变动
$db
->
query
(
"ALTER TABLE
{
$tablepre
}
game DROP gamevars"
);
...
...
include/game/revattr.func.php
View file @
b9dc240c
...
...
@@ -47,24 +47,8 @@
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
);
if
(
empty
(
$pa
[
'wep_kind'
]))
$pa
[
'wep_kind'
]
=
get_wep_kind
(
$pa
);
$range
=
isset
(
$rangeinfo
[
$pa
[
'wep_kind'
]])
?
$rangeinfo
[
$pa
[
'wep_kind'
]]
:
NULL
;
return
$range
;
}
...
...
@@ -706,7 +690,7 @@
$sp_cost_max
=
$sp_cost_r
*
$pa
[
'wepe'
];
//获取实际消耗体力:
$sp_cost
=
min
(
$sp_cost_max
,
$pa
[
'sp'
]
-
1
);
$log_sp_cost
=
round
(
$sp_cost
);
$log_sp_cost
=
ceil
(
$sp_cost
);
$log
.=
"消耗
{
$log_sp_cost
}
点体力,"
;
}
else
...
...
@@ -717,7 +701,7 @@
$factor
=
$pa
[
'type'
]
?
0.5
:
0.5
+
round
((
$sp_cost
/
$sp_cost_max
)
/
2
,
1
);
//获取伤害变化倍率并扣除体力
$dmg_p
[]
=
round
(
$factor
,
2
);
$pa
[
'sp'
]
-=
$
sp_cost
;
if
(
isset
(
$log_sp_cost
))
$pa
[
'sp'
]
-=
$log_
sp_cost
;
//输出log
$f
=
round
(
100
*
$factor
);
$log
.=
"发挥了灵力武器
{
$f
}
%的威力!<br>"
;
...
...
@@ -932,12 +916,12 @@
{
global
$ex_attack
;
$ex_keys
=
Array
();
foreach
(
$
ex_attack
as
$ex
)
foreach
(
$
pa
[
'ex_keys'
]
as
$ex
)
{
if
(
in_array
(
$ex
,
$
pa
[
'ex_keys'
]
))
if
(
in_array
(
$ex
,
$
ex_attack
))
{
//
去除该条件后不会过滤重复属性 即可以造成多次同属性伤害
if
(
!
in_array
(
$ex
,
$ex_keys
))
$ex_keys
[]
=
$ex
;
//
把$ex_attack和$pa['ex_keys']位置调换可过滤重复属性,现在不会过滤
$ex_keys
[]
=
$ex
;
}
}
return
$ex_keys
;
...
...
@@ -1266,7 +1250,54 @@
return
0
;
}
//判断pd是否满足反击pa的基础条件(姿态)
//获取pa对pd的先制攻击概率,
// $mode 0-标准战斗 1-鏖战 2-追击(追击&鏖战基础先制率不受天气姿态影响)
function
get_active_r_rev
(
&
$pa
,
&
$pd
,
$mode
=
0
)
{
global
$active_obbs
,
$weather
,
$gamecfg
,
$chase_active_obbs
;
include
config
(
'combatcfg'
,
$gamecfg
);
if
(
!
$mode
)
{
# 获取基础先攻率:
$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
;
}
else
{
$active_r
=
$chase_active_obbs
;
# 计算追击状态下pa对pd的先攻加成。默认:战场距离*10%
if
(
$mode
==
2
)
$range_ar
+=
get_battle_range
(
$pa
,
$pd
,
1
)
*
10
;
}
# 计算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
;
}
// 判断pd是否满足反击pa的基础条件(最高优先级)
function
check_can_counter
(
&
$pa
,
&
$pd
,
$active
)
{
# 治疗姿态、哨戒姿态、躲避策略不能反击
...
...
@@ -1275,14 +1306,16 @@
return
1
;
}
//
判断pa是否处于pd的反击射程内
//
判断pa是否处于pd的反击射程内(次优先级)
function
check_in_counter_range
(
&
$pa
,
&
$pd
,
$active
)
{
if
(
$pd
[
'wep_range'
]
>=
$pa
[
'wep_range'
]
&&
$pa
[
'wep_range'
]
!=
0
)
return
1
;
if
(
!
empty
(
$pa
[
'wep_range'
])
&&
$pd
[
'wep_range'
]
>=
$pa
[
'wep_range'
])
return
1
;
# 鏖战状态下无视射程反击(爆系武器除外)
if
((
isset
(
$pd
[
'is_dfight'
])
||
isset
(
$pa
[
'is_dfight'
]))
&&
!
empty
(
$pd
[
'wep_range'
]))
return
1
;
return
0
;
}
//获取pd成功对pa发起反击的概率
//
获取pd成功对pa发起反击的概率
function
get_counter_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$counter_obbs
,
$inf_counter_p
,
$pose_counter_modifier
,
$tactic_counter_modifier
;
...
...
@@ -1301,6 +1334,9 @@
$counter
=
max
(
8
,
$counter
);
}
# 鏖战状态下,将基础反击率修正为100
if
(
isset
(
$pd
[
'is_dfight'
])
||
isset
(
$pa
[
'is_dfight'
]))
$counter
=
100
;
# 获取社团技能对反击率的修正
$counter
*=
rev_get_clubskill_bonus_counter
(
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
,
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
);
...
...
@@ -1317,4 +1353,58 @@
return
$counter
;
}
//计算战场距离:仅供追击/鏖战机制使用
function
get_battle_range
(
&
$pa
,
&
$pd
,
$active
)
{
//战场距离 = (双方射程差值 - 战斗回合数) * 10
if
(
!
isset
(
$pa
[
'wep_range'
]))
$pa
[
'wep_range'
]
=
get_wep_range
(
$pa
);
if
(
!
isset
(
$pd
[
'wep_range'
]))
$pd
[
'wep_range'
]
=
get_wep_range
(
$pd
);
$range
=
abs
(
$pa
[
'wep_range'
]
-
$pd
[
'wep_range'
]);
$turns
=
get_battle_turns
(
$pa
,
$pd
,
$active
);
$range
=
max
(
0
,
$range
-
$turns
);
return
$range
;
}
//获取战斗轮次:仅供追击/鏖战机制使用
function
get_battle_turns
(
&
$pa
,
&
$pd
,
$active
)
{
if
(
!
isset
(
$pa
[
'clbpara'
][
'battle_turns'
])
||
!
isset
(
$pd
[
'clbpara'
][
'battle_turns'
]))
{
change_battle_turns
(
$pa
,
$pd
,
$active
);
}
# 如果敌我双方记录的战斗轮次不同步,选择其中更小的一方……这是因为逃跑时可能不会重置NPC的战斗轮次。
# 或许本来也不用重置NPC的战斗轮次……?
$turns
=
$pa
[
'clbpara'
][
'battle_turns'
]
==
$pd
[
'clbpara'
][
'battle_turns'
]
?
$pa
[
'clbpara'
][
'battle_turns'
]
:
min
(
$pa
[
'clbpara'
][
'battle_turns'
],
$pd
[
'clbpara'
][
'battle_turns'
]);
return
$turns
;
}
//战斗轮步进
function
change_battle_turns
(
&
$pa
,
&
$pd
,
$active
)
{
if
(
!
isset
(
$pa
[
'clbpara'
][
'battle_turns'
]))
{
$pa
[
'clbpara'
][
'battle_turns'
]
=
0
;
}
else
{
$pa
[
'clbpara'
][
'battle_turns'
]
++
;
}
if
(
!
isset
(
$pd
[
'clbpara'
][
'battle_turns'
]))
{
$pd
[
'clbpara'
][
'battle_turns'
]
=
0
;
}
else
{
$pd
[
'clbpara'
][
'battle_turns'
]
++
;
}
return
;
}
//重置战斗回合
function
rs_battle_turns
(
&
$pa
,
&
$pd
)
{
if
(
isset
(
$pa
[
'clbpara'
][
'battle_turns'
]))
unset
(
$pa
[
'clbpara'
][
'battle_turns'
]);
if
(
isset
(
$pd
[
'clbpara'
][
'battle_turns'
]))
unset
(
$pd
[
'clbpara'
][
'battle_turns'
]);
return
;
}
?>
\ No newline at end of file
include/game/revbattle.func.php
View file @
b9dc240c
...
...
@@ -4,41 +4,72 @@
exit
(
'Access Denied'
);
}
//
获取pa对pd的先制攻击概率
function
get_active_r_rev
(
&
$pa
,
&
$pd
)
//
战斗中切换武器
function
change_wep_in_battle
(
$s
=
2
)
{
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'
]))
global
$log
,
$nosta
;
global
$wep
,
$wepk
,
$wepe
,
$weps
,
$wepsk
;
global
$wep2
,
$wep2k
,
$wep2e
,
$wep2s
,
$wep2sk
;
# 初始化主武器名
$eqp
=
'wep'
;
# 初始化副武器名
$seqp
=
'wep'
.
$s
;
$seqpk
=
$seqp
.
'k'
;
$seqpe
=
$seqp
.
'e'
;
$seqps
=
$seqp
.
's'
;
$seqpsk
=
$seqp
.
'sk'
;
# 保存副武器数据
$swep
=
${$seqp}
;
$swepk
=
${$seqpk}
;
$swepe
=
${$seqpe}
;
$sweps
=
${$seqps}
;
$swepsk
=
${$seqpsk}
;
# 主武器为空、副武器不为空的情况下,直接替换为副武器
if
((
$wepk
==
'WN'
||
!
$weps
)
&&
(
$swepk
!=
'WN'
))
{
foreach
(
$inf_active_p
as
$inf_ky
=>
$value
)
${$eqp}
=
$swep
;
${$seqp}
=
'拳头'
;
$
{
$eqp
.
'k'
}
=
$swepk
;
${$seqpk}
=
'WN'
;
$
{
$eqp
.
'e'
}
=
$swepe
;
${$seqpe}
=
0
;
$
{
$eqp
.
's'
}
=
$sweps
;
${$seqps}
=
$nosta
;
$
{
$eqp
.
'sk'
}
=
$swepsk
;
${$seqpsk}
=
''
;
$log
.=
"你将
{
$wep
}
拿在了手上。<br>"
;
}
# 主武器不为空的情况下,副武器替换为主武器
elseif
(
$wepk
!=
'WN'
)
{
${$seqp}
=
${$eqp}
;
${$eqp}
=
$swep
;
${$seqpk}
=
$
{
$eqp
.
'k'
};
$
{
$eqp
.
'k'
}
=
$swepk
;
${$seqpe}
=
$
{
$eqp
.
'e'
};
$
{
$eqp
.
'e'
}
=
$swepe
;
${$seqps}
=
$
{
$eqp
.
's'
};
$
{
$eqp
.
's'
}
=
$sweps
;
${$seqpsk}
=
$
{
$eqp
.
'sk'
};
$
{
$eqp
.
'sk'
}
=
$swepsk
;
$log
.=
"你将
{
$wep2
}
收了起来"
;
if
(
$wepk
!=
'WN'
)
$log
.=
",将
{
$wep
}
拿在了手上"
;
$log
.=
"。<br>"
;
}
else
{
$log
.=
"你没有装备副武器!去给自己找一个吧!<br>"
;
}
return
;
}
//战斗中逃跑
function
escape_from_enemy
(
&
$pa
,
&
$pd
)
{
global
$action
,
$clbpara
,
$chase_escape_obbs
,
$log
;
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
# 在受追击/鏖战状态下逃跑有概率失败
if
(
strpos
(
$action
,
'pchase'
)
===
0
||
strpos
(
$action
,
'dfight'
)
===
0
)
{
$escape_dice
=
diceroll
(
99
);
if
(
$escape_dice
<
$chase_escape_obbs
)
{
if
(
strpos
(
$pa
[
'inf'
],
$inf_ky
)
!==
false
){
$inf_ar
*=
$value
;}
$log
.=
"你尝试逃跑,但是敌人在你身后紧追不舍!<br>"
;
$pa
[
'fail_escape'
]
=
1
;
return
0
;
}
}
# 计算社团技能对于先攻率的修正:
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
;
$log
.=
"你逃跑了。"
;
$action
=
''
;
unset
(
$clbpara
[
'battle_turns'
]);
return
1
;
}
//发现敌人
...
...
@@ -61,7 +92,7 @@
//初始化界面与log
$battle_title
=
init_battle_title
(
$sdata
,
$edata
);
$log
.=
init_battle_log
(
$sdata
,
$edata
);
if
(
strpos
(
$sdata
[
'action'
],
'chase'
)
!==
false
)
init_rev_battle
(
1
);
if
(
strpos
(
$sdata
[
'action'
],
'chase'
)
!==
false
||
strpos
(
$sdata
[
'action'
],
'dfight'
)
!==
false
)
init_rev_battle
(
1
);
else
init_rev_battle
();
//检查是敌对或中立单位
...
...
@@ -143,9 +174,13 @@
{
if
(
strpos
(
$pa
[
'action'
],
'chase'
)
!==
false
)
{
if
(
strpos
(
$pa
[
'action'
],
'pchase'
)
!==
false
)
$title
=
'
陷入鏖战
'
;
if
(
strpos
(
$pa
[
'action'
],
'pchase'
)
!==
false
)
$title
=
'
遭到追击
'
;
else
$title
=
'乘胜追击'
;
}
if
(
strpos
(
$pa
[
'action'
],
'dfight'
)
!==
false
)
{
$title
=
'陷入鏖战'
;
}
else
{
$title
=
'发现敌人'
;
...
...
@@ -167,6 +202,10 @@
$battle_log
=
"你再度锁定了<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>!<br>"
;
}
}
elseif
(
strpos
(
$pa
[
'action'
],
'dfight'
)
!==
false
)
{
$battle_log
=
"你与<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>相互对峙着!<br>"
;
}
else
{
if
(
$pd
[
'pose'
]
==
7
)
...
...
include/game/revcombat.func.php
View file @
b9dc240c
This diff is collapsed.
Click to expand it.
include/game/search.func.php
View file @
b9dc240c
...
...
@@ -630,6 +630,7 @@ function discover($schmode = 0) {
//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'
;
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
//获取并保存当前玩家数据
$sdata
=
current_player_save
();
//计算先攻概率
...
...
@@ -637,7 +638,7 @@ function discover($schmode = 0) {
$bid
=
$edata
[
'pid'
];
$active_dice
=
diceroll
(
99
);
//先制
if
(
$active_dice
<
$active_r
)
if
(
$active_dice
<
$active_r
)
{
$action
=
'enemy'
.
$edata
[
'pid'
];
#include_once GAME_ROOT.'./include/game/battle.func.php';
...
...
templates/default/battle.htm
View file @
b9dc240c
...
...
@@ -48,6 +48,14 @@
<td
height=
"20px"
class=
"b2"
><span>
{lang inf}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_infdata}-->
$w_infdata
<!--{else}-->
无
<!--{/if}-->
</span></td>
</tr>
<tr>
<td
height=
20px
></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</td>
</tr>
...
...
templates/default/battle_rev.htm
View file @
b9dc240c
...
...
@@ -48,6 +48,19 @@
<td
height=
"20px"
class=
"b2"
><span>
{lang inf}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_infdata}-->
$w_infdata
<!--{else}-->
无
<!--{/if}-->
</span></td>
</tr>
<tr>
<!--{if isset($s_clbpara['battle_turns'])}-->
<td
class=
"b2"
height=
20px
><span>
战斗回合
</span></td>
<td
class=
"b3"
><span>
$s_clbpara['battle_turns']
</span></td>
<!--{else}-->
<td
height=
20px
></td>
<td></td>
<!--{/if}-->
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</td>
</tr>
...
...
templates/default/battlecmd_rev.htm
View file @
b9dc240c
...
...
@@ -8,9 +8,14 @@
</div>
<!--{else}-->
<div
id=
"enemy"
>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"
><br>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w1"
value=
"{$attinfo[$w1]}"
onclick=
"$('command').value='$w1';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{if $s_wep2s}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"padding-left: 5px; width:100"
name=
"w1"
value=
"切换副武器"
onclick=
"$('command').value='changewep';postCmd('gamecmd','command.php');this.disabled=true;"
>
<!--{/if}-->
<br>
<!--{if $w2}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
><br>
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
>
<br>
<!--{/if}-->
</div>
<!--{/if}-->
...
...
templates/default/profile.htm
View file @
b9dc240c
...
...
@@ -186,6 +186,7 @@
<TD
class=
b3
>
<!--{if CURSCRIPT == 'game' && $mode == 'command' && $wepe}-->
<span><input
type=
"button"
value=
"卸下"
onclick=
"$('mode').value='itemmain';$('command').value='offwep';postCmd('gamecmd','command.php');return false;"
</
span
>
<!--{/if}-->
<span>
<!--{if $weps}-->
$wep_words
<!--{else}-->
$nowep
<!--{/if}-->
</span>
<span
class=
"eicon"
onclick=
"$('mode').value='itemmain';$('command').value='changewep';postCmd('gamecmd','command.php');return false;"
>
🔃
</span>
</TD>
<TD
class=
b3
><span>
$wepsk_words
</span></TD>
<TD
class=
b3
><span>
$wepe
</span></TD>
...
...
user_profile.php
View file @
b9dc240c
...
...
@@ -50,6 +50,10 @@ for ($i=0; $i<$achievement_count; $i++)
{
$cpl
[
$i
]
=
check_achievement
(
$i
,
$n
);
$prc
[
$i
]
=
fetch_achievement
(
$i
,
$n
);
//$ncp[$i]['s'] = $cpl[$i];
//$ncp[$i]['v'] = $prc[$i];
}
//$ncp = json_encode($ncp);
//$db->query("UPDATE {$tablepre}users SET achrev='$ncp' WHERE username='$n'" );
include
template
(
'user_profile'
);
valid.php
View file @
b9dc240c
...
...
@@ -64,6 +64,7 @@ if($mode == 'enter') {
$icon
=
$icon
?
$icon
:
rand
(
1
,
$iconlimit
);
$club
=
0
;
$wep2
=
'拳头'
;
$wep2k
=
'WN'
;
$wep2e
=
0
;
$wep2s
=
$nosta
;
$wep2sk
=
''
;
$arb
=
$gd
==
'm'
?
'男生校服'
:
'女生校服'
;
$arbk
=
'DB'
;
$arbe
=
5
;
$arbs
=
15
;
$arbsk
=
''
;
$arh
=
$ara
=
$arf
=
$art
=
''
;
...
...
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