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
4d4c0c2f
Commit
4d4c0c2f
authored
Feb 06, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rev combat phase 2.33
还……还没有新东西……
parent
b43c145b
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
636 additions
and
367 deletions
+636
-367
command.php
command.php
+1
-1
game.php
game.php
+1
-1
gamedata/cache/combatcfg_1.php
gamedata/cache/combatcfg_1.php
+11
-4
gamedata/cache/style_20190718.css
gamedata/cache/style_20190718.css
+1
-1
include/game.func.php
include/game.func.php
+1
-0
include/game/attr.func.php
include/game/attr.func.php
+9
-1
include/game/combat.func.php
include/game/combat.func.php
+5
-24
include/game/itemmain.func.php
include/game/itemmain.func.php
+35
-16
include/game/revattr.func.php
include/game/revattr.func.php
+142
-87
include/game/revattr_extra.func.php
include/game/revattr_extra.func.php
+59
-48
include/game/revbattle.func.php
include/game/revbattle.func.php
+25
-10
include/game/revcombat.func.php
include/game/revcombat.func.php
+325
-112
include/game/search.func.php
include/game/search.func.php
+3
-3
include/global.func.php
include/global.func.php
+13
-11
include/news.func.php
include/news.func.php
+3
-1
include/state.func.php
include/state.func.php
+1
-46
templates/default/profile.htm
templates/default/profile.htm
+1
-1
No files found.
command.php
View file @
4d4c0c2f
...
@@ -446,7 +446,7 @@ if($hp > 0){
...
@@ -446,7 +446,7 @@ if($hp > 0){
else
else
{
{
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$pdata
,
$edata
,
1
,
$command
);
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 @
4d4c0c2f
...
@@ -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 @
4d4c0c2f
...
@@ -39,11 +39,18 @@ $pose_defend_modifier = Array(0,25,0,-25,-50,-50,-466);
...
@@ -39,11 +39,18 @@ $pose_defend_modifier = Array(0,25,0,-25,-50,-50,-466);
$tactic_attack_modifier
=
Array
(
0
,
20
,
-
25
,
25
,
-
50
);
$tactic_attack_modifier
=
Array
(
0
,
20
,
-
25
,
25
,
-
50
);
//应战策略对防御力的加成(单位:百分比加算)
//应战策略对防御力的加成(单位:百分比加算)
$tactic_defend_modifier
=
Array
(
0
,
-
20
,
50
,
-
25
,
0
);
$tactic_defend_modifier
=
Array
(
0
,
-
20
,
50
,
-
25
,
0
);
//场景对攻击力的加成(单位:百分比加算)
//场景对攻击力的加成(单位:百分比加算) wtf
$pls_attack_modifier
=
Array
(
0
,
0
,
0
,
0
,
0
,
0
,
10
,
0
,
0
,
-
10
,
0
,
0
,
0
,
0
,
-
10
,
0
,
0
,
0
,
10
,
0
,
0
,
0
);
$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
(
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
-
10
,
10
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
10
,
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'
);
//各种攻击方式可能导致受伤的部位
//各种攻击方式可能导致受伤的部位
...
...
gamedata/cache/style_20190718.css
View file @
4d4c0c2f
...
@@ -371,7 +371,7 @@ span[tooltip]:hover:before {
...
@@ -371,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
;
}
}
/*==========下拉菜单样式==========*/
/*==========下拉菜单样式==========*/
...
...
include/game.func.php
View file @
4d4c0c2f
...
@@ -496,6 +496,7 @@ function current_player_save(){
...
@@ -496,6 +496,7 @@ function current_player_save(){
global
$$key
;
global
$$key
;
$pdata
[
$key
]
=
$$key
;
$pdata
[
$key
]
=
$$key
;
}
}
$pdata
=
player_format_with_db_structure
(
$pdata
);
$db
->
array_update
(
"
{
$tablepre
}
players"
,
$pdata
,
"pid='
$pid
'"
);
$db
->
array_update
(
"
{
$tablepre
}
players"
,
$pdata
,
"pid='
$pid
'"
);
return
$pdata
;
return
$pdata
;
}
}
...
...
include/game/attr.func.php
View file @
4d4c0c2f
...
@@ -19,7 +19,12 @@ function get_find_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf =
...
@@ -19,7 +19,12 @@ function get_find_r($weather = 0,$pls = 0,$pose = 0,$tactic = 0,$club = 0,$inf =
(
(
'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
,
-
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
(),
);
);
...
@@ -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
;
...
...
include/game/combat.func.php
View file @
4d4c0c2f
...
@@ -159,8 +159,7 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -159,8 +159,7 @@ function combat($active = 1, $wep_kind = '') {
$w_wep_kind
=
$w_w1
;
$w_wep_kind
=
$w_w1
;
}
}
$def_dmg
=
defend
(
$w_wep_kind
,
1
);
$def_dmg
=
defend
(
$w_wep_kind
,
1
);
if
(
get_single_clbpara
(
$clbpara
,
'revival_flag'
))
$revival_flag
=
get_single_clbpara
(
$clbpara
,
'revival_flag'
);
if
((
$hp
>
0
)
&&
(
$tactic
!=
4
)
&&
(
$pose
!=
5
))
{
if
((
$hp
>
0
)
&&
(
$tactic
!=
4
)
&&
(
$pose
!=
5
)
&&
!
$revival_flag
)
{
global
$rangeinfo
;
global
$rangeinfo
;
if
(
$rangeinfo
[
$wep_kind
]
>=
$rangeinfo
[
$w_wep_kind
]
&&
$rangeinfo
[
$w_wep_kind
]
!==
0
)
{
if
(
$rangeinfo
[
$wep_kind
]
>=
$rangeinfo
[
$w_wep_kind
]
&&
$rangeinfo
[
$w_wep_kind
]
!==
0
)
{
$counter
=
get_counter
(
$wep_kind
,
$tactic
,
$club
,
$inf
);
$counter
=
get_counter
(
$wep_kind
,
$tactic
,
$club
,
$inf
);
...
@@ -178,8 +177,6 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -178,8 +177,6 @@ function combat($active = 1, $wep_kind = '') {
}
else
{
}
else
{
$log
.=
"<span class=
\"
red
\"
>你攻击范围不足,不能反击,逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>你攻击范围不足,不能反击,逃跑了!</span><br>"
;
}
}
}
elseif
(
$revival_flag
)
{
//复活后不会反击,不发log
}
else
{
}
else
{
$log
.=
"<span class=
\"
red
\"
>你逃跑了!</span><br>"
;
$log
.=
"<span class=
\"
red
\"
>你逃跑了!</span><br>"
;
}
}
...
@@ -226,13 +223,6 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -226,13 +223,6 @@ function combat($active = 1, $wep_kind = '') {
}
}
logsave
(
$w_pid
,
$now
,
$w_log
,
'b'
);
logsave
(
$w_pid
,
$now
,
$w_log
,
'b'
);
}
}
//注销复活标记
if
(
$revival_flag
)
{
unset
(
$revival_flag
);
$clbpara
=
del_clbpara
(
$clbpara
,
'revival_flag'
);
}
if
((
$att_dmg
>
$hdamage
)
&&
(
$att_dmg
>=
$def_dmg
))
{
if
((
$att_dmg
>
$hdamage
)
&&
(
$att_dmg
>=
$def_dmg
))
{
$hdamage
=
$att_dmg
;
$hdamage
=
$att_dmg
;
...
@@ -286,7 +276,6 @@ function combat($active = 1, $wep_kind = '') {
...
@@ -286,7 +276,6 @@ function combat($active = 1, $wep_kind = '') {
else
else
{
{
if
(
$w_type
==
0
){
$killnum
++
;};
if
(
$w_type
==
0
){
$killnum
++
;};
check_kill_events
(
$pid
,
$w_pid
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
$log
.=
npc_chat
(
$w_type
,
$w_name
,
'death'
);
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
include_once
GAME_ROOT
.
'./include/game/achievement.func.php'
;
...
@@ -1334,7 +1323,6 @@ function defend($w_wep_kind = 'N', $active = 0) {
...
@@ -1334,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'
)
{
...
@@ -1427,18 +1415,9 @@ function defend($w_wep_kind = 'N', $active = 0) {
...
@@ -1427,18 +1415,9 @@ 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'
);
global
$clbpara
;
if
(
$hp
>
0
)
if
(
$hp
>
0
&&
get_single_clbpara
(
$clbpara
,
'revival_flag'
))
{
{
$revival_flag
=
get_single_clbpara
(
$clbpara
,
'revival_flag'
);
$log
.=
'<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>'
;
if
(
$revival_flag
==
99
)
{
$log
.=
'<span class="yellow">由于你及时按了BOMB键,你原地满血复活了!</span><br>'
;
}
elseif
(
$revival_flag
==
17
)
{
$log
.=
"<span class=
\"
lime b
\"
>但是,空气中弥漫着的奥罗拉让你重新站了起来!</span><br>"
;
}
}
}
}
}
}
else
{
}
else
{
...
@@ -1475,6 +1454,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
...
@@ -1475,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
];
...
@@ -1483,6 +1463,7 @@ function get_original_dmg($w1, $w2, $att, $def, $ws, $wp_kind) {
...
@@ -1483,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/itemmain.func.php
View file @
4d4c0c2f
...
@@ -1106,12 +1106,12 @@ function getcorpse($item){
...
@@ -1106,12 +1106,12 @@ function getcorpse($item){
return
;
return
;
}
}
//武器损耗&消耗计算:force_imp
强制扣除武器效果
//武器损耗&消耗计算:force_imp
:强制扣除武器效果;check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function
weapon_loss
(
&
$pa
,
$
force_imp
=
0
)
function
weapon_loss
(
&
$pa
,
$
hurtvalue
,
$force_imp
=
0
,
$check_sk
=
0
)
{
{
global
$log
,
$wepimprate
,
$nosta
;
global
$log
,
$wepimprate
,
$nosta
;
if
(
isset
(
$pa
[
'wep_imp_times'
])
&&
$pa
[
'wep_imp_times'
]
>
0
&&
$pa
[
'wep_kind'
]
!=
'N'
)
if
(
$hurtvalue
>
0
&&
$pa
[
'wep_kind'
]
!=
'N'
)
{
{
$wep_loss_flag
=
0
;
$wep_loss_flag
=
0
;
//获取武器损耗类型
//获取武器损耗类型
...
@@ -1121,13 +1121,13 @@ function weapon_loss(&$pa,$force_imp=0)
...
@@ -1121,13 +1121,13 @@ function weapon_loss(&$pa,$force_imp=0)
{
{
if
(
$pa
[
'weps'
]
==
$nosta
||
$force_imp
)
if
(
$pa
[
'weps'
]
==
$nosta
||
$force_imp
)
{
{
$pa
[
'wepe'
]
=
max
(
0
,
$pa
[
'wepe'
]
-
$
pa
[
'wep_imp_times'
]
);
$pa
[
'wepe'
]
=
max
(
0
,
$pa
[
'wepe'
]
-
$
hurtvalue
);
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的攻击力下降了
{
$pa
[
'wep_imp_times'
]
}
。
<br>"
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的攻击力下降了
{
$hurtvalue
}
。</span>
<br>"
;
}
}
else
else
{
{
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$
pa
[
'wep_imp_times'
]
);
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$
hurtvalue
);
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的耐久度下降了
{
$pa
[
'wep_imp_times'
]
}
。
<br>"
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的耐久度下降了
{
$hurtvalue
}
。</span>
<br>"
;
}
}
if
(
empty
(
$pa
[
'weps'
])
||
empty
(
$pa
[
'wepe'
]))
if
(
empty
(
$pa
[
'weps'
])
||
empty
(
$pa
[
'wepe'
]))
{
{
...
@@ -1140,10 +1140,10 @@ function weapon_loss(&$pa,$force_imp=0)
...
@@ -1140,10 +1140,10 @@ function weapon_loss(&$pa,$force_imp=0)
{
{
if
(
$pa
[
'weps'
]
!=
$nosta
)
if
(
$pa
[
'weps'
]
!=
$nosta
)
{
{
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$
pa
[
'wep_imp_times'
]
);
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$
hurtvalue
);
if
(
$pa
[
'wep_kind'
]
==
'C'
||
$pa
[
'wep_kind'
]
==
'D'
||
$pa
[
'wep_kind'
]
==
'F'
)
if
(
$pa
[
'wep_kind'
]
==
'C'
||
$pa
[
'wep_kind'
]
==
'D'
||
$pa
[
'wep_kind'
]
==
'F'
)
{
{
$log
.=
"
{
$pa
[
'nm'
]
}
用掉了
{
$pa
[
'wep_imp_times'
]
}
个
{
$pa
[
'wep'
]
}
。
<br>"
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
用掉了
{
$hurtvalue
}
个
{
$pa
[
'wep'
]
}
。</span>
<br>"
;
if
(
empty
(
$pa
[
'weps'
]))
if
(
empty
(
$pa
[
'weps'
]))
{
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>用光了!<br>"
;
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>用光了!<br>"
;
...
@@ -1152,7 +1152,7 @@ function weapon_loss(&$pa,$force_imp=0)
...
@@ -1152,7 +1152,7 @@ function weapon_loss(&$pa,$force_imp=0)
}
}
elseif
(
$pa
[
'wep_kind'
]
==
'G'
||
$pa
[
'wep_kind'
]
==
'J'
)
elseif
(
$pa
[
'wep_kind'
]
==
'G'
||
$pa
[
'wep_kind'
]
==
'J'
)
{
{
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的弹药数减少了
{
$pa
[
'wep_imp_times'
]
}
。
<br>"
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的弹药数减少了
{
$hurtvalue
}
。</span>
<br>"
;
if
(
empty
(
$pa
[
'weps'
]))
if
(
empty
(
$pa
[
'weps'
]))
{
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>弹药用光了!<br>"
;
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>弹药用光了!<br>"
;
...
@@ -1163,21 +1163,23 @@ function weapon_loss(&$pa,$force_imp=0)
...
@@ -1163,21 +1163,23 @@ function weapon_loss(&$pa,$force_imp=0)
}
}
if
(
$wep_loss_flag
)
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
[
'wep'
]
=
'拳头'
;
$pa
[
'wep_kind'
]
=
'N'
;
$pa
[
'wepk'
]
=
'WN'
;
$pa
[
'wepe'
]
=
0
;
$pa
[
'weps'
]
=
$nosta
;
$pa
[
'wepsk'
]
=
''
;
$pa
[
'wepe'
]
=
0
;
$pa
[
'weps'
]
=
$nosta
;
$pa
[
'wepsk'
]
=
''
;
return
-
1
;
return
-
1
;
}
}
unset
(
$pa
[
'wep_imp_times'
]);
}
}
return
;
return
;
}
}
//扣除指定装备的耐久。
$hurtkind 0=装备损坏文本 1=灵魂绑定消失文本
//扣除指定装备的耐久。
check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function
armor_hurt
(
&
$pa
,
$which
,
$hurtvalue
,
$
hurtkind
=
0
)
function
armor_hurt
(
&
$pa
,
$which
,
$hurtvalue
,
$
check_sk
=
0
)
{
{
global
$log
,
$nosta
;
global
$log
,
$nosta
;
if
(
isset
(
$pa
[
$which
.
's'
]))
if
(
!
empty
(
$pa
[
$which
.
's'
]))
{
{
//无限耐久的防具可以抵挡1次任意点损耗
//无限耐久的防具可以抵挡1次任意点损耗
if
(
$pa
[
$which
.
's'
]
==
$nosta
)
if
(
$pa
[
$which
.
's'
]
==
$nosta
)
...
@@ -1187,11 +1189,15 @@ function armor_hurt(&$pa,$which,$hurtvalue,$hurtkind=0)
...
@@ -1187,11 +1189,15 @@ function armor_hurt(&$pa,$which,$hurtvalue,$hurtkind=0)
//扣除耐久
//扣除耐久
$x
=
min
(
$pa
[
$which
.
's'
],
$hurtvalue
);
$x
=
min
(
$pa
[
$which
.
's'
],
$hurtvalue
);
$pa
[
$which
.
's'
]
=
$pa
[
$which
.
's'
]
-
$x
;
$pa
[
$which
.
's'
]
=
$pa
[
$which
.
's'
]
-
$x
;
$log
.=
"
{
$pa
[
'nm'
]
}
的"
.
$pa
[
$which
]
.
"的耐久度下降了
{
$x
}
!
<br>"
;
if
(
!
$pa
[
'type'
])
$log
.=
"<span class=
\"
grey
\"
>
{
$pa
[
'nm'
]
}
的"
.
$pa
[
$which
]
.
"的耐久度下降了
{
$x
}
!</span>
<br>"
;
//耐久为0 装备损坏
//耐久为0 装备损坏
if
(
$pa
[
$which
.
's'
]
<=
0
)
if
(
$pa
[
$which
.
's'
]
<=
0
)
{
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red b
\"
>"
.
$pa
[
$which
]
.
"</span>受损过重,无法再装备了!<br>"
;
$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'
)
if
(
$which
==
'arb'
)
{
{
$pa
[
$which
]
=
'内衣'
;
$pa
[
$which
.
'k'
]
=
'DN'
;
$pa
[
$which
]
=
'内衣'
;
$pa
[
$which
.
'k'
]
=
'DN'
;
...
@@ -1208,5 +1214,18 @@ function armor_hurt(&$pa,$which,$hurtvalue,$hurtkind=0)
...
@@ -1208,5 +1214,18 @@ function armor_hurt(&$pa,$which,$hurtvalue,$hurtkind=0)
return
0
;
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
View file @
4d4c0c2f
This diff is collapsed.
Click to expand it.
include/game/revattr_extra.func.php
View file @
4d4c0c2f
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
# 真红暮作为进攻方时的事件:
# 真红暮作为进攻方时的事件:
if
(
$pa
[
'type'
]
==
19
&&
$pa
[
'name'
]
==
'红暮'
&&
$phase
==
'attack'
)
if
(
$pa
[
'type'
]
==
19
&&
$pa
[
'name'
]
==
'红暮'
&&
$phase
==
'attack'
)
{
{
$log
.=
"<span class=
\"
yellow
\"
>“那么说好了,不留手咯~”<br>红暮吐气扬声,向你袭来!</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>“那么说好了,不留手咯~”<br></span>"
;
//$log .= "红暮吐气扬声,向你袭来!<br>";
if
(
$pa
[
'wep'
]
!=
'喷气式红杀重铁剑'
)
if
(
$pa
[
'wep'
]
!=
'喷气式红杀重铁剑'
)
{
{
...
@@ -67,8 +68,7 @@
...
@@ -67,8 +68,7 @@
if
(
$event_dice
==
1
)
if
(
$event_dice
==
1
)
{
{
$wdamage
=
rand
(
5
,
40
);
$wdamage
=
rand
(
5
,
40
);
$pd
[
'wep_imp_times'
]
=
$wdamage
;
weapon_loss
(
$pd
,
$wdamage
,
1
,
1
);
weapon_loss
(
$pd
,
1
);
get_inf_rev
(
$pd
,
'a'
);
get_inf_rev
(
$pd
,
'a'
);
$log
.=
"<span class=
\"
yellow
\"
>这一发强袭追踪弹结实地打到了你手持武器的手上,你痛的龇牙咧嘴,武器也受到了损伤!</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>这一发强袭追踪弹结实地打到了你手持武器的手上,你痛的龇牙咧嘴,武器也受到了损伤!</span><br>"
;
}
}
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
$adamage
=
rand
(
5
,
40
);
$adamage
=
rand
(
5
,
40
);
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
{
{
if
(
!
empty
(
$
{
$ar
.
's'
}))
armor_hurt
(
$pd
,
$ar
,
$adamage
);
if
(
!
empty
(
$
{
$ar
.
's'
}))
armor_hurt
(
$pd
,
$ar
,
$adamage
,
1
);
}
}
}
}
else
else
...
@@ -126,8 +126,6 @@
...
@@ -126,8 +126,6 @@
$log
.=
"<span class=
\"
lime
\"
>然而飞弹的精度太低,你并没有被它们打中。</span><br>"
;
$log
.=
"<span class=
\"
lime
\"
>然而飞弹的精度太低,你并没有被它们打中。</span><br>"
;
}
}
}
}
//血量小于0的情况下 返回值1
if
(
$pd
[
'hp'
]
<
0
)
return
1
;
}
}
return
NULL
;
return
NULL
;
...
@@ -226,60 +224,75 @@
...
@@ -226,60 +224,75 @@
function
attr_extra_89_bookworm
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
function
attr_extra_89_bookworm
(
&
$pa
,
&
$pd
,
$active
,
$phase
=
0
)
{
{
global
$log
;
global
$log
;
$rp_up
=
0
;
$dmg_p
=
-
1
;
# 防守方(pd)为白神
if
(
$pd
[
'type'
]
==
89
)
if
(
$pd
[
'type'
]
==
89
)
{
{
$rp_up
=
0
;
$dmg_p
=
-
1
;
if
(
$pd
[
'name'
]
==
'高中生·白神'
)
if
(
$pd
[
'name'
]
==
'高中生·白神'
)
{
{
$log
.=
"<span class=
\"
yellow
\"
>“你真的愿意对这个手无寸铁的高中女生下手么?”</span><br>"
;
if
(
$phase
==
'rp'
)
$dice
=
diceroll
(
444
);
{
if
(
$dice
<=
200
){
$log
.=
"<span class=
\"
yellow
\"
>“你真的愿意对这个手无寸铁的高中女生下手么?”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
$dice
=
diceroll
(
444
);
}
else
{
if
(
$dice
<=
200
){
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
elseif
(
$phase
==
'defend'
)
if
(
$pa
[
'original_dmg'
]
>
400
)
{
{
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为WIN MAX 2的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
if
(
$pa
[
'original_dmg'
]
>
400
)
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
{
$dmg_p
=
0.005
;
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为WIN MAX 2的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
$dmg_p
=
0.005
;
}
}
}
}
}
if
(
$pd
[
'name'
]
==
'白神·讨价还价'
)
if
(
$pd
[
'name'
]
==
'白神·讨价还价'
)
{
{
$dice
=
diceroll
(
1777
);
if
(
$phase
==
'rp'
)
$log
.=
"<span class=
\"
yellow
\"
>“对面似乎真的没有敌意,你还是决定要下手么?”</span><br>"
;
{
if
(
$dice
<=
200
){
$dice
=
diceroll
(
1777
);
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>“对面似乎真的没有敌意,你还是决定要下手么?”</span><br>"
;
}
elseif
(
$dice
<=
400
){
if
(
$dice
<=
200
){
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“你感觉到了罪恶感。”</span><br>"
;
}
else
{
}
elseif
(
$dice
<=
400
){
$log
.=
"<span class=
\"
neonblue
\"
>“罪恶感爬上了你的脊梁!”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“你不该这么做的。”</span><br>"
;
}
else
{
$log
.=
"<span class=
\"
neonblue
\"
>“罪恶感爬上了你的脊梁!”</span><br>"
;
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
}
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
elseif
(
$phase
==
'defend'
)
if
(
$pa
[
'original_dmg'
]
>
400
)
{
{
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为DECK的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
if
(
$pa
[
'original_dmg'
]
>
400
)
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
{
$dmg_p
=
0.005
;
$log
.=
"<span class=
\"
yellow
\"
>白神从裙底抽出了她的名为DECK的微型电脑!<br>“哪能这样被你干打?”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>白神的高超黑客技术大幅度降低了你造成的伤害!</span><br>"
;
$dmg_p
=
0.005
;
}
}
}
}
}
if
(
$pd
[
'name'
]
==
'白神·接受'
)
if
(
$pd
[
'name'
]
==
'白神·接受'
)
{
{
global
$rp
;
if
(
$phase
==
'rp'
)
$dice
=
rand
(
1777
,
4888
);
{
$log
.=
"<span class=
\"
yellow
\"
>“你对一位毫无反抗能力,并且已经表示无敌意的女高中生横下死手。”</span><br>"
;
$dice
=
rand
(
1777
,
4888
);
$log
.=
"<span class=
\"
neonblue
\"
>“希望你的良心还能得以安生。”</span><br>"
;
$log
.=
"<span class=
\"
yellow
\"
>“你对一位毫无反抗能力,并且已经表示无敌意的女高中生横下死手。”</span><br>"
;
//$log .= "<span class=\"neonblue\">“【DEBUG】你的rp上升了<span class=\"red\">$dice</span>点。”</span><br>";
$log
.=
"<span class=
\"
neonblue
\"
>“希望你的良心还能得以安生。”</span><br>"
;
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
//$log .= "<span class=\"neonblue\">“【DEBUG】你的rp上升了<span class=\"red\">$dice</span>点。”</span><br>";
$rp_up
=
$pa
[
'rp'
]
+
$dice
;
}
}
}
//结算rp上升事件
//结算rp上升事件
if
(
$rp_up
>
0
)
$pa
[
'rp'
]
=
$pa
[
'rp'
]
+
$rp_up
;
if
(
$
phase
==
'rp'
&&
$
rp_up
>
0
)
$pa
[
'rp'
]
=
$pa
[
'rp'
]
+
$rp_up
;
//返回一个伤害系数
//返回一个伤害系数
if
(
$phase
==
'defend'
&&
$dmg_p
>
0
)
return
$dmg_p
;
}
}
return
$dmg_p
;
return
;
}
}
# 百命猫特殊判定
# 百命猫特殊判定
...
@@ -290,7 +303,7 @@
...
@@ -290,7 +303,7 @@
if
(
$pa
[
'lvl'
]
<
255
)
$pa
[
'lvl'
]
++
;
if
(
$pa
[
'lvl'
]
<
255
)
$pa
[
'lvl'
]
++
;
if
(
$pa
[
'rage'
]
<
255
)
$pa
[
'rage'
]
++
;
if
(
$pa
[
'rage'
]
<
255
)
$pa
[
'rage'
]
++
;
}
}
if
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
)
else
if
(
$pd
[
'type'
]
==
89
&&
$pd
[
'name'
]
==
'是TSEROF啦!'
)
{
{
if
(
$pd
[
'lvl'
]
<
255
)
$pd
[
'lvl'
]
++
;
if
(
$pd
[
'lvl'
]
<
255
)
$pd
[
'lvl'
]
++
;
if
(
$pd
[
'rage'
]
<
255
)
$pd
[
'rage'
]
++
;
if
(
$pd
[
'rage'
]
<
255
)
$pd
[
'rage'
]
++
;
...
@@ -376,11 +389,10 @@
...
@@ -376,11 +389,10 @@
{
{
$log
.=
"<span class=
\"
neonblue
\"
>“我这双拳头……很强……很厉害……咚咚打你……”</span><br>"
;
$log
.=
"<span class=
\"
neonblue
\"
>“我这双拳头……很强……很厉害……咚咚打你……”</span><br>"
;
$damage
=
rand
(
5
,
40
);
$damage
=
rand
(
5
,
40
);
if
(
!
empty
(
$pd
[
'wep
s'
])
)
if
(
!
empty
(
$pd
[
'wep
e'
])
&&
$pd
[
'wepk'
]
!=
'WN'
)
{
{
$log
.=
"攻击使得<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>的耐久度下降了<span class=
\"
red
\"
>
$damage
</span>点!<br>"
;
$log
.=
"攻击使得<span class=
\"
red
\"
>
{
$pd
[
'wep'
]
}
</span>的效果下降了<span class=
\"
red
\"
>
$damage
</span>点!<br>"
;
$pd
[
'wep_imp_times'
]
=
$damage
;
$loss_flag
=
weapon_loss
(
$pd
,
$damage
,
1
,
1
);
$loss_flag
=
weapon_loss
(
$pd
,
1
);
if
(
$loss_flag
<
0
)
if
(
$loss_flag
<
0
)
{
{
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
120
);
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
120
);
...
@@ -388,9 +400,9 @@
...
@@ -388,9 +400,9 @@
}
}
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
foreach
(
Array
(
'arb'
,
'arh'
,
'ara'
,
'arf'
)
as
$ar
)
{
{
if
(
!
empty
(
$
{
$ar
.
's'
}
))
if
(
!
empty
(
$
pd
[
$ar
.
's'
]
))
{
{
$loss_flag
=
armor_hurt
(
$pd
,
$ar
,
$damage
);
$loss_flag
=
armor_hurt
(
$pd
,
$ar
,
$damage
,
1
);
if
(
$loss_flag
<
0
)
if
(
$loss_flag
<
0
)
{
{
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
60
);
$pa
[
'money'
]
=
$pa
[
'money'
]
+
(
$damage
*
60
);
...
@@ -434,7 +446,6 @@
...
@@ -434,7 +446,6 @@
}
else
{
}
else
{
$log
.=
"<span class=
\"
yellow
\"
>体当冲刺朝你袭来!造成了<span class=
\"
red
\"
>550</span>点伤害!<br>"
;
$log
.=
"<span class=
\"
yellow
\"
>体当冲刺朝你袭来!造成了<span class=
\"
red
\"
>550</span>点伤害!<br>"
;
$dmg
=
250
;
$dmg
=
250
;
if
(
$hp
<
0
)
$hp
=
0
;
}
}
return
$dmg
;
return
$dmg
;
}
}
...
...
include/game/revbattle.func.php
View file @
4d4c0c2f
...
@@ -8,13 +8,16 @@
...
@@ -8,13 +8,16 @@
function
findenemy_rev
(
$edata
)
function
findenemy_rev
(
$edata
)
{
{
global
$db
,
$tablepre
;
global
$db
,
$tablepre
;
global
$fog
,
$pid
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
;
global
$fog
,
$pid
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
,
$nosta
;
$battle_title
=
'发现敌人'
;
$battle_title
=
'发现敌人'
;
//
保存当前玩家数据,返回当前玩家数据组
//
获取并保存当前玩家数据
$sdata
=
current_player_save
();
$sdata
=
current_player_save
();
//格式化双方clbpara
$sdata
[
'clbpara'
]
=
get_clbpara
(
$sdata
[
'clbpara'
]);
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
//格式化对战双方数据
//格式化对战双方数据
$init_data
=
update_db_player_structure
();
$init_data
=
update_db_player_structure
();
foreach
(
Array
(
'w_'
,
's_'
)
as
$p
)
foreach
(
Array
(
'w_'
,
's_'
)
as
$p
)
...
@@ -24,13 +27,14 @@
...
@@ -24,13 +27,14 @@
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
extract
(
$sdata
,
EXTR_PREFIX_ALL
,
's'
);
init_rev_battle
();
init_rev_battle
();
$log
.=
"你发现了敌人<span class=
\"
red
\"
>
$w_name
</span>!<br>对方好像完全没有注意到你!<br>"
;
$log
.=
"你发现了敌人<span class=
\"
red
\"
>
{
$w_name
}
</span>!<br>对方好像完全没有注意到你!<br>"
;
//初始化玩家攻击方式信息
//初始化玩家攻击方式信息
$w1
=
substr
(
$s_wepk
,
1
,
1
);
$w1
=
substr
(
$s_wepk
,
1
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
$w2
=
substr
(
$s_wepk
,
2
,
1
);
if
(
$w2
==
'0'
||
$w2
==
'1'
)
$w2
=
''
;
if
(
$w2
==
'0'
||
$w2
==
'1'
)
$w2
=
''
;
if
((
$w1
==
'G'
||
$w1
==
'J'
)
&&
(
$s_weps
==
$nosta
))
$w1
=
'P'
;
if
((
$w1
==
'G'
||
$w1
==
'J'
)
&&
(
$s_weps
==
$nosta
))
$w1
=
'P'
;
include
template
(
'battlecmd_rev'
);
include
template
(
'battlecmd_rev'
);
$cmd
=
ob_get_contents
();
$cmd
=
ob_get_contents
();
ob_clean
();
ob_clean
();
...
@@ -41,20 +45,31 @@
...
@@ -41,20 +45,31 @@
//发现中立NPC $kind 0=中立单位 1=友军
//发现中立NPC $kind 0=中立单位 1=友军
function
findneut
(
&
$edata
,
$kind
=
0
)
function
findneut
(
&
$edata
,
$kind
=
0
)
{
{
global
$
log
,
$action
,
$mode
,
$name
,
$main
,
$cmd
,
$battle_title
,
$pid
,
$
db
,
$tablepre
;
global
$db
,
$tablepre
;
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
;
global
$
fog
,
$log
,
$mode
,
$main
,
$cmd
,
$battle_title
,
$attinfo
,
$skillinfo
;
$battle_title
=
$kind
?
'发现朋友'
:
'发现敌人?'
;
$battle_title
=
$kind
?
'发现朋友'
:
'发现敌人?'
;
extract
(
$edata
,
EXTR_PREFIX_ALL
,
'w'
);
//获取并保存当前玩家数据
init_battle
(
1
);
$sdata
=
current_player_save
();
if
(
!
is_array
(
$edata
[
'clbpara'
]))
$edata
[
'clbpara'
]
=
get_clbpara
(
$edata
[
'clbpara'
]);
//格式化双方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>"
;
$log
.=
"你发现了<span class=
\"
yellow
\"
>
$w_name
</span>!<br>"
;
if
(
!
$kind
)
$log
.=
"对方看起来没有敌意。<br>"
;
if
(
!
$kind
)
$log
.=
"对方看起来没有敌意。<br>"
;
//TODO:把这一段挪到一个独立函数里
//TODO:把这一段挪到一个独立函数里
if
(
$edata
[
'clbpara'
][
'post'
]
==
$
pid
)
if
(
$edata
[
'clbpara'
][
'post'
]
==
$
sdata
[
'pid'
]
)
{
{
$log
.=
"对方一看见你,便猛地朝你扑了过来!<br>
$log
.=
"对方一看见你,便猛地朝你扑了过来!<br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br>
<br><span class='sienna'>“老板!有你的快递喔!”</span><br>
...
@@ -81,7 +96,7 @@
...
@@ -81,7 +96,7 @@
include
template
(
'findneut'
);
include
template
(
'findneut'
);
$cmd
=
ob_get_contents
();
$cmd
=
ob_get_contents
();
ob_clean
();
ob_clean
();
$main
=
'battle'
;
$main
=
'battle
_rev
'
;
return
;
return
;
}
}
?>
?>
\ No newline at end of file
include/game/revcombat.func.php
View file @
4d4c0c2f
This diff is collapsed.
Click to expand it.
include/game/search.func.php
View file @
4d4c0c2f
...
@@ -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,7 +609,7 @@ function discover($schmode = 0) {
...
@@ -609,7 +609,7 @@ 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'
;
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
findenemy_rev
(
$edata
);
...
@@ -625,7 +625,7 @@ function discover($schmode = 0) {
...
@@ -625,7 +625,7 @@ 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'
;
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$edata
,
NULL
,
0
);
rev_combat_prepare
(
$edata
,
NULL
,
0
);
...
...
include/global.func.php
View file @
4d4c0c2f
...
@@ -657,30 +657,32 @@ function get_itmsk_strlen($sk_value,$max_length=5)
...
@@ -657,30 +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
get_single_clbpara
(
$para
,
$key
)
function
get_single_clbpara
(
$para
,
$key
)
{
{
$para
=
get_clbpara
(
$para
);
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
if
(
isset
(
$para
[
$key
]))
return
$para
[
$key
];
if
(
isset
(
$para
[
$key
]))
return
$para
[
$key
];
return
;
return
;
}
}
//删除clbpara中指定键
function
del_clbpara
(
$para
,
$key
)
function
del_
single_
clbpara
(
$para
,
$key
)
{
{
$para
=
get_clbpara
(
$para
);
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
if
(
isset
(
$para
[
$key
]))
unset
(
$para
[
$key
]);
if
(
isset
(
$para
[
$key
]))
unset
(
$para
[
$key
]);
return
json_encode
(
$para
)
;
return
$para
;
}
}
//修改clbpara中指定键
function
set_clbpara
(
$para
,
$key
,
$value
)
function
set_clbpara
(
$para
,
$key
,
$value
)
{
{
$para
=
get_clbpara
(
$para
);
if
(
!
is_array
(
$para
))
$para
=
get_clbpara
(
$para
);
$para
[
$key
]
=
$value
;
if
(
isset
(
$para
[
$key
]))
$para
[
$key
]
=
$value
;
return
json_encode
(
$para
)
;
return
$para
;
}
}
function
mgzdecode
(
$data
)
function
mgzdecode
(
$data
)
...
...
include/news.func.php
View file @
4d4c0c2f
...
@@ -121,8 +121,10 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
...
@@ -121,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 @
4d4c0c2f
...
@@ -6,7 +6,7 @@ if (! defined ( 'IN_GAME' )) {
...
@@ -6,7 +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
,
$clbpara
;
global
$weather
;
if
(
!
$death
)
{
if
(
!
$death
)
{
return
;
return
;
}
}
...
@@ -97,28 +97,11 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
...
@@ -97,28 +97,11 @@ function death($death, $kname = '', $ktype = 0, $annex = '') {
//$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);
$revival_flag
=
false
;
$revival_flag
=
false
;
//依次判定复活效果
if
(
!
$revival_flag
&&
$weather
==
17
)
{
include_once
GAME_ROOT
.
'./include/game/dice.func.php'
;
$aurora_rate
=
10
;
//玩家10%概率复活
$aurora_dice
=
diceroll
(
100
);
if
(
$aurora_dice
<=
$aurora_rate
)
{
//奥罗拉复活效果
addnews
(
$now
,
'aurora_revival'
,
$name
);
$hp
+=
min
(
$mhp
,
max
(
$aurora_dice
,
1
));
$sp
+=
min
(
$msp
,
max
(
$aurora_dice
,
1
));
$alivenum
++
;
$state
=
0
;
$clbpara
=
set_clbpara
(
$clbpara
,
'revival_flag'
,
'17'
);
$revival_flag
=
true
;
}
}
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"
))
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
;
$clbpara
=
set_clbpara
(
$clbpara
,
'revival_flag'
,
'99'
);
$alivenum
++
;
$alivenum
++
;
}
}
...
@@ -571,32 +554,4 @@ function rest($command) {
...
@@ -571,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/profile.htm
View file @
4d4c0c2f
...
@@ -42,7 +42,7 @@
...
@@ -42,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"
>
...
...
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