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
b43c145b
Commit
b43c145b
authored
Feb 05, 2023
by
hisuinohoshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rev combat phase 2
parent
20fcfc0f
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
890 additions
and
170 deletions
+890
-170
include/game/itemmain.func.php
include/game/itemmain.func.php
+17
-14
include/game/revattr.func.php
include/game/revattr.func.php
+277
-25
include/game/revattr_extra.func.php
include/game/revattr_extra.func.php
+443
-0
include/game/revcombat.func.php
include/game/revcombat.func.php
+150
-128
include/game/search.func.php
include/game/search.func.php
+2
-2
include/news.func.php
include/news.func.php
+1
-1
No files found.
include/game/itemmain.func.php
View file @
b43c145b
...
...
@@ -1106,30 +1106,30 @@ function getcorpse($item){
return
;
}
//武器损耗&消耗计算:
function
weapon_loss
(
&
$pa
)
//武器损耗&消耗计算:
force_imp 强制扣除武器效果
function
weapon_loss
(
&
$pa
,
$force_imp
=
0
)
{
global
$log
,
$wepimprate
;
global
$log
,
$wepimprate
,
$nosta
;
if
(
isset
(
$pa
[
'wep_imp_times'
])
&&
$pa
[
'wep_imp_times'
]
>
0
)
if
(
isset
(
$pa
[
'wep_imp_times'
])
&&
$pa
[
'wep_imp_times'
]
>
0
&&
$pa
[
'wep_kind'
]
!=
'N'
)
{
$wep_loss_flag
=
0
;
//获取武器损耗类型
$wep_imp
=
$wepimprate
[
$pa
[
'wep_kind'
]];
//损耗型武器
if
(
$wep_imp
>
0
)
if
(
$wep_imp
>
0
||
$force_imp
)
{
if
(
$pa
[
'weps'
]
==
$nosta
)
if
(
$pa
[
'weps'
]
==
$nosta
||
$force_imp
)
{
$pa
[
'wepe'
]
-=
$pa
[
'wep_imp_times'
]
;
$pa
[
'wepe'
]
=
max
(
0
,
$pa
[
'wepe'
]
-
$pa
[
'wep_imp_times'
])
;
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的攻击力下降了
{
$pa
[
'wep_imp_times'
]
}
。<br>"
;
}
else
{
$pa
[
'weps'
]
-=
$pa
[
'wep_imp_times'
]
;
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$pa
[
'wep_imp_times'
])
;
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的耐久度下降了
{
$pa
[
'wep_imp_times'
]
}
。<br>"
;
}
if
(
$pa
[
'weps'
]
<=
0
||
$pa
[
'wepe'
]
<=
0
)
if
(
empty
(
$pa
[
'weps'
])
||
empty
(
$pa
[
'wepe'
])
)
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>使用过度,已经损坏,无法再装备了!<br>"
;
$wep_loss_flag
=
1
;
...
...
@@ -1140,11 +1140,11 @@ function weapon_loss(&$pa)
{
if
(
$pa
[
'weps'
]
!=
$nosta
)
{
$pa
[
'weps'
]
-=
$pa
[
'wep_imp_times'
]
;
$pa
[
'weps'
]
=
max
(
0
,
$pa
[
'weps'
]
-
$pa
[
'wep_imp_times'
])
;
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
[
'weps'
]
<=
0
)
if
(
empty
(
$pa
[
'weps'
])
)
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>用光了!<br>"
;
$wep_loss_flag
=
1
;
...
...
@@ -1153,10 +1153,10 @@ function weapon_loss(&$pa)
elseif
(
$pa
[
'wep_kind'
]
==
'G'
||
$pa
[
'wep_kind'
]
==
'J'
)
{
$log
.=
"
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
的弹药数减少了
{
$pa
[
'wep_imp_times'
]
}
。<br>"
;
if
(
$pa
[
'weps'
]
<=
0
)
if
(
empty
(
$pa
[
'weps'
])
)
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>弹药用光了!<br>"
;
$
wep_loss_flag
=
1
;
$
pa
[
'weps'
]
=
$nosta
;
}
}
}
...
...
@@ -1165,7 +1165,9 @@ function weapon_loss(&$pa)
{
$pa
[
'wep'
]
=
'拳头'
;
$pa
[
'wep_kind'
]
=
'N'
;
$pa
[
'wepk'
]
=
'WN'
;
$pa
[
'wepe'
]
=
0
;
$pa
[
'weps'
]
=
$nosta
;
$pa
[
'wepsk'
]
=
''
;
return
-
1
;
}
unset
(
$pa
[
'wep_imp_times'
]);
}
return
;
}
...
...
@@ -1200,9 +1202,10 @@ function armor_hurt(&$pa,$which,$hurtvalue,$hurtkind=0)
$pa
[
$which
]
=
$pa
[
$which
.
'k'
]
=
$pa
[
$which
.
'sk'
]
=
''
;
$pa
[
$which
.
'e'
]
=
$pa
[
$which
.
's'
]
=
0
;
}
return
-
1
;
}
}
return
;
return
0
;
}
...
...
include/game/revattr.func.php
View file @
b43c145b
This diff is collapsed.
Click to expand it.
include/game/revattr_extra.func.php
0 → 100644
View file @
b43c145b
This diff is collapsed.
Click to expand it.
include/game/revcombat.func.php
View file @
b43c145b
This diff is collapsed.
Click to expand it.
include/game/search.func.php
View file @
b43c145b
...
...
@@ -609,7 +609,7 @@ function discover($schmode = 0) {
if
(
$active_dice
<
$active_r
)
{
$action
=
'enemy'
.
$edata
[
'pid'
];
//
include_once GAME_ROOT.'./include/game/battle.func.php';
include_once
GAME_ROOT
.
'./include/game/battle.func.php'
;
//findenemy($edata);
include_once
GAME_ROOT
.
'./include/game/revbattle.func.php'
;
findenemy_rev
(
$edata
);
...
...
@@ -625,7 +625,7 @@ function discover($schmode = 0) {
echo
"passive_w_type=
{
$edata
[
'type'
]
}
\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);
include_once
GAME_ROOT
.
'./include/game/revcombat.func.php'
;
rev_combat_prepare
(
$edata
,
NULL
,
0
);
...
...
include/news.func.php
View file @
b43c145b
...
...
@@ -110,7 +110,7 @@ function nparse_news($start = 0, $range = 0 ){//$type = '') {
}
elseif
(
$news
==
'death18'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>因<span class=
\"
red
\"
>烧伤发作</span>死亡"
;
}
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'
)
{
$newsinfo
.=
"<li>
{
$hour
}
时
{
$min
}
分
{
$sec
}
秒,<span class=
\"
yellow
\"
>
$a
</span>被<span class=
\"
yellow
\"
>
$c
</span>使用
{
$d
}
殴打致死"
;
}
elseif
(
$news
==
'death22'
)
{
...
...
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