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
0d67f709
Commit
0d67f709
authored
Feb 06, 2023
by
Nemo Ma
Committed by
GitHub
Feb 06, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22 from hikawiier/waaagh
rev combat phase 1~2.33 …………也许,所谓「过去」就是那样的东西吧……
parents
cfd8b1ec
4d4c0c2f
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
3267 additions
and
1709 deletions
+3267
-1709
command.php
command.php
+40
-15
game.php
game.php
+1
-1
gamedata/cache/combatcfg_1.php
gamedata/cache/combatcfg_1.php
+45
-1
gamedata/cache/resources_1.php
gamedata/cache/resources_1.php
+3
-1
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+2
-1
img/n_63.gif
img/n_63.gif
+0
-0
img/n_64.gif
img/n_64.gif
+0
-0
include/game.func.php
include/game.func.php
+131
-21
include/game/attr.func.php
include/game/attr.func.php
+13
-5
include/game/battle.func.php
include/game/battle.func.php
+2
-2
include/game/clubskills.func.php
include/game/clubskills.func.php
+244
-0
include/game/combat.func.php
include/game/combat.func.php
+99
-70
include/game/elementmix.func.php
include/game/elementmix.func.php
+1
-1
include/game/item2.func.php
include/game/item2.func.php
+2
-1
include/game/itemmain.func.php
include/game/itemmain.func.php
+119
-0
include/game/revattr.func.php
include/game/revattr.func.php
+1148
-0
include/game/revattr_extra.func.php
include/game/revattr_extra.func.php
+454
-0
include/game/revbattle.func.php
include/game/revbattle.func.php
+102
-0
include/game/revcombat.func.php
include/game/revcombat.func.php
+631
-885
include/game/search.func.php
include/game/search.func.php
+9
-5
include/global.func.php
include/global.func.php
+22
-4
include/news.func.php
include/news.func.php
+6
-2
include/state.func.php
include/state.func.php
+54
-66
templates/default/battle.htm
templates/default/battle.htm
+6
-173
templates/default/battle_rev.htm
templates/default/battle_rev.htm
+117
-0
templates/default/battlecmd_rev.htm
templates/default/battlecmd_rev.htm
+9
-0
templates/default/profile.htm
templates/default/profile.htm
+7
-174
templates/default/revbattle.htm
templates/default/revbattle.htm
+0
-278
templates/default/revbattleresult.htm
templates/default/revbattleresult.htm
+0
-3
No files found.
command.php
View file @
0d67f709
...
@@ -405,23 +405,48 @@ if($hp > 0){
...
@@ -405,23 +405,48 @@ if($hp > 0){
}
elseif
(
$mode
==
'combat'
)
{
}
elseif
(
$mode
==
'combat'
)
{
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
combat
(
1
,
$command
);
combat
(
1
,
$command
);
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
combat
(
1
,
$command
);
}
elseif
(
$mode
==
'revcombat'
){
}
elseif
(
$mode
==
'revcombat'
){
//NPC vs NPC:
global
$action
;
if
(
$command
==
'enter'
&&
(
strpos
(
$action
,
'corpse'
)
===
0
||
strpos
(
$action
,
'pacorpse'
)
===
0
)
)
if
(
strpos
(
$action
,
'enemy'
)
===
0
)
{
{
$cid
=
strpos
(
$action
,
'corpse'
)
===
0
?
str_replace
(
'corpse'
,
''
,
$action
)
:
str_replace
(
'pacorpse'
,
''
,
$action
);
$enemyid
=
str_replace
(
'enemy'
,
''
,
$action
);
if
(
$cid
)
}
{
if
(
!
$enemyid
||
(
strpos
(
$action
,
'enemy'
)
===
false
))
global
$db
,
$tablepre
;
{
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$cid
' AND hp=0"
);
$log
.=
"<span class=
\"
yellow b
\"
>你没有遇到敌人,或已经离开战场!</span>
{
$enemyid
}
<br>"
;
if
(
$db
->
num_rows
(
$result
)
>
0
)
goto
back_flag
;
{
}
$edata
=
$db
->
fetch_array
(
$result
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$enemyid
'"
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
if
(
!
$db
->
num_rows
(
$result
))
{
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
$log
.=
"对方不存在!<br>"
;
findcorpse
(
$edata
);
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>"
;
}
elseif
(
$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
==
'back'
)
{
$log
.=
"你逃跑了。"
;
$action
=
''
;
back_flag
:
$mode
=
'command'
;
}
else
{
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$pdata
,
$edata
,
1
,
$command
,
$message
);
}
}
}
elseif
(
$mode
==
'rest'
)
{
}
elseif
(
$mode
==
'rest'
)
{
include_once
GAME_ROOT
.
'./include/state.func.php'
;
include_once
GAME_ROOT
.
'./include/state.func.php'
;
...
...
game.php
View file @
0d67f709
...
@@ -108,7 +108,7 @@ elseif((strpos($action,'neut')===0)){
...
@@ -108,7 +108,7 @@ elseif((strpos($action,'neut')===0)){
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$nid
' AND hp>0"
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$nid
' AND hp>0"
);
if
(
$db
->
num_rows
(
$result
)
>
0
){
if
(
$db
->
num_rows
(
$result
)
>
0
){
$edata
=
$db
->
fetch_array
(
$result
);
$edata
=
$db
->
fetch_array
(
$result
);
include_once
GAME_ROOT
.
'./include/game/rev
combat
.func.php'
;
include_once
GAME_ROOT
.
'./include/game/rev
battle
.func.php'
;
findneut
(
$edata
,
1
);
findneut
(
$edata
,
1
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
init_battle
(
1
);
init_battle
(
1
);
...
...
gamedata/cache/combatcfg_1.php
View file @
0d67f709
...
@@ -17,18 +17,62 @@ $dmg_fluc = Array('N' => 15, 'P' => 15, 'K' => 40, 'G' => 20, 'C' => 5, 'D' => 2
...
@@ -17,18 +17,62 @@ $dmg_fluc = Array('N' => 15, 'P' => 15, 'K' => 40, 'G' => 20, 'C' => 5, 'D' => 2
//熟练度对伤害的影响,每点熟练度增加的伤害
//熟练度对伤害的影响,每点熟练度增加的伤害
$skill_dmg
=
Array
(
'N'
=>
0.6
,
'P'
=>
0.6
,
'K'
=>
0.65
,
'G'
=>
0.6
,
'C'
=>
0.4
,
'D'
=>
0.75
,
'F'
=>
0.4
,
'J'
=>
0.7
);
$skill_dmg
=
Array
(
'N'
=>
0.6
,
'P'
=>
0.6
,
'K'
=>
0.65
,
'G'
=>
0.6
,
'C'
=>
0.4
,
'D'
=>
0.75
,
'F'
=>
0.4
,
'J'
=>
0.7
);
//$skill_dmg = Array('N' => 0.5, 'P' => 0.5, 'K' => 0.5, 'G' => 0.6, 'C' => 0.3, 'D' => 0.4, 'F'=> 1.2);
//$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'
,
'K'
=>
'K'
,
'G'
=>
'G'
,
'J'
=>
'G'
,
'C'
=>
'C'
,
'D'
=>
'D'
,
'F'
=>
'F'
,
);
//天气对攻击力的影响(单位:百分比加算)
$weather_attack_modifier
=
Array
(
10
,
10
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
0
,
7
,
20
,
-
7
,
-
20
,
-
5
,
-
10
,
-
10
,
-
10
,
10
);
//天气对防御力的影响(单位:百分比加算)
$weather_defend_modifier
=
Array
(
10
,
30
,
0
,
0
,
-
3
,
-
15
,
-
10
,
0
,
-
20
,
-
30
,
-
50
,
-
5
,
-
20
,
-
3
,
-
20
,
5
,
-
30
,
30
);
//姿态对攻击力的影响(单位:百分比加算)
$pose_attack_modifier
=
Array
(
0
,
100
,
0
,
-
25
,
25
,
-
50
,
50
);
//姿态对防御力的影响(单位:百分比加算)
$pose_defend_modifier
=
Array
(
0
,
25
,
0
,
-
25
,
-
50
,
-
50
,
-
466
);
//应战策略对攻击力的加成(单位:百分比加算)
$tactic_attack_modifier
=
Array
(
0
,
20
,
-
25
,
25
,
-
50
);
//应战策略对防御力的加成(单位:百分比加算)
$tactic_defend_modifier
=
Array
(
0
,
-
20
,
50
,
-
25
,
0
);
//场景对攻击力的加成(单位:百分比加算) wtf
$pls_attack_modifier
=
Array
(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
10
,
0
,
0
,
-
5
,
0
,
5
,
5
,
-
5
,
-
5
,
5
,
0
,
-
15
,
-
5
,
0
,
-
10
,
0
,
0
,
5
,
-
5
,
-
15
,
-
5
,
0
,
0
,
0
,
0
,
0
,
10
,
-
10
,
5
,
0
,
0
,
0
,
-
20
,
0
,
15
// 0, 0, 0, 0, 0, 0, 10, 0, 0, -10, 0, 0, 0, 0, -10, 0, 0, 0, 10, 0, 0, 0
);
//场景对防御力的加成(单位:百分比加算)
$pls_defend_modifier
=
Array
(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
0
,
-
10
,
0
,
0
,
-
10
,
0
,
0
,
0
,
0
,
0
,
-
10
,
5
,
0
,
-
10
,
0
,
0
,
5
,
0
,
0
,
0
,
0
,
0
,
-
10
,
-
10
,
-
10
,
0
,
0
,
0
,
5
,
5
,
5
,
0
,
0
,
-
5
,
0
// 0, -10, 10, 0, 0, 0, 0, 0, 0, 0, 0, -10, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0
);
//各种攻击方式可能导致受伤的部位
//各种攻击方式可能导致受伤的部位
$infatt
=
Array
(
'N'
=>
'bhaf'
,
'P'
=>
'bhaf'
,
'K'
=>
'bhaf'
,
'G'
=>
'bhaf'
,
'C'
=>
'bhaf'
,
'D'
=>
'bhaf'
,
'F'
=>
'bhaf'
,
'J'
=>
'bhaf'
);
$infatt
=
Array
(
'N'
=>
'bhaf'
,
'P'
=>
'bhaf'
,
'K'
=>
'bhaf'
,
'G'
=>
'bhaf'
,
'C'
=>
'bhaf'
,
'D'
=>
'bhaf'
,
'F'
=>
'bhaf'
,
'J'
=>
'bhaf'
);
//各种攻击方式可能导致受伤的部位
$infatt_rev
=
Array
(
'N'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'P'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'K'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'G'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'C'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'D'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'F'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),
'J'
=>
Array
(
'b'
,
'h'
,
'a'
,
'f'
),);
//各种攻击方式的致伤率
//各种攻击方式的致伤率
$infobbs
=
Array
(
'N'
=>
5
,
'P'
=>
15
,
'K'
=>
55
,
'G'
=>
20
,
'C'
=>
10
,
'D'
=>
45
,
'F'
=>
30
,
'J'
=>
100
);
$infobbs
=
Array
(
'N'
=>
5
,
'P'
=>
15
,
'K'
=>
55
,
'G'
=>
20
,
'C'
=>
10
,
'D'
=>
45
,
'F'
=>
30
,
'J'
=>
100
);
//$infobbs = Array('N' => 5, 'P' => 15, 'K' => 30, 'G' => 30, 'C' => 15, 'D' => 40, 'F' => 30);
//$infobbs = Array('N' => 5, 'P' => 15, 'K' => 30, 'G' => 30, 'C' => 15, 'D' => 40, 'F' => 30);
//各种攻击方式的武器损伤概率
//各种攻击方式的武器损伤概率
$wepimprate
=
Array
(
'N'
=>
-
1
,
'P'
=>
12
,
'K'
=>
30
,
'G'
=>
-
1
,
'C'
=>
-
1
,
'D'
=>
-
1
,
'F'
=>
-
1
,
'J'
=>
-
1
);
$wepimprate
=
Array
(
'N'
=>
-
1
,
'P'
=>
12
,
'K'
=>
30
,
'G'
=>
-
1
,
'C'
=>
-
1
,
'D'
=>
-
1
,
'F'
=>
-
1
,
'J'
=>
-
1
);
//特殊效果发生的概率,这里指属性,跟武器系别无关
//特殊效果发生的概率,这里指属性,跟武器系别无关
$specialrate
=
Array
(
'N'
=>
40
,
'n'
=>
30
,
'B'
=>
95
,
'b'
=>
95
);
$specialrate
=
Array
(
'N'
=>
40
,
'n'
=>
30
,
'
y'
=>
30
,
'
B'
=>
95
,
'b'
=>
95
);
//属性攻击登录
//属性攻击登录
$ex_attack
=
Array
(
'p'
,
'u'
,
'i'
,
'd'
,
'e'
,
'w'
,
'f'
,
'k'
);
$ex_attack
=
Array
(
'p'
,
'u'
,
'i'
,
'd'
,
'e'
,
'w'
,
'f'
,
'k'
);
//各属性攻击对应的防御属性
$ex_def_kind
=
Array
(
'p'
=>
'q'
,
'u'
=>
'U'
,
'f'
=>
'U'
,
'i'
=>
'I'
,
'k'
=>
'I'
,
'e'
=>
'E'
,
'w'
=>
'W'
,
'd'
=>
'D'
,
);
//各种属性攻击的得意武器( 伤害2倍)
//各种属性攻击的得意武器( 伤害2倍)
$ex_good_wep
=
Array
(
'p'
=>
'K'
,
'u'
=>
'G'
,
'i'
=>
'C'
,
'd'
=>
'D'
,
'e'
=>
'P'
,
'w'
=>
'D'
);
$ex_good_wep
=
Array
(
'p'
=>
'K'
,
'u'
=>
'G'
,
'i'
=>
'C'
,
'd'
=>
'D'
,
'e'
=>
'P'
,
'w'
=>
'D'
);
//各种属性攻击的得意社团(致伤命中率+20)
//各种属性攻击的得意社团(致伤命中率+20)
...
...
gamedata/cache/resources_1.php
View file @
0d67f709
...
@@ -50,7 +50,7 @@ $clubinfo = Array(
...
@@ -50,7 +50,7 @@ $clubinfo = Array(
98
=>
'换装迷宫'
,
98
=>
'换装迷宫'
,
99
=>
'决死结界'
99
=>
'决死结界'
);
);
$wthinfo
=
Array
(
'晴天'
,
'大晴'
,
'多云'
,
'小雨'
,
'暴雨'
,
'台风'
,
'雷雨'
,
'下雪'
,
'起雾'
,
'浓雾'
,
'<span class="yellow">瘴气</span>'
,
'<span class="red">龙卷风</span>'
,
'<span class="clan">暴风雪</span>'
,
'<span class="blue">冰雹</span>'
,
'<span class="linen">离子暴</span>'
,
'<span class="green">辐射尘</span>'
,
'<span class="purple">臭氧洞</span>'
);
$wthinfo
=
Array
(
'晴天'
,
'大晴'
,
'多云'
,
'小雨'
,
'暴雨'
,
'台风'
,
'雷雨'
,
'下雪'
,
'起雾'
,
'浓雾'
,
'<span class="yellow">瘴气</span>'
,
'<span class="red">龙卷风</span>'
,
'<span class="clan">暴风雪</span>'
,
'<span class="blue">冰雹</span>'
,
'<span class="linen">离子暴</span>'
,
'<span class="green">辐射尘</span>'
,
'<span class="purple">臭氧洞</span>'
,
'<span class="gold">极光</span>'
);
$sexinfo
=
Array
(
0
=>
'未定'
,
'm'
=>
'男生'
,
'f'
=>
'女生'
);
$sexinfo
=
Array
(
0
=>
'未定'
,
'm'
=>
'男生'
,
'f'
=>
'女生'
);
$raceinfo
=
Array
(
0
=>
'人类'
,
1
=>
'兽人'
,
2
=>
'妖精'
,
3
=>
'龙'
,
4
=>
'鱼人'
,
5
=>
'AI'
);
$raceinfo
=
Array
(
0
=>
'人类'
,
1
=>
'兽人'
,
2
=>
'妖精'
,
3
=>
'龙'
,
4
=>
'鱼人'
,
5
=>
'AI'
);
$hpinfo
=
Array
(
'并无大碍'
,
'伤痕累累'
,
'生命危险'
,
'已经死亡'
);
$hpinfo
=
Array
(
'并无大碍'
,
'伤痕累累'
,
'生命危险'
,
'已经死亡'
);
...
@@ -1144,6 +1144,7 @@ $itemspkinfo_tooltip = Array
...
@@ -1144,6 +1144,7 @@ $itemspkinfo_tooltip = Array
'w'
=>
Array
(
'title'
=>
"攻击对手时,将产生额外的音波属性伤害。也有可能让对手陷入混乱异常状态。"
,),
'w'
=>
Array
(
'title'
=>
"攻击对手时,将产生额外的音波属性伤害。也有可能让对手陷入混乱异常状态。"
,),
'X'
=>
Array
(
'title'
=>
"可能会一击必杀。"
,),
'X'
=>
Array
(
'title'
=>
"可能会一击必杀。"
,),
'x'
=>
Array
(
'title'
=>
"人类,可以挑战神么?"
,),
'x'
=>
Array
(
'title'
=>
"人类,可以挑战神么?"
,),
'y'
=>
Array
(
'title'
=>
"攻击对手时,一定几率无效属性抹消类与属性防御类属性,并增加让对手陷入异常状态的概率。"
,),
'Z'
=>
Array
(
'title'
=>
"该物品可以使用特定物品进行强化。"
,),
'Z'
=>
Array
(
'title'
=>
"该物品可以使用特定物品进行强化。"
,),
'z'
=>
Array
(
'title'
=>
"那么,这个有什么用呢……?"
,),
'z'
=>
Array
(
'title'
=>
"那么,这个有什么用呢……?"
,),
'-'
=>
Array
(
'title'
=>
"战斗时无效双方的防具效果。"
,),
'-'
=>
Array
(
'title'
=>
"战斗时无效双方的防具效果。"
,),
...
@@ -1196,6 +1197,7 @@ $itemspkinfo = Array(
...
@@ -1196,6 +1197,7 @@ $itemspkinfo = Array(
'w'
=>
'音波'
,
'w'
=>
'音波'
,
'X'
=>
'直死'
,
//NPC专用
'X'
=>
'直死'
,
//NPC专用
'x'
=>
'奇迹'
,
'x'
=>
'奇迹'
,
'y'
=>
'破格'
,
//属穿
'Z'
=>
'菁英'
,
'Z'
=>
'菁英'
,
'z'
=>
'天然'
,
'z'
=>
'天然'
,
'-'
=>
'精神抽取'
,
'-'
=>
'精神抽取'
,
...
...
gamedata/cache/style_20190718.css
View file @
0d67f709
...
@@ -91,6 +91,7 @@ table.admin td.tdtitle {
...
@@ -91,6 +91,7 @@ table.admin td.tdtitle {
.clit
{
color
:
#feea23
;
font
:
18pt
"微软雅黑"
serif
;
}
.clit
{
color
:
#feea23
;
font
:
18pt
"微软雅黑"
serif
;
}
.yellow
{
color
:
#ffff00
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.yellow
{
color
:
#ffff00
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.gold
{
color
:
rgb
(
255
,
215
,
0
);
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.clan
{
color
:
#00ffff
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.clan
{
color
:
#00ffff
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.blue
{
color
:
#0060ff
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.blue
{
color
:
#0060ff
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.red
{
color
:
#ff0000
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
.red
{
color
:
#ff0000
;
font
:
bold
10pt
"微软雅黑"
serif
;
line-height
:
16px
}
...
@@ -370,7 +371,7 @@ span[tooltip]:hover:before {
...
@@ -370,7 +371,7 @@ span[tooltip]:hover:before {
text-shadow
:
3px
3px
3px
#3b3535
;
text-align
:
center
;
text-fill-color
:
white
;
-webkit-text-fill-color
:
white
;
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
);
background-size
:
0
;
background-clip
:
border-box
;
background-color
:
rgba
(
198
,
114
,
199
,
0.8
);
top
:
20px
;
left
:
-5px
;
border-radius
:
2px
;
top
:
20px
;
left
:
-5px
;
border-radius
:
2px
;
width
:
160px
;
max-width
:
160px
;
z-index
:
3
;
position
:
absolute
;
width
:
160px
;
max-width
:
160px
;
z-index
:
3
;
position
:
absolute
;
z-index
:
5
;
}
}
/*==========下拉菜单样式==========*/
/*==========下拉菜单样式==========*/
...
...
img/n_63.gif
View replaced file @
cfd8b1ec
View file @
0d67f709
6.95 KB
|
W:
|
H:
6.95 KB
|
W:
|
H:
2-up
Swipe
Onion skin
img/n_64.gif
View replaced file @
cfd8b1ec
View file @
0d67f709
5.66 KB
|
W:
|
H:
5.7 KB
|
W:
|
H:
2-up
Swipe
Onion skin
include/game.func.php
View file @
0d67f709
...
@@ -359,27 +359,120 @@ function init_battle($ismeet = 0){
...
@@ -359,27 +359,120 @@ function init_battle($ismeet = 0){
return
;
return
;
}
}
//function get_pstate($pid){//玩家状态储存在内存表里,读取之前先判断是否存在
function
init_rev_battle
(
$ismeet
=
0
)
// global $db,$tablepre,$now;
{
// $result=$db->query("SELECT * FROM {$tablepre}pstate WHERE pid = '$pid'");
global
$fog
,
$hpinfo
,
$spinfo
,
$rageinfo
,
$wepeinfo
,
$typeinfo
,
$sexinfo
,
$infinfo
;
// if($db->num_rows($result)){
$ui_data
=
Array
(
'hpstate'
,
'spstate'
,
'ragestate'
,
'wepestate'
,
'wepk_words'
,
'wep_words'
,
'infdata'
,
'iconImg'
,
'iconImgB'
,
'sNoinfo'
);
// $psdata = $db->fetch_array($result);
$init_data
=
update_db_player_structure
();
// }else{
foreach
(
Array
(
'w_'
,
's_'
)
as
$p
)
// $psdata = false;
{
// }
foreach
(
$init_data
as
$i
)
// return $psdata;
{
//}
global
$
{
$p
.
$i
};
}
//function set_pstate($psdata){//玩家状态储存在内存表里,若存在则更新记录,否则创建记录
foreach
(
$ui_data
as
$u
)
// global $db,$tablepre;
{
// $pid = $psdata['pid'];
global
$
{
$p
.
$u
};
// $result=$db->query("SELECT * FROM {$tablepre}pstate WHERE pid = '$pid'");
}
// if($db->num_rows($result)){
//更新血量、体力、怒气显示
// return $db->array_update("{$tablepre}pstate",$psdata," pid = '$pid'");
if
(
$
{
$p
.
'hp'
}
<=
0
)
// }else{
{
// return $db->array_insert("{$tablepre}pstate",$psdata);
$
{
$p
.
'hpstate'
}
=
"<span class=
\"
red
\"
>
$hpinfo[3]
</span>"
;
// }
$
{
$p
.
'spstate'
}
=
"<span class=
\"
red
\"
>
$spinfo[3]
</span>"
;
//}
$
{
$p
.
'ragestate'
}
=
"<span class=
\"
red
\"
>
$rageinfo[3]
</span>"
;
}
else
{
if
(
$
{
$p
.
'hp'
}
<
$
{
$p
.
'mhp'
}
*
0.2
)
{
$
{
$p
.
'hpstate'
}
=
"<span class=
\"
red
\"
>
$hpinfo[2]
</span>"
;
}
elseif
(
$
{
$p
.
'hp'
}
<
$
{
$p
.
'mhp'
}
*
0.5
)
{
$
{
$p
.
'hpstate'
}
=
"<span class=
\"
yellow
\"
>
$hpinfo[1]
</span>"
;
}
else
{
$
{
$p
.
'hpstate'
}
=
"<span class=
\"
clan
\"
>
$hpinfo[0]
</span>"
;
}
if
(
$
{
$p
.
'sp'
}
<
$
{
$p
.
'msp'
}
*
0.2
)
{
$
{
$p
.
'spstate'
}
=
"
$spinfo[2]
"
;
}
elseif
(
$
{
$p
.
'sp'
}
<
$
{
$p
.
'msp'
}
*
0.5
)
{
$
{
$p
.
'spstate'
}
=
"
$spinfo[1]
"
;
}
else
{
$
{
$p
.
'spstate'
}
=
"
$spinfo[0]
"
;
}
if
(
$
{
$p
.
'rage'
}
>=
100
)
{
$
{
$p
.
'ragestate'
}
=
"<span class=
\"
red
\"
>
$rageinfo[2]
</span>"
;
}
elseif
(
$
{
$p
.
'rage'
}
>=
30
)
{
$
{
$p
.
'ragestate'
}
=
"<span class=
\"
yellow
\"
>
$rageinfo[1]
</span>"
;
}
else
{
$
{
$p
.
'ragestate'
}
=
"
$rageinfo[0]
"
;
}
}
//更新武器效果情报
switch
(
$
{
$p
.
'wepe'
})
{
case
$
{
$p
.
'wepe'
}
>=
400
:
$
{
$p
.
'wepestate'
}
=
"
$wepeinfo[3]
"
;
break
;
case
$
{
$p
.
'wepe'
}
>=
200
:
$
{
$p
.
'wepestate'
}
=
"
$wepeinfo[2]
"
;
break
;
case
$
{
$p
.
'wepe'
}
>=
60
:
$
{
$p
.
'wepestate'
}
=
"
$wepeinfo[1]
"
;
break
;
default
:
$
{
$p
.
'wepestate'
}
=
"
$wepeinfo[0]
"
;
}
//更新武器名、武器类别情报
$
{
$p
.
'wep_words'
}
=
parse_itm_desc
(
$
{
$p
.
'wep'
},
'm'
);
$
{
$p
.
'wepk_words'
}
=
parse_itm_desc
(
$
{
$p
.
'wepk'
},
'k'
);
//更新编号情报
$
{
$p
.
'sNoinfo'
}
=
$typeinfo
[
$
{
$p
.
'type'
}]
.
"("
.
$sexinfo
[
$
{
$p
.
'gd'
}]
.
$
{
$p
.
'sNo'
}
.
"号)"
;
//更新头像情报
$itype
=
$
{
$p
.
'type'
}
>
0
?
'n'
:
$
{
$p
.
'gd'
};
$iname
=
$itype
.
'_'
.
$
{
$p
.
'icon'
};
if
(
file_exists
(
'img/'
.
$iname
.
'a.gif'
))
{
$
{
$p
.
'iconImgB'
}
=
$iname
.
'a.gif'
;
}
else
{
$
{
$p
.
'iconImg'
}
=
$iname
.
'.gif'
;
unset
(
$
{
$p
.
'iconImgB'
});
}
//更新受伤状态
if
(
$
{
$p
.
'inf'
})
{
$
{
$p
.
'infdata'
}
=
''
;
foreach
(
$infinfo
as
$inf_ky
=>
$inf_nm
)
{
if
(
strpos
(
$
{
$p
.
'inf'
},
$inf_ky
)
!==
false
)
$
{
$p
.
'infdata'
}
.=
$inf_nm
;
}
}
else
{
$
{
$p
.
'infdata'
}
=
''
;
}
}
if
(
$fog
&&
!
$ismeet
)
{
//雾天显示???
$w_wep_words
=
'???'
;
$w_wepk_words
=
'???'
;
$w_sNoinfo
=
'???'
;
$w_iconImg
=
'question.gif'
;
$w_iconImgB
=
''
;
$w_name
=
'???'
;
$w_wep
=
'???'
;
$w_infdata
=
'???'
;
$w_pose
=
-
1
;
$w_tactic
=
-
1
;
$w_lvl
=
'?'
;
$w_hpstate
=
'???'
;
$w_spstate
=
'???'
;
$w_ragestate
=
'???'
;
$w_wepestate
=
'???'
;
$w_wepk
=
''
;
}
return
;
}
function
get_remaincdtime
(
$pid
){
function
get_remaincdtime
(
$pid
){
$psdata
=
get_pstate
(
$pid
);
$psdata
=
get_pstate
(
$pid
);
...
@@ -393,8 +486,24 @@ function get_remaincdtime($pid){
...
@@ -393,8 +486,24 @@ function get_remaincdtime($pid){
}
}
}
}
//用于将当前玩家数据保存至数据库
function
current_player_save
(){
global
$db
,
$tablepre
;
$pdata
=
Array
();
$data
=
update_db_player_structure
();
foreach
(
$data
as
$key
)
{
global
$$key
;
$pdata
[
$key
]
=
$$key
;
}
$pdata
=
player_format_with_db_structure
(
$pdata
);
$db
->
array_update
(
"
{
$tablepre
}
players"
,
$pdata
,
"pid='
$pid
'"
);
return
$pdata
;
}
//用于将指定player数据存回数据库
function
player_save
(
$data
){
function
player_save
(
$data
){
global
$db
,
$tablepre
;
global
$db
,
$tablepre
;
$ndata
=
Array
();
if
(
isset
(
$data
[
'pid'
])){
if
(
isset
(
$data
[
'pid'
])){
$pid
=
$data
[
'pid'
];
$pid
=
$data
[
'pid'
];
$ndata
=
player_format_with_db_structure
(
$data
);
$ndata
=
player_format_with_db_structure
(
$data
);
...
@@ -403,6 +512,7 @@ function player_save($data){
...
@@ -403,6 +512,7 @@ function player_save($data){
}
}
return
;
return
;
}
}
//用于刷新当前玩家数据
function
player_load
(
$data
)
function
player_load
(
$data
)
{
{
$ndata
=
player_format_with_db_structure
(
$data
);
$ndata
=
player_format_with_db_structure
(
$data
);
...
...
include/game/attr.func.php
View file @
0d67f709
...
@@ -17,9 +17,14 @@ $tacinfo = Array('通常','','重视防御','重视反击','重视躲避',);
...
@@ -17,9 +17,14 @@ $tacinfo = Array('通常','','重视防御','重视反击','重视躲避',);
function
get_find_r
(
$weather
=
0
,
$pls
=
0
,
$pose
=
0
,
$tactic
=
0
,
$club
=
0
,
$inf
=
''
){
function
get_find_r
(
$weather
=
0
,
$pls
=
0
,
$pose
=
0
,
$tactic
=
0
,
$club
=
0
,
$inf
=
''
){
$_FIND
=
Array
$_FIND
=
Array
(
(
'weather'
=>
array
(
10
,
20
,
0
,
-
2
,
-
3
,
-
10
,
-
7
,
5
,
-
10
,
-
20
,
0
,
-
7
,
-
5
,
-
30
,
-
5
,
-
20
,
0
),
'weather'
=>
array
(
10
,
20
,
0
,
-
2
,
-
3
,
-
10
,
-
7
,
5
,
-
10
,
-
20
,
0
,
-
7
,
-
5
,
-
30
,
-
5
,
-
20
,
0
,
20
),
//'weather' => array(10,20,0,-2,-3,-7,-10,-5,10,0,0,-7,-5,-30),
//'weather' => array(10,20,0,-2,-3,-7,-10,-5,10,0,0,-7,-5,-30),
'pls'
=>
array
(
10
,
0
,
0
,
10
,
-
10
,
10
,
0
,
10
,
-
10
,
0
,
10
,
0
,
0
,
-
10
,
0
,
-
10
,
-
10
,
-
10
,
0
,
10
,
0
,
10
),
//'pls' => array(10,0,0,10,-10,10,0,10,-10,0,10,0,0,-10,0,-10,-10,-10,0,10,0,10),
'pls'
=>
Array
(
// 无月 端点 RF高 雪镇 索拉 指挥 梦幻 清水 白穗 墓地 麦斯 对天 夏镇 三体 光坂 守矢 常林 常高 秋镇 精灵 春镇 圣G 初始 幻想 永恒 妖精 冰封 花菱 FARG 风祭 格纳 和田 SCP 雏菊 英灵
20
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
,
20
// 10, 0, 0, 10, -10, 10, 0, 10, -10, 0, 10, 0, 0, -10, 0, -10, -10, -10, 0, 10, 0, 10
),
'pose'
=>
array
(
0
,
0
,
0
,
25
,
-
10
,
-
25
,
85
),
'pose'
=>
array
(
0
,
0
,
0
,
25
,
-
10
,
-
25
,
85
),
'tactic'
=>
array
(),
'tactic'
=>
array
(),
);
);
...
@@ -52,7 +57,7 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
...
@@ -52,7 +57,7 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global
$active_obbs
,
$inf_active_p
;
global
$active_obbs
,
$inf_active_p
;
$_ACTIVE
=
Array
$_ACTIVE
=
Array
(
(
'weather'
=>
array
(
10
,
20
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
-
7
,
-
10
,
-
10
,
-
5
,
0
,
-
5
,
-
20
,
-
5
,
0
),
'weather'
=>
array
(
10
,
20
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
-
7
,
-
10
,
-
10
,
-
5
,
0
,
-
5
,
-
20
,
-
5
,
0
,
20
),
//'weather' => array(20,10,0,-3,-5,-5,-7,10,-10,-10,-10,-5,0,-5),
//'weather' => array(20,10,0,-3,-5,-5,-7,10,-10,-10,-10,-5,0,-5),
'pls'
=>
array
(),
'pls'
=>
array
(),
'pose'
=>
array
(
0
,
0
,
0
,
0
,
25
,
-
25
,
5
),
'pose'
=>
array
(
0
,
0
,
0
,
0
,
25
,
-
25
,
5
),
...
@@ -72,6 +77,9 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
...
@@ -72,6 +77,9 @@ function get_active_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
//echo 'active:'.$active_r.' ';
//echo 'active:'.$active_r.' ';
return
$active_r
;
return
$active_r
;
}
}
# 下面的部分在新版战斗流程中已弃用 #
//命中率修正
//命中率修正
function
get_hitrate
(
$wkind
=
'N'
,
$skill
=
0
,
$club
=
0
,
$inf
=
''
){
function
get_hitrate
(
$wkind
=
'N'
,
$skill
=
0
,
$club
=
0
,
$inf
=
''
){
global
$hitrate_obbs
,
$hitrate_max_obbs
,
$hitrate_r
,
$weather
,
$inf_htr_p
;
global
$hitrate_obbs
,
$hitrate_max_obbs
,
$hitrate_r
,
$weather
,
$inf_htr_p
;
...
@@ -106,7 +114,7 @@ function get_attack_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
...
@@ -106,7 +114,7 @@ function get_attack_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global
$inf_att_p
;
global
$inf_att_p
;
$_ATTACK
=
Array
$_ATTACK
=
Array
(
(
'weather'
=>
array
(
10
,
10
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
0
,
7
,
20
,
-
7
,
-
20
,
-
5
,
-
10
,
-
10
,
-
10
),
'weather'
=>
array
(
10
,
10
,
0
,
-
5
,
-
10
,
-
20
,
-
15
,
0
,
0
,
7
,
20
,
-
7
,
-
20
,
-
5
,
-
10
,
-
10
,
-
10
,
10
),
'pls'
=>
array
(
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
,
0
,
-
10
,
0
,
0
,
0
,
0
,
-
10
,
0
,
0
,
0
,
10
,
0
,
0
,
0
),
'pls'
=>
array
(
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
,
0
,
-
10
,
0
,
0
,
0
,
0
,
-
10
,
0
,
0
,
0
,
10
,
0
,
0
,
0
),
'pose'
=>
array
(
0
,
100
,
0
,
-
25
,
25
,
-
50
,
50
),
'pose'
=>
array
(
0
,
100
,
0
,
-
25
,
25
,
-
50
,
50
),
'tactic'
=>
array
(
0
,
20
,
-
25
,
25
,
-
50
),
'tactic'
=>
array
(
0
,
20
,
-
25
,
25
,
-
50
),
...
@@ -131,7 +139,7 @@ function get_defend_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
...
@@ -131,7 +139,7 @@ function get_defend_p($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf
global
$inf_def_p
;
global
$inf_def_p
;
$_DEFEND
=
Array
$_DEFEND
=
Array
(
(
'weather'
=>
array
(
10
,
30
,
0
,
0
,
-
3
,
-
15
,
-
10
,
0
,
-
20
,
-
30
,
-
50
,
-
5
,
-
20
,
-
3
,
-
20
,
5
,
-
30
),
'weather'
=>
array
(
10
,
30
,
0
,
0
,
-
3
,
-
15
,
-
10
,
0
,
-
20
,
-
30
,
-
50
,
-
5
,
-
20
,
-
3
,
-
20
,
5
,
-
30
,
30
),
'pls'
=>
array
(
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
),
'pls'
=>
array
(
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
),
'pose'
=>
array
(
0
,
25
,
0
,
-
25
,
-
50
,
-
50
,
-
466
),
'pose'
=>
array
(
0
,
25
,
0
,
-
25
,
-
50
,
-
50
,
-
466
),
'tactic'
=>
array
(
0
,
-
20
,
50
,
-
25
,
0
),
'tactic'
=>
array
(
0
,
-
20
,
50
,
-
25
,
0
),
...
...
include/game/battle.func.php
View file @
0d67f709
...
@@ -79,7 +79,7 @@ function findteam(&$w_pdata){
...
@@ -79,7 +79,7 @@ function findteam(&$w_pdata){
function
findcorpse
(
&
$w_pdata
){
function
findcorpse
(
&
$w_pdata
){
global
$log
,
$mode
,
$main
,
$battle_title
,
$cmd
,
$iteminfo
,
$itemspkinfo
;
global
$log
,
$mode
,
$main
,
$battle_title
,
$cmd
,
$iteminfo
,
$itemspkinfo
;
global
$w_type
,
$w_name
,
$w_gd
,
$w_sNo
,
$w_icon
,
$w_hp
,
$w_mhp
,
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_lvl
,
$w_pose
,
$w_tactic
,
$w_inf
;
//,$itmsk0;
global
$w_type
,
$w_name
,
$w_gd
,
$w_sNo
,
$w_icon
,
$w_hp
,
$w_mhp
,
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_lvl
,
$w_pose
,
$w_tactic
,
$w_inf
,
$w_rp
;
//,$itmsk0;
global
$club
;
global
$club
;
$battle_title
=
'发现尸体'
;
$battle_title
=
'发现尸体'
;
...
@@ -114,7 +114,7 @@ function findcorpse(&$w_pdata){
...
@@ -114,7 +114,7 @@ function findcorpse(&$w_pdata){
$log
.=
'你发现了<span class="red">'
.
$w_name
.
'</span>的尸体!<br>'
;
$log
.=
'你发现了<span class="red">'
.
$w_name
.
'</span>的尸体!<br>'
;
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
,
'itm0'
,
'itm1'
,
'itm2'
,
'itm3'
,
'itm4'
,
'itm5'
,
'itm6'
)
as
$w_value
)
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
,
'itm0'
,
'itm1'
,
'itm2'
,
'itm3'
,
'itm4'
,
'itm5'
,
'itm6'
)
as
$w_value
)
{
{
${$w_value}
=
parse_itm_desc
(
${$w_value}
,
'm'
);
if
(
isset
(
${$w_value}
))
${$w_value}
=
parse_itm_desc
(
${$w_value}
,
'm'
);
}
}
foreach
(
Array
(
'w_wepk'
,
'w_arbk'
,
'w_arhk'
,
'w_arak'
,
'w_arfk'
,
'w_artk'
,
'w_itmk0'
,
'w_itmk1'
,
'w_itmk2'
,
'w_itmk3'
,
'w_itmk4'
,
'w_itmk5'
,
'w_itmk6'
)
as
$w_k_value
)
{
foreach
(
Array
(
'w_wepk'
,
'w_arbk'
,
'w_arhk'
,
'w_arak'
,
'w_arfk'
,
'w_artk'
,
'w_itmk0'
,
'w_itmk1'
,
'w_itmk2'
,
'w_itmk3'
,
'w_itmk4'
,
'w_itmk5'
,
'w_itmk6'
)
as
$w_k_value
)
{
if
(
${$w_k_value}
){
if
(
${$w_k_value}
){
...
...
include/game/clubskills.func.php
View file @
0d67f709
...
@@ -3,6 +3,8 @@ if (! defined ( 'IN_GAME' )) {
...
@@ -3,6 +3,8 @@ if (! defined ( 'IN_GAME' )) {
exit
(
'Access Denied'
);
exit
(
'Access Denied'
);
}
}
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
function
getskills
(
&
$arr
)
function
getskills
(
&
$arr
)
{
{
$arr
=
Array
(
$arr
=
Array
(
...
@@ -777,6 +779,248 @@ function upgradeclubskills($cmd)
...
@@ -777,6 +779,248 @@ function upgradeclubskills($cmd)
}
}
}
}
#适配新版战斗函数的社团技能判定函数:
function
rev_get_clubskill_bonus_hitrate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//命中率系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
3
&&
$pa
[
'wep_kind'
]
==
"K"
)
//见敌必斩称号
{
$r
*=
(
1
+
$clskl
[
3
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
5
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
*=
(
1
+
$clskl
[
5
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$blearn
[
'learn'
.
$i
]
==
12
)
//宛如疾风称号
{
$r
*=
(
1
-
$clskl
[
12
][
$
{
'b'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_imfrate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//防具损坏率系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
*=
(
1
+
$clskl
[
6
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_imftime
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//防具损坏效果系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
+=
$clskl
[
6
][
$
{
'a'
.
$i
}][
2
];
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_imprate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//武器损坏率系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
4
&&
$pa
[
'wep_kind'
]
==
"K"
)
//见敌必斩称号
{
$r
*=
(
1
-
$clskl
[
4
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
function
rev_get_clubskill_bonus
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
,
&
$att
,
&
$def
)
{
//攻击防御力加成
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$att
=
0
;
$def
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$blearn
[
'learn'
.
$i
]
==
1
&&
$pd
[
'wep_kind'
]
==
"P"
)
//铁拳无敌称号
{
$dup
=
$clskl
[
1
][
$
{
'b'
.
$i
}][
1
]
/
100
*
$pd
[
'wepe'
];
if
(
$dup
>
2000
)
$dup
=
2000
;
$def
+=
$dup
;
}
}
}
function
rev_get_clubskill_bonus_p
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
,
&
$att
,
&
$def
)
{
//攻击防御加成系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$att
=
1
;
$def
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
2
&&
$pa
[
'wep_kind'
]
==
"P"
)
//铁拳无敌称号
{
$att
*=
(
1
+
$clskl
[
2
][
$
{
'a'
.
$i
}][
1
]
/
100
);
if
(
rand
(
0
,
99
)
<
$clskl
[
2
][
$
{
'a'
.
$i
}][
2
])
$def
*=
(
1
-
$clskl
[
2
][
$
{
'a'
.
$i
}][
3
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
8
&&
$pa
[
'wep_kind'
]
==
"C"
)
//灌篮高手称号
{
$att
*=
(
1
+
$clskl
[
8
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
if
(
rand
(
0
,
99
)
<
$clskl
[
6
][
$
{
'a'
.
$i
}][
3
])
$att
*=
(
1
+
$clskl
[
6
][
$
{
'a'
.
$i
}][
4
]
/
100
);
}
}
}
function
rev_get_clubskill_bonus_fluc
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//伤害浮动值
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
8
&&
$pa
[
'wep_kind'
]
==
"C"
)
//灌篮高手称号
{
$r
+=
$clskl
[
8
][
$
{
'a'
.
$i
}][
2
];
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_counter
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//反击率加成
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
7
&&
$pa
[
'wep_kind'
]
==
'C'
)
//灌篮高手称号
{
$r
*=
(
1
+
$clskl
[
7
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
11
)
//宛如疾风称号
{
$r
*=
(
1
+
$clskl
[
11
][
$
{
'a'
.
$i
}][
3
]
/
100
);
}
if
(
$blearn
[
'learn'
.
$i
]
==
13
&&
$pd
[
'wep_kind'
]
==
'F'
)
//超能力者称号
{
$r
*=
(
1
-
$clskl
[
13
][
$
{
'b'
.
$i
}][
2
]
/
100
);
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_dmg_rate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//最终伤害加成/减成,a为攻击方,b为防御方
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$ar
=
100
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
14
)
//攻击方有晶莹技能,伤害大幅下降
{
$ar
-=
$clskl
[
14
][
$
{
'a'
.
$i
}][
1
];
}
}
$br
=
100
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$blearn
[
'learn'
.
$i
]
==
14
)
//防御方有晶莹技能,伤害下降
{
$br
-=
$clskl
[
14
][
$
{
'b'
.
$i
}][
2
];
}
}
$r
=
round
(
$ar
*
$br
)
/
10000
*
100
;
//高端的算法往往以低调的姿态示人
return
$r
;
}
function
rev_get_clubskill_bonus_dmg_val
(
$club
,
$skl
,
$pa
,
$pd
)
{
//最终伤害增加值
getskills2
(
$clskl
);
getlearnt
(
$learn
,
$club
,
$skl
);
$a1
=
((
int
)(
$skl
/
10
))
%
10
;
$a2
=
$skl
%
10
;
$rate
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$learn
[
'learn'
.
$i
]
==
15
)
//攻击方有剔透技能,得到概率
{
$rate
=
$clskl
[
15
][
$
{
'a'
.
$i
}][
1
];
}
}
$rate
-=
round
(
$pa
[
'rp'
]
/
20
);
if
(
$rate
<
0
){
$rate
=
0
;}
$rpdmg
=
$pd
[
'rp'
]
-
$pa
[
'rp'
];
$dice
=
diceroll
(
99
);
if
(
$rpdmg
>
0
&&
$dice
<
$rate
){
return
$rpdmg
;
}
return
0
;
}
function
rev_get_clubskill_rp_dec
(
$clb
,
$skl
)
{
//RP增长率下降
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$clb
,
$skl
);
$a1
=
((
int
)(
$skl
/
10
))
%
10
;
$a2
=
$skl
%
10
;
$r
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
14
)
$r
=
$clskl
[
14
][
$
{
'a'
.
$i
}][
3
];
//晶莹剔透1
}
//echo $r;
return
$r
;
}
#### 原社团技能函数:
function
get_clubskill_bonus_p
(
$aclub
,
$askl
,
$prefix1
,
$bclub
,
$bskl
,
$prefix2
,
&
$att
,
&
$def
)
function
get_clubskill_bonus_p
(
$aclub
,
$askl
,
$prefix1
,
$bclub
,
$bskl
,
$prefix2
,
&
$att
,
&
$def
)
{
{
//攻击防御加成系数
//攻击防御加成系数
...
...
include/game/combat.func.php
View file @
0d67f709
...
@@ -12,6 +12,7 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -12,6 +12,7 @@ function combat($active = 1, $wep_kind = '') {
global
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_weps
,
$w_arb
,
$w_arbk
,
$w_arbe
,
$w_arbs
,
$w_arh
,
$w_arhk
,
$w_arhe
,
$w_arhs
,
$w_ara
,
$w_arak
,
$w_arae
,
$w_aras
,
$w_arf
,
$w_arfk
,
$w_arfe
,
$w_arfs
,
$w_art
,
$w_artk
,
$w_arte
,
$w_arts
,
$w_itm0
,
$w_itmk0
,
$w_itme0
,
$w_itms0
,
$w_itm1
,
$w_itmk1
,
$w_itme1
,
$w_itms1
,
$w_itm2
,
$w_itmk2
,
$w_itme2
,
$w_itms2
,
$w_itm3
,
$w_itmk3
,
$w_itme3
,
$w_itms3
,
$w_itm4
,
$w_itmk4
,
$w_itme4
,
$w_itms4
,
$w_itm5
,
$w_itmk5
,
$w_itme5
,
$w_itms5
,
$w_itm6
,
$w_itmk6
,
$w_itme6
,
$w_itms6
,
$w_wepsk
,
$w_arbsk
,
$w_arhsk
,
$w_arask
,
$w_arfsk
,
$w_artsk
,
$w_itmsk0
,
$w_itmsk1
,
$w_itmsk2
,
$w_itmsk3
,
$w_itmsk4
,
$w_itmsk5
,
$w_itmsk6
;
global
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_weps
,
$w_arb
,
$w_arbk
,
$w_arbe
,
$w_arbs
,
$w_arh
,
$w_arhk
,
$w_arhe
,
$w_arhs
,
$w_ara
,
$w_arak
,
$w_arae
,
$w_aras
,
$w_arf
,
$w_arfk
,
$w_arfe
,
$w_arfs
,
$w_art
,
$w_artk
,
$w_arte
,
$w_arts
,
$w_itm0
,
$w_itmk0
,
$w_itme0
,
$w_itms0
,
$w_itm1
,
$w_itmk1
,
$w_itme1
,
$w_itms1
,
$w_itm2
,
$w_itmk2
,
$w_itme2
,
$w_itms2
,
$w_itm3
,
$w_itmk3
,
$w_itme3
,
$w_itms3
,
$w_itm4
,
$w_itmk4
,
$w_itme4
,
$w_itms4
,
$w_itm5
,
$w_itmk5
,
$w_itme5
,
$w_itms5
,
$w_itm6
,
$w_itmk6
,
$w_itme6
,
$w_itms6
,
$w_wepsk
,
$w_arbsk
,
$w_arhsk
,
$w_arask
,
$w_arfsk
,
$w_artsk
,
$w_itmsk0
,
$w_itmsk1
,
$w_itmsk2
,
$w_itmsk3
,
$w_itmsk4
,
$w_itmsk5
,
$w_itmsk6
;
global
$infinfo
,
$w_combat_inf
;
global
$infinfo
,
$w_combat_inf
;
global
$rp
,
$w_rp
,
$action
,
$w_action
,
$achievement
,
$w_achievement
,
$skills
,
$w_skills
,
$skillpoint
,
$w_skillpoint
;
global
$rp
,
$w_rp
,
$action
,
$w_action
,
$achievement
,
$w_achievement
,
$skills
,
$w_skills
,
$skillpoint
,
$w_skillpoint
;
global
$clubpara
,
$w_clubpara
;
$battle_title
=
'战斗发生'
;
$battle_title
=
'战斗发生'
;
...
@@ -176,9 +177,10 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -176,9 +177,10 @@ function combat($active = 1, $wep_kind = '') {
}
else
{
}
else
{
$log
.=
"<span class=
\"
red
\"
>你攻击范围不足,不能反击,逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>你攻击范围不足,不能反击,逃跑了!</span><br>"
;
}
}
}
else
if
(
$hp
>
0
)
{
}
else
{
$log
.=
"<span class=
\"
red
\"
>你逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>你逃跑了!</span><br>"
;
}
}
}
}
if
(
$hp
==
0
&&
!
$w_action
){
$w_action
=
'pacorpse'
.
$pid
;}
if
(
$hp
==
0
&&
!
$w_action
){
$w_action
=
'pacorpse'
.
$pid
;}
...
@@ -207,7 +209,18 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -207,7 +209,18 @@ function combat($active = 1, $wep_kind = '') {
//include_once GAME_ROOT.'./include/game/achievement.func.php';
//include_once GAME_ROOT.'./include/game/achievement.func.php';
//check_battle_achievement($w_achievement,$w_type,$name);
//check_battle_achievement($w_achievement,$w_type,$name);
}
}
if
(
$revival_flag
)
{
$w_log
.=
"<span class=
\"
yellow
\"
>
$name
</span><span class=
\"
red
\"
>被你杀死了!</span><br>"
;
if
(
$revival_flag
==
99
)
{
$w_log
.=
"<span class=
\"
lime
\"
>但由于及时按下了BOMB键,
{
$name
}
原地满血复活了!</span><br>"
;
}
elseif
(
$revival_flag
==
17
)
{
$w_log
.=
"<span class=
\"
lime
\"
>但是,空气中弥漫着的奥罗拉让
{
$name
}
重新站了起来!</span><br>"
;
}
}
logsave
(
$w_pid
,
$now
,
$w_log
,
'b'
);
logsave
(
$w_pid
,
$now
,
$w_log
,
'b'
);
}
}
...
@@ -223,80 +236,93 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -223,80 +236,93 @@ function combat($active = 1, $wep_kind = '') {
//$bid = $w_pid;
//$bid = $w_pid;
if
(
$w_hp
<=
0
&&
$w_club
!=
99
)
{
if
(
$w_hp
<=
0
)
$w_bid
=
$pid
;
{
$w_hp
=
0
;
//二形态最优先判断
if
(
$w_type
==
0
){
$killnum
++
;};
if
(
$w_club
==
99
&&
$w_type
)
{
include_once
GAME_ROOT
.
'./include/state.func.php'
;
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
$killmsg
=
kill
(
$wep_kind
,
$w_name
,
$w_type
,
$w_pid
,
$wep_temp
);
include_once
GAME_ROOT
.
'./include/system.func.php'
;
check_kill_events
(
$pid
,
$w_pid
);
$npcdata
=
evonpc
(
$w_type
,
$w_name
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
$log
.=
'<span class="yellow">'
.
$w_name
.
'却没死去,反而爆发出真正的实力!</span><br>'
;
if
(
$npcdata
){
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
addnews
(
$now
,
'evonpc'
,
$w_name
,
$npcdata
[
'name'
],
$name
);
check_battle_achievement
(
$name
,
$w_type
,
$w_name
,
$wep_temp
);
foreach
(
$npcdata
as
$key
=>
$val
){
$
{
'w_'
.
$key
}
=
$val
;
$log
.=
"<span class=
\"
red
\"
>
{
$w_name
}
被你杀死了!</span><br>"
;
}
//$rp = $rp + 20 ;
}
if
(
!
$w_type
){
if
(
$w_rp
<
80
){
$rpup
=
80
;
}
else
{
$rpup
=
$w_rp
;}
}
else
{
$rpup
=
20
;}
if
(
$club
==
19
){
$rpdec
=
30
;
$rpdec
+=
get_clubskill_rp_dec
(
$club
,
$skills
);
$rp
+=
round
(
$rpup
*
(
100
-
$rpdec
)
/
100
);
}
else
{
$rp
+=
$rpup
;
}
}
else
if
(
$killmsg
){
$log
.=
"<span class=
\"
yellow
\"
>你对
{
$w_name
}
说:“
{
$killmsg
}
”</span><br>"
;}
{
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
$w_bid
=
$pid
;
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$w_pid
'"
);
$w_hp
=
0
;
$cdata
=
$db
->
fetch_array
(
$result
);
$action
=
'corpse'
.
$edata
[
'pid'
];
$log
.=
"<span class=
\"
red
\"
>
{
$w_name
}
被你杀死了!</span><br>"
;
findcorpse
(
$cdata
);
//进行复活判定
return
;
include_once
GAME_ROOT
.
'./include/state.func.php'
;
}
else
{
$killmsg
=
kill
(
$wep_kind
,
$w_name
,
$w_type
,
$w_pid
,
$wep_temp
,
$revival_flag
);
if
(
$w_hp
<=
0
){
//有第二阶段
if
(
$revival_flag
)
if
(
$w_type
)
{
{
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
if
(
$revival_flag
==
99
)
include_once
GAME_ROOT
.
'./include/system.func.php'
;
{
$npcdata
=
evonpc
(
$w_type
,
$w_name
);
$log
.=
'<span class="yellow">'
.
$w_name
.
'由于其及时按了BOMB键而原地满血复活了!</span><br>'
;
$log
.=
'<span class="yellow">'
.
$w_name
.
'却没死去,反而爆发出真正的实力!</span><br>'
;
}
if
(
$npcdata
){
elseif
(
$revival_flag
==
17
)
addnews
(
$now
,
'evonpc'
,
$w_name
,
$npcdata
[
'name'
],
$name
);
{
foreach
(
$npcdata
as
$key
=>
$val
){
$log
.=
'<span class="yellow">但是,空气中弥漫着的奥罗拉让敌人重新站了起来!</span><br>'
;
$
{
'w_'
.
$key
}
=
$val
;
}
}
}
}
}
//没有复活 继续击杀判定
else
else
{
{
include_once
GAME_ROOT
.
'./include/state.func.php'
;
if
(
$w_type
==
0
){
$killnum
++
;};
$killmsg
=
kill
(
$wep_kind
,
$w_name
,
$w_type
,
$w_pid
,
$wep_temp
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
$log
.=
'<span class="yellow">'
.
$w_name
.
'由于其及时按了BOMB键而原地满血复活了!</span><br>'
;
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
check_battle_achievement
(
$name
,
$w_type
,
$w_name
,
$wep_temp
);
if
(
!
$w_type
){
if
(
$w_rp
<
80
){
$rpup
=
80
;
}
else
{
$rpup
=
$w_rp
;}
}
else
{
$rpup
=
20
;}
if
(
$club
==
19
){
$rpdec
=
30
;
$rpdec
+=
get_clubskill_rp_dec
(
$club
,
$skills
);
$rp
+=
round
(
$rpup
*
(
100
-
$rpdec
)
/
100
);
}
else
{
$rp
+=
$rpup
;
}
if
(
$killmsg
){
$log
.=
"<span class=
\"
yellow
\"
>你对
{
$w_name
}
说:“
{
$killmsg
}
”</span><br>"
;}
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$w_pid
'"
);
$cdata
=
$db
->
fetch_array
(
$result
);
$action
=
'corpse'
.
$edata
[
'pid'
];
findcorpse
(
$cdata
);
return
;
}
}
}
}
$main
=
'battle'
;
}
init_battle
(
1
);
//再注销一次复活标记
if
(
CURSCRIPT
!==
'botservice'
)
if
(
$revival_flag
)
unset
(
$revival_flag
);
{
include
template
(
'battleresult'
);
$main
=
'battle'
;
//$cmd = '<br><br><input type="hidden" name="mode" value="command"><input type="radio" name="command" id="back" value="back" checked><a onclick=sl("back"); href="javascript:void(0);" >确定</a><br>';
init_battle
(
1
);
$cmd
=
ob_get_contents
();
ob_clean
();
if
(
CURSCRIPT
!==
'botservice'
)
//$bid = $hp <= 0 ? $bid : 0;
{
}
include
template
(
'battleresult'
);
$action
=
''
;
//$cmd = '<br><br><input type="hidden" name="mode" value="command"><input type="radio" name="command" id="back" value="back" checked><a onclick=sl("back"); href="javascript:void(0);" >确定</a><br>';
return
;
$cmd
=
ob_get_contents
();
}
ob_clean
();
//$bid = $hp <= 0 ? $bid : 0;
}
$action
=
''
;
return
;
}
}
function
attack
(
$wep_kind
=
'N'
,
$active
=
0
)
{
function
attack
(
$wep_kind
=
'N'
,
$active
=
0
)
{
...
@@ -1297,7 +1323,6 @@ function defend($w_wep_kind = 'N', $active = 0) {
...
@@ -1297,7 +1323,6 @@ function defend($w_wep_kind = 'N', $active = 0) {
$attack
=
$w_att
+
$watt
;
$attack
=
$w_att
+
$watt
;
$defend
=
checkdef
(
$def
,
$arbe
+
$arhe
+
$arae
+
$arfe
,
$w_att_key
);
$defend
=
checkdef
(
$def
,
$arbe
+
$arhe
+
$arae
+
$arfe
,
$w_att_key
);
$damage
=
get_original_dmg
(
'w_'
,
''
,
$attack
,
$defend
,
$w_wep_skill
,
$w_wep_kind
);
$damage
=
get_original_dmg
(
'w_'
,
''
,
$attack
,
$defend
,
$w_wep_skill
,
$w_wep_kind
);
if
(
$w_wep_kind
==
'F'
)
{
if
(
$w_wep_kind
==
'F'
)
{
...
@@ -1390,8 +1415,10 @@ function defend($w_wep_kind = 'N', $active = 0) {
...
@@ -1390,8 +1415,10 @@ function defend($w_wep_kind = 'N', $active = 0) {
include_once
GAME_ROOT
.
'./include/state.func.php'
;
include_once
GAME_ROOT
.
'./include/state.func.php'
;
$killmsg
=
death
(
$w_wep_kind
,
$w_name
,
$w_type
,
$w_wep_temp
);
$killmsg
=
death
(
$w_wep_kind
,
$w_name
,
$w_type
,
$w_wep_temp
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'kill'
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'kill'
);
if
(
$tmp_club
==
99
)
if
(
$hp
>
0
)
{
$log
.=
'<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>'
;
$log
.=
'<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>'
;
}
}
}
}
else
{
}
else
{
$damage
=
0
;
$damage
=
0
;
...
@@ -1427,6 +1454,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
...
@@ -1427,6 +1454,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
$att_pow
*=
$attfac
;
$att_pow
*=
$attfac
;
$def_pow
*=
$deffac
;
$def_pow
*=
$deffac
;
if
(
$def_pow
<=
0
){
$def_pow
=
0.01
;}
if
(
$def_pow
<=
0
){
$def_pow
=
0.01
;}
echo
"【DEBUG】原始伤害计算阶段:PA的基础攻击为
{
$att_pow
}
,PD的基础防御为
{
$def_pow
}
,"
;
$damage
=
(
$att_pow
/
$def_pow
)
*
$ws
*
$skill_dmg
[
$wp_kind
];
$damage
=
(
$att_pow
/
$def_pow
)
*
$ws
*
$skill_dmg
[
$wp_kind
];
$dfluc
=
$dmg_fluc
[
$wp_kind
];
$dfluc
=
$dmg_fluc
[
$wp_kind
];
...
@@ -1435,6 +1463,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
...
@@ -1435,6 +1463,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
$dmg_factor
=
(
100
+
rand
(
-
$dfluc
,
$dfluc
))
/
100
;
$dmg_factor
=
(
100
+
rand
(
-
$dfluc
,
$dfluc
))
/
100
;
$damage
=
round
(
$damage
*
$dmg_factor
*
rand
(
4
,
10
)
/
10
);
$damage
=
round
(
$damage
*
$dmg_factor
*
rand
(
4
,
10
)
/
10
);
echo
"【DEBUG】伤害浮动为
{
$dmg_factor
}
,原始伤害为
{
$damage
}
<br>"
;
return
$damage
;
return
$damage
;
}
}
...
...
include/game/elementmix.func.php
View file @
0d67f709
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
global
$
{
'element'
.
$e_key
};
global
$
{
'element'
.
$e_key
};
if
(
$
{
'element'
.
$e_key
})
if
(
$
{
'element'
.
$e_key
})
{
{
$log
.=
"<span t
itle
=
\"
"
.
print_elements_tags
(
$e_key
)
.
"
\"
>"
;
$log
.=
"<span t
ooltip
=
\"
"
.
print_elements_tags
(
$e_key
)
.
"
\"
>"
;
$log
.=
"◆
{
$e_info
}
:
{${
'element'
.
$e_key
}}
份;"
;
$log
.=
"◆
{
$e_info
}
:
{${
'element'
.
$e_key
}}
份;"
;
$log
.=
"</span><br>"
;
$log
.=
"</span><br>"
;
}
}
...
...
include/game/item2.func.php
View file @
0d67f709
...
@@ -61,7 +61,7 @@ function poison($itmn = 0) {
...
@@ -61,7 +61,7 @@ function poison($itmn = 0) {
function
wthchange
(
$itm
,
$itmsk
){
function
wthchange
(
$itm
,
$itmsk
){
global
$now
,
$log
,
$weather
,
$wthinfo
,
$name
,
$nick
;
global
$now
,
$log
,
$weather
,
$wthinfo
,
$name
,
$nick
;
$weathertd
=
$weather
;
$weathertd
=
$weather
;
if
(
$weather
>=
14
&&
$weather
<=
1
6
){
if
(
$weather
>=
14
&&
$weather
<=
1
7
){
addnews
(
$now
,
'wthfail'
,
$nick
.
' '
.
$name
,
$weather
,
$itm
);
addnews
(
$now
,
'wthfail'
,
$nick
.
' '
.
$name
,
$weather
,
$itm
);
$log
.=
"你使用了
{
$itm
}
。<br /><span class=
\"
red
\"
>但是恶劣的天气并未发生任何变化!</span><br />"
;
$log
.=
"你使用了
{
$itm
}
。<br /><span class=
\"
red
\"
>但是恶劣的天气并未发生任何变化!</span><br />"
;
}
else
{
}
else
{
...
@@ -69,6 +69,7 @@ function wthchange($itm,$itmsk){
...
@@ -69,6 +69,7 @@ function wthchange($itm,$itmsk){
elseif
(
$itmsk
==
98
){
$weather
=
rand
(
10
,
13
);}
//随机恶劣天气
elseif
(
$itmsk
==
98
){
$weather
=
rand
(
10
,
13
);}
//随机恶劣天气
elseif
(
$itmsk
==
97
){
$weather
=
rand
(
0
,
9
);}
//随机一般天气
elseif
(
$itmsk
==
97
){
$weather
=
rand
(
0
,
9
);}
//随机一般天气
elseif
(
$itmsk
==
96
){
$weather
=
rand
(
8
,
9
);}
//随机起雾天气
elseif
(
$itmsk
==
96
){
$weather
=
rand
(
8
,
9
);}
//随机起雾天气
elseif
(
$itmsk
==
95
){
$weather
=
17
;}
//极光天气
elseif
(
!
empty
(
$itmsk
)
&&
is_numeric
(
$itmsk
)){
elseif
(
!
empty
(
$itmsk
)
&&
is_numeric
(
$itmsk
)){
if
(
$itmsk
>=
0
&&
$itmsk
<
count
(
$wthinfo
)){
if
(
$itmsk
>=
0
&&
$itmsk
<
count
(
$wthinfo
)){
$weather
=
$itmsk
;
$weather
=
$itmsk
;
...
...
include/game/itemmain.func.php
View file @
0d67f709
...
@@ -1106,7 +1106,126 @@ function getcorpse($item){
...
@@ -1106,7 +1106,126 @@ function getcorpse($item){
return
;
return
;
}
}
//武器损耗&消耗计算:force_imp:强制扣除武器效果;check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function
weapon_loss
(
&
$pa
,
$hurtvalue
,
$force_imp
=
0
,
$check_sk
=
0
)
{
global
$log
,
$wepimprate
,
$nosta
;
if
(
$hurtvalue
>
0
&&
$pa
[
'wep_kind'
]
!=
'N'
)
{
$wep_loss_flag
=
0
;
//获取武器损耗类型
$wep_imp
=
$wepimprate
[
$pa
[
'wep_kind'
]];
//损耗型武器
if
(
$wep_imp
>
0
||
$force_imp
)
{
if
(
$pa
[
'weps'
]
==
$nosta
||
$force_imp
)
{
$pa
[
'wepe'
]
=
max
(
0
,
$pa
[
'wepe'
]
-
$hurtvalue
);
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的攻击力下降了
{
$hurtvalue
}
。</span><br>"
;
}
else
{
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$hurtvalue
);
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的耐久度下降了
{
$hurtvalue
}
。</span><br>"
;
}
if
(
empty
(
$pa
[
'weps'
])
||
empty
(
$pa
[
'wepe'
]))
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>使用过度,已经损坏,无法再装备了!<br>"
;
$wep_loss_flag
=
1
;
}
}
//消耗型武器
else
{
if
(
$pa
[
'weps'
]
!=
$nosta
)
{
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$hurtvalue
);
if
(
$pa
[
'wep_kind'
]
==
'C'
||
$pa
[
'wep_kind'
]
==
'D'
||
$pa
[
'wep_kind'
]
==
'F'
)
{
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
用掉了
{
$hurtvalue
}
个
{
$pa
[
'wep'
]
}
。</span><br>"
;
if
(
empty
(
$pa
[
'weps'
]))
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>用光了!<br>"
;
$wep_loss_flag
=
1
;
}
}
elseif
(
$pa
[
'wep_kind'
]
==
'G'
||
$pa
[
'wep_kind'
]
==
'J'
)
{
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的弹药数减少了
{
$hurtvalue
}
。</span><br>"
;
if
(
empty
(
$pa
[
'weps'
]))
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>弹药用光了!<br>"
;
$pa
[
'weps'
]
=
$nosta
;
}
}
}
}
if
(
$wep_loss_flag
)
{
//剔除武器属性
if
(
$check_sk
&&
!
empty
(
$pa
[
'wepsk'
]))
unset_ex_from_array
(
$pa
,
get_itmsk_array
(
$pa
[
'wepsk'
]));
$pa
[
'wep'
]
=
'拳头'
;
$pa
[
'wep_kind'
]
=
'N'
;
$pa
[
'wepk'
]
=
'WN'
;
$pa
[
'wepe'
]
=
0
;
$pa
[
'weps'
]
=
$nosta
;
$pa
[
'wepsk'
]
=
''
;
return
-
1
;
}
}
return
;
}
//扣除指定装备的耐久。check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function
armor_hurt
(
&
$pa
,
$which
,
$hurtvalue
,
$check_sk
=
0
)
{
global
$log
,
$nosta
;
if
(
!
empty
(
$pa
[
$which
.
's'
]))
{
//无限耐久的防具可以抵挡1次任意点损耗
if
(
$pa
[
$which
.
's'
]
==
$nosta
)
{
$pa
[
$which
.
's'
]
=
$hurtvalue
;
}
//扣除耐久
$x
=
min
(
$pa
[
$which
.
's'
],
$hurtvalue
);
$pa
[
$which
.
's'
]
=
$pa
[
$which
.
's'
]
-
$x
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class=
\"
grey
\"
>
{
$pa
[
'nm'
]
}
的"
.
$pa
[
$which
]
.
"的耐久度下降了
{
$x
}
!</span><br>"
;
//耐久为0 装备损坏
if
(
$pa
[
$which
.
's'
]
<=
0
)
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>"
.
$pa
[
$which
]
.
"</span>受损过重,无法再装备了!<br>"
;
//剔除防具属性
if
(
$check_sk
&&
!
empty
(
$pa
[
$which
.
'sk'
]))
unset_ex_from_array
(
$pa
,
get_itmsk_array
(
$pa
[
$which
.
'sk'
]));
if
(
$which
==
'arb'
)
{
$pa
[
$which
]
=
'内衣'
;
$pa
[
$which
.
'k'
]
=
'DN'
;
$pa
[
$which
.
'e'
]
=
0
;
$pa
[
$which
.
's'
]
=
$nosta
;
$pa
[
$which
.
'sk'
]
=
''
;
}
else
{
$pa
[
$which
]
=
$pa
[
$which
.
'k'
]
=
$pa
[
$which
.
'sk'
]
=
''
;
$pa
[
$which
.
'e'
]
=
$pa
[
$which
.
's'
]
=
0
;
}
return
-
1
;
}
}
return
0
;
}
//从属性数组中剔除指定属性
function
unset_ex_from_array
(
&
$pa
,
$exarr
)
{
if
(
!
empty
(
$pa
[
'ex_keys'
])
&&
!
empty
(
$exarr
))
{
foreach
(
$exarr
as
$ex
)
{
if
(
in_array
(
$ex
,
$pa
[
'ex_keys'
]))
unset
(
$pa
[
'ex_keys'
][
array_search
(
$ex
,
$pa
[
'ex_keys'
])]);
}
}
return
;
}
?>
?>
include/game/revattr.func.php
0 → 100644
View file @
0d67f709
<?php
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
}
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr_extra.func.php'
;
//获取真实攻击类别
function
get_wep_kind
(
&
$pa
,
$wep_kind
=
''
)
{
global
$nosta
;
if
(
isset
(
$pa
[
'is_wpg'
]))
unset
(
$pa
[
'is_wpg'
]);
if
(
!
empty
(
$wep_kind
))
{
$pa
[
'wep_kind'
]
=
strpos
(
$pa
[
'wepk'
],
$wep_kind
)
===
false
?
substr
(
$pa
[
'wepk'
],
1
,
1
)
:
$wep_kind
;
}
else
{
$w1
=
substr
(
$pa
[
'wepk'
],
1
,
1
);
$w2
=
substr
(
$pa
[
'wepk'
],
2
,
1
);
if
(((
$w1
==
'G'
)
||
(
$w1
==
'J'
))
&&
(
$pa
[
'weps'
]
==
$nosta
))
{
$pa
[
'wep_kind'
]
=
$w2
?
$w2
:
'P'
;
if
(
$pa
[
'wep_kind'
]
==
'P'
)
$pa
[
'is_wpg'
]
=
true
;
}
else
{
$pa
[
'wep_kind'
]
=
$w1
;
}
}
return
;
}
//获取防具上的属性
//如果你想设计一个在战斗中能临时获得属性的机制,请在这两个函数执行完毕后,把属性加入返回的结果内。除非你希望技能的机制优先级高于三抽的判定。
function
get_equip_ex_array
(
&
$pa
)
{
$skarr
=
Array
();
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$equip
)
{
if
(
$pa
[
$equip
.
's'
])
{
if
(
!
empty
(
$pa
[
$equip
.
'sk'
]))
$skarr
=
array_merge
(
$skarr
,
get_itmsk_array
(
$pa
[
$equip
.
'sk'
]));
}
}
return
$skarr
;
}
//获取武器、饰品上的属性
function
get_wep_ex_array
(
&
$pa
)
{
$skarr
=
Array
();
if
(
!
isset
(
$pa
[
'is_wpg'
])
&&
$pa
[
'weps'
]
&&
!
empty
(
$pa
[
'wepsk'
]))
{
$skarr
=
array_merge
(
$skarr
,
get_itmsk_array
(
$pa
[
'wepsk'
]));
}
if
(
$pa
[
'arts'
])
{
if
(
!
empty
(
$pa
[
'artsk'
]))
$skarr
=
array_merge
(
$skarr
,
get_itmsk_array
(
$pa
[
'artsk'
]));
switch
(
$pa
[
'artk'
])
{
case
'Ag'
:
$skarr
[]
=
'g'
;
break
;
case
'Al'
:
$skarr
[]
=
'l'
;
break
;
case
'Ah'
:
$skarr
[]
=
'h'
;
break
;
case
'Ac'
:
$skarr
[]
=
'c'
;
break
;
}
}
return
$skarr
;
}
//在初始化战斗阶段触发的事件。即:无论是否反击都只会触发1次的事件。
function
combat_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
{
# 百命猫 初始化事件: 每次初始化战斗时都会提升等级与怒气
if
((
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'是TSEROF啦!'
)
||
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
))
{
attr_extra_89_100lifecat
(
$pa
,
$pd
,
$active
);
}
# 笼中鸟 初始化事件:喂养成功会跳过战斗
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'笼中鸟'
)
{
$flag
=
attr_extra_89_cagedbird
(
$pa
,
$pd
,
$active
);
if
(
$flag
<
0
)
return
$flag
;
}
elseif
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'笼中鸟'
)
{
$flag
=
attr_extra_89_cagedbird
(
$pd
,
$pa
,
$active
);
if
(
$flag
<
0
)
return
$flag
;
}
return
1
;
}
//攻击方(pa)在命中流程前触发的事件(直死、DOT结算、踩陷阱……) 返回值小于0:中止打击流程
function
hitrate_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$attinfo
;
# 玩家直死反噬:这是一个暴毙死法,触发时将中止后续战斗动作。
if
(
in_array
(
'X'
,
$pa
[
'ex_keys'
])
&&
!
$pa
[
'type'
])
{
$xdice
=
diceroll
(
99
);
if
(
$xdice
<=
14
)
{
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
手中的武器忽然失去了控制,喀吧一声就斩断了什么!那似乎是
{
$pa
[
'nm'
]
}
的死线……</span><br>"
;
$pa
[
'gg_flag'
]
=
39
;
#这个标记用于登记暴毙死法 39-武器反噬
$pa
[
'hp'
]
=
0
;
return
-
1
;
}
}
# 真红暮进攻事件:
# 注意:真红暮的进攻事件虽然有让敌人扣血致死的可能,但是不应该返回-1,因为死的不是自己。在这个函数里,只有攻击方在造成伤害前暴毙才需要返回-1。
# 如果想为真红暮的特殊攻击提供指定死法,请在判定中添加:$pd['gg_flag'] = '死法编号';
if
(
$pa
[
'type'
]
==
19
&&
$pa
[
'name'
]
==
'红暮'
)
{
attr_extra_19_crimson
(
$pa
,
$pd
,
$active
,
'attack'
);
}
# 电子狐进攻事件:
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'电掣部长 米娜'
)
{
attr_extra_89_efox
(
$pa
,
$pd
,
$active
);
}
# 走地羊进攻事件:
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'坚韧之子·拉姆'
)
{
attr_extra_89_walksheep
(
$pa
,
$pd
,
$active
);
}
# 书中虫受伤时rp上升事件:
if
(
$pd
[
'type'
]
==
89
&&
(
$pd
[
'name'
]
==
'高中生·白神'
||
$pd
[
'name'
]
==
'白神·讨价还价'
||
$pd
[
'name'
]
==
'白神·接受'
))
{
attr_extra_89_bookworm
(
$pa
,
$pd
,
$active
,
'rp'
);
}
# 临摹装置:
if
(
$pa
[
'wep'
]
==
"临摹装置"
)
{
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
尝试使用临摹装置来复制
{
$pd
[
'nm'
]
}
的武器!</span><br>"
;
$dice1
=
diceroll
(
20
);
if
(
$dice1
>
1
)
{
$dice2
=
diceroll
(
20
);
if
((
$pd
[
'wepe'
]
>
17777
)
&&
(
$dice2
<=
4
)){
//对手武器过于强力则 1/4 可能失败!
$log
.=
"<span class=
\"
red
\"
>因为
{
$pd
[
'nm'
]
}
的武器过于给力,临摹装置在
{
$pa
[
'nm'
]
}
手上爆炸了!</span><br>"
;
if
(
$dice2
<=
2
){
//大失败!
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
眼前一黑,感觉小命要交代在这里了!</span><br>"
;
$pa
[
'hp'
]
=
1
;
}
else
{
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
受到了巨大的伤害!</span><br>"
;
$pa
[
'hp'
]
=
round
(
$pa
[
'hp'
]
*
0.3
);
}
}
elseif
((
$pd
[
'wepe'
]
>
999999
)
&&
(
$dice2
>=
4
)){
$log
.=
"<span class=
\"
red
\"
>因为
{
$pd
[
'nm'
]
}
的武器过于给力,临摹装置在
{
$pa
[
'nm'
]
}
手上爆炸了!</span><br>"
;
if
(
$dice2
<=
4
){
//大失败!
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
眼前一黑,感觉小命要交代在这里了!</span><br>"
;
$pa
[
'hp'
]
=
1
;
}
else
{
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
受到了特别巨大的伤害!</span><br>"
;
$pa
[
'hp'
]
=
round
(
$pa
[
'hp'
]
*
0.1
);
}
}
else
{
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
成功地复制了对手的武器!</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>临摹装置化作了<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>!</span><br><br>"
;
//从原属性数组中剔除当前武器属性
if
(
!
empty
(
$pa
[
'wepsk'
]))
unset_ex_from_array
(
$pa
,
get_itmsk_array
(
$pa
[
'wepsk'
]));
$pa
[
'wep'
]
=
$pd
[
'wep'
];
$pa
[
'wepk'
]
=
$pd
[
'wepk'
];
$pa
[
'wepsk'
]
=
$pd
[
'wepsk'
];
$pa
[
'wepe'
]
=
$pd
[
'wepe'
];
$pa
[
'weps'
]
=
$pd
[
'weps'
];
//没有灵抽的情况下,向属性数组中打入复制后武器的属性
if
(
!
isset
(
$pa
[
'sldr_flag'
]))
$pa
[
'ex_keys'
]
=
array_merge
(
$pa
[
'ex_keys'
],
get_itmsk_array
(
$pa
[
'wepsk'
]));
get_wep_kind
(
$pa
);
$log
.=
"
{
$pa
[
'nm'
]
}
使用
{
$pa
[
'wep'
]
}
<span class=
\"
yellow
\"
>
{
$attinfo
[
$pa
[
'wep_kind'
]]
}
</span>
{
$pd
[
'nm'
]
}
!<br>"
;
}
}
else
{
$log
.=
"<span class=
\"
red
\"
>但是似乎失败了!</span><br>"
;
}
}
# 存在其他方式提供的暴毙死法,也中止后续战斗动作。
if
(
isset
(
$pa
[
'gg_flag'
]))
{
return
-
1
;
}
return
0
;
}
//获取基础命中率与修正
function
get_hitrate_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$hitrate_obbs
,
$hitrate_max_obbs
,
$hitrate_r
,
$weather
,
$inf_htr_p
;
//基础命中率
$hitrate
=
$hitrate_obbs
[
$pa
[
'wep_kind'
]];
//熟练度修正
$hitrate
+=
round
(
$pa
[
'wep_skill'
]
*
$hitrate_r
[
$pa
[
'wep_kind'
]]);
//武器基础命中率上限
$hitrate
=
min
(
$hitrate_max_obbs
[
$pa
[
'wep_kind'
]],
$hitrate
);
//获取社团技能对基础命中率的修正
$hitrate
*=
rev_get_clubskill_bonus_hitrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
//异常状态状态修正
foreach
(
$inf_htr_p
as
$inf_ky
=>
$value
)
{
if
(
strpos
(
$pa
[
'inf'
],
$inf_ky
)
!==
false
)
$hitrate
*=
$value
;
}
//天气修正
if
(
$weather
==
12
)
$hitrate
+=
20
;
//属性修正
return
$hitrate
;
}
//获取命中次数
function
get_hit_time_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$nosta
,
$wepimprate
,
$infobbs
;
//获取基础连击命中率衰减系数
$hitratebonus
=
0.8
;
//获取社团技能对连击命中率衰减系数的修正
$hitratebonus
*=
rev_get_clubskill_bonus_hitrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
//获取基础致伤率(防具耐久损伤率)系数
$inf_r
=
$infobbs
[
$pa
[
'wep_kind'
]];
//获取社团技能对致伤率(防具耐久损伤率)的修正
$inf_r
*=
rev_get_clubskill_bonus_imfrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
//获取基础致伤效果(每次致伤会损耗多少点防具耐久)
$inf_points
=
rev_get_clubskill_bonus_imftime
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
//获取武器损耗类型
$wep_imp
=
$wepimprate
[
$pa
[
'wep_kind'
]];
//武器是损耗型而非消耗型
if
(
$wep_imp
>
0
)
{
//基础损伤系数
$wep_imp_obbs
=
$wep_imp
;
//额外损伤系数
if
(
isset
(
$pa
[
'is_wpg'
]))
$wep_imp_obbs
*=
4
;
if
(
$pa
[
'weps'
]
==
$nosta
)
$wep_imp_obbs
*=
2
;
//社团技能对武器损伤系数的修正
$wep_imp_obbs
*=
rev_get_clubskill_bonus_imprate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
}
else
{
//消耗型武器 每次连击必定消耗1
$wep_imp_obbs
=
100
;
}
//获取可命中次数上限
$atk_t
=
1
;
if
(
in_array
(
'r'
,
$pa
[
'ex_keys'
])
&&
!
isset
(
$pa
[
'is_wpg'
]))
{
$atk_t
=
$pa
[
'wep_skill'
]
>=
800
?
6
:
2
+
floor
(
$pa
[
'wep_skill'
]
/
200
);
}
//对于消耗型武器,命中次数不能超过武器耐久
if
(
$wep_imp
<
0
)
{
$atk_t
=
$pa
[
'weps'
]
==
$nosta
?
$atk_t
:
min
(
$atk_t
,
$pa
[
'weps'
]);
}
//计算实际命中次数
$pa
[
'hitrate_times'
]
=
$pa
[
'inf_times'
]
=
$pa
[
'wep_imp_times'
]
=
0
;
for
(
$i
=
1
;
$i
<=
$atk_t
;
$i
++
)
{
$dice
=
diceroll
(
99
);
$dice2
=
diceroll
(
99
);
$dice3
=
diceroll
(
99
);
if
(
$dice
<
$pa
[
'hitrate'
])
{
//增加命中次数
$pa
[
'hitrate_times'
]
+=
1
;
//增加致伤(防具损伤)次数
if
(
$dice2
<
$inf_r
)
$pa
[
'inf_times'
]
+=
$inf_points
;
//损耗型武器,按概率计算损耗
if
(
$wep_imp
>
0
&&
$dice3
<
$wep_imp_obbs
)
$pa
[
'wep_imp_times'
]
++
;
}
//消耗型武器 不管有没有命中+1消耗
if
(
$wep_imp
<
0
)
$pa
[
'wep_imp_times'
]
++
;
//连击命中系数衰减
$pa
[
'hitrate'
]
*=
$hitratebonus
;
//连击致伤率衰减
$inf_r
*=
0.9
;
//武器是损耗型而非消耗型,随连击次数增加损耗率
if
(
$wep_imp
>
0
)
$wep_imp_obbs
*=
1.2
;
}
//将可命中次数上限保存在$pa['hitrate_max_times']内
$pa
[
'hitrate_max_times'
]
=
$atk_t
;
return
;
}
//获取不受其他条件影响的固定伤害变化(混沌伤害)
function
get_fix_damage
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
# 黑熊吃香蕉事件:
if
(
$pa
[
'type'
]
&&
in_array
(
'X'
,
$pa
[
'ex_keys'
]))
{
if
(
$pa
[
'wep'
]
==
'燕返262'
)
$log
.=
"<img src=
\"
img/other/262.png
\"
><br>"
;
$damage
=
999983
;
$pd
[
'sp_death_flag'
]
=
1
;
#这个标记用于影响是否复活或登记特殊死法的判断
$log
.=
"造成<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
return
$damage
;
}
# 真红暮防御事件:
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'红暮'
)
{
$p
=
attr_extra_19_crimson
(
$pa
,
$pd
,
$active
,
'defend'
);
if
(
isset
(
$p
))
return
$p
;
}
# 数据护盾:这个有意思
if
(
$pd
[
'artk'
]
==
"AA"
)
{
if
(
$pd
[
'type'
])
{
if
(
$pd
[
'arte'
]
<
100
)
{
$pd
[
'arte'
]
=
min
(
100
,
$pd
[
'arte'
]
+
$pd
[
'arts'
]);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
身上的数据护盾投射出了防护罩,轻松挡下了
{
$pa
[
'nm'
]
}
的攻击!</span><br>"
;
return
0
;
}
}
else
{
if
(
$pd
[
'arte'
]
>
1
)
{
$pd
[
'arte'
]
=
max
(
1
,
$pd
[
'arte'
]
-
$pd
[
'arts'
]);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
身上的数据护盾投射出了防护罩,轻松挡下了
{
$pa
[
'nm'
]
}
的攻击!</span><br>"
;
return
0
;
}
}
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
身上的数据护盾失效了!</span><br>"
;
}
# 迷你蜂进攻事件:
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'诚心使魔·阿摩尔'
)
{
$damage
=
attr_extra_89_minibee
(
$pa
,
$pd
,
$active
);
return
$damage
;
}
# 魔法蜂针:
if
(
$pa
[
'wep'
]
==
"魔法蜂针"
)
{
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
使用魔法蜂针攻击
{
$pd
[
'nm'
]
}
!</span><br>"
;
$damage
=
$pd
[
'def'
]
>
65000
?
1
:
350
;
if
(
$damage
>
1
)
$log
.=
"<span class=
\"
lime
\"
>蜂针命中了
{
$pd
[
'nm'
]
}
,对其造成了350点真实伤害!</span><br>"
;
else
$log
.=
"<span class=
\"
lime
\"
>然而
{
$pd
[
'nm'
]
}
的防御力实在太高,
{
$pa
[
'nm'
]
}
根本无法对其造成有效伤害!</span><br>"
;
if
(
strpos
(
$pd
[
'inf'
],
'p'
)
===
false
)
{
$pd
[
'inf'
]
.=
'p'
;
$log
.=
"<span class=
\"
lime
\"
>蜂针还让
{
$pd
[
'nm'
]
}
中毒了!</span><br>"
;
}
return
$damage
;
}
# 混沌伤害:
if
(
in_array
(
'R'
,
$pa
[
'ex_keys'
]))
{
$maxdmg
=
$pd
[
'mhp'
]
>
$pa
[
'wepe'
]
?
$pa
[
'wepe'
]
:
$pd
[
'mhp'
];
$damage
=
rand
(
1
,
$maxdmg
);
global
$log
;
$log
.=
"武器随机造成了<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
return
$damage
;
}
return
NULL
;
}
//获取pa的攻击力
function
get_base_att
(
&
$pa
,
&
$pd
,
$active
)
{
//空手 武器伤害=2/3熟练度
if
(
$pa
[
'wep_kind'
]
==
'N'
)
{
$pa
[
'wepe_t'
]
=
round
(
$pa
[
'wep_skill'
]
*
2
/
3
);
}
//射系 武器伤害=面板数值
elseif
(
$pa
[
'wep_kind'
]
==
'G'
||
$pa
[
'wep_kind'
]
==
'J'
)
{
$pa
[
'wepe_t'
]
=
$pa
[
'wepe'
];
}
//枪托打人 武器伤害=面板数值/5
elseif
(
isset
(
$pa
[
'is_wpg'
]))
{
$pa
[
'wepe_t'
]
=
round
(
$pa
[
'wepe'
]
/
5
);
}
//其他武器 武器伤害=面板数值*2
else
{
$pa
[
'wepe_t'
]
=
$pa
[
'wepe'
]
*
2
;
}
//获取pa社团技能对攻击力的加成
rev_get_clubskill_bonus
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$att1
,
$def1
);
//pa攻击力:
$base_att
=
$pa
[
'att'
]
+
$pa
[
'wepe_t'
]
+
$att1
;
global
$log
;
//$log.= "【DEBUG】{$pa['name']}的base_att是{$base_att},";
//计算攻击力修正
$base_att
=
get_base_att_modifier
(
$pa
,
$pd
,
$active
,
$base_att
);
//$log.= "修正后是{$base_att}。<br>";
return
$base_att
;
}
//获取pa的攻击力修正
function
get_base_att_modifier
(
&
$pa
,
&
$pd
,
$active
,
$base_att
)
{
//计算天气、姿态、策略、地点对pa攻击力的修正
global
$weather
,
$weather_attack_modifier
,
$pose_attack_modifier
,
$tactic_attack_modifier
,
$pls_attack_modifier
;
$wth_atk_per
=
$weather_attack_modifier
[
$weather
]
?:
0
;
$pose_atk_per
=
$pose_attack_modifier
[
$pa
[
'pose'
]]
?:
0
;
$tac_atk_per
=
$tactic_attack_modifier
[
$pa
[
'tactic'
]]
?:
0
;
$pls_atk_per
=
$pls_attack_modifier
[
$pa
[
'pls'
]]
?:
0
;
$base_att
=
round
(
$base_att
*
((
100
+
$wth_atk_per
+
$pose_atk_per
+
$tac_atk_per
+
$pls_atk_per
)
/
100
));
//计算pa受伤状态对攻击力的修正
global
$inf_att_p
;
foreach
(
$inf_att_p
as
$inf_ky
=>
$value
)
{
if
(
strpos
(
$pa
[
'inf'
],
$inf_ky
)
!==
false
)
$base_att
*=
$value
;
}
//计算pa社团技能对攻击力的修正
rev_get_clubskill_bonus_p
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$attfac
,
$deffac
);
$base_att
*=
$attfac
;
$base_att
=
max
(
1
,
$base_att
);
return
$base_att
;
}
//获取pd的防御力与修正
function
get_base_def
(
&
$pa
,
&
$pd
,
$active
)
{
global
$specialrate
,
$log
;
//pd基础防御力:
$base_def
=
$pd
[
'def'
];
//pd装备提供防御力:
$equip_def
=
$pd
[
'arbe'
]
+
$pd
[
'arhe'
]
+
$pd
[
'arae'
]
+
$pd
[
'arfe'
];
//是否受pa冲击效果影响:
if
(
in_array
(
'N'
,
$pa
[
'ex_keys'
]))
{
$Ndice
=
diceroll
(
99
);
if
(
$Ndice
<
$specialrate
[
'N'
])
{
$equip_def
=
round
(
$equip_def
/
2
);
//为了美观考虑……冲击的log在之后的deal_damage_prepare_events()显示
$pa
[
'charge_flag'
]
=
1
;
}
}
//获取pd社团技能对防御力的加成
rev_get_clubskill_bonus
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$att1
,
$def1
);
//pd防御力:
$total_def
=
$base_def
+
$equip_def
+
$def1
;
//$log.= "【DEBUG】{$pd['name']}的total_def是{$total_def},";
//计算防御力修正
$total_def
=
get_base_def_modifier
(
$pa
,
$pd
,
$active
,
$total_def
);
//$log.= "修正后是{$total_def}。<br>";
return
$total_def
;
}
//获取pd的防御力修正
function
get_base_def_modifier
(
&
$pa
,
&
$pd
,
$active
,
$total_def
)
{
//计算天气、姿态、策略、地点对pd防御力的修正
global
$weather
,
$weather_defend_modifier
,
$pose_defend_modifier
,
$tactic_defend_modifier
,
$pls_defend_modifier
,
$log
;
$wth_def_per
=
$weather_defend_modifier
[
$weather
]
?:
0
;
//$log.= "天气修正系数是{$wth_def_per}。<br>";
$pose_def_per
=
$pose_defend_modifier
[
$pd
[
'pose'
]]
?:
0
;
//$log.= "姿势修正系数是{$pose_def_per}。<br>";
$tac_def_per
=
$tactic_defend_modifier
[
$pd
[
'tactic'
]]
?:
0
;
//$log.= "策略修正系数是{$tac_def_per}。<br>";
$pls_def_per
=
$pls_defend_modifier
[
$pd
[
'pls'
]]
?:
0
;
//$log.= "地点修正系数是{$pls_def_per}。<br>";
$total_def
=
round
(
$total_def
*
((
100
+
$wth_def_per
+
$pose_def_per
+
$tac_def_per
+
$pls_def_per
)
/
100
));
//$log.= "上述修正后防御为{$total_def}。<br>";
//计算受伤状态对pd防御力的修正
global
$inf_def_p
;
foreach
(
$inf_def_p
as
$inf_ky
=>
$value
)
{
if
(
strpos
(
$pd
[
'inf'
],
$inf_ky
)
!==
false
)
$total_def
*=
$value
;
}
//计算社团技能对pd防御力的修正
rev_get_clubskill_bonus_p
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$attfac
,
$deffac
);
$total_def
*=
$deffac
;
//$log.= "社团技能修正后防御为{$total_def}。<br>";
$total_def
=
max
(
0.01
,
$total_def
);
return
$total_def
;
}
//计算原始伤害
function
get_original_dmg_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$skill_dmg
,
$dmg_fluc
,
$weather
,
$pls
,
$log
;
//$log.= "【DEBUG】原始伤害计算阶段:{$pa['name']}的攻击系数为{$pa['base_att']},{$pd['name']}的防御系数为{$pd['base_def']},";
//原始伤害:(pa基础攻击/pd基础防御) * pa熟练度 * pa熟练度系数
$damage
=
(
$pa
[
'base_att'
]
/
$pd
[
'base_def'
])
*
$pa
[
'wep_skill'
]
*
$skill_dmg
[
$pa
[
'wep_kind'
]];
//获取伤害浮动系数:
$dfluc
=
$dmg_fluc
[
$pa
[
'wep_kind'
]];
//获取社团技能对伤害浮动系数的修正:
$dfluc
+=
rev_get_clubskill_bonus_fluc
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
);
//计算伤害浮动:
$dmg_factor
=
(
100
+
rand
(
-
$dfluc
,
$dfluc
))
/
100
;
$damage
=
round
(
$damage
*
$dmg_factor
*
rand
(
4
,
10
)
/
10
);
//echo "【DEBUG】伤害浮动为{$dmg_factor},原始伤害为{$damage}<br>";
//把计算得到的原始伤害保存在$pa['original_dmg']里
$pa
[
'original_dmg'
]
=
$damage
;
return
$damage
;
}
//计算在原始伤害基础上附加的固定伤害
function
get_original_fix_dmg_rev
(
&
$pa
,
&
$pd
,
$active
)
{
$damage
=
0
;
//重枪
if
(
$pa
[
'wep_kind'
]
==
'J'
)
{
$adddamage
=
$pd
[
'mhp'
]
/
3
;
if
(
$adddamage
>
20000
)
$adddamage
=
10000
;
$damage
+=
round
(
$pa
[
'wepe'
]
*
2
/
3
+
$adddamage
);
}
//灵力武器
if
(
$pa
[
'wep_kind'
]
==
'F'
)
{
global
$log
;
if
(
isset
(
$pa
[
'sldr_flag'
])
||
isset
(
$pd
[
'sldr_flag'
]))
{
$log
.=
"<span class=
\"
red
\"
>由于灵魂抽取的作用,灵系武器伤害大幅降低了!</span><br>"
;
}
else
{
$damage
+=
$pa
[
'wepe'
];
}
}
return
$damage
;
}
//计算伤害倍率变化(攻击方)
function
get_damage_p_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
//每一条伤害倍率判定变化提示会以$dmg_p[]= $r;的形式放入伤害倍率数组内,
//在输出成log时会显示为:总计造成了100x0.5x1.2...=111点伤害 的形式
$dmg_p
=
Array
();
# 灵力武器伤害↔体力消耗系数判定:
if
(
$pa
[
'wep_kind'
]
==
'F'
)
{
//玩家使用灵力武器才会计算体力消耗
if
(
!
$pa
[
'type'
])
{
//获取体力消耗系数:
$sp_cost_r
=
$pa
[
'club'
]
==
9
?
0.2
:
0.25
;
//获取社团技能对体力消耗系数的修正:
$sp_cost_r
*=
get_clubskill_bonus_spd
(
$pa
[
'club'
],
$pa
[
'skills'
]);
//获取理论消耗体力最大值:
$sp_cost_max
=
$sp_cost_r
*
$pa
[
'wepe'
];
//获取实际消耗体力:
$sp_cost
=
min
(
ceil
(
$sp_cost_max
),
$pa
[
'sp'
]
-
1
);
$log
.=
"消耗
{
$sp_cost
}
点体力,"
;
}
//获取威力系数:NPC固定为50%
$factor
=
$pa
[
'type'
]
?
0.5
:
0.5
+
(
$sp_cost
/
$sp_cost_max
/
2
);
//获取伤害变化倍率并扣除体力
$dmg_p
[]
=
$factor
;
$pa
[
'sp'
]
-=
$sp_cost
;
//输出log
$f
=
round
(
100
*
$factor
);
$log
.=
"发挥了灵力武器
{
$f
}
%的威力!<br>"
;
}
# 重击判定:
//获取触发重击需要的最小怒气值
if
(
in_array
(
'c'
,
$pa
[
'ex_keys'
]))
{
$rage_min_cost
=
$pa
[
'club'
]
==
9
?
20
:
10
;
}
else
{
$rage_min_cost
=
$pa
[
'club'
]
==
9
?
50
:
30
;
}
if
(
$pa
[
'rage'
]
>=
$rage_min_cost
)
{
//获取触发概率
if
(
isset
(
$pa
[
'message'
])
||
$pa
[
'rage'
]
>=
255
)
{
$max_dice
=
100
;
}
else
{
if
(
$pa
[
'type'
])
$max_dice
=
40
;
else
$max_dice
=
$pa
[
'club'
]
==
9
?
0
:
30
;
}
//掷骰
$cri_dice
=
diceroll
(
100
);
if
(
$cri_dice
<=
$max_dice
)
{
$pa
[
'rage'
]
-=
$rage_min_cost
;
//获取伤害变化倍率
$p
=
$pa
[
'club'
]
==
9
?
2
:
1.5
;
$dmg_p
[]
=
$p
;
//输出log
$log
.=
npc_chat
(
$pa
[
'type'
],
$pa
[
'nm'
],
'critical'
);
$log
.=
"
{
$pa
[
'nm'
]
}
消耗<span class=
\"
yellow
\"
>
{
$rage_min_cost
}
</span>点怒气,"
;
if
(
$pa
[
'club'
]
==
9
)
$log
.=
"<span class=
\"
red
\"
>发动必杀技!</span><br>"
;
else
$log
.=
"<span class=
\"
red
\"
>使出重击!</span><br>"
;
}
}
# 连击判定:
# 只要命中次数大于1就进入连击判定,不需要再检查武器有没有连击属性。方便一些技能强制附加连击
if
(
$pa
[
'hitrate_times'
]
>
1
)
{
//获取连击次数伤害倍率:2次2倍,3次2.8倍,之后=2.8+(次数-3)*0.6
$r_dmg_p
=
Array
(
2
=>
2
,
3
=>
2.8
);
$p
=
isset
(
$r_dmg_p
[
$pa
[
'hitrate_times'
]])
?
$r_dmg_p
[
$pa
[
'hitrate_times'
]]
:
2.8
+
(
$pa
[
'hitrate_times'
]
-
3
)
*
0.6
;
$dmg_p
[]
=
$p
;
//输出log
$log
.=
"
{
$pa
[
'hitrate_max_times'
]
}
次连续攻击命中<span class=
\"
yellow
\"
>
{
$pa
[
'hitrate_times'
]
}
</span>次!"
;
}
return
$dmg_p
;
}
//攻击方在造成伤害前触发的事件
function
deal_damage_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$def_kind
,
$specialrate
,
$itemspkinfo
;
# 冲击效果log显示(实际的效果判断在get_base_def()阶段)
if
(
!
empty
(
$pa
[
'charge_flag'
]))
{
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
的攻击隔着
{
$pd
[
'nm'
]
}
的防具造成了伤害!</span><br>"
;
}
# 检查防守方(pd)有没有伤害抹消属性
if
(
in_array
(
'B'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
//检查抹消属性是否生效
if
(
$dice
<
$specialrate
[
'B'
])
{
$pd
[
'phy_def_flag'
]
=
2
;
}
else
{
$log
.=
"纳尼?
{
$pd
[
'nm'
]
}
的装备使攻击无效化的属性竟然失效了!<br>"
;
}
}
# 抹消不存在&未生效,检查防守方(pd)有没有全系防御属性
if
(
!
isset
(
$pd
[
'phy_def_flag'
])
&&
in_array
(
'A'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
//检查防御属性是否生效
if
(
$dice
<
90
)
{
$pd
[
'phy_def_flag'
]
=
1
;
}
else
{
$log
.=
"
{
$pd
[
'nm'
]
}
的装备没能发挥减半伤害的效果!<br>"
;
}
}
# 抹消、全系防御不存在&未生效,检查防守方(pd)有没有单系防御属性:
if
(
!
isset
(
$pd
[
'phy_def_flag'
])
&&
in_array
(
$def_kind
[
$pa
[
'wep_kind'
]],
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
//检查防御属性是否生效
if
(
$dice
<
90
)
{
$pd
[
'phy_def_flag'
]
=
$def_kind
[
$pa
[
'wep_kind'
]];
}
else
{
$log
.=
"
{
$pd
[
'nm'
]
}
的
{
$itemspkinfo
[
$def_kind
[
$pa
[
'wep_kind'
]]]
}
没能发挥减半伤害的效果!<br>"
;
}
}
# 贯穿效果判定:
if
(
in_array
(
'n'
,
$pa
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
if
(
$dice
<
$specialrate
[
'n'
])
{
if
(
!
empty
(
$pd
[
'phy_def_flag'
]))
{
$pd
[
'phy_def_flag'
]
=
0
;
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
的攻击贯穿了
{
$pd
[
'nm'
]
}
的防具!</span><br>"
;
}
$pa
[
'pierce_flag'
]
=
1
;
}
}
return
;
}
//计算伤害倍率变化(防守方)
function
get_damage_def_p_rev
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
$dmg_p
=
Array
();
# 防守方(pd)持有重枪受到额外伤害:
if
(
$pd
[
'wep_kind'
]
==
'J'
)
{
//获取伤害变化倍率并扣除体力
$p
=
1.5
;
$dmg_p
[]
=
$p
;
//输出log
$log
.=
"<span class=
\"
red
\"
>由于
{
$pd
[
'nm'
]
}
手中的武器过于笨重,受到的伤害大增!真是大快人心啊!</span><br>"
;
}
# 热恋、同志判定:
if
(
in_array
(
'l'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
100
);
if
(
$dice
<=
25
)
{
if
(
$pa
[
'gd'
]
!=
$pd
[
'gd'
])
{
$p
=
0
;
$dmg_p
[]
=
$p
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
被
{
$pd
[
'nm'
]
}
迷惑,无法全力攻击!</span>"
;
}
else
{
$p
=
2
;
$dmg_p
[]
=
$p
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
被
{
$pd
[
'nm'
]
}
激怒,伤害加倍!</span>"
;
}
}
}
if
(
in_array
(
'g'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
100
);
if
(
$dice
<=
25
)
{
if
(
$pa
[
'gd'
]
==
$pd
[
'gd'
])
{
$p
=
0
;
$dmg_p
[]
=
$p
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
被
{
$pd
[
'nm'
]
}
迷惑,无法全力攻击!</span>"
;
}
else
{
$p
=
2
;
$dmg_p
[]
=
$p
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
被
{
$pd
[
'nm'
]
}
激怒,伤害加倍!</span>"
;
}
}
}
# 防御属性减伤判定:
if
(
!
empty
(
$pd
[
'phy_def_flag'
]))
{
//存在抹消属性
if
(
$pd
[
'phy_def_flag'
]
==
2
)
{
$p
=
0
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'nm'
]
}
的攻击完全被
{
$pd
[
'nm'
]
}
的装备吸收了!</span><br>"
;
}
else
{
$p
=
0.5
;
$log
.=
"<span class=
\"
yellow
\"
>
{
$pd
[
'nm'
]
}
的装备使
{
$pa
[
'nm'
]
}
的攻击伤害减半了!</span><br>"
;
}
$dmg_p
[]
=
$p
;
}
return
$dmg_p
;
}
//获取pa能造成的属性伤害队列
function
get_base_ex_att_array
(
&
$pa
,
&
$pd
,
$active
)
{
global
$ex_attack
;
$ex_keys
=
Array
();
foreach
(
$ex_attack
as
$ex
)
{
if
(
in_array
(
$ex
,
$pa
[
'ex_keys'
]))
{
//去除该条件后不会过滤重复属性 即可以造成多次同属性伤害
if
(
!
in_array
(
$ex
,
$ex_keys
))
$ex_keys
[]
=
$ex
;
}
}
return
$ex_keys
;
}
//pa在造成属性伤害前触发的事件
function
deal_ex_damage_prepare_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$ex_attack
,
$ex_def_kind
,
$specialrate
,
$itemspkinfo
;
# 检查防守方(pd)有没有属性抹消属性
if
(
in_array
(
'b'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
//检查抹消属性是否生效
if
(
$dice
<
$specialrate
[
'b'
])
{
$pd
[
'ex_def_flag'
]
=
2
;
}
else
{
$log
.=
"纳尼?
{
$pd
[
'nm'
]
}
装备上使属性攻击无效化的属性竟然失效了!<br>"
;
//无效化属性攻击的属性无效化了 怎么会这样
}
}
# 属性抹消未生效&不存在的情况下,检查防守方(pd)是否存在属性防御
if
(
!
isset
(
$pd
[
'ex_def_flag'
])
&&
in_array
(
'a'
,
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
if
(
$dice
<
90
)
{
$pd
[
'ex_def_flag'
]
=
1
;
}
else
{
$log
.=
"属性防御装备没能发挥应有的作用!<br>"
;
}
}
# 属性抹消、防御均未生效&不存在的情况下,检查防守方(pd)是否存在单项属性防御
if
(
!
isset
(
$pd
[
'ex_def_flag'
]))
{
foreach
(
$pa
[
'ex_attack_keys'
]
as
$ex
)
{
if
(
in_array
(
$ex_def_kind
[
$ex
],
$pd
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
if
(
$dice
<
90
)
$pd
[
'ex_def_flag'
][]
=
$ex
;
//单项防御生效,加入队列
else
$invaild_ex
[]
=
$ex
;
//单项防御未生效,记录一下,之后统一输出提示文本
}
}
//输出未生效的单项防御提示文本
if
(
isset
(
$invaild_ex
))
{
$ivlog
=
''
;
foreach
(
$invaild_ex
as
$ivex
)
{
if
(
!
empty
(
$ivlog
))
$ivlog
.=
"、"
.
$itemspkinfo
[
$ex_def_kind
[
$ivex
]];
else
$ivlog
=
$itemspkinfo
[
$ex_def_kind
[
$ivex
]];
}
$log
.=
$ivlog
.
"装备没能发挥应有的作用!<br>"
;
}
}
# 破格(属穿)效果判断:
if
(
in_array
(
'y'
,
$pa
[
'ex_keys'
]))
{
$dice
=
diceroll
(
99
);
if
(
$dice
<
$specialrate
[
'y'
])
{
if
(
!
empty
(
$pd
[
'ex_def_flag'
]))
{
$pd
[
'ex_def_flag'
]
=
0
;
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
的攻击瓦解了
{
$pd
[
'nm'
]
}
的属性防护!</span><br>"
;
}
$pa
[
'ex_pierce_flag'
]
=
1
;
}
}
return
;
}
//计算可造成的属性伤害
function
get_original_ex_dmg
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$now
;
//触发了属抹效果,直接返回固定伤害值
if
(
isset
(
$pd
[
'ex_def_flag'
])
&&
$pd
[
'ex_def_flag'
]
==
2
)
{
$total_ex_dmg
=
count
(
$pa
[
'ex_attack_keys'
]);
$log
.=
"<span class=
\"
red
\"
>属性攻击的力量完全被防具吸收了!</span>仅造成了<span class=
\"
red
\"
>
{
$total_ex_dmg
}
</span>点伤害!<br>"
;
return
$total_ex_dmg
;
}
//遍历并执行单次属性伤害,返回的是一个数组
$ex_dmg
=
0
;
$ex_inf
=
0
;
// 属性攻击名 异常状态 对应防御属性 基础属性伤害 属性伤害上限 效果↔伤害系数 熟练↔伤害系数 伤害浮动
global
$exdmgname
,
$exdmginf
,
$ex_def_kind
,
$ex_base_dmg
,
$ex_max_dmg
,
$ex_wep_dmg
,
$ex_skill_dmg
,
$ex_dmg_fluc
;
// 属性↔异常 异常率 异常率上限 熟练↔异常率系数 异常↔伤害系数 得意社团 得意武器
global
$ex_inf
,
$ex_inf_r
,
$ex_max_inf_r
,
$ex_skill_inf_r
,
$ex_inf_punish
,
$ex_good_club
,
$ex_good_wep
;
foreach
(
$pa
[
'ex_attack_keys'
]
as
$ex
)
{
$dmginf
=
''
;
//计算单个属性的基础属性伤害: 基础伤害 + 效果↔伤害系数修正 + 熟练↔伤害系数修正
$ex_dmg
=
$ex_base_dmg
[
$ex
]
+
$pa
[
'wepe'
]
/
$ex_wep_dmg
[
$ex
]
+
$pa
[
'wep_skill'
]
/
$ex_skill_dmg
[
$ex
];
//计算单个属性能造成的基础伤害上限
if
(
$ex_max_dmg
[
$ex
]
>
0
&&
$ex_dmg
>
$ex_max_dmg
[
$ex
])
$ex_dmg
=
$ex_max_dmg
[
$ex
];
//计算得意武器类型修正
if
(
$ex_good_wep
[
$ex
]
==
$pa
[
'wep_kind'
])
$ex_dmg
*=
2
;
//计算已经进入的异常状态对属性攻击伤害的影响
if
(
isset
(
$ex_inf
[
$ex
])
&&
strpos
(
$pd
[
'inf'
],
$ex_inf
[
$ex
])
!==
false
&&
isset
(
$ex_inf_punish
[
$ex
]))
{
$ex_dmg
*=
$ex_inf_punish
[
$ex
];
$log
.=
"由于
{
$pd
[
'nm'
]
}
已经
{
$exdmginf
[
$ex_inf
[
$ex
]]
}
,
{
$exdmgname
[
$ex
]
}
的伤害"
;
$log
.=
$ex_inf_punish
[
$ex
]
>
1
?
"增加了!"
:
"减少了!"
;
}
//计算属性伤害浮动
$ex_dmg
=
round
(
$ex_dmg
*
rand
(
100
-
$ex_dmg_fluc
[
$ex
],
100
+
$ex_dmg_fluc
[
$ex
])
/
100
);
//计算属性伤害是否被防御
$log
.=
$exdmgname
[
$ex
];
if
(
!
empty
(
$pd
[
'ex_def_flag'
])
&&
(
$pd
[
'ex_def_flag'
]
==
1
||
(
is_array
(
$pd
[
'ex_def_flag'
])
&&
in_array
(
$ex
,
$pd
[
'ex_def_flag'
]))))
{
$ex_dmg
=
round
(
$ex_dmg
*
0.5
);
$log
.=
"被防御效果抵消了!仅"
;
}
else
{
//计算是否施加属性异常
if
(
isset
(
$ex_inf
[
$ex
])
&&
strpos
(
$pd
[
'inf'
],
$ex_inf
[
$ex
])
===
false
)
{
$dice
=
diceroll
(
99
);
//获取属性施加异常的基础概率 + 熟练度修正
$e_htr
=
$ex_inf_r
[
$ex
]
+
$pa
[
'wep_skill'
]
*
$ex_skill_inf_r
[
$ex
];
//获取属性施加异常率的基础上限
$e_htr
=
min
(
$e_htr
,
$ex_max_inf_r
[
$ex
]);
//获取属性施加异常概率的社团修正
if
(
isset
(
$ex_good_club
[
$ex
])
&&
$ex_good_club
[
$ex
]
==
$pd
[
'club'
])
$e_htr
+=
20
;
//施加异常
if
(
$dice
<
$e_htr
)
{
$dmginf
=
$ex_inf
[
$ex
];
$pd
[
'inf'
]
.=
$dmginf
;
addnews
(
$now
,
'inf'
,
$pa
[
'name'
],
$pd
[
'name'
],
$dmginf
);
}
}
}
$log
.=
"造成了<span class=
\"
red
\"
>
{
$ex_dmg
}
</span>点伤害!"
;
if
(
!
empty
(
$dmginf
))
$log
.=
"并造成
{
$pd
[
'name'
]
}{
$exdmginf
[
$dmginf
]
}
了!"
;
$log
.=
"<br>"
;
$total_ex_dmg
[]
=
$ex_dmg
;
}
return
$total_ex_dmg
;
}
//计算最终伤害的系数变化
function
get_final_dmg_p
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
;
$fin_dmg_p
=
Array
();
# 书中虫防守事件:移动到最终伤害系数变化阶段了
if
(
$pd
[
'type'
]
==
89
&&
(
$pd
[
'name'
]
==
'高中生·白神'
||
$pd
[
'name'
]
==
'白神·讨价还价'
))
{
$p
=
attr_extra_89_bookworm
(
$pa
,
$pd
,
$active
,
'defend'
);
if
(
$p
>
0
)
$fin_dmg_p
[]
=
$p
;
}
# 晶莹判定:
if
(
$pa
[
'club'
]
==
19
||
$pd
[
'club'
]
==
19
)
{
$p
=
rev_get_clubskill_bonus_dmg_rate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
if
(
$p
!=
100
)
{
$log
.=
"<span class=
\"
yellow
\"
>在「晶莹」的作用下,
{
$pa
[
'nm'
]
}
造成的最终伤害变化至"
.
$p
.
"%!</span><br>"
;
$fin_dmg_p
[]
=
round
(
$p
/
100
);
}
}
return
$fin_dmg_p
;
}
//计算最终伤害的定值变化
function
get_final_dmg_fix
(
&
$pa
,
&
$pd
,
$active
,
$fin_dmg
)
{
global
$log
;
$fin_dmg
=
0
;
# 伤害制御判定:
if
(
in_array
(
'h'
,
$pd
[
'ex_keys'
])
&&
$fin_dmg
>=
1950
)
{
$dice
=
diceroll
(
99
);
if
(
$dice
<
90
)
{
//贯穿与破格同时生效时 穿透伤害制御
if
(
isset
(
$pa
[
'ex_pierce_flag'
])
&&
isset
(
$pa
[
'pierce_flag'
]))
{
$log
.=
"<span class='gold'>
{
$pa
[
'nm'
]
}
凌厉的攻势直接突破了
{
$pd
[
'nm'
]
}
的伤害限制!</span><br>"
;
}
else
{
$fin_dmg
=
1950
+
$dice
;
$log
.=
"在
{
$pd
[
'nm'
]
}
的装备的作用下,攻击伤害被限制了!<br>"
;
}
}
else
{
$log
.=
"
{
$pd
[
'nm'
]
}
的装备没能发挥限制攻击伤害的效果!<br>"
;
}
}
#剔透判定:
if
(
$pa
[
'club'
]
==
19
)
{
$rp_dmg
=
rev_get_clubskill_bonus_dmg_val
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
);
if
(
$rp_dmg
>
0
)
{
$fin_dmg
+=
$rp_dmg
;
$log
.=
"<span class=
\"
yellow
\"
>在「剔透」的作用下,敌人受到了<span class=
\"
red
\"
>
$rp_dmg
</span>点额外伤害。</span><br>"
;
}
}
return
$fin_dmg
;
}
//攻击方(pa)在造成伤害后触发的事件
function
attack_finish_events
(
$pa
,
$pd
,
$active
)
{
global
$log
;
#计算反噬伤害:
if
(
$pa
[
'final_damage'
]
>=
1000
)
{
if
(
$pa
[
'final_damage'
]
<
2000
)
{
$hp_d
=
floor
(
$pa
[
'hp'
]
/
2
);
}
elseif
(
$pa
[
'final_damage'
]
<
5000
)
{
$hp_d
=
floor
(
$pa
[
'hp'
]
*
2
/
3
);
}
else
{
$hp_d
=
floor
(
$pa
[
'hp'
]
*
4
/
5
);
}
if
(
in_array
(
'H'
,
$pa
[
'ex_keys'
]))
{
$hp_d
=
floor
(
$hp_d
/
10
);
}
if
(
$hp_d
>
0
)
{
$log
.=
"惨无人道的攻击对
{
$pa
[
'nm'
]
}
自身造成了<span class=
\"
red
\"
>
$hp_d
</span>点<span class=
\"
red
\"
>反噬伤害!</span><br>"
;
$pa
[
'hp'
]
-=
$hp_d
;
}
}
return
;
}
//防守方(pd)在受到伤害后触发的事件
function
get_hurt_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$infatt_rev
,
$infinfo
;
# 真蓝凝防守事件:
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'蓝凝'
)
{
attr_extra_19_azure
(
$pa
,
$pd
,
$active
);
}
# pa致伤次数>0时,计算pd防具受损或致伤情况
if
(
$pa
[
'inf_times'
]
>
0
)
{
//获取可致伤部位
$inf_parts
=
$infatt_rev
[
$pa
[
'wep_kind'
]];
$inf_att
=
Array
();
for
(
$i
=
0
;
$i
<
$pa
[
'inf_times'
];
$i
++
)
{
//随机选择一个可致伤的部位
$aim
=
rand
(
0
,
count
(
$inf_parts
)
-
1
);
$inf_aim
=
$inf_parts
[
$aim
];
//对应部位致伤次数+1
$inf_att
[
$inf_aim
]
=
isset
(
$inf_att
[
$inf_aim
])
?
$inf_att
[
$inf_aim
]
+
1
:
1
;
}
//应用防具损伤/致伤效果
foreach
(
$inf_att
as
$ipt
=>
$times
)
{
$which
=
'ar'
.
$ipt
;
if
(
$pd
[
$which
.
's'
]
>
0
)
{
armor_hurt
(
$pd
,
$which
,
$times
);
}
else
{
$flag
=
get_inf_rev
(
$pd
,
$ipt
);
if
(
$flag
)
$log
.=
"
{
$pd
[
'nm'
]
}
的<span class=
\"
red
\"
>
$infinfo[$ipt]
</span>部受伤了!<br>"
;
}
}
}
return
;
}
//战斗后结算rp事件
function
get_killer_rp
(
&
$pa
,
&
$pd
,
$active
)
{
//杀人rp结算
$rpup
=
$pd
[
'type'
]
?
20
:
max
(
80
,
$pd
[
'rp'
]);
//晶莹剔透修正
if
(
$pa
[
'club'
]
==
19
)
{
$rpdec
=
30
;
$rpdec
+=
get_clubskill_rp_dec
(
$pa
[
'club'
],
$pa
[
'skills'
]);
$pa
[
'rp'
]
+=
round
(
$rpup
*
(
100
-
$rpdec
)
/
100
);
}
else
{
$pa
[
'rp'
]
+=
$rpup
;
}
return
;
}
//受到致伤或异常
function
get_inf_rev
(
&
$pa
,
$infnm
,
$type
=
0
)
{
global
$log
;
if
(
strpos
(
$pa
[
'inf'
],
$infnm
)
===
false
)
{
$pa
[
'inf'
]
.=
$infnm
;
//$pa['combat_inf'] .= $infnm;
return
1
;
}
return
0
;
}
?>
\ No newline at end of file
include/game/revattr_extra.func.php
0 → 100644
View file @
0d67f709
<?php
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
}
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/itemmain.func.php'
;
//revattr_extra.func.php: 记录NPC特殊战斗机制
//Q:为什么要把每个NPC的特殊战斗机制都新建一个函数保存?
//A:也不是每个都要这么干……这个做法主要用于存在大段log、多段判定的机制,分离出来一是方便定位这个NPC的相关机制在哪个阶段执行,二是确保原流程的可读性;
# 真红暮特殊判定
function
attr_extra_19_crimson
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
# 真红暮作为防御方时的事件
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'红暮'
&&
$pa
[
'wep_kind'
]
!=
$pd
[
'wep_kind'
]
&&
$phase
==
'defend'
)
{
$log
.=
"<span class=
\"
red
\"
>红暮身上的武器投射出了防护罩,轻松挡下了
{
$pa
[
'nm'
]
}
的攻击!</span><br>"
;
return
0
;
}
# 真红暮作为进攻方时的事件:
if
(
$pa
[
'type'
]
==
19
&&
$pa
[
'name'
]
==
'红暮'
&&
$phase
==
'attack'
)
{
$log
.=
"<span class=
\"
yellow
\"
>“那么说好了,不留手咯~”<br></span>"
;
//$log .= "红暮吐气扬声,向你袭来!<br>";
if
(
$pa
[
'wep'
]
!=
'喷气式红杀重铁剑'
)
{
$event_dice
=
rand
(
1
,
6
);
$log
.=
"<span class=
\"
neonred
\"
>只见红暮手上的巨大铁剑带着一条火光向你飞去。</span><br>"
;
if
(
$event_dice
==
1
)
{
get_inf_rev
(
$pd
,
'w'
);
get_inf_rev
(
$pd
,
'u'
);
$log
.=
"<span class=
\"
yellow
\"
>你被赤红热风扫过,顿感头晕目眩,而且身上也起了火!</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
lime
\"
>不过你灵活地躲开了赤红热风!</span><br>"
;
}
}
if
(
$pa
[
'wep'
]
!=
'绯红记忆'
)
{
$event_dice
=
rand
(
1
,
8
);
$log
.=
"<span class=
\"
neonred
\"
>只见从红暮身边飞出来了一个红色的光球!</span><br>"
;
if
(
$event_dice
==
1
)
{
$damage
=
min
(
$pd
[
'hp'
]
-
1
,
round
(
$pd
[
'mhp'
]
*
0.5
));
//罪不至死
$pd
[
'hp'
]
-=
$damage
;
//$log .= "<span class=\"yellow\">“虽说我不是什么超能力者,但是最高级的科技也和超能力无异了!”红暮大笑。</span><br>";
$log
.=
"<span class=
\"
yellow
\"
>红色的光球直击你的心脏!</span><br>"
;
$log
.=
"这一发绯红锥心弹对你造成<span class=
\"
red
\"
>
$damage
</span>点伤害!你感觉你半条命都没咯~<br>"
;
}
else
{
$log
.=
"<span class=
\"
lime
\"
>你大呼不妙,连忙侧身躲过了这发绯红锥心弹!</span><br>"
;
}
}
if
(
$pa
[
'wep'
]
!=
'血色强袭'
)
{
$event_dice
=
rand
(
1
,
4
);
$log
.=
"<span class=
\"
neonred
\"
>红暮从背后抽出一把重炮,向你扣下了扳机!</span><br>"
;
if
(
$event_dice
==
1
)
{
$wdamage
=
rand
(
5
,
40
);
weapon_loss
(
$pd
,
$wdamage
,
1
,
1
);
get_inf_rev
(
$pd
,
'a'
);
$log
.=
"<span class=
\"
yellow
\"
>这一发强袭追踪弹结实地打到了你手持武器的手上,你痛的龇牙咧嘴,武器也受到了损伤!</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
lime
\"
>你身形一矮,躲过了这发强袭追踪弹。</span><br>"
;
}
}
if
(
$pa
[
'wep'
]
!=
'狮虎丝带'
)
{
$event_dice
=
rand
(
1
,
4
);
//$log .= "<span class=\"yellow\">红暮打了一个响指,从背后飞出来两条丝带!<br>“虽然这种玩意蓝凝应该用的更顺手吧……”</span><br>";
$log
.=
"<span class=
\"
neonred
\"
>红暮打了一个响指,从背后飞出来两条丝带!”</span><br>"
;
if
(
$event_dice
==
1
)
{
$pd
[
'sp'
]
=
max
(
0
,
$pd
[
'sp'
]
-
250
);
$log
.=
"<span class=
\"
yellow
\"
>丝带将你缠绕,吸收了你的体力!</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
lime
\"
>你赶快腾跃躲避,两条丝带擦身而过!</span><br>"
;
}
}
if
(
$pa
[
'wep'
]
!=
'落樱巨锤'
)
{
$event_dice
=
rand
(
1
,
6
);
//$log .= "<span class=\"yellow\">红暮高高一跃,跳到空中!<br>“询问淑女的体重固然很不礼貌,但我自然不是什么淑女!”</span><br>";
$log
.=
"<span class=
\"
neonred
\"
>红暮高高一跃,跳到空中!</span><br>"
;
if
(
$event_dice
==
1
)
{
$pd
[
'hp'
]
-=
1107
;
$log
.=
"<span class=
\"
yellow
\"
>巨大的机甲一下便将你碾压!造成了<span class=
\"
red
\"
>1107</span>点伤害!</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
lime
\"
>你在地上进行了一次翻滚,躲开了从天而降的机甲!</span><br>"
;
}
}
if
(
$pa
[
'wep'
]
!=
'八八连流星浮游炮'
)
{
$event_dice
=
rand
(
1
,
6
);
//$log .= "<span class=\"yellow\">从红暮的机甲中发射出了大量的火箭弹!<br>“知道吗,量变终究会引起质变!”</span><br>";
$log
.=
"<span class=
\"
neonred
\"
>从红暮的机甲中发射出了大量的火箭弹!</span><br>"
;
if
(
$event_dice
==
1
)
{
$log
.=
"<span class=
\"
yellow
\"
>虽然火箭弹的精度颇低,但是大量的火箭弹还是对你的防具造成了可观的伤害!</span><br>"
;
$adamage
=
rand
(
5
,
40
);
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
{
if
(
!
empty
(
$
{
$ar
.
's'
}))
armor_hurt
(
$pd
,
$ar
,
$adamage
,
1
);
}
}
else
{
$log
.=
"<span class=
\"
lime
\"
>然而飞弹的精度太低,你并没有被它们打中。</span><br>"
;
}
}
}
return
NULL
;
}
# 真蓝凝特殊判定
function
attr_extra_19_azure
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$db
,
$tablepre
,
$log
;
if
(
$pd
[
'type'
]
==
19
&&
$pd
[
'name'
]
==
'蓝凝'
)
{
$id
=
$pd
[
'pid'
];
$dice
=
diceroll
(
100
);
$ttr
=
"♪臻蓝之愿♪"
;
$ttr2
=
"♫钴蓝之灵♫"
;
$ttr3
=
"❀矢车菊的回忆❀"
;
//$rp=18;
//不要起这种会和玩家数据混淆的变量名啊喂!
$rpls
=
$pa
[
'pls'
];
if
(
$dice
<
5
)
$rpls
=
rand
(
1
,
33
);
$le
=
diceroll
(
200
)
+
$pa
[
'mhp'
]
-
100
;
if
(
$le
>
1001
)
$le
=
1001
;
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr
', 'TO', '
$le
', '1', '
$id
', '
$rpls
')"
);
$le
=
rand
(
1
,
200
)
+
$pa
[
'final_damage'
]
-
100
;
if
(
$le
>
2000
)
$le
=
2000
;
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr2
', 'TO', '
$le
', '1', '
$id
', '
$rpls
')"
);
$le
=
rand
(
1
,
$pa
[
'hp'
]);
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr3
', 'TO', '
$le
', '1', '
$id
', '
$rpls
')"
);
$log
.=
"从蓝凝的身边飞出了数个光球,散布在了战场上!<br>"
;
}
return
;
}
# 电子狐特殊判定
function
attr_extra_89_efox
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
# 进攻方(pa)为米娜
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'电掣部长 米娜'
)
{
$log
.=
"<span class=
\"
yellow
\"
>米娜的双眼突然闪耀了起来!</span><br>
<span class=
\"
neonblue
\"
>“侦测到敌意实体,开始扫描~”</span><br>"
;
$dice
=
diceroll
(
1024
);
//$log .= "<span class=\"yellow\">【DEBUG】骰子检定结果:<span class=\"red\">$dice</span>/1024。</span><br>";
if
(
$dice
<=
126
)
//8%
{
$log
.=
"<span class=
\"
yellow
\"
>“似乎米娜具现化了你的武器!”</span><br>
<span class=
\"
neonblue
\"
>“你的<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>,我就收下了!”</span><br>"
;
$pa
[
'wep'
]
=
$pd
[
'wep'
];
$pa
[
'wepk'
]
=
$pd
[
'wepk'
];
$pa
[
'wepsk'
]
=
$pd
[
'wepsk'
];
$pa
[
'wepe'
]
=
$pd
[
'wepe'
];
$pa
[
'weps'
]
=
$pd
[
'weps'
];
get_wep_kind
(
$pa
);
}
elseif
(
$dice
<=
635
)
{
$dice2
=
rand
(
1
,
5
);
$log
.=
"<span class=
\"
yellow
\"
>“似乎米娜扫描了你的武器!”</span><br>
<span class=
\"
neonblue
\"
>“你的<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>,已扫描入<span class=
\"
red
\"
>
$dice2
</span>号位。”<br>
“我会妥善保管的~”</span><br>"
;
$pa
[
'itm'
.
$dice2
]
=
$pd
[
'wep'
];
$pa
[
'itmk'
.
$dice2
]
=
$pd
[
'wepk'
];
$pa
[
'itmsk'
.
$dice2
]
=
$pd
[
'wepsk'
];
$pa
[
'itme'
.
$dice2
]
=
$pd
[
'wepe'
];
$pa
[
'itms'
.
$dice2
]
=
$pd
[
'weps'
];
}
elseif
(
$dice
>=
1024
)
// 1/1024 几率直接抢夺玩家全部背包
{
$log
.=
"<span class=
\"
yellow
\"
>哎呀,骰子检定结果是大·失·败!</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>“米娜将你的全身扫描了个遍!”</span><br>
<span class=
\"
neonblue
\"
>“我判定你身上的东西放到我身上可能更好一点~”<br>
“我会妥善保管的~”</span><br>"
;
for
(
$i
=
1
;
$i
<=
6
;
$i
++
)
{
if
(
!
empty
(
$pd
[
'itms'
.
$i
]))
{
//复制
$pa
[
'itm'
.
$i
]
=
$pd
[
'itm'
.
$i
];
$pa
[
'itmk'
.
$i
]
=
$pd
[
'itmk'
.
$i
];
$pa
[
'itmsk'
.
$i
]
=
$pd
[
'itmsk'
.
$i
];
$pa
[
'itme'
.
$i
]
=
$pd
[
'itme'
.
$i
];
$pa
[
'itms'
.
$i
]
=
$pd
[
'itms'
.
$i
];
//哎哟喂啊,真是倒霉,但这就是人生啊。
$pd
[
'itm'
.
$i
]
=
$pd
[
'itmk'
.
$i
]
=
$pd
[
'itmsk'
.
$i
]
=
''
;
$pd
[
'itme'
.
$i
]
=
$pd
[
'itms'
.
$i
]
=
0
;
}
}
}
else
{
$log
.=
"<span class=
\"
yellow
\"
>不过似乎什么都没发生!</span><br>
<span class=
\"
neonblue
\"
>“扫描失败了么……”</span><br>"
;
}
}
}
# 书中虫特殊判定
function
attr_extra_89_bookworm
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
if
(
$pd
[
'type'
]
==
89
)
{
$rp_up
=
0
;
$dmg_p
=
-
1
;
if
(
$pd
[
'name'
]
==
'高中生·白神'
)
{
if
(
$phase
==
'rp'
)
{
$log
.=
"<span class=
\"
yellow
\"
>“你真的愿意对这个手无寸铁的高中女生下手么?”</span><br>"
;
$dice
=
diceroll
(
444
);
if
(
$dice
<=
200
){
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
elseif
(
$phase
==
'defend'
)
{
if
(
$pa
[
'original_dmg'
]
>
400
)
{
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为WIN MAX 2的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
$dmg_p
=
0.005
;
}
}
}
if
(
$pd
[
'name'
]
==
'白神·讨价还价'
)
{
if
(
$phase
==
'rp'
)
{
$dice
=
diceroll
(
1777
);
$log
.=
"<span class=
\"
yellow
\"
>“对面似乎真的没有敌意,你还是决定要下手么?”</span><br>"
;
if
(
$dice
<=
200
){
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
}
elseif
(
$dice
<=
400
){
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
neonblue
\"
>“罪恶感爬上了你的脊梁!”</span><br>"
;
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
elseif
(
$phase
==
'defend'
)
{
if
(
$pa
[
'original_dmg'
]
>
400
)
{
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为DECK的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
$dmg_p
=
0.005
;
}
}
}
if
(
$pd
[
'name'
]
==
'白神·接受'
)
{
if
(
$phase
==
'rp'
)
{
$dice
=
rand
(
1777
,
4888
);
$log
.=
"<span class=
\"
yellow
\"
>“你对一位毫无反抗能力,并且已经表示无敌意的女高中生横下死手。”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“希望你的良心还能得以安生。”</span><br>"
;
//$log .= "<span class=\"neonblue\">“【DEBUG】你的rp上升了<span class=\"red\">$dice</span>点。”</span><br>";
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
}
//结算rp上升事件
if
(
$phase
==
'rp'
&&
$rp_up
>
0
)
$pa
[
'rp'
]
=
$pa
[
'rp'
]
+
$rp_up
;
//返回一个伤害系数
if
(
$phase
==
'defend'
&&
$dmg_p
>
0
)
return
$dmg_p
;
}
return
;
}
# 百命猫特殊判定
function
attr_extra_89_100lifecat
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'是TSEROF啦!'
)
{
if
(
$pa
[
'lvl'
]
<
255
)
$pa
[
'lvl'
]
++
;
if
(
$pa
[
'rage'
]
<
255
)
$pa
[
'rage'
]
++
;
}
elseif
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
)
{
if
(
$pd
[
'lvl'
]
<
255
)
$pd
[
'lvl'
]
++
;
if
(
$pd
[
'rage'
]
<
255
)
$pd
[
'rage'
]
++
;
}
return
;
}
# 笼中鸟特殊判定
function
attr_extra_89_cagedbird
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'笼中鸟'
)
{
if
(
$pa
[
'statusa'
]
<
3
)
{
$continue_flag
=
0
;
//70%几率吸收玩家HP值成为自己的HP和SP值,SP值上升到一定程度时变身,变身后各种数值直接膨胀。三段变身。
$log
.=
"<span class=
\"
yellow
\"
>“笼中鸟含情脉脉地看着你!”</span><br>"
;
$dice
=
diceroll
(
20
);
//$log .= "<span class=\"yellow\">【DEBUG】骰子检定结果:<span class=\"red\">$dice</span>。</span><br>";
if
(
$dice
>=
14
)
{
$log
.=
"<span class=
\"
yellow
\"
>“你感觉你的生命被她汲取,但同时更有一种奇怪的暖洋洋的舒畅感。”</span><br>"
;
//继续投d20,1~10吸收30%,11~19吸收65%,大失败直接吸到1。
$dice2
=
rand
(
1
,
20
);
//$log .= "<span class=\"yellow\">【DEBUG】骰子2检定结果:<span class=\"red\">$dice2</span>。</span><br>";
if
(
$dice2
<=
10
){
$log
.=
"<span class=
\"
yellow
\"
>“你稍微稳了稳身形,似乎问题不是很严重。”</span><br>"
;
$gain
=
$pd
[
'hp'
]
*
0.3
;
}
elseif
(
$dice2
<=
19
){
$log
.=
"<span class=
\"
yellow
\"
>“你觉得头晕目眩。”</span><br>"
;
$gain
=
$pd
[
'hp'
]
*
0.65
;
}
elseif
(
$dice2
>=
20
){
$log
.=
"<span class=
\"
yellow
\"
>哎呀,骰子检定结果是大·失·败!</span><br>"
;
//哎哟喂啊,真是倒霉,但这就是人生啊。
$log
.=
"<span class=
\"
yellow
\"
>“你整个人都倒了下去,不过想到你的生命力将要打开她的镣铐,这让你充满了决心。”</span><br>"
;
$gain
=
$pd
[
'hp'
]
-
1
;
$pd
[
'def'
]
=
$pd
[
'def'
]
+
(
$gain
*
0.25
);
}
$pa
[
'hp'
]
=
$pa
[
'hp'
]
+
(
$gain
*
30
);
$pa
[
'mhp'
]
=
$pa
[
'mhp'
]
+
(
$gain
*
30
);
$pa
[
'msp'
]
=
$pa
[
'msp'
]
+
(
$gain
*
30
);
$pd
[
'hp'
]
=
round
(
$pd
[
'hp'
]
-
$gain
);
$pd
[
'rp'
]
=
round
(
$pd
[
'rp'
]
-
$gain
);
$continue_flag
=
1
;
}
else
{
$log
.=
"<span class=
\"
yellow
\"
>“不过什么也没有发生!”</span><br>"
;
}
}
//处理直接变身 在$pa['statusa']加了个限定条件 不然无限变身了
if
(
$pa
[
'msp'
]
>
5003
&&
$pa
[
'statusa'
]
==
0
){
$log
.=
"<span class=
\"
yellow
\"
>“笼中鸟的枷锁被打破了一些。”</span><br>"
;
$pa
[
'statusa'
]
=
1
;
$pa
[
'mhp'
]
=
$pa
[
'mhp'
]
*
5
;
$pa
[
'hp'
]
=
$pa
[
'hp'
]
*
5
;
$pa
[
'wf'
]
=
$pa
[
'wf'
]
*
5
;
$pa
[
'att'
]
=
$pa
[
'att'
]
*
5
;
$pa
[
'def'
]
=
$pa
[
'def'
]
*
5
;
}
elseif
(
$pa
[
'msp'
]
>
13377
&&
$pa
[
'statusa'
]
==
1
){
$log
.=
"<span class=
\"
yellow
\"
>“笼中鸟的枷锁被打破了一些。”</span><br>"
;
$pa
[
'statusa'
]
=
2
;
$pa
[
'mhp'
]
=
$pa
[
'mhp'
]
*
10
;
$pa
[
'hp'
]
=
$pa
[
'hp'
]
*
10
;
$pa
[
'wf'
]
=
$pa
[
'wf'
]
*
10
;
$pa
[
'att'
]
=
$pa
[
'att'
]
*
10
;
$pa
[
'def'
]
=
$pa
[
'def'
]
*
10
;
}
elseif
(
$pa
[
'msp'
]
>
33777
&&
$pa
[
'statusa'
]
==
2
){
$log
.=
"<span class=
\"
yellow
\"
>“笼中鸟的枷锁被完全打破了!”</span><br>"
;
$pa
[
'statusa'
]
=
3
;
$pa
[
'mhp'
]
=
$pa
[
'mhp'
]
*
30
;
$pa
[
'hp'
]
=
$pa
[
'hp'
]
*
30
;
$pa
[
'wf'
]
=
$pa
[
'wf'
]
*
30
;
$pa
[
'att'
]
=
$pa
[
'att'
]
*
30
;
$pa
[
'def'
]
=
$pa
[
'def'
]
*
30
;
$pa
[
'name'
]
=
$pa
[
'nm'
]
=
"完全解放的鸟儿"
;
}
//成功喂养笼中鸟会跳过战斗
if
(
$continue_flag
)
return
-
1
;
}
return
0
;
}
#走地羊特殊判定
function
attr_extra_89_walksheep
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'坚韧之子·拉姆'
)
{
$event_dice
=
diceroll
(
99
);
if
(
$event_dice
>=
30
)
{
$log
.=
"<span class=
\"
neonblue
\"
>“我这双拳头……很强……很厉害……咚咚打你……”</span><br>"
;
$damage
=
rand
(
5
,
40
);
if
(
!
empty
(
$pd
[
'wepe'
])
&&
$pd
[
'wepk'
]
!=
'WN'
)
{
$log
.=
"攻击使得<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>的效果下降了<span class=
\"
red
\"
>
$damage
</span>点!<br>"
;
$loss_flag
=
weapon_loss
(
$pd
,
$damage
,
1
,
1
);
if
(
$loss_flag
<
0
)
{
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
120
);
}
}
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
{
if
(
!
empty
(
$pd
[
$ar
.
's'
]))
{
$loss_flag
=
armor_hurt
(
$pd
,
$ar
,
$damage
,
1
);
if
(
$loss_flag
<
0
)
{
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
60
);
}
}
}
$w_money
=
$w_money
+
(
$damage
*
30
);
get_inf_rev
(
$pd
,
'a'
);
get_inf_rev
(
$pd
,
'f'
);
$log
.=
"致伤攻击使你的<span class=
\"
red
\"
>腕部</span>和<span class=
\"
red
\"
>足部</span>受伤了!<br>"
;
}
}
return
;
}
# 迷你蜂特殊判定
function
attr_extra_89_minibee
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
global
$log
;
if
(
$pa
[
'type'
]
==
89
&&
$pa
[
'name'
]
==
'诚心使魔·阿摩尔'
)
// 迷你蜂
{
$log
.=
"<span class=
\"
neonblue
\"
>“这只小蜜蜂勇敢地朝你袭来!”</span><br>"
;
$dice
=
diceroll
(
4
);
if
(
$dice
==
0
){
$log
.=
"<span class=
\"
yellow
\"
>魔法蜂针朝你刺来!造成了<span class=
\"
red
\"
>250</span>点伤害!并且使你<span class=
\"
red
\"
>麻痹</span>了!</span><br>"
;
$dmg
=
250
;
get_inf_rev
(
$pd
,
'e'
);
}
elseif
(
$dice
==
1
){
$log
.=
"<span class=
\"
yellow
\"
>幻惑花粉朝你扑来!造成了<span class=
\"
red
\"
>250</span>点伤害!并且使你<span class=
\"
red
\"
>混乱</span>了!</span><br>"
;
$dmg
=
250
;
get_inf_rev
(
$pd
,
'w'
);
}
elseif
(
$dice
==
2
){
$log
.=
"<span class=
\"
yellow
\"
>凶猛翼击朝你袭来!造成了<span class=
\"
red
\"
>250</span>点伤害!并且使你<span class=
\"
red
\"
>炎上</span>了!</span><br>"
;
$dmg
=
250
;
get_inf_rev
(
$pd
,
'u'
);
}
elseif
(
$dice
==
3
){
$log
.=
"<span class=
\"
yellow
\"
>剧毒蜂针朝你刺来!造成了<span class=
\"
red
\"
>250</span>点伤害!并且使你<span class=
\"
red
\"
>中毒</span>了!</span><br>"
;
$dmg
=
250
;
get_inf_rev
(
$pd
,
'p'
);
}
else
{
$log
.=
"<span class=
\"
yellow
\"
>体当冲刺朝你袭来!造成了<span class=
\"
red
\"
>550</span>点伤害!<br>"
;
$dmg
=
250
;
}
return
$dmg
;
}
}
?>
\ No newline at end of file
include/game/revbattle.func.php
0 → 100644
View file @
0d67f709
<?php
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
}
//发现敌人
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
)
{
foreach
(
$init_data
as
$i
)
global
$
{
$p
.
$i
};
}
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
init_rev_battle
();
$log
.=
"你发现了敌人<span class=
\"
red
\"
>
{
$w_name
}
</span>!<br>对方好像完全没有注意到你!<br>"
;
//初始化玩家攻击方式信息
$w1
=
substr
(
$s_wepk
,
1
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
if
(
$w2
==
'0'
||
$w2
==
'1'
)
$w2
=
''
;
if
((
$w1
==
'G'
||
$w1
==
'J'
)
&&
(
$s_weps
==
$nosta
))
$w1
=
'P'
;
include
template
(
'battlecmd_rev'
);
$cmd
=
ob_get_contents
();
ob_clean
();
$main
=
'battle_rev'
;
return
;
}
//发现中立NPC $kind 0=中立单位 1=友军
function
findneut
(
&
$edata
,
$kind
=
0
)
{
global
$db
,
$tablepre
;
global
$fog
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
;
$battle_title
=
$kind
?
'发现朋友'
:
'发现敌人?'
;
//获取并保存当前玩家数据
$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
)
{
foreach
(
$init_data
as
$i
)
global
$
{
$p
.
$i
};
}
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
init_rev_battle
(
1
);
$log
.=
"你发现了<span class=
\"
yellow
\"
>
$w_name
</span>!<br>"
;
if
(
!
$kind
)
$log
.=
"对方看起来没有敌意。<br>"
;
//TODO:把这一段挪到一个独立函数里
if
(
$edata
[
'clbpara'
][
'post'
]
==
$sdata
[
'pid'
])
{
$log
.=
"对方一看见你,便猛地朝你扑了过来!<br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br>
<br>你被这突然袭击吓了一跳!<br>
但对方只是从身上摸出了一个包裹样的东西扔给了你。然后又急匆匆地转身离开了。<br>
<br>……这是在搞啥……?<br><br>"
;
$action
=
''
;
global
$itm0
,
$itmk0
,
$itme0
,
$itms0
,
$itmsk0
;
$iid
=
$edata
[
'clbpara'
][
'postid'
];
$itm0
=
$edata
[
'itm'
.
$iid
];
$itmk0
=
$edata
[
'itmk'
.
$iid
];
$itmsk0
=
$edata
[
'itmsk'
.
$iid
];
$itme0
=
$edata
[
'itme'
.
$iid
];
$itms0
=
$edata
[
'itms'
.
$iid
];
//发一条news 表示快递已送达
$sponsorid
=
$edata
[
'clbpara'
][
'sponsor'
];
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
gambling WHERE uid = '
$sponsorid
'"
);
$sordata
=
$db
->
fetch_array
(
$result
);
addnews
(
$now
,
'gpost_success'
,
$sordata
[
'uname'
],
$itm0
,
$name
);
//再见了~快递员!
unset
(
$edata
[
'clbpara'
][
'post'
]);
unset
(
$edata
[
'clbpara'
][
'postid'
]);
unset
(
$edata
[
'clbpara'
][
'sponsor'
]);
destory_corpse
(
$edata
);
//解除快递锁
$db
->
query
(
"UPDATE
{
$tablepre
}
gambling SET bnid=0 WHERE uid='
$sponsorid
'"
);
}
include
template
(
'findneut'
);
$cmd
=
ob_get_contents
();
ob_clean
();
$main
=
'battle_rev'
;
return
;
}
?>
\ No newline at end of file
include/game/revcombat.func.php
View file @
0d67f709
...
@@ -3,243 +3,190 @@
...
@@ -3,243 +3,190 @@
if
(
!
defined
(
'IN_GAME'
))
{
if
(
!
defined
(
'IN_GAME'
))
{
exit
(
'Access Denied'
);
exit
(
'Access Denied'
);
}
}
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
include_once
GAME_ROOT
.
'./include/game/attr.func.php'
;
include_once
GAME_ROOT
.
'./include/game/attr.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revattr.func.php'
;
/*这个文件里的函数是供npc与npc战斗使用的。
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
但是只要提供了正确的pa和pd当然也可以给玩家使用。 //哈哈!不行!玩家数据存不回去!傻了吧! //搞定了! //没搞定啊!!不能100%保证不出怪问题,所以还是不要给玩家使用
本质上就是一套整理过的原版战斗函数。*/
//发现中立NPC $kind 0=中立单位 1=友军
# 战斗准备流程:
function
findneut
(
&
$edata
,
$kind
=
0
)
# pa、pd分别代表先制发现者与被先制发现者;
# active用于判断当前的主视角(玩家、战斗界面下方那一栏)对应pa还是pd;
# actvie=1代表主视角是pa,否则主视角是pd;
function
rev_combat_prepare
(
$pa
,
$pd
,
$active
,
$wep_kind
=
''
,
$msg
=
''
,
$log_print
=
1
)
{
{
global
$log
,
$action
,
$mode
,
$name
,
$main
,
$cmd
,
$battle_title
,
$pid
,
$db
,
$tablepre
;
global
$db
,
$tablepre
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
;
global
$w_type
,
$w_name
,
$w_gd
,
$w_sNo
,
$w_icon
,
$w_hp
,
$w_mhp
,
$w_sp
,
$w_msp
,
$w_rage
,
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_lvl
,
$w_pose
,
$w_tactic
,
$w_inf
;
$battle_title
=
$kind
?
'发现朋友'
:
'发现敌人?'
;
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
# actvie=0但没有传入pd时,读取当前玩家数据。
init_battle
(
1
);
# pa无论怎样都会有的,因为玩家主动发现还要过一遍findenemy()
if
(
!
is
_array
(
$edata
[
'clbpara'
]))
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]
);
if
(
!
is
set
(
$pd
)
&&
!
$active
)
$pd
=
current_player_save
(
);
$log
.=
"你发现了<span class=
\"
yellow
\"
>
$w_name
</span>!<br>"
;
# 格式化双方clbpara:最后保存角色数据的时候会自动转写clbpara,所以想改什么直接改就行了
if
(
!
$kind
)
$log
.=
"对方看起来没有敌意。<br>"
;
$pa
[
'clbpara'
]
=
get_clbpara
(
$pa
[
'clbpara'
]);
$pd
[
'clbpara'
]
=
get_clbpara
(
$pd
[
'clbpara'
])
;
//TODO:把这一段挪到一个独立函数里
# 是否显示战斗界面
if
(
$edata
[
'clbpara'
][
'post'
]
==
$pid
)
if
(
$log_print
)
{
$log
.=
"对方一看见你,便猛地朝你扑了过来!<br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br>
<br>你被这突然袭击吓了一跳!<br>
但对方只是从身上摸出了一个包裹样的东西扔给了你。然后又急匆匆地转身离开了。<br>
<br>……这是在搞啥……?<br><br>"
;
$action
=
''
;
global
$itm0
,
$itmk0
,
$itme0
,
$itms0
,
$itmsk0
;
$iid
=
$edata
[
'clbpara'
][
'postid'
];
$itm0
=
$edata
[
'itm'
.
$iid
];
$itmk0
=
$edata
[
'itmk'
.
$iid
];
$itmsk0
=
$edata
[
'itmsk'
.
$iid
];
$itme0
=
$edata
[
'itme'
.
$iid
];
$itms0
=
$edata
[
'itms'
.
$iid
];
//发一条news 表示快递已送达
$sponsorid
=
$edata
[
'clbpara'
][
'sponsor'
];
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
gambling WHERE uid = '
$sponsorid
'"
);
$sordata
=
$db
->
fetch_array
(
$result
);
addnews
(
$now
,
'gpost_success'
,
$sordata
[
'uname'
],
$itm0
,
$name
);
//再见了~快递员!
unset
(
$edata
[
'clbpara'
][
'post'
]);
unset
(
$edata
[
'clbpara'
][
'postid'
]);
unset
(
$edata
[
'clbpara'
][
'sponsor'
]);
destory_corpse
(
$edata
);
//解除快递锁
$db
->
query
(
"UPDATE
{
$tablepre
}
gambling SET bnid=0 WHERE uid='
$sponsorid
'"
);
}
include
template
(
'findneut'
);
$cmd
=
ob_get_contents
();
ob_clean
();
$main
=
'battle'
;
return
;
}
//战斗准备流程:通过传入的战斗双方ID初始化
function
rev_combat_prepare
(
$nid
,
$eid
)
{
global
$db
,
$tablepre
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
;
global
$n_type
,
$n_name
,
$n_gd
,
$n_sNo
,
$n_icon
,
$n_hp
,
$n_mhp
,
$n_sp
,
$n_msp
,
$n_rage
,
$n_wep
,
$n_wepk
,
$n_wepe
,
$n_lvl
,
$n_pose
,
$n_tactic
,
$n_inf
;
global
$w_type
,
$w_name
,
$w_gd
,
$w_sNo
,
$w_icon
,
$w_hp
,
$w_mhp
,
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_lvl
,
$w_pose
,
$w_tactic
,
$w_inf
;
//初始化进攻方数据
if
(
$nid
)
{
{
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$nid
' AND hp>0"
);
// 格式化交战双方信息
if
(
$db
->
num_rows
(
$result
)
>
0
)
// 主视角(战斗界面下方那一栏)前缀是$s_;敌对视角前缀是$w_;
// 为什么要这么搞……?都是为了兼容 NPC vs NPC 的战斗场景……
$init_data
=
update_db_player_structure
();
foreach
(
Array
(
'w_'
,
's_'
)
as
$p
)
{
{
$ndata
=
$db
->
fetch_array
(
$result
);
foreach
(
$init_data
as
$i
)
global
$
{
$p
.
$i
};
extract
(
$ndata
,
EXTR_PREFIX_ALL
,
'n'
);
}
}
}
if
(
$active
)
//初始化防守方数据
{
// 先制攻击,主视角是pa,给pa一个s_前缀;敌对视角是pd,给pd一个w_前缀;
if
(
$eid
)
extract
(
$pa
,
EXTR_PREFIX_ALL
,
's'
);
extract
(
$pd
,
EXTR_PREFIX_ALL
,
'w'
);
{
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$eid
' AND hp>0"
);
if
(
$db
->
num_rows
(
$result
)
>
0
)
{
$edata
=
$db
->
fetch_array
(
$result
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
}
}
else
{
//被先制攻击,主视角是pd,敌对视角是pa
extract
(
$pd
,
EXTR_PREFIX_ALL
,
's'
);
extract
(
$pa
,
EXTR_PREFIX_ALL
,
'w'
);
}
init_rev_battle
(
1
);
$battle_title
=
'战斗发生'
;
$main
=
'battle_rev'
;
}
}
if
(
$ndata
&&
$edata
&&
$nid
!=
$eid
)
{
# 加入喊话
init_battle
(
1
);
if
(
!
empty
(
$msg
))
$pa
[
'message'
]
=
$msg
;
$main
=
'revbattle'
;
//进入战斗流程
# 进入战斗流程
rev_combat
(
$ndata
,
$edata
,
1
);
rev_combat
(
$pa
,
$pd
,
$active
,
$wep_kind
,
$log_print
);
include
template
(
'revbattleresult'
);
$cmd
=
ob_get_contents
();
ob_clean
();
}
else
{
$log
.=
"初始化战斗对象失败,可能是攻方/守方已死,或传入的NPCID非法。<br>"
;
}
return
;
}
}
//战斗流程:pa(攻方)pd(守方)active(1=玩家为pa;0=玩家为pd)
# 战斗流程:
function
rev_combat
(
&
$pa
,
&
$pd
,
$active
,
$wep_kind
=
''
)
function
rev_combat
(
&
$pa
,
&
$pd
,
$active
,
$wep_kind
=
''
,
$log_print
=
1
)
{
{
global
$log
,
$mode
,
$main
,
$cmd
,
$action
,
$db
,
$tablepre
,
$now
,
$nosta
,
$hdamage
,
$hplayer
;
global
$db
,
$tablepre
,
$now
,
$mode
,
$main
,
$cmd
,
$log
;
global
$infinfo
,
$plsinfo
,
$hplsinfo
,
$battle_title
,
$message
;
global
$hdamage
,
$hplayer
;
global
$infinfo
,
$plsinfo
,
$hplsinfo
,
$nosta
;
//
登记非功能性地点信息时合并隐藏地点
#
登记非功能性地点信息时合并隐藏地点
foreach
(
$hplsinfo
as
$hgroup
=>
$hpls
)
$plsinfo
+=
$hpls
;
foreach
(
$hplsinfo
as
$hgroup
=>
$hpls
)
$plsinfo
+=
$hpls
;
$battle_title
=
'战斗发生'
;
# 登记称谓:之后的流程里已经用不到active了(大概)
$pa
[
'nm'
]
=
(
!
$pa
[
'type'
]
&&
$active
)
?
'你'
:
$pa
[
'name'
];
$pd
[
'nm'
]
=
(
!
$pd
[
'type'
]
&&
!
$active
&&
$pa
[
'nm'
]
!==
'你'
)
?
'你'
:
$pd
[
'name'
];
if
(
!
$wep_kind
)
# 在初始化战斗阶段触发的事件。即:无论是否反击都只会触发1次的事件。如果返回值小于0,则中断战斗。
{
$cp_flag
=
combat_prepare_events
(
$pa
,
$pd
,
$active
);
$w1
=
substr
(
$pa
[
'wepk'
],
1
,
1
);
if
(
$cp_flag
<
0
)
goto
battle_finish_flag
;
$w2
=
substr
(
$pa
[
'wepk'
],
2
,
1
);
if
(((
$w1
==
'G'
)
||
(
$w1
==
'J'
))
&&
(
$pa
[
'weps'
]
==
$nosta
))
$wep_kind
=
$w2
?
$w2
:
'P'
;
else
$wep_kind
=
$w1
;
}
elseif
(
strpos
(
$pa
[
'wepk'
],
$wep_kind
)
===
false
&&
$wep_kind
!=
'back'
)
{
$wep_kind
=
substr
(
$pa
[
'wepk'
],
1
,
1
);
}
$pa
[
'wep_kind'
]
=
$wep_kind
;
//战斗发起者是玩家时才会判断的一些事件
# 遇敌log
if
(
!
$pa
[
'type'
]
&&
$active
)
if
(
$active
)
{
{
if
(
$pa
[
'pls'
]
!=
$pd
[
'pls'
])
if
(
!
$pa
[
'type'
]
&&
isset
(
$pa
[
'message'
]))
{
$log
.=
"<span class=
\"
yellow
\"
>"
.
$pd
[
'name'
]
.
"</span>已经离开了<span class=
\"
yellow
\"
>
{
$plsinfo
[
$pa
[
'pls'
]]
}
</span>。<br>"
;
$action
=
''
;
$mode
=
'command'
;
return
;
}
if
(
$pd
[
'hp'
]
<=
0
)
{
$log
.=
"<span class=
\"
red
\"
>"
.
$pd
[
'name'
]
.
"</span>已经死亡,不能被攻击。<br>"
;
return
;
}
if
(
$message
)
{
{
$log
.=
"<span class=
\"
lime
\"
>
你对
{
$pd
[
'name'
]
}
大喊:
{
$message
}
</span><br>"
;
$log
.=
"<span class=
\"
lime
\"
>
{
$pa
[
'nm'
]
}
大喊着:
{
$pa
[
'message'
]
}
!向<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
</span>发起了攻击!
</span><br>"
;
if
(
!
$pd
[
'type'
])
if
(
!
$pd
[
'type'
])
{
{
$w_log
=
"<span class=
\"
lime
\"
>
{
$
name
}
对你大喊:
{
$message
}
</span><br>"
;
$w_log
=
"<span class=
\"
lime
\"
>
{
$
pa
[
'name'
]
}
对你大喊:
{
$pa
[
'message'
]
}
</span><br>"
;
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
}
}
}
}
else
{
if
(
$active
)
$log
.=
"
{
$pa
[
'nm'
]
}
向<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
</span>发起了攻击!<br>"
;
{
}
$log
.=
"你向<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
</span>发起了攻击!<br>"
;
}
}
else
else
{
{
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'n
ame'
]
}
</span>突然向你
袭来!<br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pa
[
'n
m'
]
}
</span>突然向
{
$pd
[
'nm'
]
}
袭来!<br>"
;
}
}
//战斗发起者是NPC时进行的判断
# 战斗发起者是NPC时
if
(
$pa
[
'type'
])
if
(
$pa
[
'type'
])
{
{
//$log .= npc_chat ($pa['type'],$pa['name'],'attack');
$log
.=
npc_chat
(
$pa
[
'type'
],
$pa
[
'name'
],
'attack'
);
//npc_changewep(); TODO
//换装判定
npc_changewep_rev
(
$pa
,
$pd
,
$active
);
}
}
# 初始化双方的真实攻击方式wep_kind,传入了攻击方式/主动技的情况下,在这里判断传入参数的合法性。
get_wep_kind
(
$pa
,
$wep_kind
);
get_wep_kind
(
$pd
);
//打击流程
# 打击流程
# 这里的第一个参数指的是进攻方(造成伤害的一方);第二个参数指的是防守方(承受伤害的一方)。active已经没用了。
# 传参的时候只用考虑参数位置,不用管pa、pd具体是谁。
$att_dmg
=
rev_attack
(
$pa
,
$pd
,
$active
);
$att_dmg
=
rev_attack
(
$pa
,
$pd
,
$active
);
//暴毙流程
# 存在暴毙标识:进攻方(pa)在进攻过程中未造成伤害就暴毙,可能是因为触发了武器直死。
if
(
$pa
[
'ggflag'
]
)
if
(
isset
(
$pa
[
'gg_flag'
])
)
{
{
unset
(
$pa
[
'ggflag'
]);
$pa
[
'hp'
]
=
0
;
return
;
//提前进行战斗结果判断。注意:这里的pa、pd顺序。因为暴毙的是pa,所以pa放在第二个参数位置。
}
//在rev_combat_result()中:传入的第一个参数代表击杀者(敌人)、第二个参数代表死者。不用管是pa还是pd,只要按照这个规则传就行了。
$att_result
=
rev_combat_result
(
$pd
,
$pa
,
$active
);
//打击效果结算
}
if
(
isset
(
$att_dmg
))
# 没有暴毙,结算打击伤害
elseif
(
isset
(
$att_dmg
))
{
{
//扣血
//扣血
$pd
[
'hp'
]
=
max
(
0
,
$pd
[
'hp'
]
-
$att_dmg
);
$pd
[
'hp'
]
=
max
(
0
,
$pd
[
'hp'
]
-
$att_dmg
);
//判断是否触发击杀或复活
//判断是否触发击杀或复活
:1-继续战斗;0-中止战斗
$att_result
=
rev_combat_result
(
$pa
,
$pd
,
$active
);
$att_result
=
rev_combat_result
(
$pa
,
$pd
,
$active
);
}
}
//判断是否进入反击流程 把!$att_result去掉可以实现复活后反击 很酷吧!
# 反击流程判断:$att_result>0,且敌人非治疗姿态或重视躲藏才会触发反击。 TODO:为反击条件新建一个函数
if
((
$pd
[
'hp'
]
>
0
)
&&
(
$pd
[
'pose'
]
!=
5
)
&&
(
$pd
[
'tactic'
]
!=
4
)
&&
!
$att_result
)
if
((
$pd
[
'hp'
]
>
0
)
&&
(
$pd
[
'pose'
]
!=
5
)
&&
(
$pd
[
'tactic'
]
!=
4
)
&&
$att_result
>
0
)
{
{
global
$rangeinfo
;
global
$rangeinfo
;
$w_w1
=
substr
(
$pd
[
'wepk'
],
1
,
1
);
# 通过武器射程判断是否满足反击条件。 TODO:为武器射程判断新建一个函数
$w_w2
=
substr
(
$pd
[
'wepk'
],
2
,
1
);
if
(((
$w_w1
==
'G'
)
||
(
$w_w1
==
'J'
))
&&
(
$pd
[
'weps'
]
==
$nosta
))
{
$pd
[
'wep_kind'
]
=
$w_w2
?
$w_w2
:
'P'
;
}
else
{
$pd
[
'wep_kind'
]
=
$w_w1
;
}
//echo "【DEBUG】{$pd['name']}的攻击方式是{$pd['wep_kind']}<br>";
$d_wep_temp
=
$pd
[
'wep'
];
if
(
$rangeinfo
[
$pa
[
'wep_kind'
]]
<=
$rangeinfo
[
$pd
[
'wep_kind'
]]
&&
$rangeinfo
[
$pa
[
'wep_kind'
]]
!==
0
)
if
(
$rangeinfo
[
$pa
[
'wep_kind'
]]
<=
$rangeinfo
[
$pd
[
'wep_kind'
]]
&&
$rangeinfo
[
$pa
[
'wep_kind'
]]
!==
0
)
{
{
# 计算基础反击率
$counter
=
get_counter
(
$pd
[
'wep_kind'
],
$pd
[
'tactic'
],
$pd
[
'club'
],
$pd
[
'inf'
]);
$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
*=
rev_get_clubskill_bonus_counter
(
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
,
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
);
$counter_dice
=
rand
(
0
,
99
);
# 掷骰
$counter_dice
=
diceroll
(
99
);
if
(
$counter_dice
<
$counter
)
if
(
$counter_dice
<
$counter
)
{
{
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
的反击!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
的反击!</span><br>"
;
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'name'
],
'defend'
);
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'nm'
],
'defend'
);
//反击打击实行
# 反击打击实行
# 因为这时候进攻方(造成伤害)的一方是pd,所以向第一个位置传入pd,向第二个位置(防守方)传入pa。
$def_dmg
=
rev_attack
(
$pd
,
$pa
,
1
);
$def_dmg
=
rev_attack
(
$pd
,
$pa
,
1
);
}
}
else
else
{
{
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'n
ame
'
],
'escape'
);
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'n
m
'
],
'escape'
);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
ame
'
]
}
处于无法反击的状态,逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
m
'
]
}
处于无法反击的状态,逃跑了!</span><br>"
;
}
}
}
}
# 不满足射程
else
else
{
{
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'n
ame
'
],
'cannot'
);
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'n
m
'
],
'cannot'
);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
ame
'
]
}
攻击范围不足,不能反击,逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
m
'
]
}
攻击范围不足,不能反击,逃跑了!</span><br>"
;
}
}
}
}
elseif
(
$pd
[
'hp'
]
>
0
&&
!
$att_result
)
# 不满足基础反击条件
elseif
(
$pd
[
'hp'
]
>
0
&&
$att_result
>
0
)
{
{
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
ame'
]
}
逃跑
了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'n
m'
]
}
没有反击,转身逃开
了!</span><br>"
;
}
}
//反击效果结算
# 存在暴毙标识:反击方(pd)在反击过程中未造成伤害就暴毙,可能是因为触发了武器直死。
if
(
isset
(
$def_dmg
))
if
(
isset
(
$pd
[
'gg_flag'
]))
{
$pd
[
'hp'
]
=
0
;
//提前进行战斗结果判断。注意:这里的pa、pd顺序。
$att_result
=
rev_combat_result
(
$pa
,
$pd
,
$active
);
}
# 没有暴毙,结算反击伤害
elseif
(
isset
(
$def_dmg
))
{
{
//扣血
//扣血
$pa
[
'hp'
]
=
max
(
0
,
$pa
[
'hp'
]
-
$def_dmg
);
$pa
[
'hp'
]
=
max
(
0
,
$pa
[
'hp'
]
-
$def_dmg
);
//判断是否触发击杀或复活
//判断是否触发击杀或复活
。增补:$active已经没有用了,不用管它。
$def_result
=
rev_combat_result
(
$pd
,
$pa
,
1
-
$active
);
$def_result
=
rev_combat_result
(
$pd
,
$pa
,
1
-
$active
);
}
}
//
检查是否更新最高伤害情报
#
检查是否更新最高伤害情报
$att_dmg
=
$att_dmg
?
$att_dmg
:
0
;
$att_dmg
=
!
empty
(
$att_dmg
)
?
$att_dmg
:
0
;
$def_dmg
=
$def_dmg
?
$def_dmg
:
0
;
$def_dmg
=
!
empty
(
$def_dmg
)
?
$def_dmg
:
0
;
if
((
$att_dmg
>
$hdamage
)
&&
(
$att_dmg
>=
$def_dmg
)
&&
(
!
$pa
[
'type'
]))
{
if
((
$att_dmg
>
$hdamage
)
&&
(
$att_dmg
>=
$def_dmg
)
&&
(
!
$pa
[
'type'
]))
{
$hdamage
=
$att_dmg
;
$hdamage
=
$att_dmg
;
$hplayer
=
$pa
[
'name'
];
$hplayer
=
$pa
[
'name'
];
...
@@ -250,7 +197,25 @@
...
@@ -250,7 +197,25 @@
save_combatinfo
();
save_combatinfo
();
}
}
//如果战斗中出现了死人 更新action标记
# 敌人是玩家,更新logsave
if
((
$active
&&
!
$pd
[
'type'
])
||
(
!
$active
&&
!
$pa
[
'type'
]))
{
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>"
;
logsave
(
$pd
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
else
{
$w_log
=
"你发现了手持<span class=
\"
red
\"
>
{
$pd
[
'wep_name'
]
}
</span>的<span class=
\"
yellow
\"
>
{
$pd
[
'name'
]
}
</span>并且先发制人!<br>你对其做出<span class=
\"
yellow
\"
>
$att_dmg
</span>点攻击,受到其<span class=
\"
yellow
\"
>
$def_dmg
</span>点反击。<br>"
;
logsave
(
$pa
[
'pid'
],
$now
,
$w_log
,
'c'
);
}
}
# 战斗准备事件中触发了跳过战斗标记,直接goto跳转到这个位置。
battle_finish_flag
:
# 如果战斗中出现了死者 更新action标记
if
(
$active
)
if
(
$active
)
{
{
if
(
$pd
[
'hp'
]
<=
0
&&
$pa
[
'hp'
]
>
0
)
if
(
$pd
[
'hp'
]
<=
0
&&
$pa
[
'hp'
]
>
0
)
...
@@ -273,780 +238,395 @@
...
@@ -273,780 +238,395 @@
$pd
[
'action'
]
=
'corpse'
.
$pa
[
'pid'
];
$pd
[
'action'
]
=
'corpse'
.
$pa
[
'pid'
];
}
}
}
}
$log
=
str_replace
(
'你'
,
$pa
[
'name'
],
$log
);
//偷懒做法 如果NPC的台词里有“你”出现的话 会变得很怪23333
//保存两个人的状态
# 主视角不是玩家,可能是玩家召唤的NPC帮手。将身上的印记传给玩家。
player_save
(
$pa
);
player_save
(
$pd
);
if
(
!
$pa
[
'type'
]
&&
$active
)
if
(
!
$pa
[
'type'
])
player_load
(
$pa
);
{
if
(
!
$pd
[
'type'
])
player_load
(
$pd
);
//主视角-pa是NPC的情况下,把身上的标记传递给玩家
//刷新界面状态
global
$action
;
global
$n_iconImg
,
$n_type
,
$n_name
,
$n_gd
,
$n_sNo
,
$n_icon
,
$n_hp
,
$n_mhp
,
$n_sp
,
$n_msp
,
$n_rage
,
$n_wep
,
$n_wepk
,
$n_wepe
,
$n_lvl
,
$n_pose
,
$n_tactic
,
$n_inf
,
$n_wep_words
,
$n_wepk_words
;
$action
=
$pa
[
'action'
];
global
$w_type
,
$w_name
,
$w_gd
,
$w_sNo
,
$w_icon
,
$w_hp
,
$w_mhp
,
$w_wep
,
$w_wepk
,
$w_wepe
,
$w_lvl
,
$w_pose
,
$w_tactic
,
$w_inf
;
}
extract
(
$pa
,
EXTR_PREFIX_ALL
,
'n'
);
extract
(
$pd
,
EXTR_PREFIX_ALL
,
'w'
);
$main
=
'revbattle'
;
# 保存双方状态
init_battle
(
1
);
if
(
$active
)
//条件TODO:由玩家控制的,或者与玩家处于盟友状态的NPC完成了击杀,给玩家传一个摸尸体标记,这样玩家点了确定之后就可以去摸尸体了
{
global
$action
;
//pa是玩家/主视角NPC的情况下 把edata($w_*)发给$pd 把sdata($s_*) 发给$pa
$action
=
$pa
[
'action'
];
$edata
=
$pd
;
$sdata
=
$pa
;
//毁尸灭迹
player_save
(
$pa
);
player_save
(
$pd
);
unset
(
$pa
);
unset
(
$pd
);
}
else
{
//pd是玩家/主视角NPC的情况下 把edata($w_*)发给$pa 把sdata($s_*) 发给$pd
$edata
=
$pa
;
$sdata
=
$pd
;
player_save
(
$pa
);
player_save
(
$pd
);
}
# 刷新玩家状态
if
(
!
$sdata
[
'type'
])
player_load
(
$sdata
);
# 刷新界面显示 蛋疼度+233
$init_data
=
update_db_player_structure
();
foreach
(
Array
(
'w_'
,
's_'
,
''
)
as
$p
)
{
foreach
(
$init_data
as
$i
)
global
$
{
$p
.
$i
};
}
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
init_rev_battle
(
1
);
$main
=
'battle_rev'
;
# 根据玩家身上的标记($action) 判断接下来要跳转的页面
if
(
substr
(
$action
,
0
,
6
)
==
'corpse'
)
{
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
findcorpse
(
$edata
);
}
else
{
include
template
(
'battleresult'
);
$cmd
=
ob_get_contents
();
ob_clean
();
}
return
;
return
;
}
}
//打击流程:pa(打击方);pd(被打方);active(1=pa主动攻击;0=pa发起反击)
# 打击流程:
# 这里的第一个参数pa指的是进攻方(造成伤害的一方);第二个参数pd指的是防守方(承受伤害的一方)。active已经没用了。
# 传参的时候只用考虑位置,不用管pa、pd都是谁。
function
rev_attack
(
&
$pa
,
&
$pd
,
$active
=
1
)
function
rev_attack
(
&
$pa
,
&
$pd
,
$active
=
1
)
{
{
//通用
global
$now
,
$nosta
,
$log
,
$infobbs
,
$infinfo
,
$attinfo
,
$skillinfo
,
$wepimprate
,
$specialrate
;
global
$now
,
$nosta
,
$log
,
$infobbs
,
$infinfo
,
$attinfo
,
$skillinfo
,
$wepimprate
,
$specialrate
;
global
$db
,
$tablepre
;
global
$db
,
$tablepre
;
//枪托攻击标识
$is_wpg
=
false
;
//武器效果值修正
$watt
=-
1
;
if
(((
strpos
(
$pa
[
'wepk'
],
'G'
)
==
1
)
||
(
strpos
(
$pa
[
'wepk'
],
'J'
)
==
1
))
&&
(
$pa
[
'weps'
]
==
$nosta
))
{
if
((
$pa
[
'wep_kind'
]
==
'G'
)
||
(
$pa
[
'wep_kind'
]
==
'P'
)
||
(
$pa
[
'wep_kind'
]
==
'J'
))
{
$pa
[
'wep_kind'
]
=
'P'
;
$is_wpg
=
true
;
$watt
=
round
(
$pa
[
'wepe'
]
/
5
);
}
else
{
$watt
=
$pa
[
'wepe'
];
}
}
$log
.=
"
{
$pa
[
'name'
]
}
使用
{
$pa
[
'wep'
]
}
<span class=
\"
yellow
\"
>
{
$attinfo
[
$pa
[
'wep_kind'
]]
}
</span>
{
$pd
[
'name'
]
}
!<br>"
;
$pa
[
'att_key'
]
=
getatkkey
(
$pa
[
'wepsk'
],
$pa
[
'arhsk'
],
$pa
[
'arbsk'
],
$pa
[
'arask'
],
$pa
[
'arfsk'
],
$pa
[
'artsk'
],
$pa
[
'artk'
],
$is_wpg
);
# 获取属性
$pd
[
'def_key'
]
=
getdefkey
(
$pd
[
'wepsk'
],
$pd
[
'arhsk'
],
$pd
[
'arbsk'
],
$pd
[
'arask'
],
$pd
[
'arfsk'
],
$pd
[
'artsk'
],
$pd
[
'artk'
]
);
$pa
[
'ex_equip_keys'
]
=
$pa
[
'ex_wep_keys'
]
=
Array
();
$pa
[
'ex_equip_keys'
]
=
get_equip_ex_array
(
$pa
);
//获取pa防具上的所有属性
//三抽标识
$pa
[
'ex_wep_keys'
]
=
get_wep_ex_array
(
$pa
);
//获取pd武器、饰品上的所有属性
$mdr
=
$skdr
=
$sldr
=
false
;
if
(
strpos
(
$pa
[
'att_key'
]
.
$pd
[
'def_key'
],
'-'
)
!==
false
){
$mdr
=
true
;}
//精抽
$pd
[
'ex_equip_keys'
]
=
$pd
[
'ex_wep_keys'
]
=
Array
();
if
(
strpos
(
$pa
[
'att_key'
]
.
$pd
[
'def_key'
],
'*'
)
!==
false
){
$sldr
=
true
;}
//魂抽
$pd
[
'ex_equip_keys'
]
=
get_equip_ex_array
(
$pd
);
//获取pd防具上的所有属性
if
(
strpos
(
$pa
[
'att_key'
]
.
$pd
[
'def_key'
],
'+'
)
!==
false
){
$skdr
=
true
;}
//技抽
$pd
[
'ex_wep_keys'
]
=
get_wep_ex_array
(
$pd
);
//获取pd武器、饰品上的所有属性
if
(
$mdr
||
$sldr
||
$skdr
){
list
(
$wsk
,
$hsk
,
$bsk
,
$ask
,
$fsk
,
$tsk
,
$tk
)
=
Array
(
$pa
[
'wepsk'
],
$pa
[
'arhsk'
],
$pa
[
'arbsk'
],
$pa
[
'arask'
],
$pa
[
'arfsk'
],
$pa
[
'artsk'
],
$pa
[
'artk'
]);
list
(
$wwsk
,
$whsk
,
$wbsk
,
$wask
,
$wfsk
,
$wtsk
,
$wtk
)
=
Array
(
$pd
[
'wepsk'
],
$pd
[
'arhsk'
],
$pd
[
'arbsk'
],
$pd
[
'arask'
],
$pd
[
'arfsk'
],
$pd
[
'artsk'
],
$pd
[
'artk'
]);
if
(
$mdr
){
$log
.=
"<span class=
\"
yellow
\"
>精神抽取使双方的防具属性全部失效!</span><br>"
;
$hsk
=
$bsk
=
$ask
=
$fsk
=
$whsk
=
$wbsk
=
$wask
=
$wfsk
=
''
;
}
if
(
$sldr
){
$log
.=
"<span class=
\"
yellow
\"
>灵魂抽取使双方的武器和饰物属性全部失效!</span><br>"
;
$wsk
=
$tsk
=
$tk
=
$wwsk
=
$wtsk
=
$wtk
=
''
;
}
if
(
$skdr
){
$log
.=
"<span class=
\"
yellow
\"
>技能抽取使双方的武器熟练度在战斗中大幅下降!</span><br>"
;
}
$pa
[
'att_key'
]
=
getatkkey
(
$wsk
,
$hsk
,
$bsk
,
$ask
,
$fsk
,
$tsk
,
$tk
,
$is_wpg
);
$pd
[
'def_key'
]
=
getdefkey
(
$wwsk
,
$whsk
,
$wbsk
,
$wask
,
$wfsk
,
$wtsk
,
$wtk
);
}
//echo "【DEBUG】pa_att_key={$pa['att_key']},pd_def_key={$pd['def_key']}<br>";
//直死 NPC打NPC 无效果
//真红暮护盾/特效
# 技能抽取判定
if
(
(
$pd
[
'type'
]
==
19
)
&&
(
$pd
[
'name'
]
==
"红暮"
)
&&
(
substr
(
$pa
[
'wepk'
],
0
,
2
)
!=
$pd
[
'wepk'
]
))
if
(
in_array
(
'+'
,
array_merge
(
$pa
[
'ex_wep_keys'
],
$pa
[
'ex_equip_keys'
]))
||
in_array
(
'+'
,
array_merge
(
$pd
[
'ex_wep_keys'
],
$pd
[
'ex_equip_keys'
])
))
{
{
$log
.=
"<span class=
\"
red
\"
>红暮身上的武器投射出了防护罩,轻松挡下了
{
$pa
[
'name'
]
}
的攻击
!</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>技能抽取使双方的武器熟练度在战斗中大幅下降
!</span><br>"
;
return
0
;
$pa
[
'skdr_flag'
]
=
$pd
[
'skdr_flag'
]
=
1
;
}
}
# 灵魂抽取判定
//数据护盾 NPC打NPC
if
(
in_array
(
'*'
,
$pa
[
'ex_wep_keys'
])
||
in_array
(
'*'
,
$pd
[
'ex_wep_keys'
]))
if
(
$pd
[
'artk'
]
==
"AA"
)
{
{
//主动攻击判定
$log
.=
"<span class=
\"
yellow
\"
>灵魂抽取使双方的武器和饰物属性全部失效!</span><br>"
;
if
(
$pd
[
'type'
]
!=
0
)
$pa
[
'ex_wep_keys'
]
=
$pd
[
'ex_wep_keys'
]
=
Array
();
{
//pd是NPC
$pa
[
'sldr_flag'
]
=
$pd
[
'sldr_flag'
]
=
1
;
if
(
$pd
[
'arte'
]
<
100
)
{
$log
.=
"<span class=
\"
red
\"
>对手身上的数据护盾投射出了防护罩,轻松挡下了
{
$pa
[
'name'
]
}
的攻击!</span><br>"
;
$pd
[
'arte'
]
=
$pd
[
'arte'
]
+
$pd
[
'arts'
];
if
(
$pd
[
'arte'
]
>
100
){
$pd
[
'arte'
]
=
100
;}
return
0
;
}
else
{
$log
.=
"<span class=
\"
red
\"
>对手身上的数据护盾失效了!</span><br>"
;
}
}
}
}
# 精神抽取判定
//迷你蜂 - NPC打NPC TODO
if
(
in_array
(
'-'
,
$pa
[
'ex_equip_keys'
])
||
in_array
(
'-'
,
$pd
[
'ex_equip_keys'
]))
{
//电子狐 - NPC打NPC TODO
$log
.=
"<span class=
\"
yellow
\"
>精神抽取使双方的防具属性全部失效!</span><br>"
;
$pa
[
'ex_equip_keys'
]
=
$pd
[
'ex_equip_keys'
]
=
Array
();
$pa
[
'mdr_flag'
]
=
$pd
[
'mdr_flag'
]
=
1
;
}
// PS:三抽检定现在没有做彼此保留的额外判定。因为单独写在这里太丑陋了。
// 因此如果一件武器/防具上同时带有3抽,有可能会被灵抽/精抽洗掉对方的效果。但是现在游戏里还没有这样的装备,所以等出问题了再解决。
//三抽检定过后把2个属性数组合并,不然每次都要拖着一长串
$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'
]);
//熟练度修正
# 在计算命中流程开始前判定的事件,分两种:(以后看情况要不要分成两个函数)
//$add_skill = &$pa[$skillinfo[$pa['wep_kind']]];
# 第一种:进攻方(pa)在进攻前因为某种缘故受到伤害、甚至暴毙(直死、DOT结算等) 。判断是否继续进攻流程;
//提醒自己一下:$skillinfo[$pa['wep_kind']]返回的是'wp','wk'...这种熟练名字段,对应熟练度值是$pa[$skillinfo[$pa['wep_kind']]]
# 如果需要登记特殊的死法,请给死者(比如pa)赋一个$pa['gg_flag'] = '死法编号'; 这样在后续的流程里会自动判定特殊死亡事件,如果没有登记特殊死法,会按照正常的战死流程登记;
if
(
$pa
[
'club'
]
==
18
){
# 第二种:pa对pd的装备、武器产生影响的特殊攻击(临摹装置、一些特殊的直接伤害等)。
# 如果这个阶段让pa或pd的武器发生了改变,记得使用get_wep_kind()刷新真实攻击方式。对武器和装备的破坏请使用weapon_loss()与armor_hurt()函数,以使装备在被破坏后从ex_keys中剔除对应的属性。
# 返回值小于0时中止流程,否则继续。
$flag
=
hitrate_prepare_events
(
$pa
,
$pd
,
$active
);
if
(
$flag
<
0
)
return
$flag
;
# 获取真实熟练度 保存在$pa['wep_skill']内。TODO:将熟练度计算汇总到一个函数内
if
(
$pa
[
'club'
]
==
18
)
{
$pa
[
'wep_skill'
]
=
round
(
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
*
0.7
+
(
$pa
[
'wp'
]
+
$pa
[
'wk'
]
+
$pa
[
'wc'
]
+
$pa
[
'wg'
]
+
$pa
[
'wd'
]
+
$pa
[
'wf'
])
*
0.3
);
$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'
]]];
}
}
//三抽修正
else
if
(
$skdr
)
{
{
$pa
[
'wep_skill'
]
=
sqrt
(
$pa
[
'wep_skill'
])
;
$pa
[
'wep_skill'
]
=
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
;
}
}
//空手武器效果值修正
# 应用技抽效果
if
(
$watt
==-
1
)
if
(
isset
(
$pa
[
'skdr_flag'
])
||
isset
(
$pd
[
'skdr_flag'
])
)
{
{
if
(
$pa
[
'wep_kind'
]
==
'N'
)
$pa
[
'wep_skill'
]
=
sqrt
(
$pa
[
'wep_skill'
]);
{
$watt
=
round
(
$pa
[
'wep_skill'
]
*
2
/
3
);
}
else
{
$watt
=
$pa
[
'wepe'
]
*
2
;
}
}
}
//echo "【DEBUG】pa_wep_kind={$pa['wep_kind']},pa_wep_skill={$pa['wep_skill']},pa_skills={$pa['skills']}<br>";
$hitrate
=
get_hitrate
(
$pa
[
'wep_kind'
],
$pa
[
'wep_skill'
],
$pa
[
'club'
],
$pa
[
'inf'
]
);
//echo "【DEBUG】hitrate={$hitrate}<br>";
$hitrate
*=
rev_get_clubskill_bonus_hitrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
//echo "【DEBUG】修正后hitrate={$hitrate}<br>";
$damage_p
=
get_damage_p
(
$pa
[
'rage'
],
$pa
[
'att_key'
],
0
,
$pa
[
'name'
]
,
$pa
[
'club'
],
$message
);
//echo "【DEBUG】damage_p={$damage_p}<br>";
//……咕咕?
# 计算武器基础命中率 保存在$pa['hitrate']内
$clb_bonus_imfrate
=
rev_get_clubskill_bonus_imfrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
$pa
[
'hitrate'
]
=
get_hitrate_rev
(
$pa
,
$pd
,
$active
);
$clb_bonus_imftime
=
rev_get_clubskill_bonus_imftime
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
# 计算命中次数 保存在$pa['hitrate_times']内
$clb_bonus_imprate
=
rev_get_clubskill_bonus_imprate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
get_hit_time_rev
(
$pa
,
$pd
,
$active
);
$clb_bonus_hitrate
=
rev_get_clubskill_bonus_hitrate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pd
[
'skills'
],
$pd
);
# 在执行伤害计算前登记武器名 防止武器被消耗掉后不能正常登记击杀信息
$pa
[
'wep_name'
]
=
$pa
[
'wep'
];
$hit_time
=
get_hit_time
(
$pa
[
'att_key'
],
$pa
[
'wep_skill'
],
$hitrate
,
$pa
[
'wep_kind'
],
$pa
[
'weps'
],
$infobbs
[
$pa
[
'wep_kind'
]]
*
$clb_bonus_imfrate
,
$clb_bonus_imftime
,
$wepimprate
[
$pa
[
'wep_kind'
]]
*
$clb_bonus_imprate
,
$is_wpg
,
$clb_bonus_hitrate
);
$log
.=
"
{
$pa
[
'nm'
]
}
使用
{
$pa
[
'wep'
]
}
<span class=
\"
yellow
\"
>
{
$attinfo
[
$pa
[
'wep_kind'
]]
}
</span>
{
$pd
[
'nm'
]
}
!<br>"
;
//echo "【DEBUG】看上面是输出的hit_time数组".print_r($hit_time)."<br>";
if
(
$hit_time
[
1
]
>
0
)
# 命中次数大于0时 执行伤害判断
if
(
$pa
[
'hitrate_times'
]
>
0
)
{
{
if
(
strpos
(
$pa
[
'att_key'
],
'R'
)
!==
false
)
//检查是否存在造成不受其他因素影响的固定伤害(例:混沌伤害、直死)
$fix_dmg
=
get_fix_damage
(
$pa
,
$pd
,
$active
);
if
(
isset
(
$fix_dmg
))
{
{
//随机伤害无视一切伤害计算
$damage
=
$fix_dmg
;
$maxdmg
=
$pd
[
'mhp'
]
>
$pa
[
'wepe'
]
?
$pa
[
'wepe'
]
:
$pd
[
'mhp'
];
if
(
$damage
<=
0
)
$log
.=
"<span class=
\"
yellow
\"
>造成的总伤害:<span class=
\"
red
\"
>
$damage
</span>。</span><br>"
;
$damage
=
rand
(
1
,
$maxdmg
);
$log
.=
"武器随机造成了<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
}
}
//如无,则正常计算伤害
else
else
{
{
$gender_dmg_p
=
check_gender
(
$pa
[
'name'
],
$pd
[
'name'
],
$pa
[
'gd'
],
$pd
[
'gd'
],
$pa
[
'att_key'
]);
# 物理伤害计算部分:
if
(
$gender_dmg_p
==
0
)
//获取攻击方(pa)的基础攻击力与修正
{
$pa
[
'base_att'
]
=
get_base_att
(
$pa
,
$pd
,
$active
);
$damage
=
1
;
//获取防守方(pd)的基础防御与修正
}
$pd
[
'base_def'
]
=
get_base_def
(
$pa
,
$pd
,
$active
);
else
//获取攻击方(pa)的原始伤害
$damage
=
get_original_dmg_rev
(
$pa
,
$pd
,
$active
);
//获取攻击方(pa)在原始伤害基础上附加的固定伤害(重枪、灵武固伤)
$damage
+=
get_original_fix_dmg_rev
(
$pa
,
$pd
,
$active
);
//获取攻击方(pa)对伤害倍率施加的变化(连击、必杀、灵力武器发挥了x%的威力) 返回的是一个数组 每个值是一个单独的系数
$damage_p
=
get_damage_p_rev
(
$pa
,
$pd
,
$active
);
//获取攻击方(pa)在造成伤害前触发的事件(检查pd身上是否有防御属性,pa是否触发了贯穿、冲击)
deal_damage_prepare_events
(
$pa
,
$pd
,
$active
);
//获取防守方(pd)对伤害倍率施加的变化(防御属性、持有重枪受伤增加、热恋、同志) 系数保存在同一个数组里,分开2个函数只是为了调整log顺序
$damage_p
=
array_merge
(
$damage_p
,
get_damage_def_p_rev
(
$pa
,
$pd
,
$active
));
//计算物理伤害:
$log
.=
"造成了"
;
//存在伤害系数队列
if
(
is_array
(
$damage_p
)
&&
count
(
$damage_p
)
>
0
&&
$damage
>
1
)
{
{
$attack
=
$pa
[
'att'
]
+
$watt
;
if
(
in_array
(
'0'
,
$damage_p
))
$defend
=
checkdef
(
$pd
[
'def'
]
,
$pd
[
'arbe'
]
+
$pd
[
'arhe'
]
+
$pd
[
'arae'
]
+
$pd
[
'arfe'
]
,
$pa
[
'att_key'
],
1
);
{
$damage
=
rev_get_original_dmg
(
$pa
,
$pd
,
$attack
,
$defend
,
$pa
[
'wep_skill'
]
,
$pa
[
'wep_kind'
]
);
//队列内系数有0 直接归零
//echo "【DEBUG】rev_get_original_dmg={$damage}<br>";
$damage
=
0
;
if
(
$pa
[
'wep_kind'
]
==
'F'
)
}
else
{
//否则输出一段 A×B×C=D 样式的文本
$log
.=
"
{
$damage
}
"
;
foreach
(
$damage_p
as
$p
)
{
$damage
=
round
(
$damage
*
$p
);
$log
.=
"×
{
$p
}
"
;
}
$log
.=
"="
;
}
}
$damage
=
$damage
>
1
?
round
(
$damage
)
:
1
;
//命中了至少会保留1点伤害 此所谓雁过拔毛
$log
.=
"<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
//最终物理伤害
$pdamage
=
$damage
;
# 属性伤害计算部分:
//获取攻击方(pa)能造成的属性伤害类型
$pa
[
'ex_attack_keys'
]
=
get_base_ex_att_array
(
$pa
,
$pd
,
$active
);
//攻击方(pa)存在属性伤害:
if
(
$pa
[
'ex_attack_keys'
])
{
//获取攻击方(pa)在造成属性伤害前触发的事件(检查pd身上是否有防御属性,pa是否触发了属穿)
deal_ex_damage_prepare_events
(
$pa
,
$pd
,
$active
);
//获取攻击方(pa)能造成的属性伤害
$ex_damage
=
get_original_ex_dmg
(
$pa
,
$pd
,
$active
);
//存在大于1种属性伤害,输出一段 A+B+C=D 样式的文本
$total_ex_damage
=
0
;
if
(
is_array
(
$ex_damage
))
{
{
if
(
$sldr
)
if
(
count
(
$ex_damage
)
>
1
)
{
{
$log
.=
"<span class=
\"
red
\"
>由于灵魂抽取的作用,灵系武器伤害大幅降低了!</span><br>"
;
$log
.=
"造成了"
;
$elog
=
''
;
foreach
(
$ex_damage
as
$edmg
)
{
$total_ex_damage
+=
$edmg
;
if
(
!
empty
(
$elog
))
$elog
.=
"+"
.
$edmg
;
else
$elog
=
$edmg
;
}
$log
.=
$elog
.
"=<span class=
\"
red
\"
>
{
$total_ex_damage
}
</span>点属性伤害!<br>"
;
}
}
else
else
{
{
$damage
=
round
((
$pa
[
'wepe'
]
+
$damage
)
*
rev_get_WF_p
(
$pa
,
$pa
[
'club'
],
$pa
[
'wepe'
]));
$total_ex_damage
=
$ex_damage
[
0
];
//echo "【DEBUG】rev_get_WF_p修正后damage={$damage}<br>";
}
}
}
}
if
(
$pa
[
'wep_kind'
]
==
'J'
)
else
{
{
$adddamage
=
$pd
[
'mhp'
]
/
3
;
$total_ex_damage
=
$ex_damage
;
if
(
$adddamage
>
20000
)
{
$adddamage
=
10000
;}
$damage
+=
round
(
$pa
[
'wepe'
]
*
2
/
3
+
$adddamage
);
}
}
checkarb
(
$damage
,
$pa
[
'wep_kind'
],
$pa
[
'att_key'
],
$pd
[
'def_key'
]
,
1
);
//最终属性伤害
$damage
*=
$damage_p
;
$damage
+=
$total_ex_damage
;
$damage
=
$damage
>
1
?
round
(
$damage
)
:
1
;
$damage
*=
$gender_dmg_p
;
}
}
if
(
$pd
[
'wepk'
]
==
'WJ'
)
{
$log
.=
"<span class=
\"
red
\"
>由于
{
$pd
[
'name'
]
}
手中的武器过于笨重,受到的伤害大增!真是大快人心啊!</span><br>"
;
$damage
+=
round
(
$damage
*
0.5
);
}
// 书中虫 TODO
if
(
$hit_time
[
1
]
>
1
)
#最终伤害计算部分:
//获取最终伤害的系数变化(晶莹、书中虫减伤)
$fin_damage_p
=
get_final_dmg_p
(
$pa
,
$pd
,
$active
);
//最终伤害存在系数队列的情况下,输出一段 AxBxC=D 格式的文本,但是如果最终伤害发生了定值变化,则不会使用这一段文本。
if
(
!
empty
(
$fin_damage_p
))
{
{
$d_temp
=
$damage
;
$fd_log
=
$damage
;
if
(
$hit_time
[
1
]
==
2
)
{
foreach
(
$fin_damage_p
as
$fin_p
)
$dmg_p
=
2
;
{
}
elseif
(
$hit_time
[
1
]
==
3
)
{
$damage
=
round
(
$damage
*
$fin_p
);
$dmg_p
=
2.8
;
$fd_log
.=
"×
{
$fin_p
}
"
;
}
else
{
$dmg_p
=
2.8
+
0.6
*
(
$hit_time
[
1
]
-
3
);
}
}
//$dmg_p = $hit_time[1] - ($hit_time[1]-1)*0.2;
$damage
=
round
(
$damage
*
$dmg_p
);
$log
.=
"造成
{
$d_temp
}
×
{
$dmg_p
}
=<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
}
else
{
$log
.=
"造成<span class=
\"
red
\"
>
$damage
</span>点伤害!<br>"
;
}
}
//获取最终伤害的定值变化(伤害制御、剔透)
$pdamage
=
$damage
;
$fin_damage_fix
=
get_final_dmg_fix
(
$pa
,
$pd
,
$active
,
$damage
);
$damage
+=
rev_get_ex_dmg
(
$pa
,
$pd
,
0
,
$pa
[
'club'
],
$pd
[
'inf'
],
$pa
[
'att_key'
],
$pa
[
'wep_kind'
],
$pa
[
'wepe'
],
$pa
[
'wep_skill'
],
$pd
[
'def_key'
]
);
if
(
$fin_damage_fix
>
0
)
$damage
+=
$fin_damage_fix
;
$damage
=
checkdmgdef
(
$damage
,
$pa
[
'att_key'
],
$pd
[
'def_key'
],
1
);
//存在物理伤害以外的其他伤害 输出一段最终伤害log:
if
(
$pdamage
!=
$damage
)
$bonus_dmg
=
get_clubskill_bonus_dmg_rate
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pd
[
'club'
],
$pd
[
'skills'
])
*
100
;
if
(
$bonus_dmg
<
100
)
{
$log
.=
"<span class=
\"
yellow
\"
>由于技能效果的作用,伤害下降至"
.
$bonus_dmg
.
"%!</span><br>"
;
$damage
=
round
(
$damage
*
$bonus_dmg
/
100
);
}
$rpdmg
=
get_clubskill_bonus_dmg_val
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
[
'rp'
],
$pd
[
'rp'
]);
if
(
$rpdmg
>
0
)
{
{
$log
.=
"<span class=
\"
yellow
\"
>由于技能的影响,对方受到了<span class=
\"
red
\"
>
$rpdmg
</span>点额外伤害。</span><br>"
;
if
(
isset
(
$fd_log
)
&&
!
$fin_damage_fix
)
$log
.=
"<span class=
\"
yellow
\"
>造成的总伤害:
{
$fd_log
}
=<span class=
\"
red
\"
>
$damage
</span>。</span><br>"
;
$damage
+=
$rpdmg
;
else
$log
.=
"<span class=
\"
yellow
\"
>造成的总伤害:<span class=
\"
red
\"
>
$damage
</span>。</span><br>"
;
}
if
(
$pdamage
!=
$damage
){
$log
.=
"<span class=
\"
yellow
\"
>造成的总伤害:<span class=
\"
red
\"
>
$damage
</span>。</span><br>"
;
}
}
}
}
//将造成的最终伤害登记在$pa['final_damage']内
checkdmg
(
$pa
[
'name'
],
$pd
[
'name'
],
$damage
)
;
$pa
[
'final_damage'
]
=
$damage
;
//将伤害发送至进行状况
if
(
!
$pa
[
'type'
])
get_dmg_punish
(
$pa
[
'name'
],
$damage
,
$pa
[
'hp'
],
$pa
[
'att_key'
]
);
//npc不受反噬伤害
checkdmg
(
$pa
[
'name'
],
$pd
[
'name'
],
$damage
);
//攻击方(pa)造成伤害后的事件(计算反噬伤害)
rev_get_inf
(
$pd
,
$hit_time
[
2
],
$pa
[
'wep_kind'
]
);
attack_finish_events
(
$pa
,
$pd
,
$active
);
//防守方(pd)受到伤害后的事件(防具耐久下降、受伤)
check_KP_wep
(
$pa
[
'name'
],
$hit_time
[
3
],
$pa
[
'wep'
],
$pa
[
'wepk'
],
$pa
[
'wepe'
],
$pa
[
'weps'
],
$pa
[
'wepsk'
]
);
get_hurt_events
(
$pa
,
$pd
,
$active
);
//经验结算
$is_player_flag
=
$pa
[
'type'
]
?
0
:
1
;
$is_player_flag
=
$pa
[
'type'
]
?
0
:
1
;
exprgup
(
$pa
[
'lvl'
],
$pd
[
'lvl'
],
$pa
[
'exp'
],
$is_player_flag
,
$pd
[
'rage'
]
);
exprgup
(
$pa
[
'lvl'
],
$pd
[
'lvl'
],
$pa
[
'exp'
],
$is_player_flag
,
$pd
[
'rage'
]);
}
}
else
{
else
{
$damage
=
0
;
$damage
=
0
;
$log
.=
"但是没有击中!<br>"
;
$log
.=
"但是没有击中!<br>"
;
}
}
//计算武器损耗
//真蓝凝伏计
if
(
!
empty
(
$pa
[
'wep_imp_times'
]))
weapon_loss
(
$pa
,
$pa
[
'wep_imp_times'
]);
if
((
$pd
[
'type'
]
==
19
)
&&
(
$pd
[
'name'
]
==
'蓝凝'
))
//发出声音
{
$ttr
=
"♪臻蓝之愿♪"
;
$ttr2
=
"♫钴蓝之灵♫"
;
$ttr3
=
"❀矢车菊的回忆❀"
;
if
(
rand
(
1
,
100
)
<
5
)
$pa
[
'rp'
]
=
rand
(
1
,
33
);
$le
=
rand
(
1
,
200
)
+
$pa
[
'mhp'
]
-
100
;
if
(
$le
>
1001
)
$le
=
1001
;
$w_pid
=
$pd
[
'pid'
];
$n_rp
=
$pa
[
'rp'
];
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr
', 'TO', '
$le
', '1', '
$w_pid
', '
$n_rp
')"
);
$le
=
rand
(
1
,
200
)
+
$damage
-
100
;
if
(
$le
>
2000
)
$le
=
2000
;
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr2
', 'TO', '
$le
', '1', '
$w_pid
', '
$n_rp
')"
);
$le
=
rand
(
1
,
$pa
[
'hp'
]);
$db
->
query
(
"INSERT INTO
{
$tablepre
}
maptrap (itm, itmk, itme, itms, itmsk, pls) VALUES ('
$ttr3
', 'TO', '
$le
', '1', '
$w_pid
', '
$n_rp
')"
);
$log
.=
"从蓝凝的身边飞出了数个光球,散布在了战场上!<br>"
;
}
//echo "【DEBUG】武器耐久为:{$pa['weps']}<br>";
check_GCDF_wep
(
$pa
[
'name'
],
$hit_time
[
0
],
$pa
[
'wep'
],
$pa
[
'wep_kind'
],
$pa
[
'wepk'
],
$pa
[
'wepe'
],
$pa
[
'weps'
],
$pa
[
'wepsk'
]
);
//echo "【DEBUG】武器耐久变更为:{$pa['weps']}<br>";
addnoise
(
$pa
[
'wep_kind'
],
$pa
[
'wepsk'
],
$now
,
$pa
[
'pls'
],
$pa
[
'pid'
],
$pd
[
'pid'
],
$pa
[
'wep_kind'
]
);
addnoise
(
$pa
[
'wep_kind'
],
$pa
[
'wepsk'
],
$now
,
$pa
[
'pls'
],
$pa
[
'pid'
],
$pd
[
'pid'
],
$pa
[
'wep_kind'
]
);
//增加熟练度
if
(
$pa
[
'club'
]
==
10
)
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
+=
$pa
[
'club'
]
==
10
?
2
:
1
;
{
//print_r($pa);
//就这样了 不用引用了
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
+=
2
;
}
else
{
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
+=
1
;
}
if
(
$pd
[
'hp'
]
<=
$damage
)
{
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
)
as
$a
)
{
if
(
strpos
(
$pd
[
$a
.
'sk'
],
'v'
)
!==
false
)
{
$log
.=
"伴随着对方的死亡,对方的<span class=
\"
yellow
\"
>
{
$pd
[
$a
]
}
</span>也化作灰烬消散了。<br>"
;
$pd
[
$a
]
=
$pd
[
$a
.
'k'
]
=
$pd
[
$a
.
'sk'
];
$pd
[
$a
.
'e'
]
=
$pd
[
$a
.
's'
];
}
}
for
(
$i
=
0
;
$i
<=
6
;
$i
++
)
{
if
(
strpos
(
$pd
[
'itm'
.
$i
.
'sk'
],
'v'
)
!==
false
)
{
$log
.=
"伴随着对方的死亡,对方的<span class=
\"
yellow
\"
>
{
$pd
[
'itm'
.
$i
]
}
</span>也化作灰烬消散了。<br>"
;
$pd
[
'itm'
.
$i
]
=
$pd
[
'itm'
.
$i
.
'k'
]
=
$pd
[
'itm'
.
$i
.
'sk'
];
$pd
[
'itm'
.
$i
.
'e'
]
=
$pd
[
'itm'
.
$i
.
's'
];
}
}
}
return
$damage
;
return
$damage
;
}
}
//战斗结算流程:pa(杀人方);pd(被杀方);active(1=pa视角;0=pd视角)
# 战斗结算流程:返回1=继续战斗;返回0=中止战斗;
# 这里第一个参数pa指的是杀人者(敌对方)视角,第二个参数pd指的是死者(受到伤害者)视角。不需要考虑papd具体是谁,只要按照这个规则传参就行
# active已经没用了……大概吧
function
rev_combat_result
(
&
$pa
,
&
$pd
,
$active
)
function
rev_combat_result
(
&
$pa
,
&
$pd
,
$active
)
{
{
global
$log
;
global
$log
;
# 死者(受伤者)pd血量低于0时 结算击杀/复活事件
if
(
$pd
[
'hp'
]
<=
0
)
if
(
$pd
[
'hp'
]
<=
0
)
{
{
//复活判定
# NPC二阶段处理:
if
(
$pd
[
'club'
]
==
99
)
if
(
$pd
[
'club'
]
==
99
&&
$pd
[
'type'
]
)
{
{
//NPC进化
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'name'
],
'death'
);
if
(
$pd
[
'type'
])
include_once
GAME_ROOT
.
'./include/system.func.php'
;
$npcdata
=
evonpc
(
$pd
[
'type'
],
$pd
[
'name'
]);
$log
.=
'<span class="yellow">'
.
$pd
[
'name'
]
.
'却没死去,反而爆发出真正的实力!</span><br>'
;
if
(
$npcdata
)
{
{
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'name'
],
'death'
);
addnews
(
$now
,
'evonpc'
,
$pd
[
'name'
],
$npcdata
[
'name'
],
$pa
[
'name'
]);
include_once
GAME_ROOT
.
'./include/system.func.php'
;
foreach
(
$npcdata
as
$key
=>
$val
)
$npcdata
=
evonpc
(
$pd
[
'type'
],
$pd
[
'name'
]);
{
$log
.=
'<span class="yellow">'
.
$pd
[
'name'
]
.
'却没死去,反而爆发出真正的实力!</span><br>'
;
$pd
[
$key
]
=
$val
;
if
(
$npcdata
){
addnews
(
$now
,
'evonpc'
,
$pd
[
'name'
],
$npcdata
[
'name'
],
$pa
[
'name'
]);
foreach
(
$npcdata
as
$key
=>
$val
)
{
$pd
[
$key
]
=
$val
;
}
}
}
return
0
;
}
}
//决死结界复活
else
{
$killmsg
=
rev_kill
(
$pa
,
$pd
,
$pa
[
'wep_kind'
],
$pa
[
'wep'
]);
if
(
$active
)
$log
.=
'<span class="yellow">'
.
$pd
[
'name'
]
.
'由于其及时按了BOMB键而原地满血复活了!</span><br>'
;
else
$log
.=
'<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>'
;
}
return
1
;
}
}
elseif
(
$pd
[
'hp'
]
<=
0
)
# 击杀、复活判定检查
else
{
{
$pd
[
'bid'
]
=
$pa
[
'pid'
];
# 如果存在暴毙标记,证明pd是在攻击过程中死掉的,发送一个暴毙log
$pd
[
'hp'
]
=
0
;
if
(
isset
(
$pd
[
'gg_flag'
]))
if
(
!
$pd
[
'type'
])
$pa
[
'killnum'
]
++
;
$killmsg
=
rev_kill
(
$pa
,
$pd
,
$pa
[
'wep_kind'
],
$pa
[
'wep'
]);
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'name'
],
'death'
);
if
(
$active
)
{
{
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'name'
]
}
被你杀死了!</span><br>"
;
$death_flag
=
$pd
[
'gg_flag'
];
if
(
$killmsg
)
$log
.=
"<span class=
\"
yellow
\"
>你对
{
$pd
[
'name'
]
}
说:“
{
$killmsg
}
”</span><br>"
;
unset
(
$pd
[
'gg_flag'
]);
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
在与
{
$pa
[
'nm'
]
}
的战斗中意外身亡!</span><br>"
;
}
}
# 否则,pd作为防守方被打死,发送正常击杀log
else
else
{
{
$log
.=
"<span class=
\"
red
\"
>你被
{
$pa
[
'name'
]
}
杀死了!</span><br>"
;
$death_flag
=
$pa
[
'wep_kind'
];
if
(
$killmsg
)
$log
.=
"<span class=
\"
yellow
\"
>
{
$pd
[
'name'
]
}
对你说:“
{
$killmsg
}
”</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>
{
$pd
[
'nm'
]
}
被
{
$pa
[
'nm'
]
}
杀死了!</span><br>"
;
}
//杀人rp结算
if
(
!
$pd
[
'type'
])
{
if
(
$pd
[
'rp'
]
<
80
){
$rpup
=
80
;
}
else
{
$rpup
=
$pd
[
'rp'
];}
}
}
else
{
$rpup
=
20
;}
# 执行不需要考虑复活问题的击杀事件:
//晶莹剔透修正
$lastword
=
pre_kill_events
(
$pa
,
$pd
,
$active
,
$death_flag
);
if
(
$pa
[
'club'
]
==
19
)
# 执行复活判定:
$revival_flag
=
revive_process
(
$pa
,
$pd
,
$active
);
# 没有复活的情况下,执行完后续击杀事件:
if
(
!
$revival_flag
)
{
{
$rpdec
=
30
;
global
$alivenum
,
$deathnum
;
$rpdec
+=
get_clubskill_rp_dec
(
$pa
[
'club'
],
$pa
[
'skills'
]);
$pd
[
'hp'
]
=
0
;
$pa
[
'rp'
]
+=
round
(
$rpup
*
(
100
-
$rpdec
)
/
100
);
}
else
{
$pa
[
'rp'
]
+=
$rpup
;
}
return
1
;
}
}
return
0
;
}
//pa、pd格式的社团技能-命中率系数修正
# 初始化遗言
//这个函数能帮你找回10年前的记忆
if
(
!
$pd
[
'type'
])
function
rev_get_clubskill_bonus_hitrate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
{
//死者是玩家,增加击杀数并保存系统状况。
//命中率系数
$pa
[
'killnum'
]
++
;
getskills2
(
$clskl
);
$alivenum
--
;
getlearnt
(
$alearn
,
$aclub
,
$askl
);
if
(
!
empty
(
$lastword
))
$log
.=
"<span class='evergreen'>你用尽最后的力气喊道:“"
.
$lastword
.
"”</span><br>"
;
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
3
&&
$pa
[
'wep_kind'
]
==
"K"
)
//见敌必斩称号
{
$r
*=
(
1
+
$clskl
[
3
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
5
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
*=
(
1
+
$clskl
[
5
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$blearn
[
'learn'
.
$i
]
==
12
)
//宛如疾风称号
{
$r
*=
(
1
-
$clskl
[
12
][
$
{
'b'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
//时代变得很快,我们还没有跟上时代
function
rev_get_clubskill_bonus_imfrate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//防具损坏率系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
*=
(
1
+
$clskl
[
6
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
//也可能我们只是想活在过去
function
rev_get_clubskill_bonus_imftime
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//防具损坏效果系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
$r
+=
$clskl
[
6
][
$
{
'a'
.
$i
}][
2
];
}
}
return
$r
;
}
//还是过去拽住了我们的腿不让我们向前走
function
rev_get_clubskill_bonus_imprate
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//武器损坏率系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
4
&&
$pa
[
'wep_kind'
]
==
"K"
)
//见敌必斩称号
{
$r
*=
(
1
-
$clskl
[
4
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
}
return
$r
;
}
//用引用的方式修改一个变量,很像人和过去藕断丝连的关系。你以为你已经把过去的自己消化干净了,但ta仍会在某个毫无预兆的夜晚,出现在你的面前,让你辗转反侧、难以入眠。
function
rev_get_clubskill_bonus
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
,
&
$att
,
&
$def
)
{
//攻击防御力加成
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$att
=
0
;
$def
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$blearn
[
'learn'
.
$i
]
==
1
&&
$pd
[
'wep_kind'
]
==
"P"
)
//铁拳无敌称号
{
$dup
=
$clskl
[
1
][
$
{
'b'
.
$i
}][
1
]
/
100
*
$pd
[
'wepe'
];
if
(
$dup
>
2000
)
$dup
=
2000
;
$def
+=
$dup
;
}
}
}
//复杂的东西是怎么变得复杂的:可能是因为我们把它想得太简单。当一个问题出现时,我们总以为ta会是最后一个出现的问题。
function
rev_get_clubskill_bonus_p
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
,
&
$att
,
&
$def
)
{
//攻击防御加成系数
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$att
=
1
;
$def
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
2
&&
$pa
[
'wep_kind'
]
==
"P"
)
//铁拳无敌称号
{
$att
*=
(
1
+
$clskl
[
2
][
$
{
'a'
.
$i
}][
1
]
/
100
);
if
(
rand
(
0
,
99
)
<
$clskl
[
2
][
$
{
'a'
.
$i
}][
2
])
$def
*=
(
1
-
$clskl
[
2
][
$
{
'a'
.
$i
}][
3
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
8
&&
$pa
[
'wep_kind'
]
==
"C"
)
//灌篮高手称号
{
$att
*=
(
1
+
$clskl
[
8
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
6
&&
(
$pa
[
'wep_kind'
]
==
"G"
||
$pa
[
'wep_kind'
]
==
"J"
))
//狙击鹰眼称号
{
if
(
rand
(
0
,
99
)
<
$clskl
[
6
][
$
{
'a'
.
$i
}][
3
])
$att
*=
(
1
+
$clskl
[
6
][
$
{
'a'
.
$i
}][
4
]
/
100
);
}
}
}
//反而是我们以为很复杂的人,其实意外的更容易看懂。
function
rev_get_clubskill_bonus_fluc
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//伤害浮动值
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
0
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
8
&&
$
{
$prefix1
.
'wepk'
}
==
"WC"
)
//灌篮高手称号
{
$r
+=
$clskl
[
8
][
$
{
'a'
.
$i
}][
2
];
}
}
return
$r
;
}
function
rev_get_clubskill_bonus_counter
(
$aclub
,
$askl
,
$pa
,
$bclub
,
$bskl
,
$pd
)
{
//反击率加成
getskills2
(
$clskl
);
getlearnt
(
$alearn
,
$aclub
,
$askl
);
getlearnt
(
$blearn
,
$bclub
,
$bskl
);
$a1
=
((
int
)(
$askl
/
10
))
%
10
;
$a2
=
$askl
%
10
;
$b1
=
((
int
)(
$bskl
/
10
))
%
10
;
$b2
=
$bskl
%
10
;
$r
=
1
;
for
(
$i
=
1
;
$i
<=
2
;
$i
++
)
{
if
(
$alearn
[
'learn'
.
$i
]
==
7
&&
$pa
[
'wep_kind'
]
==
'C'
)
//灌篮高手称号
{
$r
*=
(
1
+
$clskl
[
7
][
$
{
'a'
.
$i
}][
1
]
/
100
);
}
if
(
$alearn
[
'learn'
.
$i
]
==
11
)
//宛如疾风称号
{
$r
*=
(
1
+
$clskl
[
11
][
$
{
'a'
.
$i
}][
3
]
/
100
);
}
if
(
$blearn
[
'learn'
.
$i
]
==
13
&&
$pd
[
'wep_kind'
]
==
'F'
)
//超能力者称号
{
$r
*=
(
1
-
$clskl
[
13
][
$
{
'b'
.
$i
}][
2
]
/
100
);
}
}
return
$r
;
}
//pa、pd格式的原始伤害计算
//其实想翻新一个函数,不一定需要看得懂它本身——也许只要看懂当时写它的人。
function
rev_get_original_dmg
(
$pa
,
$pd
,
$att
,
$def
,
$ws
,
$wp_kind
,
$active
=
1
)
{
global
$skill_dmg
,
$dmg_fluc
,
$weather
,
$pls
;
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
rev_get_clubskill_bonus
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$att1
,
$def1
);
$att
+=
$att1
;
$def
+=
$def1
;
$attack_p
=
get_attack_p
(
$weather
,
$pls
,
$pa
[
'pose'
],
$pa
[
'tactic'
],
$pa
[
'club'
],
$pa
[
'inf'
],
$active
);
$att_pow
=
$att
*
$attack_p
;
$defend_p
=
get_defend_p
(
$weather
,
$pls
,
$pd
[
'pose'
],
$pd
[
'tactic'
],
$pd
[
'club'
],
$pd
[
'inf'
],
1
-
$active
);
$def_pow
=
$def
*
$defend_p
;
rev_get_clubskill_bonus_p
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
,
$attfac
,
$deffac
);
$att_pow
*=
$attfac
;
$def_pow
*=
$deffac
;
if
(
$def_pow
<=
0
){
$def_pow
=
0.01
;}
$damage
=
(
$att_pow
/
$def_pow
)
*
$ws
*
$skill_dmg
[
$wp_kind
];
$dfluc
=
$dmg_fluc
[
$wp_kind
];
$dfluc
+=
rev_get_clubskill_bonus_fluc
(
$pa
[
'club'
],
$pa
[
'skills'
],
$pa
,
$pd
[
'club'
],
$pa
[
'skills'
],
$pd
);
$dmg_factor
=
(
100
+
rand
(
-
$dfluc
,
$dfluc
))
/
100
;
$damage
=
round
(
$damage
*
$dmg_factor
*
rand
(
4
,
10
)
/
10
);
return
$damage
;
}
function
rev_get_WF_p
(
$pa
,
$clb
,
$we
)
{
global
$log
;
if
(
$pa
[
'type'
])
{
//你要找的是不是:NPC作弊
$factor
=
0.5
;
}
else
{
$we
=
$we
>
0
?
$we
:
1
;
if
(
$clb
==
9
)
{
include_once
GAME_ROOT
.
'./include/game/clubskills.func.php'
;
$spd0
=
round
(
0.2
*
get_clubskill_bonus_spd
(
$clb
,
$pa
[
'skills'
])
*
$we
);
}
else
{
$spd0
=
round
(
0.25
*
$we
);
}
if
(
$spd0
>=
$pa
[
'sp'
])
{
$spd
=
$pa
[
'sp'
]
-
1
;
}
else
{
$spd
=
$spd0
;
}
$factor
=
0.5
+
$spd
/
$spd0
/
2
;
$f
=
round
(
100
*
$factor
);
$log
.=
"你消耗
{
$spd
}
点体力,发挥了灵力武器
{
$f
}
%的威力!"
;
$pa
[
'sp'
]
-=
$spd
;
}
return
$factor
;
}
function
rev_get_ex_dmg
(
$pa
,
$pd
,
$sd
,
$clb
,
&
$inf
,
$ky
,
$wk
,
$we
,
$ws
,
$dky
)
{
if
(
$ky
)
{
global
$log
,
$exdmgname
,
$exdmginf
,
$ex_attack
,
$specialrate
,
$now
;
global
$ex_dmg_def
,
$ex_base_dmg
,
$ex_max_dmg
,
$ex_wep_dmg
,
$ex_skill_dmg
,
$ex_dmg_fluc
,
$ex_inf
,
$ex_inf_r
,
$ex_max_inf_r
,
$ex_skill_inf_r
,
$ex_inf_punish
,
$ex_good_wep
,
$ex_good_club
;
$ex_final_dmg
=
0
;
$exinv
=
false
;
$ex_list
=
array
();
foreach
(
$ex_attack
as
$ex_dmg_sign
)
{
if
(
strpos
(
$ky
,
$ex_dmg_sign
)
!==
false
){
$ex_list
[]
=
$ex_dmg_sign
;
}
}
if
(
strpos
(
$dky
,
'b'
)
!==
false
&&
!
empty
(
$ex_list
)){
$dice
=
rand
(
0
,
99
);
if
(
$dice
<
$specialrate
[
'b'
])
{
//几率4%
$ex_final_dmg
=
1
;
$exnum
=
0
;
foreach
(
$ex_attack
as
$ex_dmg_sign
)
{
if
(
strpos
(
$ky
,
$ex_dmg_sign
)
!==
false
)
{
$exnum
++
;
}
}
$log
.=
"<span class=
\"
red
\"
>属性攻击的力量完全被防具吸收了!</span>只造成了<span class=
\"
red
\"
>
{
$exnum
}
</span>点伤害!<br>"
;
$exinv
=
true
;
}
else
{
$log
.=
"纳尼?防具使属性攻击无效化的属性竟然失效了!<br>"
;
}
}
if
(
!
$exinv
){
foreach
(
$ex_list
as
$ex_dmg_sign
)
{
$dmgnm
=
$exdmgname
[
$ex_dmg_sign
];
$def
=
$ex_dmg_def
[
$ex_dmg_sign
];
$bdmg
=
$ex_base_dmg
[
$ex_dmg_sign
];
$mdmg
=
$ex_max_dmg
[
$ex_dmg_sign
];
$wdmg
=
$ex_wep_dmg
[
$ex_dmg_sign
];
$sdmg
=
$ex_skill_dmg
[
$ex_dmg_sign
];
$fluc
=
$ex_dmg_fluc
[
$ex_dmg_sign
];
if
(
in_array
(
$ex_dmg_sign
,
array_keys
(
$ex_inf
)))
{
$dmginf
=
$exdmginf
[
$ex_inf
[
$ex_dmg_sign
]];
$ex_inf_sign
=
$ex_inf
[
$ex_dmg_sign
];
$infr
=
$ex_inf_r
[
$ex_inf_sign
];
$minfr
=
$ex_max_inf_r
[
$ex_inf_sign
];
$sinfr
=
$ex_skill_inf_r
[
$ex_inf_sign
];
$punish
=
$ex_inf_punish
[
$ex_dmg_sign
];
$e_htr
=
$ex_good_club
[
$ex_inf_sign
]
==
$clb
?
20
:
0
;
}
else
{
$ex_inf_sign
=
''
;
$punish
=
1
;
$e_htr
=
0
;
}
}
$wk_dmg_p
=
$ex_good_wep
[
$ex_dmg_sign
]
==
$wk
?
2
:
1
;
else
$e_dmg
=
$bdmg
+
$we
/
$wdmg
+
$ws
/
$sdmg
;
{
if
((
$mdmg
>
0
)
&&
(
$wk
!=
'H'
)){
//死者是NPC,加载NPC遗言
$e_dmg
=
round
(
$wk_dmg_p
*
$mdmg
*
(
$e_dmg
/
(
$e_dmg
+
$mdmg
/
2
))
*
rand
(
100
-
$fluc
,
100
+
$fluc
)
/
100
);
$log
.=
npc_chat
(
$pd
[
'type'
],
$pd
[
'name'
],
'death'
);
}
else
{
$e_dmg
=
round
(
$wk_dmg_p
*
$e_dmg
*
rand
(
100
-
$fluc
,
100
+
$fluc
)
/
100
);
}
}
$ex_def_dice
=
rand
(
0
,
99
);
$deathnum
++
;
if
(
strpos
(
$dky
,
$def
)
===
false
||
$ex_def_dice
>
90
)
{
if
(
strpos
(
$dky
,
$def
)
!==
false
){
# 初始化killmsg
$log
.=
"属性防御装备没能发挥应有的作用!"
;
if
(
!
$pa
[
'type'
])
}
{
if
(
$ex_inf_sign
&&
strpos
(
$inf
,
$ex_inf_sign
)
!==
false
&&
$punish
>
1
)
{
global
$db
,
$tablepre
;
$log
.=
"由于
{
$pd
[
'name'
]
}
已经
{
$dmginf
}
,
{
$dmgnm
}
伤害倍增!"
;
$pname
=
$pa
[
'name'
];
$e_dmg
*=
$punish
;
$result
=
$db
->
query
(
"SELECT killmsg FROM
{
$tablepre
}
users WHERE username = '
$pname
'"
);
}
elseif
(
$ex_inf_sign
&&
strpos
(
$inf
,
$ex_inf_sign
)
!==
false
&&
$punish
<
1
)
{
$killmsg
=
$db
->
result
(
$result
,
0
);
$log
.=
"由于
{
$pd
[
'name'
]
}
已经
{
$dmginf
}
,
{
$dmgnm
}
伤害减少!"
;
if
(
!
empty
(
$killmsg
))
$log
.=
"<span class=
\"
evergreen
\"
>
{
$pa
[
'nm'
]
}
对
{
$pd
[
'nm'
]
}
说:“
{
$killmsg
}
”</span><br>"
;
$e_dmg
*=
$punish
;
}
else
{
$e_htr
+=
$infr
+
$ws
*
$sinfr
;
$e_htr
=
$e_htr
>
$minfr
?
$minfr
:
$e_htr
;
}
$e_dmg
=
round
(
$e_dmg
);
$log
.=
"
{
$dmgnm
}
造成了<span class=
\"
red
\"
>
{
$e_dmg
}
</span>点额外伤害!<br>"
;
if
(
!
empty
(
$ex_inf_sign
)
&&
(
strpos
(
$inf
,
$ex_inf_sign
)
===
false
))
{
$dice
=
rand
(
0
,
99
);
if
(
$dice
<
$e_htr
)
{
$inf
.=
$ex_inf_sign
;
if
(
$sd
==
0
)
{
$pd
[
'combat_inf'
]
.=
$ex_inf_sign
;
}
$log
.=
"并造成
{
$pd
[
'name'
]
}{
$dmginf
}
了!<br>"
;
addnews
(
$now
,
'inf'
,
$pa
[
'name'
],
$pd
[
'name'
],
$ex_inf_sign
);
}
}
}
else
{
$e_dmg
=
round
(
$e_dmg
/
2
);
$log
.=
"
{
$dmgnm
}
被防御效果抵消了!造成了<span class=
\"
red
\"
>
{
$e_dmg
}
</span>点额外伤害!<br>"
;
}
}
$ex_final_dmg
+=
$e_dmg
;
else
}
}
return
$ex_final_dmg
;
}
else
{
return
0
;
}
}
function
rev_get_inf
(
$pd
,
$ht
,
$wp_kind
)
{
if
(
$ht
>
0
)
{
global
$infatt
,
$log
;
$infatt_dice
=
rand
(
1
,
4
);
if
((
$infatt_dice
==
1
)
&&
(
strpos
(
$infatt
[
$wp_kind
],
'b'
)
!==
false
))
{
$inf_att
=
'b'
;
}
elseif
((
$infatt_dice
==
2
)
&&
(
strpos
(
$infatt
[
$wp_kind
],
'h'
)
!==
false
))
{
$inf_att
=
'h'
;
}
elseif
((
$infatt_dice
==
3
)
&&
(
strpos
(
$infatt
[
$wp_kind
],
'a'
)
!==
false
))
{
$inf_att
=
'a'
;
}
elseif
((
$infatt_dice
==
4
)
&&
(
strpos
(
$infatt
[
$wp_kind
],
'f'
)
!==
false
))
{
$inf_att
=
'f'
;
}
if
(
$inf_att
)
{
if
(
$pd
[
'ar'
.
$inf_att
.
's'
])
{
$pd
[
'ar'
.
$inf_att
.
's'
]
-=
$ht
;
$log
.=
"
{
$pd
[
'name'
]
}
的
{
$pd
[
'ar'
.
$inf_att
]
}
的耐久度下降了
{
$ht
}
!<br>"
;
if
(
$pd
[
'ar'
.
$inf_att
.
's'
]
<=
0
)
{
{
$log
.=
"
{
$nm
}
的<span class=
\"
red
\"
>
{
$pd
[
'ar'
.
$inf_att
.
's'
]
}
</span>受损过重,无法再装备了!<br>"
;
$log
.=
npc_chat
(
$pa
[
'type'
],
$pa
[
'name'
],
'kill'
);
$pd
[
'ar'
.
$inf_att
]
=
$pd
[
'ar'
.
$inf_att
.
'k'
]
=
$pd
[
'ar'
.
$inf_att
.
'sk'
]
=
''
;
$pd
[
'ar'
.
$inf_att
.
'e'
]
=
$pd
[
'ar'
.
$inf_att
.
's'
]
=
0
;
}
}
}
# 杀人rp结算
get_killer_rp
(
$pa
,
$pd
,
$active
);
# 执行死亡事件(灵魂绑定等)
check_death_events
(
$pa
,
$pd
,
$active
);
# 检查成就
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
check_battle_achievement
(
$pa
[
'name'
],
$pd
[
'type'
],
$pd
[
'name'
],
$pa
[
'wep_name'
]);
# 保存游戏进行状态
include_once
GAME_ROOT
.
'./include/system.func.php'
;
save_gameinfo
();
}
else
else
{
{
global
$infinfo
;
//如果希望复活后能继续战斗,在这里加入判定条件
if
(
strpos
(
$pd
[
'inf'
],
$inf_att
)
===
false
)
//例:if($revival_flag == 99) return 1;
{
$pd
[
'inf'
]
.=
$inf_att
;
$pd
[
'combat_inf'
]
.=
$inf_att
;
$log
.=
"
{
$pd
[
'name'
]
}
的<span class=
\"
red
\"
>
$infinfo[$inf_att]
</span>部受伤了!<br>"
;
}
}
}
return
0
;
}
}
}
}
return
;
return
1
;
}
}
function
rev_kill
(
&
$pa
,
&
$pd
,
$death
,
$annex
=
''
)
# 执行不需要考虑复活问题的击杀事件:
# 再重复一遍:这里的第一个参数指的是杀人者(敌对方)视角,第二个参数指的是死者(受到伤害者)视角。
function
pre_kill_events
(
&
$pa
,
&
$pd
,
$active
,
$death
)
{
{
global
$now
,
$db
,
$tablepre
,
$alivenum
,
$deathnum
,
$typeinfo
,
$lwinfo
;
global
$log
,
$now
,
$db
,
$tablepre
,
$typeinfo
,
$lwinfo
;
//echo "【DEBUG】检测到{$pa['name']}使用{$death}击杀了{$pd['name']},凶器是{$annex}。<br>";
//登记玩家狠话
$killmsg
=
''
;
if
(
!
$pa
[
'type'
])
{
$pname
=
$pa
[
'name'
];
$result
=
$db
->
query
(
"SELECT killmsg FROM
{
$tablepre
}
users WHERE username = '
$pname
'"
);
$killmsg
=
$db
->
result
(
$result
,
0
);
}
//登记死法
// 登记死法
if
(
$death
==
'N'
)
{
// 传入了数字编号死法
if
(
is_numeric
(
$death
))
{
$pd
[
'state'
]
=
$death
;
// 否则按照指定武器类型判断
}
elseif
(
$death
==
'N'
)
{
$pd
[
'state'
]
=
20
;
$pd
[
'state'
]
=
20
;
}
elseif
(
$death
==
'P'
)
{
}
elseif
(
$death
==
'P'
)
{
$pd
[
'state'
]
=
21
;
$pd
[
'state'
]
=
21
;
...
@@ -1067,50 +647,216 @@
...
@@ -1067,50 +647,216 @@
}
else
{
}
else
{
$pd
[
'state'
]
=
10
;
$pd
[
'state'
]
=
10
;
}
}
//初始化死者信息
//死者是玩家 更新幸存者数
if
(
!
$pd
[
'type'
])
$alivenum
--
;
$deathnum
++
;
//发遗言
$dtype
=
$pd
[
'type'
];
$dname
=
$pd
[
'name'
];
$dpls
=
$pd
[
'pls'
];
$dtype
=
$pd
[
'type'
];
$dname
=
$pd
[
'name'
];
$dpls
=
$pd
[
'pls'
];
if
(
$dtype
==
15
)
{
//静流AI
global
$gamevars
;
$gamevars
[
'sanmadead'
]
=
1
;
save_gameinfo
();
}
//死者是?
$lwname
=
$typeinfo
[
$dtype
]
.
' '
.
$dname
;
$lwname
=
$typeinfo
[
$dtype
]
.
' '
.
$dname
;
//
遗言是?
//
初始化NPC遗言
if
(
$dtype
)
if
(
$dtype
)
{
{
$lastword
=
is_array
(
$lwinfo
[
$dtype
])
?
$lwinfo
[
$dtype
][
$dname
]
:
$lwinfo
[
$dtype
];
$lastword
=
is_array
(
$lwinfo
[
$dtype
])
?
$lwinfo
[
$dtype
][
$dname
]
:
$lwinfo
[
$dtype
];
}
}
//初始化玩家遗言
else
else
{
{
$result
=
$db
->
query
(
"SELECT lastword FROM
{
$tablepre
}
users WHERE username ='
$dname
'"
);
$result
=
$db
->
query
(
"SELECT lastword FROM
{
$tablepre
}
users WHERE username ='
$dname
'"
);
$lastword
=
$db
->
result
(
$result
,
0
);
$lastword
=
$db
->
result
(
$result
,
0
);
}
}
//向聊天框发送遗言
$db
->
query
(
"INSERT INTO
{
$tablepre
}
chat (type,`time`,send,recv,msg) VALUES ('3','
$now
','
$lwname
','
$dpls
','
$lastword
')"
);
$db
->
query
(
"INSERT INTO
{
$tablepre
}
chat (type,`time`,send,recv,msg) VALUES ('3','
$now
','
$lwname
','
$dpls
','
$lastword
')"
);
//发news
//发
送
news
$kname
=
$pa
[
'type'
]
?
$pa
[
'name'
]
:
$pa
[
'nick'
]
.
' '
.
$pa
[
'name'
];
$kname
=
$pa
[
'type'
]
?
$pa
[
'name'
]
:
$pa
[
'nick'
]
.
' '
.
$pa
[
'name'
];
addnews
(
$now
,
'death'
.
$pd
[
'state'
],
$dname
,
$dtype
,
$kname
,
$annex
,
$lastword
);
addnews
(
$now
,
'death'
.
$pd
[
'state'
],
$pd
[
'name'
],
$pd
[
'type'
],
$pa
[
'name'
],
$pa
[
'wep_name'
],
$lastword
);
return
$lastword
;
}
# 执行复活事件:
# 重要的事情要说三次:这里的第一个参数指的是杀人者(敌对方)视角,第二个参数指的是死者(受到伤害者)视角。
function
revive_process
(
&
$pa
,
&
$pd
,
$active
)
{
global
$log
,
$weather
,
$now
;
$revival_flag
=
0
;
#极光天气下,玩家有10%概率、NPC有1%概率无条件复活
if
(
!
$revival_flag
&&
$weather
==
17
)
{
$aurora_rate
=
$pd
[
'type'
]
?
1
:
10
;
//玩家10%概率复活
$aurora_dice
=
diceroll
(
99
);
if
(
$aurora_dice
<=
$aurora_rate
)
{
#奥罗拉复活效果
$revival_flag
=
17
;
//保存复活标记为通过奥罗拉复活
addnews
(
$now
,
'aurora_revival'
,
$pd
[
'name'
]);
$pd
[
'hp'
]
+=
min
(
$pd
[
'mhp'
],
max
(
$aurora_dice
,
1
));
$pd
[
'sp'
]
+=
min
(
$pd
[
'msp'
],
max
(
$aurora_dice
,
1
));
$pd
[
'state'
]
=
0
;
$log
.=
"<span class=
\"
lime
\"
>但是,空气中弥漫着的奥罗拉让
{
$pd
[
'nm'
]
}
重新站了起来!</span><br>"
;;
return
$revival_flag
;
}
}
#决死结界复活:
if
(
!
$revival_flag
&&
$pd
[
'club'
]
==
99
&&
!
$pd
[
'type'
])
{
#决死结界复活效果:
$revival_flag
=
99
;
//保存复活标记为通过奥罗拉复活
addnews
(
$now
,
'revival'
,
$pd
[
'name'
]);
//玩家春哥附体称号的处理
$pd
[
'hp'
]
=
$pd
[
'mhp'
];
$pd
[
'sp'
]
=
$pd
[
'msp'
];
$pd
[
'state'
]
=
0
;
$pd
[
'club'
]
=
17
;
$log
.=
'<span class="yellow">但是,由于及时按下BOMB键,'
.
$pd
[
'nm'
]
.
'原地满血复活了!</span><br>'
;
return
$revival_flag
;
}
return
$revival_flag
;
}
# 特殊死亡事件(灵魂绑定等)
function
check_death_events
(
&
$pa
,
&
$pd
,
$active
)
{
global
$db
,
$tablepre
,
$log
,
$now
,
$nosta
;
# 快递被劫事件:
if
(
isset
(
$pd
[
'clbpara'
][
'post'
]))
{
$log
.=
"<span class='sienna'>某样东西从
{
$pd
[
'name'
]
}
身上掉了出来……</span><br>"
;
//获取快递信息
$iid
=
$pd
[
'clbpara'
][
'postid'
];
//获取金主信息
$sponsorid
=
$pd
[
'clbpara'
][
'sponsor'
];
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
gambling WHERE uid = '
$sponsorid
'"
);
$sordata
=
$db
->
fetch_array
(
$result
);
//发一条news 表示快递被劫走了
addnews
(
$now
,
'gpost_failed'
,
$sordata
[
'uname'
],
$pd
[
'itm'
.
$iid
]);
//消除快递相关参数
unset
(
$pd
[
'clbpara'
][
'post'
]);
unset
(
$pd
[
'clbpara'
][
'postid'
]);
unset
(
$pd
[
'clbpara'
][
'sponsor'
]);
//解除快递锁
$db
->
query
(
"UPDATE
{
$tablepre
}
gambling SET bnid=0 WHERE uid='
$sponsorid
'"
);
}
# 灵魂绑定事件:
foreach
(
Array
(
'wep'
,
'arb'
,
'arh'
,
'ara'
,
'arf'
,
'art'
)
as
$equip
)
{
// ……我为什么不把这个装备名数组放进resources里……用了一万遍了
if
(
!
empty
(
$pd
[
$equip
.
's'
])
&&
strpos
(
$pd
[
$equip
.
'sk'
],
'v'
)
!==
false
)
{
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
$equip
]
}
</span>也化作灰烬消散了。<br>"
;
$pd
[
$equip
]
=
$pd
[
$equip
.
'k'
]
=
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
$pd
[
$equip
.
's'
]
=
0
;
if
(
$equip
==
'wep'
)
{
$pd
[
$equip
]
=
'拳头'
;
$pd
[
$equip
.
'k'
]
=
'WN'
;
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
0
;
$pd
[
$equip
.
's'
]
=
$nosta
;
}
elseif
(
$equip
==
'arb'
)
{
$pd
[
$equip
]
=
'内衣'
;
$pd
[
$equip
.
'k'
]
=
'DN'
;
$pd
[
$equip
.
'sk'
]
=
''
;
$pd
[
$equip
.
'e'
]
=
0
;
$pd
[
$equip
.
's'
]
=
$nosta
;
}
}
}
for
(
$i
=
0
;
$i
<=
6
;
$i
++
)
{
if
(
!
empty
(
$pd
[
'itms'
.
$i
])
&&
strpos
(
$pd
[
'itmsk'
.
$i
],
'v'
)
!==
false
)
{
$log
.=
"伴随着
{
$pd
[
'nm'
]
}
的死亡,<span class=
\"
yellow
\"
>
{
$pd
[
'itm'
.
$i
]
}
</span>也化作灰烬消散了。<br>"
;
$pd
[
'itm'
.
$i
]
=
$pd
[
'itmk'
.
$i
]
=
$pd
[
'itmsk'
.
$i
]
=
''
;
$pd
[
'itme'
.
$i
]
=
$pd
[
'itms'
.
$i
]
=
0
;
}
}
return
;
}
# NPC自动换装
#说实话没有完全看懂,但是能跑就行
function
npc_changewep_rev
(
&
$pa
,
&
$pd
,
$acitve
)
{
global
$now
,
$log
;
global
$rangeinfo
,
$ex_dmg_def
;
if
(
!
$pa
[
'type'
]
||
$pa
[
'club'
]
!=
98
)
return
;
$dice
=
diceroll
(
99
);
//玩家决死结界复活判定
if
(
$dice
>
50
)
$revivaled
=
false
;
if
(
!
$pd
[
'type'
]
&&
$pd
[
'club'
]
==
99
&&
(
$death
==
"N"
||
$death
==
"P"
||
$death
==
"K"
||
$death
==
"G"
||
$death
==
"C"
||
$death
==
"D"
||
$death
==
"F"
||
$death
==
"J"
||
$death
==
"trap"
))
{
{
addnews
(
$now
,
'revival'
,
$pd
[
'name'
]);
$weplist
=
Array
();
$pd
[
'hp'
]
=
$pd
[
'mhp'
];
$wepklist
=
Array
(
$pa
[
'wepk'
]);
$weplist2
=
Array
();
$pd
[
'sp'
]
=
$pd
[
'msp'
];
for
(
$i
=
0
;
$i
<=
6
;
$i
++
)
$pd
[
'club'
]
=
17
;
{
$pd
[
'state'
]
=
0
;
if
(
!
empty
(
$pa
[
'itms'
.
$i
])
&&
!
empty
(
$pa
[
'itme'
.
$i
])
&&
strpos
(
$pa
[
'itmk'
.
$i
],
'W'
)
===
0
)
$alivenum
++
;
{
$weplist
[]
=
Array
(
$i
,
$pa
[
'itm'
.
$i
],
$pa
[
'itmk'
.
$i
],
$pa
[
'itme'
.
$i
],
$pa
[
'itms'
.
$i
],
$pa
[
'itmsk'
.
$i
]);
$wepklist
[]
=
$pa
[
'itmk'
.
$i
];
}
}
if
(
!
empty
(
$weplist
))
{
$wepklist
=
array_unique
(
$wepklist
);
$temp_pd_ex_keys
=
array_merge
(
get_equip_ex_array
(
$pd
),
get_wep_ex_array
(
$pd
));
$wepkAI
=
$wepskAI
=
true
;
if
(
!
empty
(
$temp_pd_ex_keys
))
{
if
(
count
(
$wepklist
)
<=
1
)
$wepkAI
=
false
;
foreach
(
$temp_pd_ex_keys
as
$ex
)
{
if
(
in_array
(
$ex
,
Array
(
'A'
,
'B'
)))
$wepkAI
=
false
;
if
(
in_array
(
$ex
,
Array
(
'a'
,
'b'
)))
$wepskAI
=
false
;
}
}
if
(
$wepkAI
)
{
$wepk_temp
=
$pa
[
'wepk'
];
foreach
(
$weplist
as
$val
)
{
if
(
$rangeinfo
[
substr
(
$val
[
2
],
1
,
1
)]
>=
$rangeinfo
[
substr
(
$wepk_temp
,
1
,
1
)]
&&
!
in_array
(
substr
(
$val
[
2
],
1
,
1
),
$temp_pd_ex_keys
))
{
$weplist2
[]
=
$val
;
}
}
if
(
$weplist2
)
{
$weplist
=
$weplist2
;
}
}
if
(
$wepskAI
&&
$weplist
)
{
$minus
=
array
();
foreach
(
$weplist
as
$val
)
{
foreach
(
$ex_dmg_def
as
$key
=>
$val2
){
if
(
strpos
(
$val
[
5
],
$key
)
!==
false
&&
!
in_array
(
$val2
,
$temp_pd_ex_keys
)){
$minus
[]
=
$val
;
}
}
}
if
(
count
(
$minus
)
<
count
(
$weplist
)){
$weplist
=
array_diff
(
$weplist
,
$minus
);
}
}
}
else
{
//没有获取到可换装列表,直接返回
return
;
}
if
(
!
empty
(
$weplist
))
{
$oldwep
=
$pa
[
'wep'
];
shuffle
(
$weplist
);
$chosen
=
$weplist
[
0
];
$c
=
$chosen
[
0
];
//var_dump($chosen);
$pa
[
'itm'
.
$c
]
=
$pa
[
'wep'
];
$pa
[
'itmk'
.
$c
]
=
$pa
[
'wepk'
];
$pa
[
'itmsk'
.
$c
]
=
$pa
[
'wepsk'
];
$pa
[
'itme'
.
$c
]
=
$pa
[
'wepe'
];
$pa
[
'itms'
.
$c
]
=
$pa
[
'weps'
];
$pa
[
'wep'
]
=
$chosen
[
1
];
$pa
[
'wepk'
]
=
$chosen
[
2
];
$pa
[
'wepe'
]
=
$chosen
[
3
];
$pa
[
'weps'
]
=
$chosen
[
4
];
$pa
[
'wepsk'
]
=
$chosen
[
5
];
$pa
[
'wep_kind'
]
=
get_wep_kind
(
$pa
);
$log
.=
"<span class=
\"
yellow
\"
>
{
$pa
[
'nm'
]
}
</span>将手中的<span class=
\"
yellow
\"
>
{
$oldwep
}
</span>卸下,装备了<span class=
\"
yellow
\"
>
{
$pa
[
'wep'
]
}
</span>!<br>"
;
}
}
}
save_gameinfo
();
return
;
return
$killmsg
;
}
}
?>
?>
\ No newline at end of file
include/game/search.func.php
View file @
0d67f709
...
@@ -592,7 +592,7 @@ function discover($schmode = 0) {
...
@@ -592,7 +592,7 @@ function discover($schmode = 0) {
{
{
$bid
=
$edata
[
'pid'
];
$bid
=
$edata
[
'pid'
];
$action
=
'neut'
.
$edata
[
'pid'
];
$action
=
'neut'
.
$edata
[
'pid'
];
include_once
GAME_ROOT
.
'./include/game/rev
combat
.func.php'
;
include_once
GAME_ROOT
.
'./include/game/rev
battle
.func.php'
;
findneut
(
$edata
,
1
);
findneut
(
$edata
,
1
);
return
;
return
;
}
}
...
@@ -609,8 +609,10 @@ function discover($schmode = 0) {
...
@@ -609,8 +609,10 @@ function discover($schmode = 0) {
if
(
$active_dice
<
$active_r
)
if
(
$active_dice
<
$active_r
)
{
{
$action
=
'enemy'
.
$edata
[
'pid'
];
$action
=
'enemy'
.
$edata
[
'pid'
];
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
//include_once GAME_ROOT.'./include/game/battle.func.php';
findenemy
(
$edata
);
//findenemy($edata);
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
return
;
return
;
}
}
//挨打
//挨打
...
@@ -623,8 +625,10 @@ function discover($schmode = 0) {
...
@@ -623,8 +625,10 @@ function discover($schmode = 0) {
echo
"passive_w_type=
{
$edata
[
'type'
]
}
\n
"
;
echo
"passive_w_type=
{
$edata
[
'type'
]
}
\n
"
;
echo
"passive_w_sNo=
{
$edata
[
'sNo'
]
}
\n
"
;
echo
"passive_w_sNo=
{
$edata
[
'sNo'
]
}
\n
"
;
}
}
include_once
GAME_ROOT
.
'./include/game/combat.func.php'
;
//include_once GAME_ROOT.'./include/game/combat.func.php';
combat
(
0
);
//combat(0);
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$edata
,
NULL
,
0
);
return
;
return
;
}
}
}
}
...
...
include/global.func.php
View file @
0d67f709
...
@@ -657,14 +657,32 @@ function get_itmsk_strlen($sk_value,$max_length=5)
...
@@ -657,14 +657,32 @@ function get_itmsk_strlen($sk_value,$max_length=5)
return
$ret
;
return
$ret
;
}
}
//将clbpara转为数组
function
get_clbpara
(
$para
)
function
get_clbpara
(
$para
)
{
{
return
json_decode
(
$para
,
true
);
if
(
!
is_array
(
$para
))
return
json_decode
(
$para
,
true
);
else
return
$para
;
}
}
//获取clbpara中指定键
function
set_clbpara
(
$para
)
function
get_single_clbpara
(
$para
,
$key
)
{
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
if
(
isset
(
$para
[
$key
]))
return
$para
[
$key
];
return
;
}
//删除clbpara中指定键
function
del_single_clbpara
(
$para
,
$key
)
{
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
if
(
isset
(
$para
[
$key
]))
unset
(
$para
[
$key
]);
return
$para
;
}
//修改clbpara中指定键
function
set_clbpara
(
$para
,
$key
,
$value
)
{
{
return
json_encode
(
$para
);
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
if
(
isset
(
$para
[
$key
]))
$para
[
$key
]
=
$value
;
return
$para
;
}
}
function
mgzdecode
(
$data
)
function
mgzdecode
(
$data
)
...
...
include/news.func.php
View file @
0d67f709
...
@@ -90,6 +90,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
...
@@ -90,6 +90,8 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>本局游戏被GM中止</span><br>
\n
"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
red
\"
>本局游戏被GM中止</span><br>
\n
"
;
}
elseif
(
$news
==
'revival'
)
{
}
elseif
(
$news
==
'revival'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
lime
\"
>
{
$a
}
因为及时按了BOMB键而原地满血复活了!</span><br>
\n
"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
lime
\"
>
{
$a
}
因为及时按了BOMB键而原地满血复活了!</span><br>
\n
"
;
}
elseif
(
$news
==
'aurora_revival'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
lime
\"
>
{
$a
}
在奥罗拉的作用下原地复活了!</span></li>"
;
}
elseif
(
strpos
(
$news
,
'death'
)
===
0
)
{
}
elseif
(
strpos
(
$news
,
'death'
)
===
0
)
{
if
(
$news
==
'death11'
)
{
if
(
$news
==
'death11'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因滞留在<span class=
\"
red
\"
>禁区【
{
$plsinfo
[
$c
]
}
】</span>死亡"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因滞留在<span class=
\"
red
\"
>禁区【
{
$plsinfo
[
$c
]
}
】</span>死亡"
;
...
@@ -108,7 +110,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
...
@@ -108,7 +110,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
}
elseif
(
$news
==
'death18'
)
{
}
elseif
(
$news
==
'death18'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>烧伤发作</span>死亡"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>烧伤发作</span>死亡"
;
}
elseif
(
$news
==
'death20'
)
{
}
elseif
(
$news
==
'death20'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span><span class=
\"
red
\"
>
$nowep
</span>击飞"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>
用
<span class=
\"
red
\"
>
$nowep
</span>击飞"
;
}
elseif
(
$news
==
'death21'
)
{
}
elseif
(
$news
==
'death21'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>使用
{
$d
}
殴打致死"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>使用
{
$d
}
殴打致死"
;
}
elseif
(
$news
==
'death22'
)
{
}
elseif
(
$news
==
'death22'
)
{
...
@@ -119,8 +121,10 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
...
@@ -119,8 +121,10 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>投掷
{
$d
}
致死"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>投掷
{
$d
}
致死"
;
}
elseif
(
$news
==
'death25'
)
{
}
elseif
(
$news
==
'death25'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>埋设
{
$d
}
伏击炸死"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>埋设
{
$d
}
伏击炸死"
;
}
elseif
(
$news
==
'death29'
)
{
}
elseif
(
$news
==
'death29'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>发动
{
$d
}
以灵力杀死"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>发动
{
$d
}
以灵力杀死"
;
}
elseif
(
$news
==
'death39'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>在与<span class=
\"
yellow
\"
>
$c
</span>的战斗中因<span class=
\"
red
\"
>武器反噬</span>意外身亡"
;
}
elseif
(
$news
==
'death26'
)
{
}
elseif
(
$news
==
'death26'
)
{
if
(
$c
)
{
if
(
$c
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因食用了<span class=
\"
yellow
\"
>
$c
</span>下毒的
{
$d
}
被毒死"
;
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因食用了<span class=
\"
yellow
\"
>
$c
</span>下毒的
{
$d
}
被毒死"
;
...
...
include/state.func.php
View file @
0d67f709
...
@@ -6,6 +6,7 @@ if (! defined ( 'IN_GAME' )) {
...
@@ -6,6 +6,7 @@ if (! defined ( 'IN_GAME' )) {
function
death
(
$death
,
$kname
=
''
,
$ktype
=
0
,
$annex
=
''
)
{
function
death
(
$death
,
$kname
=
''
,
$ktype
=
0
,
$annex
=
''
)
{
global
$now
,
$db
,
$tablepre
,
$alivenum
,
$deathnum
,
$name
,
$state
,
$deathtime
,
$type
,
$lvl
,
$bid
,
$killmsginfo
,
$typeinfo
,
$hp
,
$mhp
,
$wp
,
$wk
,
$wg
,
$wc
,
$wd
,
$wf
,
$sp
,
$msp
,
$club
,
$pls
,
$nick
;
global
$now
,
$db
,
$tablepre
,
$alivenum
,
$deathnum
,
$name
,
$state
,
$deathtime
,
$type
,
$lvl
,
$bid
,
$killmsginfo
,
$typeinfo
,
$hp
,
$mhp
,
$wp
,
$wk
,
$wg
,
$wc
,
$wd
,
$wf
,
$sp
,
$msp
,
$club
,
$pls
,
$nick
;
global
$weather
;
if
(
!
$death
)
{
if
(
!
$death
)
{
return
;
return
;
}
}
...
@@ -94,23 +95,25 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
...
@@ -94,23 +95,25 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
$knname
=
isset
(
$knick
)
?
$knick
.
' '
.
$kname
:
$kname
;
$knname
=
isset
(
$knick
)
?
$knick
.
' '
.
$kname
:
$kname
;
addnews
(
$now
,
'death'
.
$state
,
$name
,
$type
,
$knname
,
$annex
,
$lastword
);
addnews
(
$now
,
'death'
.
$state
,
$name
,
$type
,
$knname
,
$annex
,
$lastword
);
//$alivenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}players WHERE hp>0 AND type=0"), 0);
//$alivenum = $db->result($db->query("SELECT COUNT(*) FROM {$tablepre}players WHERE hp>0 AND type=0"), 0);
if
(
$type
==
0
&&
$club
==
99
&&
(
$death
==
"N"
||
$death
==
"P"
||
$death
==
"K"
||
$death
==
"G"
||
$death
==
"C"
||
$death
==
"D"
||
$death
==
"F"
||
$death
==
"J"
||
$death
==
"trap"
))
$revival_flag
=
false
;
if
(
!
$revival_flag
&&
$type
==
0
&&
$club
==
99
&&
(
$death
==
"N"
||
$death
==
"P"
||
$death
==
"K"
||
$death
==
"G"
||
$death
==
"C"
||
$death
==
"D"
||
$death
==
"F"
||
$death
==
"J"
||
$death
==
"trap"
))
{
{
addnews
(
$now
,
'revival'
,
$name
);
//玩家春哥附体称号的处理
addnews
(
$now
,
'revival'
,
$name
);
//玩家春哥附体称号的处理
$hp
=
$mhp
;
$sp
=
$msp
;
$hp
=
$mhp
;
$sp
=
$msp
;
$club
=
17
;
$state
=
0
;
$club
=
17
;
$state
=
0
;
$alivenum
++
;
$alivenum
++
;
}
}
//PORT
if
(
!
$revival_flag
)
//死亡时灵魂绑定的道具也会消失
{
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
//死亡时灵魂绑定的道具也会消失 嗨呀 死了没复活才会消失
global
$weps
,
$arbs
,
$arhs
,
$aras
,
$arfs
,
$arts
,
$itms1
,
$itms2
,
$itms3
,
$itms4
,
$itms5
,
$itms6
;
global
$wep
,
$arb
,
$arh
,
$ara
,
$arf
,
$art
,
$itm1
,
$itm2
,
$itm3
,
$itm4
,
$itm5
,
$itm6
;
global
$wepe
,
$arbe
,
$arhe
,
$arae
,
$arfe
,
$arte
,
$itme1
,
$itme2
,
$itme3
,
$itme4
,
$itme5
,
$itme6
;
global
$weps
,
$arbs
,
$arhs
,
$aras
,
$arfs
,
$arts
,
$itms1
,
$itms2
,
$itms3
,
$itms4
,
$itms5
,
$itms6
;
global
$wepk
,
$arbk
,
$arhk
,
$arak
,
$arfk
,
$artk
,
$itmk1
,
$itmk2
,
$itmk3
,
$itmk4
,
$itmk5
,
$itmk6
;
global
$wepe
,
$arbe
,
$arhe
,
$arae
,
$arfe
,
$arte
,
$itme1
,
$itme2
,
$itme3
,
$itme4
,
$itme5
,
$itme6
;
global
$wepsk
,
$arbsk
,
$arhsk
,
$arask
,
$arfsk
,
$artsk
,
$itmsk1
,
$itmsk2
,
$itmsk3
,
$itmsk4
,
$itmsk5
,
$itmsk6
;
global
$wepk
,
$arbk
,
$arhk
,
$arak
,
$arfk
,
$artk
,
$itmk1
,
$itmk2
,
$itmk3
,
$itmk4
,
$itmk5
,
$itmk6
;
global
$log
;
global
$wepsk
,
$arbsk
,
$arhsk
,
$arask
,
$arfsk
,
$artsk
,
$itmsk1
,
$itmsk2
,
$itmsk3
,
$itmsk4
,
$itmsk5
,
$itmsk6
;
global
$log
;
for
(
$i
=
1
;
$i
<=
6
;
$i
++
){
for
(
$i
=
1
;
$i
<=
6
;
$i
++
){
if
(
strpos
(
$
{
'itmsk'
.
$i
},
'v'
)
!==
false
){
if
(
strpos
(
$
{
'itmsk'
.
$i
},
'v'
)
!==
false
){
$log
.=
"伴随着你的死亡,<span class=
\"
yellow
\"
>${'itm'.
$i
}</span>也化作灰烬消散了。<br>"
;
$log
.=
"伴随着你的死亡,<span class=
\"
yellow
\"
>${'itm'.
$i
}</span>也化作灰烬消散了。<br>"
;
...
@@ -149,17 +152,17 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
...
@@ -149,17 +152,17 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
$arts
=
$arte
=
0
;
$arts
=
$arte
=
0
;
}
}
}
}
$alivenum
--
;
$alivenum
--
;
$deathnum
++
;
$deathnum
++
;
}
save_gameinfo
();
save_gameinfo
();
return
$killmsg
;
return
$killmsg
;
}
}
function
kill
(
$death
,
$dname
,
$dtype
=
0
,
$dpid
=
0
,
$annex
=
''
)
{
function
kill
(
$death
,
$dname
,
$dtype
=
0
,
$dpid
=
0
,
$annex
=
''
,
&
$revival_flag
=
0
)
{
global
$now
,
$db
,
$tablepre
,
$alivenum
,
$deathnum
,
$name
,
$w_state
,
$type
,
$pid
,
$typeinfo
,
$pls
,
$lwinfo
,
$w_achievement
;
global
$now
,
$db
,
$tablepre
,
$alivenum
,
$deathnum
,
$name
,
$w_state
,
$type
,
$pid
,
$typeinfo
,
$pls
,
$lwinfo
,
$w_achievement
;
global
$weather
;
if
(
!
$death
||
!
$dname
)
{
if
(
!
$death
||
!
$dname
)
{
return
;
return
;
...
@@ -199,11 +202,6 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
...
@@ -199,11 +202,6 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
if
(
$dtype
)
{
if
(
$dtype
)
{
if
(
$dtype
==
15
){
//静流AI
global
$gamevars
;
$gamevars
[
'sanmadead'
]
=
1
;
save_gameinfo
();
}
$lwname
=
$typeinfo
[
$dtype
]
.
' '
.
$dname
;
$lwname
=
$typeinfo
[
$dtype
]
.
' '
.
$dname
;
if
(
is_array
(
$lwinfo
[
$dtype
]
))
{
if
(
is_array
(
$lwinfo
[
$dtype
]
))
{
$lastword
=
$lwinfo
[
$dtype
]
[
$dname
];
$lastword
=
$lwinfo
[
$dtype
]
[
$dname
];
...
@@ -225,30 +223,48 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
...
@@ -225,30 +223,48 @@ function kill($death, $dname, $dtype = 0, $dpid = 0, $annex = '') {
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid=
$dpid
"
);
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid=
$dpid
"
);
$res
=
$db
->
fetch_array
(
$result
);
$res
=
$db
->
fetch_array
(
$result
);
$revivaled
=
false
;
$revivaled
=
false
;
if
(
$res
[
'type'
]
==
0
&&
$res
[
'club'
]
==
99
&&
(
$death
==
"N"
||
$death
==
"P"
||
$death
==
"K"
||
$death
==
"G"
||
$death
==
"C"
||
$death
==
"D"
||
$death
==
"F"
||
$death
==
"J"
||
$death
==
"trap"
))
//依次判定复活效果
if
(
!
$revival_flag
&&
$weather
==
17
)
{
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
$aurora_rate
=
$dtype
?
1
:
10
;
//NPC概率1% 玩家概率10%
$aurora_dice
=
diceroll
(
100
);
if
(
$aurora_dice
<=
$aurora_rate
)
{
//奥罗拉复活效果
addnews
(
$now
,
'aurora_revival'
,
$res
[
'name'
]);
$res
[
'hp'
]
+=
min
(
$res
[
'mhp'
],
max
(
$aurora_dice
,
1
));
$res
[
'sp'
]
+=
min
(
$res
[
'msp'
],
max
(
$aurora_dice
,
1
));
$res
[
'state'
]
=
0
;
$alivenum
++
;
$revival_flag
=
17
;
}
}
if
(
!
$revival_flag
&&
$res
[
'type'
]
==
0
&&
$res
[
'club'
]
==
99
&&
(
$death
==
"N"
||
$death
==
"P"
||
$death
==
"K"
||
$death
==
"G"
||
$death
==
"C"
||
$death
==
"D"
||
$death
==
"F"
||
$death
==
"J"
||
$death
==
"trap"
))
{
{
addnews
(
$now
,
'revival'
,
$res
[
'name'
]);
//玩家春哥附体称号的处理
addnews
(
$now
,
'revival'
,
$res
[
'name'
]);
//玩家春哥附体称号的处理
$db
->
query
(
"UPDATE
{
$tablepre
}
players SET hp=mhp WHERE pid=
$dpid
"
);
$res
[
'hp'
]
=
$res
[
'mhp'
];
$res
[
'sp'
]
=
$res
[
'msp'
];
$res
[
'club'
]
=
17
;
$res
[
'state'
]
=
0
;
/*$db->query ( "UPDATE {$tablepre}players SET hp=mhp WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET sp=msp WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET sp=msp WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET club=17 WHERE pid=$dpid" );
$db->query ( "UPDATE {$tablepre}players SET club=17 WHERE pid=$dpid" );
$db
->
query
(
"UPDATE
{
$tablepre
}
players SET state=0 WHERE pid=
$dpid
"
);
$db->query ( "UPDATE {$tablepre}players SET state=0 WHERE pid=$dpid" );
*/
$alivenum
++
;
$alivenum
++
;
$revivaled
=
true
;
$revivaled
=
99
;
}
}
if
(
!
$revivaled
)
$db
->
query
(
"UPDATE
{
$tablepre
}
players SET hp='0',endtime='
$now
',deathtime='
$now
',bid='
$pid
',state='
$w_state
' WHERE pid=
$dpid
"
);
if
(
!
$revivaled
)
// if($dtype == 1 || $dtype == 9){
{
// global $rdown,$bdown;
if
(
$dtype
==
15
){
//静流AI
// if($dtype == 1){
global
$gamevars
;
// $rdown = 1;
$gamevars
[
'sanmadead'
]
=
1
;
// storyputchat($now,'rdown');
save_gameinfo
();
// }elseif($dtype == 9){
}
// $bdown = 1;
//$db->query ( "UPDATE {$tablepre}players SET hp='0',endtime='$now',deathtime='$now',bid='$pid',state='$w_state' WHERE pid=$dpid" );
// storyputchat($now,'bdown');
}
// }
// }
player_save
(
$res
);
save_gameinfo
();
save_gameinfo
();
return
$killmsg
;
return
$killmsg
;
}
}
...
@@ -538,32 +554,4 @@ function rest($command) {
...
@@ -538,32 +554,4 @@ function rest($command) {
return
;
return
;
}
}
//登记一些特殊的死亡事件
function
check_kill_events
(
$kid
,
$eid
)
{
global
$db
,
$tablepre
,
$log
,
$now
;
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
players WHERE pid='
$eid
'"
);
$edata
=
$db
->
fetch_array
(
$result
);
if
(
!
is_array
(
$edata
[
'clbpara'
]))
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
if
(
$edata
[
'clbpara'
][
'post'
])
{
//发一条news 表示快递被劫走了
$log
.=
"<span class='sienna'>某样东西从
{
$edata
[
'name'
]
}
身上掉了出来……</span><br>"
;
$iid
=
$edata
[
'clbpara'
][
'postid'
];
$sponsorid
=
$edata
[
'clbpara'
][
'sponsor'
];
$result
=
$db
->
query
(
"SELECT * FROM
{
$tablepre
}
gambling WHERE uid = '
$sponsorid
'"
);
$sordata
=
$db
->
fetch_array
(
$result
);
addnews
(
$now
,
'gpost_failed'
,
$sordata
[
'uname'
],
$edata
[
'itm'
.
$iid
]);
//消除快递相关参数
unset
(
$edata
[
'clbpara'
][
'post'
]);
unset
(
$edata
[
'clbpara'
][
'postid'
]);
unset
(
$edata
[
'clbpara'
][
'sponsor'
]);
//解除快递锁
$db
->
query
(
"UPDATE
{
$tablepre
}
gambling SET bnid=0 WHERE uid='
$sponsorid
'"
);
player_save
(
$edata
);
}
return
;
}
?>
?>
templates/default/battle.htm
View file @
0d67f709
<!--{if (CURSCRIPT == 'game' && $pls=='0')}-->
<!--{loop $plsinfo $places $info}-->
<style>
<!--{if (CURSCRIPT == 'game' && $pls==$places)}-->
body
{
background-image
:
url("../../img/location/0.jpg")
;
background-position
:
center
;}
<!--{eval $bgurl = "img/location/".$places.".jpg"}-->
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='1')}-->
<style>
body
{
background-image
:
url("../../img/location/1.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='2')}-->
<style>
<style>
body
{
background-image
:
url("../../img/location/2.jpg")
;
background-position
:
center
;}
body
{
background-image
:
url("$bgurl")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='3')}-->
<style>
body
{
background-image
:
url("../../img/location/3.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='4')}-->
<style>
body
{
background-image
:
url("../../img/location/4.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='5')}-->
<style>
body
{
background-image
:
url("../../img/location/5.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='6')}-->
<style>
body
{
background-image
:
url("../../img/location/6.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='7')}-->
<style>
body
{
background-image
:
url("../../img/location/7.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='8')}-->
<style>
body
{
background-image
:
url("../../img/location/8.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='9')}-->
<style>
body
{
background-image
:
url("../../img/location/9.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='10')}-->
<style>
body
{
background-image
:
url("../../img/location/10.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='11')}-->
<style>
body
{
background-image
:
url("../../img/location/11.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='12')}-->
<style>
body
{
background-image
:
url("../../img/location/12.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='13')}-->
<style>
body
{
background-image
:
url("../../img/location/13.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='14')}-->
<style>
body
{
background-image
:
url("../../img/location/14.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='15')}-->
<style>
body
{
background-image
:
url("../../img/location/15.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='16')}-->
<style>
body
{
background-image
:
url("../../img/location/16.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='17')}-->
<style>
body
{
background-image
:
url("../../img/location/17.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='18')}-->
<style>
body
{
background-image
:
url("../../img/location/18.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='19')}-->
<style>
body
{
background-image
:
url("../../img/location/19.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='20')}-->
<style>
body
{
background-image
:
url("../../img/location/20.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='21')}-->
<style>
body
{
background-image
:
url("../../img/location/21.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='22')}-->
<style>
body
{
background-image
:
url("../../img/location/22.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='23')}-->
<style>
body
{
background-image
:
url("../../img/location/23.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='24')}-->
<style>
body
{
background-image
:
url("../../img/location/24.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='25')}-->
<style>
body
{
background-image
:
url("../../img/location/25.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='26')}-->
<style>
body
{
background-image
:
url("../../img/location/26.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='27')}-->
<style>
body
{
background-image
:
url("../../img/location/27.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='28')}-->
<style>
body
{
background-image
:
url("../../img/location/28.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='29')}-->
<style>
body
{
background-image
:
url("../../img/location/29.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='30')}-->
<style>
body
{
background-image
:
url("../../img/location/30.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='31')}-->
<style>
body
{
background-image
:
url("../../img/location/31.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='32')}-->
<style>
body
{
background-image
:
url("../../img/location/32.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='33')}-->
<style>
body
{
background-image
:
url("../../img/location/33.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='34')}-->
<style>
body
{
background-image
:
url("../../img/location/34.jpg")
;
background-position
:
center
;}
</style>
</style>
<!--{/if}-->
<!--{/if}-->
<!--{/loop}-->
<TABLE
border=
"0"
width=
720px
height=
430px
align=
"center"
cellspacing=
"0"
cellpadding=
"0"
class=
"battle"
>
<TABLE
border=
"0"
width=
720px
height=
430px
align=
"center"
cellspacing=
"0"
cellpadding=
"0"
class=
"battle"
>
<tr>
<tr>
<td
class=
"b8"
valign=
"top"
rowspan=
2
>
<td
class=
"b8"
valign=
"top"
rowspan=
2
>
...
...
templates/default/battle_rev.htm
0 → 100644
View file @
0d67f709
<!--{loop $plsinfo $places $info}-->
<!--{if (CURSCRIPT == 'game' && $s_pls==$places)}-->
<!--{eval $bgurl = "img/location/".$places.".jpg"}-->
<style>
body
{
background-image
:
url("$bgurl")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{/loop}-->
<TABLE
border=
"0"
width=
720px
height=
430px
align=
"center"
cellspacing=
"0"
cellpadding=
"0"
class=
"battle"
>
<tr>
<td
class=
"b8"
valign=
"top"
rowspan=
2
>
<div
style=
"position:relative;width:140px;height:340px;"
>
<!--{if $w_iconImgB}-->
<IMG
src=
"img/$w_iconImgB"
style=
"border:0;height:340px;position:absolute;left:0px;top:0px;<!--{if $w_hp==0}-->filter: grayscale(100%)<!--{/if}-->"
/>
<!--{else}-->
<IMG
src=
"img/$w_iconImg"
style=
"border:0;height:80px;<!--{if $w_hp==0}-->filter: grayscale(100%)<!--{/if}-->"
/>
<!--{/if}-->
</div>
</td>
<td
colspan=
2
width=
580px
>
<table
border=
"0"
cellspacing=
"0"
height=
75px
width=
580px
cellpadding=
"0"
width=
"100%"
valign=
"middle"
>
<tr>
<td
class=
"b1"
colspan=
2
height=
20px
><span>
Lv. $w_lvl
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$w_name
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$w_sNoinfo
</span>
<!--{if $s_club==19}-->
【
<span
class=
"lime"
>
报应点数:
<span
id=
"anum"
>
$w_rp
</span></span>
】
<!--{/if}-->
</td>
</tr>
<tr>
<td
class=
"b2"
width=
70px
height=
20px
><span>
{lang rage}
</span></td>
<td
class=
"b3"
width=
95px
><span>
$w_ragestate
</span></td>
<td
class=
"b2"
width=
70px
><span>
{lang sp}
</span></td>
<td
class=
"b3"
width=
105px
><span>
$w_spstate
</span></td>
<td
class=
"b2"
width=
70px
><span>
{lang hp}
</span></td>
<td
class=
"b3"
width=
170px
><span>
$w_hpstate
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang wep}{lang effect}
</span></td>
<td
class=
"b3"
><span>
$w_wepestate
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang kind1}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_wepk != ''}-->
$w_wepk_words
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
class=
"b2"
><span>
{lang wep}
</span></td>
<td
class=
"b3"
><span>
$w_wep_words
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang tactic}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_tactic >= 0}-->
$tacinfo[$w_tactic]
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
class=
"b2"
><span>
{lang pose}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_pose >= 0}-->
$poseinfo[$w_pose]
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
height=
"20px"
class=
"b2"
><span>
{lang inf}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_infdata}-->
$w_infdata
<!--{else}-->
无
<!--{/if}-->
</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<TD
class=
"b8"
height=
270px
width=
440px
>
<div
style=
"position:relative;height:268px;width:438px;display: flex;align-items:center;justify-content: center;"
>
<span><B><FONT
color=
"#ff0000"
size=
"5"
face=
"黑体"
>
$battle_title
</FONT></B></span>
</div>
</TD>
<td
class=
"b8"
width=
140px
rowspan=
"2"
valign=
"bottom"
>
<div
style=
"position:relative;width:140px;height:350px;"
>
<!--{if $iconImgB}-->
<IMG
src=
"img/$iconImgB"
style=
"border:0;height:340px;position:absolute;left:0px;bottom:-10px;<!--{if $hp==0}-->filter: grayscale(100%)<!--{/if}-->"
/>
<!--{else}-->
<IMG
src=
"img/$iconImg"
style=
"border:0;height:80px;position:absolute;left:0;bottom:0;<!--{if $hp==0}-->filter: grayscale(100%)<!--{/if}-->"
/>
<!--{/if}-->
</div>
</td>
</TR>
<tr>
<td
colspan=
2
width=
580px
>
<table
border=
"0"
width=
580px
height=
80px
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<tr>
<td
class=
"b1"
colspan=
2
height=
20px
><span>
$typeinfo[$s_type]({$sexinfo[$s_gd]}{$s_sNo}号)
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$s_name
</span></td>
<td
class=
"b1"
colspan=
2
><span>
Lv. $s_lvl
</span></td>
</tr>
<tr>
<td
class=
"b2"
width=
70px
height=
20px
><span>
{lang hp}
</span></td>
<td
class=
"b3"
width=
170px
><span><span
class=
"$hpcolor"
>
$s_hp / $s_mhp
</span></span></td>
<td
class=
"b2"
width=
70px
><span>
{lang sp}
</span></td>
<td
class=
"b3"
width=
105px
><span>
$s_sp / $s_msp
</span></td>
<td
class=
"b2"
width=
70px
><span>
{lang rage}
</span></td>
<td
class=
"b3"
width=
95px
><span>
<!--{if $s_rage >=30}-->
<span
class=
"yellow"
>
$s_rage
</span>
<!--{else}-->
$s_rage
<!--{/if}-->
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang wep}
</span></td>
<td
class=
"b3"
><span>
$s_wep_words
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang kind1}
</span></td>
<td
class=
"b3"
><span>
$s_wepk_words
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang effect}
</span></td>
<td
class=
"b3"
><span>
$s_wepe
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang inf}
</span></td>
<td
class=
"b3"
>
<span>
<!--{if $inf}-->
<!--{loop $infinfo $key $val}-->
<!--{if strpos($s_inf,$key)!==false}-->
$val
<!--{/if}-->
<!--{/loop}-->
<!--{else}-->
无
<!--{/if}-->
</span>
</td>
<td
class=
"b2"
><span>
{lang pose}
</span></td>
<td
class=
"b3"
><span>
$poseinfo[$s_pose]
</span></td>
<td
class=
"b2"
><span>
{lang tactic}
</span></td>
<td
class=
"b3"
><span>
$tacinfo[$s_tactic]
</span></td>
</tr>
</table>
</td>
</tr>
</TABLE>
templates/default/battlecmd_rev.htm
0 → 100644
View file @
0d67f709
现在想要做什么?
<br><br>
向对手大喊:
<br><input
size=
"30"
type=
"text"
name=
"message"
maxlength=
"60"
><br><br>
<input
type=
"hidden"
name=
"mode"
value=
"revcombat"
>
<input
type=
"hidden"
id=
"command"
name=
"command"
value=
"back"
>
<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>
<!--{if $w2}-->
<input
type=
"button"
class=
"cmdbutton"
style=
"width:100"
name=
"w2"
value=
"{$attinfo[$w2]}"
onclick=
"$('command').value='$w2';postCmd('gamecmd','command.php');this.disabled=true;"
><br>
<!--{/if}-->
<br><input
type=
"button"
class=
"cmdbutton"
name=
"back"
value=
"逃跑"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
>
\ No newline at end of file
templates/default/profile.htm
View file @
0d67f709
<!--{if (CURSCRIPT == 'game' && $pls=='0')}-->
<!--{loop $plsinfo $places $info}-->
<style>
<!--{if (CURSCRIPT == 'game' && $pls==$places)}-->
body
{
background-image
:
url("../../img/location/0.jpg")
;
background-position
:
center
;}
<!--{eval $bgurl = "img/location/".$places.".jpg"}-->
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='1')}-->
<style>
body
{
background-image
:
url("../../img/location/1.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='2')}-->
<style>
<style>
body
{
background-image
:
url("../../img/location/2.jpg")
;
background-position
:
center
;}
body
{
background-image
:
url("$bgurl")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='3')}-->
<style>
body
{
background-image
:
url("../../img/location/3.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='4')}-->
<style>
body
{
background-image
:
url("../../img/location/4.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='5')}-->
<style>
body
{
background-image
:
url("../../img/location/5.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='6')}-->
<style>
body
{
background-image
:
url("../../img/location/6.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='7')}-->
<style>
body
{
background-image
:
url("../../img/location/7.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='8')}-->
<style>
body
{
background-image
:
url("../../img/location/8.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='9')}-->
<style>
body
{
background-image
:
url("../../img/location/9.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='10')}-->
<style>
body
{
background-image
:
url("../../img/location/10.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='11')}-->
<style>
body
{
background-image
:
url("../../img/location/11.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='12')}-->
<style>
body
{
background-image
:
url("../../img/location/12.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='13')}-->
<style>
body
{
background-image
:
url("../../img/location/13.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='14')}-->
<style>
body
{
background-image
:
url("../../img/location/14.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='15')}-->
<style>
body
{
background-image
:
url("../../img/location/15.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='16')}-->
<style>
body
{
background-image
:
url("../../img/location/16.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='17')}-->
<style>
body
{
background-image
:
url("../../img/location/17.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='18')}-->
<style>
body
{
background-image
:
url("../../img/location/18.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='19')}-->
<style>
body
{
background-image
:
url("../../img/location/19.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='20')}-->
<style>
body
{
background-image
:
url("../../img/location/20.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='21')}-->
<style>
body
{
background-image
:
url("../../img/location/21.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='22')}-->
<style>
body
{
background-image
:
url("../../img/location/22.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='23')}-->
<style>
body
{
background-image
:
url("../../img/location/23.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='24')}-->
<style>
body
{
background-image
:
url("../../img/location/24.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='25')}-->
<style>
body
{
background-image
:
url("../../img/location/25.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='26')}-->
<style>
body
{
background-image
:
url("../../img/location/26.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='27')}-->
<style>
body
{
background-image
:
url("../../img/location/27.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='28')}-->
<style>
body
{
background-image
:
url("../../img/location/28.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='29')}-->
<style>
body
{
background-image
:
url("../../img/location/29.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='30')}-->
<style>
body
{
background-image
:
url("../../img/location/30.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='31')}-->
<style>
body
{
background-image
:
url("../../img/location/31.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='32')}-->
<style>
body
{
background-image
:
url("../../img/location/32.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='33')}-->
<style>
body
{
background-image
:
url("../../img/location/33.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $pls=='34')}-->
<style>
body
{
background-image
:
url("../../img/location/34.jpg")
;
background-position
:
center
;}
</style>
</style>
<!--{/if}-->
<!--{/if}-->
<!--{/loop}-->
<table
border=
"0"
width=
"720"
height=
"100%"
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<table
border=
"0"
width=
"720"
height=
"100%"
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<tr>
<tr>
<td>
<td>
...
@@ -209,7 +42,7 @@
...
@@ -209,7 +42,7 @@
<img
src=
"img/dead.gif"
style=
"position:absolute;top:120;left:6;width:94;height:40"
>
<img
src=
"img/dead.gif"
style=
"position:absolute;top:120;left:6;width:94;height:40"
>
<!--{elseif $hp <= $mhp*0.2}-->
<!--{elseif $hp <= $mhp*0.2}-->
<img
src=
"img/danger.gif"
style=
"position:absolute;top:120;left:5;width:95;height:37"
>
<img
src=
"img/danger.gif"
style=
"position:absolute;top:120;left:5;width:95;height:37"
>
<!--{elseif $hp <= $mhp*0.5}-->
<!--{elseif $hp <= $mhp*0.5
|| $inf!=''
}-->
<img
src=
"img/caution.gif"
style=
"position:absolute;top:120;left:5;width:95;height:36"
>
<img
src=
"img/caution.gif"
style=
"position:absolute;top:120;left:5;width:95;height:36"
>
<!--{elseif !$inf}-->
<!--{elseif !$inf}-->
<img
src=
"img/fine.gif"
style=
"position:absolute;top:120;left:12;width:81;height:38"
>
<img
src=
"img/fine.gif"
style=
"position:absolute;top:120;left:12;width:81;height:38"
>
...
...
templates/default/revbattle.htm
deleted
100644 → 0
View file @
cfd8b1ec
<!--{if (CURSCRIPT == 'game' && $w_pls=='0')}-->
<style>
body
{
background-image
:
url("../../img/location/0.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='1')}-->
<style>
body
{
background-image
:
url("../../img/location/1.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='2')}-->
<style>
body
{
background-image
:
url("../../img/location/2.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='3')}-->
<style>
body
{
background-image
:
url("../../img/location/3.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='4')}-->
<style>
body
{
background-image
:
url("../../img/location/4.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='5')}-->
<style>
body
{
background-image
:
url("../../img/location/5.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='6')}-->
<style>
body
{
background-image
:
url("../../img/location/6.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='7')}-->
<style>
body
{
background-image
:
url("../../img/location/7.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='8')}-->
<style>
body
{
background-image
:
url("../../img/location/8.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='9')}-->
<style>
body
{
background-image
:
url("../../img/location/9.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='10')}-->
<style>
body
{
background-image
:
url("../../img/location/10.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='11')}-->
<style>
body
{
background-image
:
url("../../img/location/11.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='12')}-->
<style>
body
{
background-image
:
url("../../img/location/12.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='13')}-->
<style>
body
{
background-image
:
url("../../img/location/13.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='14')}-->
<style>
body
{
background-image
:
url("../../img/location/14.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='15')}-->
<style>
body
{
background-image
:
url("../../img/location/15.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='16')}-->
<style>
body
{
background-image
:
url("../../img/location/16.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='17')}-->
<style>
body
{
background-image
:
url("../../img/location/17.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='18')}-->
<style>
body
{
background-image
:
url("../../img/location/18.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='19')}-->
<style>
body
{
background-image
:
url("../../img/location/19.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='20')}-->
<style>
body
{
background-image
:
url("../../img/location/20.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='21')}-->
<style>
body
{
background-image
:
url("../../img/location/21.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='22')}-->
<style>
body
{
background-image
:
url("../../img/location/22.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='23')}-->
<style>
body
{
background-image
:
url("../../img/location/23.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='24')}-->
<style>
body
{
background-image
:
url("../../img/location/24.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='25')}-->
<style>
body
{
background-image
:
url("../../img/location/25.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='26')}-->
<style>
body
{
background-image
:
url("../../img/location/26.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='27')}-->
<style>
body
{
background-image
:
url("../../img/location/27.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='28')}-->
<style>
body
{
background-image
:
url("../../img/location/28.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='29')}-->
<style>
body
{
background-image
:
url("../../img/location/29.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='30')}-->
<style>
body
{
background-image
:
url("../../img/location/30.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='31')}-->
<style>
body
{
background-image
:
url("../../img/location/31.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='32')}-->
<style>
body
{
background-image
:
url("../../img/location/32.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='33')}-->
<style>
body
{
background-image
:
url("../../img/location/33.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<!--{if (CURSCRIPT == 'game' && $w_pls=='34')}-->
<style>
body
{
background-image
:
url("../../img/location/34.jpg")
;
background-position
:
center
;}
</style>
<!--{/if}-->
<table
border=
"0"
width=
720px
height=
380px
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<TR
align=
"center"
>
<TD
valign=
"middle"
class=
"b5"
>
<TABLE
border=
"0"
width=
720px
height=
380px
align=
"center"
cellspacing=
"0"
cellpadding=
"0"
class=
"battle"
>
<tr>
<td>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
width=
"100%"
>
<tr>
<td>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
valign=
"top"
width=
"100%"
>
<tr>
<td
class=
"b1"
colspan=
2
height=
20px
><span>
Lv. $w_lvl
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$w_name
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$w_sNoinfo
</span>
<!--{if $club==19}-->
【
<span
class=
"lime"
>
报应点数:
<span
id=
"anum"
>
$w_rp
</span></span>
】
<!--{/if}-->
</td>
<td
class=
"b5"
rowspan=
4
width=
140px
colspan=
1
height=
80px
><IMG
src=
"img/$w_iconImg"
height=
80px
border=
"0"
align=
"middle"
<!
--
{
if
$
w_hp=
=0}--
>
style="filter:Xray()"
<!--{/if}-->
/>
</td>
</tr>
<tr>
<td
class=
"b2"
width=
75px
height=
20px
><span>
{lang rage}
</span></td>
<td
class=
"b3"
width=
90px
><span>
$w_ragestate
</span></td>
<td
class=
"b2"
width=
75px
><span>
{lang sp}
</span></td>
<td
class=
"b3"
width=
90px
><span>
$w_spstate
</span></td>
<td
class=
"b2"
width=
100px
><span>
{lang hp}
</span></td>
<td
class=
"b3"
width=
145px
><span>
$w_hpstate
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang wep}{lang effect}
</span></td>
<td
class=
"b3"
><span>
$w_wepestate
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang kind1}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_wepk != ''}-->
$w_wepk_words
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
class=
"b2"
><span>
{lang wep}
</span></td>
<td
class=
"b3"
><span>
$w_wep_words
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang tactic}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_tactic >= 0}-->
$tacinfo[$w_tactic]
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
class=
"b2"
><span>
{lang pose}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_pose >= 0}-->
$poseinfo[$w_pose]
<!--{else}-->
???
<!--{/if}-->
</span></td>
<td
class=
"b2"
><span>
{lang inf}
</span></td>
<td
class=
"b3"
><span>
<!--{if $w_infdata}-->
$w_infdata
<!--{else}-->
无
<!--{/if}-->
</span></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</TR>
<tr>
<TD
class=
"b3"
height=
"100%"
>
<span><B><FONT
color=
"#ff0000"
size=
"5"
face=
"黑体"
>
$battle_title
</FONT></B></span>
</TD>
</TR>
<tr>
<td>
<table
border=
"0"
width=
720px
cellspacing=
"0"
cellpadding=
"0"
valign=
"middle"
>
<tr>
<td
class=
"b5"
rowspan=
4
colspan=
1
width=
140px
height=
80px
><IMG
src=
"img/$n_iconImg"
height=
80px
border=
"0"
align=
"middle"
<!
--
{
if
$
hp=
=0}--
>
style="filter:Xray()"
<!--{/if}-->
/>
</td>
<td
class=
"b1"
colspan=
2
height=
20px
><span>
$typeinfo[$n_type]({$sexinfo[$n_gd]}{$n_sNo}号)
</span></td>
<td
class=
"b1"
colspan=
2
><span>
$n_name
</span></td>
<td
class=
"b1"
colspan=
2
><span>
Lv. $n_lvl
</span></td>
</tr>
<tr>
<td
class=
"b2"
width=
100px
height=
20px
><span>
{lang hp}
</span></td>
<td
class=
"b3"
width=
145px
><span>
$n_hpstate
</span></span></td>
<td
class=
"b2"
width=
75px
><span>
{lang sp}
</span></td>
<td
class=
"b3"
width=
90px
><span>
$n_spstate
</span></td>
<td
class=
"b2"
width=
75px
><span>
{lang rage}
</span></td>
<td
class=
"b3"
width=
90px
><span>
$n_ragestate
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang wep}
</span></td>
<td
class=
"b3"
><span>
$n_wep_words
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang kind1}
</span></td>
<td
class=
"b3"
><span>
$n_wepk_words
</span></td>
<td
class=
"b2"
><span>
{lang wep}{lang effect}
</span></td>
<td
class=
"b3"
><span>
$n_wepe
</span></td>
</tr>
<tr>
<td
class=
"b2"
height=
20px
><span>
{lang inf}
</span></td>
<td
class=
"b3"
>
<span>
<!--{if $n_inf}-->
<!--{loop $infinfo $key $val}-->
<!--{if strpos($n_inf,$key)!==false}-->
$val
<!--{/if}-->
<!--{/loop}-->
<!--{else}-->
无
<!--{/if}-->
</span>
</td>
<td
class=
"b2"
><span>
{lang pose}
</span></td>
<td
class=
"b3"
><span>
$poseinfo[$n_pose]
</span></td>
<td
class=
"b2"
><span>
{lang tactic}
</span></td>
<td
class=
"b3"
><span>
$tacinfo[$n_tactic]
</span></td>
</tr>
</table>
</td>
</tr>
</TABLE>
</TD>
</TR>
</table>
templates/default/revbattleresult.htm
deleted
100644 → 0
View file @
cfd8b1ec
<input
type=
"hidden"
name=
"mode"
value=
"revcombat"
>
<input
type=
"hidden"
name=
"command"
value=
"enter"
>
<input
type=
"button"
class=
"cmdbutton"
name=
"submit"
value=
"确定"
onclick=
"postCmd('gamecmd','command.php');this.disabled=true;"
>
\ No newline at end of file
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