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
0daf35e9
Commit
0daf35e9
authored
Jul 27, 2023
by
winddramon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
weapon_bow
更新弓系武器,但是不含资源层,话说商店的最终战术去哪里了
parent
2f244a18
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
179 additions
and
30 deletions
+179
-30
gamedata/cache/clubskills_1.php
gamedata/cache/clubskills_1.php
+6
-6
gamedata/cache/combatcfg_1.php
gamedata/cache/combatcfg_1.php
+12
-12
gamedata/cache/resources_1.php
gamedata/cache/resources_1.php
+6
-3
gamedata/sql/reset.sql
gamedata/sql/reset.sql
+2
-2
include/game/item.func.php
include/game/item.func.php
+14
-0
include/game/item2.func.php
include/game/item2.func.php
+51
-0
include/game/itemmain.func.php
include/game/itemmain.func.php
+46
-3
include/game/revattr.func.php
include/game/revattr.func.php
+15
-1
include/game/revbattle.func.php
include/game/revbattle.func.php
+22
-1
include/global.func.php
include/global.func.php
+5
-2
No files found.
gamedata/cache/clubskills_1.php
View file @
0daf35e9
...
...
@@ -443,7 +443,7 @@ $cskills = Array
'wepk+wep_kind'
=>
'武器不适用,持<span class="yellow">投系武器</span>时生效'
,
),
'unlock'
=>
Array
(
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c3_enchant'
=>
Array
...
...
@@ -493,7 +493,7 @@ $cskills = Array
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 5'
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c3_potential'
=>
Array
...
...
@@ -514,7 +514,7 @@ $cskills = Array
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 7'
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c3_hawkeye'
=>
Array
...
...
@@ -534,7 +534,7 @@ $cskills = Array
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 9'
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c3_offset'
=>
Array
...
...
@@ -567,7 +567,7 @@ $cskills = Array
),
'unlock'
=>
Array
(
'lvl'
=>
'[:lvl:] >= 13'
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c3_numerous'
=>
Array
...
...
@@ -587,7 +587,7 @@ $cskills = Array
//……
'unlock'
=>
Array
(
'skillpara|c3_enchant-ur+skillpara|c3_enchant-ir+skillpara|c3_enchant-pr+skillpara|c3_enchant-er+skillpara|c3_enchant-wr+skillpara|c3_enchant-dr'
=>
'[:skillpara|c3_enchant-ur:] >= 120 || [:skillpara|c3_enchant-ir:] >= 120 || [:skillpara|c3_enchant-er:] >= 120 || [:skillpara|c3_enchant-wr:] >= 120 || [:skillpara|c3_enchant-pr:] >= 120 || [:skillpara|c3_enchant-dr:] >= 120'
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
(!empty([:wep_kind:]) && [:wep_kind:] == 'C'
)"
,
'wepk+wep_kind'
=>
"strpos([:wepk:],'C')!==false ||
strpos([:wepk:],'B')!==false || (!empty([:wep_kind:]) && ([:wep_kind:] == 'C' || [:wep_kind:] == 'B')
)"
,
),
),
'c4_stable'
=>
Array
...
...
gamedata/cache/combatcfg_1.php
View file @
0daf35e9
<?php
//基础反击率
$counter_obbs
=
Array
(
'N'
=>
75
,
'P'
=>
85
,
'K'
=>
85
,
'G'
=>
50
,
'C'
=>
75
,
'D'
=>
0
,
'F'
=>
95
,
'J'
=>
50
);
$counter_obbs
=
Array
(
'N'
=>
75
,
'P'
=>
85
,
'K'
=>
85
,
'G'
=>
50
,
'C'
=>
75
,
'D'
=>
0
,
'F'
=>
95
,
'J'
=>
50
,
'B'
=>
30
);
//各种攻击方式的射程,射程大者可以反击射程小者,此外射程为0则代表不能反击任何系但也不能被任何系反击
$rangeinfo
=
Array
(
'N'
=>
3
,
'P'
=>
3
,
'K'
=>
3
,
'G'
=>
7
,
'C'
=>
5
,
'D'
=>
0
,
'F'
=>
1
,
'J'
=>
8
);
$rangeinfo
=
Array
(
'N'
=>
3
,
'P'
=>
3
,
'K'
=>
3
,
'G'
=>
7
,
'C'
=>
5
,
'D'
=>
0
,
'F'
=>
1
,
'J'
=>
8
,
'B'
=>
5
);
//各种攻击方式的基础命中率
$hitrate_obbs
=
Array
(
'N'
=>
80
,
'P'
=>
80
,
'K'
=>
75
,
'G'
=>
70
,
'C'
=>
70
,
'D'
=>
60
,
'F'
=>
85
,
'J'
=>
10
);
$hitrate_obbs
=
Array
(
'N'
=>
80
,
'P'
=>
80
,
'K'
=>
75
,
'G'
=>
70
,
'C'
=>
70
,
'D'
=>
60
,
'F'
=>
85
,
'J'
=>
10
,
'B'
=>
65
);
//$hitrate_obbs = Array('N' => 80, 'P' => 80, 'K' => 80, 'G' => 75, 'C' => 100, 'D' => 60, 'F' => 70);
//各种攻击方式的最高命中率
$hitrate_max_obbs
=
Array
(
'N'
=>
90
,
'P'
=>
90
,
'K'
=>
85
,
'G'
=>
95
,
'C'
=>
96
,
'D'
=>
70
,
'F'
=>
96
,
'J'
=>
98
);
$hitrate_max_obbs
=
Array
(
'N'
=>
90
,
'P'
=>
90
,
'K'
=>
85
,
'G'
=>
95
,
'C'
=>
96
,
'D'
=>
70
,
'F'
=>
96
,
'J'
=>
98
,
'B'
=>
90
);
//熟练度对命中的影响,每点熟练增加的命中,可以考虑区分武器
$hitrate_r
=
Array
(
'N'
=>
0.025
,
'P'
=>
0.025
,
'K'
=>
0.025
,
'G'
=>
0.05
,
'C'
=>
0.25
,
'D'
=>
0.02
,
'F'
=>
0.1
,
'J'
=>
0.2
);
$hitrate_r
=
Array
(
'N'
=>
0.025
,
'P'
=>
0.025
,
'K'
=>
0.025
,
'G'
=>
0.05
,
'C'
=>
0.25
,
'D'
=>
0.02
,
'F'
=>
0.1
,
'J'
=>
0.2
,
'B'
=>
0.15
);
//$hitrate_r = Array('N' => 0.02, 'P' => 0.02, 'K' => 0.02, 'G' => 0.01, 'C' => 0, 'D' => 0.03, 'F'=> 0.05);
//各种攻击方式的伤害变动范围,越少越稳定。
$dmg_fluc
=
Array
(
'N'
=>
15
,
'P'
=>
15
,
'K'
=>
40
,
'G'
=>
20
,
'C'
=>
5
,
'D'
=>
25
,
'F'
=>
10
,
'J'
=>
10
);
$dmg_fluc
=
Array
(
'N'
=>
15
,
'P'
=>
15
,
'K'
=>
40
,
'G'
=>
20
,
'C'
=>
5
,
'D'
=>
25
,
'F'
=>
10
,
'J'
=>
10
,
'B'
=>
10
);
//熟练度对伤害的影响,每点熟练度增加的伤害
$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
,
'B'
=>
0.5
);
//$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'
,
'N'
=>
'P'
,
'K'
=>
'K'
,
'G'
=>
'G'
,
'J'
=>
'G'
,
'C'
=>
'C'
,
'C'
=>
'C'
,
'B'
=>
'C'
,
'D'
=>
'D'
,
'F'
=>
'F'
,
);
...
...
@@ -325,14 +325,14 @@ $pls_hide_modifier = Array(
34
=>
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'
,
'B'
=>
'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'
),);
$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'
),
'B'
=>
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
,
'B'
=>
40
);
//$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
,
'B'
=>
-
1
);
//特殊效果发生的概率,这里指属性,跟武器系别无关
$specialrate
=
Array
(
'N'
=>
40
,
'n'
=>
30
,
'y'
=>
30
,
'B'
=>
95
,
'b'
=>
95
);
//属性攻击登录
...
...
gamedata/cache/resources_1.php
View file @
0daf35e9
...
...
@@ -296,8 +296,8 @@ $lwinfo = Array(
92
=>
'成为……焰火……'
,
);
$infinfo
=
Array
(
'b'
=>
'<span class="red">胸</span>'
,
'h'
=>
'<span class="red">头</span>'
,
'a'
=>
'<span class="red">腕</span>'
,
'f'
=>
'<span class="red">足</span>'
,
'p'
=>
'<span class="purple">毒</span>'
,
'u'
=>
'<span class="red">烧</span>'
,
'i'
=>
'<span class="clan">冻</span>'
,
'e'
=>
'<span class="yellow">麻</span>'
,
'w'
=>
'<span class="grey">乱</span>'
);
$attinfo
=
Array
(
'N'
=>
'徒手殴打'
,
'P'
=>
'殴打'
,
'K'
=>
'斩刺'
,
'G'
=>
'射击'
,
'C'
=>
'投掷'
,
'D'
=>
'设置引信伏击'
,
'F'
=>
'释放灵力攻击'
,
'J'
=>
'狙击'
);
$skillinfo
=
Array
(
'N'
=>
'wp'
,
'P'
=>
'wp'
,
'K'
=>
'wk'
,
'G'
=>
'wg'
,
'C'
=>
'wc'
,
'D'
=>
'wd'
,
'F'
=>
'wf'
,
'J'
=>
'wg'
);
$attinfo
=
Array
(
'N'
=>
'徒手殴打'
,
'P'
=>
'殴打'
,
'K'
=>
'斩刺'
,
'G'
=>
'射击'
,
'C'
=>
'投掷'
,
'D'
=>
'设置引信伏击'
,
'F'
=>
'释放灵力攻击'
,
'J'
=>
'狙击'
,
'B'
=>
'投射'
);
$skillinfo
=
Array
(
'N'
=>
'wp'
,
'P'
=>
'wp'
,
'K'
=>
'wk'
,
'G'
=>
'wg'
,
'C'
=>
'wc'
,
'D'
=>
'wd'
,
'F'
=>
'wf'
,
'J'
=>
'wg'
,
'B'
=>
'wc'
);
//$rangeinfo = Array('N' => 'S', 'P' => 'S', 'K' => 'S', 'G' => 'M', 'C' => 'M', 'D' => 'L', 'F'=> 'M'); #各种攻击方式的射程,移动到combatcfg.php
$restinfo
=
Array
(
'通常'
,
'睡眠'
,
'治疗'
,
'静养'
);
$noiseinfo
=
Array
(
...
...
@@ -1006,6 +1006,7 @@ $iteminfo = Array(//注意顺序,AB必须在A的前面,以此类推
'HB'
=>
'命体恢复'
,
'HM'
=>
'歌魂增加'
,
'HT'
=>
'歌魂恢复'
,
'GA'
=>
'箭矢'
,
'GBr'
=>
'机枪弹药'
,
'GBi'
=>
'气体弹药'
,
'GBh'
=>
'重型弹药'
,
...
...
@@ -1046,6 +1047,7 @@ $iteminfo = Array(//注意顺序,AB必须在A的前面,以此类推
'WC'
=>
'投掷兵器'
,
#CAST
'WD'
=>
'爆炸物'
,
#DETONATE
'WF'
=>
'灵力兵器'
,
#FLOWERING
'WB'
=>
'弓'
,
#BOW
'WQ'
=>
'????'
,
'XA'
=>
'代码残片·绿'
,
'XB'
=>
'代码残片·紫'
,
...
...
@@ -1114,6 +1116,7 @@ $itemspkinfo = Array(
'^'
=>
'背包'
,
'🧰'
=>
'工具'
,
'🍎'
=>
'水果'
,
'|'
=>
'<:DUMMY:>'
,
//箭矢用的分隔符
);
//club20 元素大师:
...
...
gamedata/sql/reset.sql
View file @
0daf35e9
...
...
@@ -75,7 +75,7 @@ CREATE TABLE bra_maptrap (
DROP
TABLE
IF
EXISTS
bra_newsinfo
;
CREATE
TABLE
bra_newsinfo
(
nid
small
int
unsigned
NOT
NULL
auto_increment
,
nid
medium
int
unsigned
NOT
NULL
auto_increment
,
`time`
int
(
10
)
unsigned
NOT
NULL
default
'0'
,
`news`
char
(
30
)
NOT
NULL
default
''
,
`a`
varchar
(
255
)
NOT
NULL
default
''
,
...
...
@@ -94,7 +94,7 @@ CREATE TABLE bra_newsinfo (
DROP
TABLE
IF
EXISTS
bra_gambling
;
CREATE
TABLE
bra_gambling
(
gid
small
int
unsigned
NOT
NULL
auto_increment
,
gid
medium
int
unsigned
NOT
NULL
auto_increment
,
uid
mediumint
(
8
)
unsigned
NOT
NULL
default
'0'
,
uname
char
(
15
)
NOT
NULL
default
''
,
bid
smallint
unsigned
NOT
NULL
default
'0'
,
...
...
include/game/item.func.php
View file @
0daf35e9
...
...
@@ -434,6 +434,20 @@ function itemuse($itmn,&$data=NULL) {
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
}
}
elseif
(
strpos
(
$itmk
,
'GA'
)
===
0
)
{
//使用箭矢
if
(
strpos
(
$wepk
,
'WB'
)
!==
0
)
{
$log
.=
"<span class=
\"
red b
\"
>你没有装备弓,不能给武器上箭。</span><br>"
;
$mode
=
'command'
;
return
;
}
elseif
(
0
===
$itmn
&&
!
empty
(
$weps
))
{
//捡到的箭矢不能马上拉弓,避免换箭覆盖itm0的问题
$log
.=
"你一只手捏着弓箭,一只手抓着刚捡到的箭矢,没法马上弯弓搭箭。<span class=
\"
red b
\"
>还是先把箭矢收进包裹里吧。</span><br>"
;
$mode
=
'command'
;
return
;
}
else
{
//$theitem = Array('itm' => &$itm, 'itmk' => &$itmk, 'itme' => &$itme, 'itms' => &$itms, 'itmsk' => &$itmsk);
include_once
GAME_ROOT
.
'./include/game/item2.func.php'
;
itemuse_ugb
(
$pdata
,
$itmn
);
}
}
elseif
(
strpos
(
$itmk
,
'R'
)
===
0
)
{
//$log.= $itm .'已经废弃,请联系管理员。';
if
(
$itme
>
0
)
{
...
...
include/game/item2.func.php
View file @
0daf35e9
...
...
@@ -880,4 +880,55 @@ function item_slip($snm,&$data)
'U'
=>
'“纸条啥的……”<br>“希望这张纸条不会成为你的遗书。”<br>“总之祝你好运。”<br>'
,
);
}
//使用箭矢的功能拆在这里
function
itemuse_ugb
(
&
$pdata
,
$itmn
){
global
$log
,
$mode
,
$nosta
;
$wep
=&
$pdata
[
'wep'
];
$wepk
=&
$pdata
[
'wepk'
];
$wepe
=&
$pdata
[
'wepe'
];
$weps
=&
$pdata
[
'weps'
];
$wepsk
=&
$pdata
[
'wepsk'
];
$itm
=&
$pdata
[
'itm'
.
$itmn
];
$itmk
=&
$pdata
[
'itmk'
.
$itmn
];
$itme
=&
$pdata
[
'itme'
.
$itmn
];
$itms
=&
$pdata
[
'itms'
.
$itmn
];
$itmsk
=&
$pdata
[
'itmsk'
.
$itmn
];
//清除箭矢名
$swapn
=
wep_b_clean_arrow_name
(
$wepk
);
//清除武器上的箭属性
$swapsk
=
wep_b_clean_arrow_sk
(
$wepsk
);
//判定卸下来的箭矢数目,然后把武器改成无穷耐
$swapnum
=
0
;
if
(
$weps
!==
$nosta
)
{
$swapnum
=
$weps
;
$weps
=
$nosta
;
}
$wepsk_arr
=
get_itmsk_array
(
$wepsk
);
$itmsk_arr
=
get_itmsk_array
(
$itmsk
);
//如果是箭矢或者弓有连射属性,那么箭矢上限就是连射次数上限
//判定连射次数按理也应该拆一个函数出来
$arrowmax
=
(
in_array
(
'r'
,
$itmsk_arr
)
||
in_array
(
'r'
,
$wepsk_arr
))
?
2
+
min
(
floor
(
$
{
$skillinfo
[
'B'
]}
/
200
),
4
)
:
1
;
$arrownum
=
min
(
$arrowmax
,
$itms
);
//再修改一次武器的耐久值。其实如果弄一个卸箭的功能,卸箭和上箭应该要拆成两个函数
$weps
=
$arrownum
;
$itms
-=
$arrownum
;
//记录箭矢名
$wepk
.=
'|'
.
$itm
;
//为武器增加箭属性
if
(
!
empty
(
$itmsk_arr
)){
$wepsk
.=
'|'
.
implode
(
''
,
$itmsk_arr
)
.
'|'
;
}
if
(
!
$swapnum
)
$log
.=
"为<span class=
\"
red b
\"
>
$wep
</span>选用了<span class=
\"
red b
\"
>
$itm
</span>,<span class=
\"
red b
\"
>
$wep
</span>发射次数增加了<span class=
\"
yellow b
\"
>
$arrownum
</span>。<br>"
;
else
$log
.=
"为<span class=
\"
red b
\"
>
$wep
</span>换上了<span class=
\"
red b
\"
>
$itm
</span>,<span class=
\"
red b
\"
>
$wep
</span>发射次数增加了<span class=
\"
yellow b
\"
>
$arrownum
</span>。<br>"
;
if
(
$itms
<=
0
)
{
$log
.=
"<span class=
\"
red b
\"
>
$itm
</span>用光了。<br>"
;
$itm
=
$itmk
=
$itmsk
=
''
;
$itme
=
$itms
=
0
;
}
if
(
$swapnum
){
$pdata
[
'itm0'
]
=
$swapn
?
$swapn
:
'卸下的箭'
;
$pdata
[
'itmk0'
]
=
'GA'
;
$pdata
[
'itme0'
]
=
1
;
$pdata
[
'itms0'
]
=
$swapnum
;
$pdata
[
'itmsk0'
]
=
$swapsk
;
itemget
();
}
}
?>
\ No newline at end of file
include/game/itemmain.func.php
View file @
0daf35e9
...
...
@@ -408,7 +408,6 @@ function itemfind(&$data=NULL) {
}
}
function
itemget
(
&
$data
=
NULL
)
{
global
$log
,
$nosta
,
$mode
,
$cmd
;
...
...
@@ -436,7 +435,7 @@ function itemget(&$data=NULL)
return
;
}
}
if
(
preg_match
(
'/^(WC|WD|WF|Y|B|C|TN|GB|M|V)/'
,
$itmk0
)
&&
$itms0
!==
$nosta
){
if
(
preg_match
(
'/^(WC|WD|WF|Y|B|C|TN|G
A|G
B|M|V)/'
,
$itmk0
)
&&
$itms0
!==
$nosta
){
//global $wep,$wepk,$wepe,$weps,$wepsk;
if
(
$wep
==
$itm0
&&
$wepk
==
$itmk0
&&
$wepe
==
$itme0
&&
$wepsk
==
$itmsk0
){
$weps
+=
$itms0
;
...
...
@@ -737,7 +736,7 @@ function itemmerge($itn1,$itn2){
}
if
((
$it1
==
$it2
)
&&
(
$ite1
==
$ite2
))
{
if
((
$itk1
==
$itk2
)
&&
(
$itsk1
==
$itsk2
)
&&
preg_match
(
'/^(WC|WD|WF|Y|B|C|TN|GB|V|M)/'
,
$itk1
))
{
if
((
$itk1
==
$itk2
)
&&
(
$itsk1
==
$itsk2
)
&&
preg_match
(
'/^(WC|WD|WF|Y|B|C|TN|G
A|G
B|V|M)/'
,
$itk1
))
{
$its2
+=
$its1
;
$it1
=
$itk1
=
$itsk1
=
''
;
$ite1
=
$its1
=
0
;
...
...
@@ -1749,6 +1748,24 @@ function weapon_loss(&$pa,$hurtvalue,$force_imp=0,$check_sk=0)
$pa
[
'weps'
]
=
$nosta
;
}
}
elseif
(
$pa
[
'wep_kind'
]
==
'B'
)
{
if
(
!
$pa
[
'type'
])
{
if
(
$hurtvalue
>
0
)
$log
.=
"<span class='grey'>
{
$pa
[
'nm'
]
}
的
{
$pa
[
'wep'
]
}
用掉了
{
$hurtvalue
}
支箭。</span><br>"
;
else
$log
.=
"<span class='grey'>
{
$pa
[
'wep'
]
}
的箭矢数凭空多出了"
.
abs
(
$hurtvalue
)
.
"……啊??</span><br>"
;
}
if
(
empty
(
$pa
[
'weps'
]))
{
$log
.=
"
{
$pa
[
'nm'
]
}
的<span class=
\"
red
\"
>
{
$pa
[
'wep'
]
}
</span>的箭矢用光了!<br>"
;
$pa
[
'weps'
]
=
$nosta
;
//弓系武器用光箭后刷新一次属性,剔除箭矢带来的属性
//箭矢用光时抹掉箭矢名
wep_b_clean_arrow_name
(
$pa
[
'wepk'
]);
//箭矢用光时抹掉箭矢带来的属性
wep_b_clean_arrow_sk
(
$pa
[
'wepsk'
]);
}
}
}
}
if
(
$wep_loss_flag
)
...
...
@@ -1764,6 +1781,7 @@ function weapon_loss(&$pa,$hurtvalue,$force_imp=0,$check_sk=0)
return
;
}
//扣除指定装备的耐久。check_sk:是否在武器毁坏时重新检查属性数组$pa['ex_keys']
function
armor_hurt
(
&
$pa
,
$which
,
$hurtvalue
,
$check_sk
=
0
)
{
...
...
@@ -1820,5 +1838,30 @@ function unset_ex_from_array(&$pa,$exarr)
return
;
}
//把箭矢名字抹掉
//认为武器类别|后的都是箭矢名,返回抹掉的名字
function
wep_b_clean_arrow_name
(
&
$itmk
){
if
(
strpos
(
$itmk
,
'|'
)
===
false
)
return
''
;
$ofs
=
strpos
(
$itmk
,
'|'
);
$ret
=
substr
(
$itmk
,
$ofs
+
1
);
$itmk
=
substr
(
$itmk
,
0
,
$ofs
);
return
$ret
;
}
//把引用的参数中的箭矢带来的属性抹掉,返回抹掉的属性
//认为|之间的属性都是箭矢属性
function
wep_b_clean_arrow_sk
(
&
$itmsk
){
if
(
strpos
(
$itmsk
,
'|'
)
===
false
)
return
''
;
//如果奇数个,则结尾补一个|,嘿嘿
if
(
substr_count
(
$itmsk
,
'|'
)
%
2
)
$itmsk
.=
'|'
;
preg_match
(
'/\|.*\|/s'
,
$itmsk
,
$matches
);
$ret
=
''
;
if
(
!
empty
(
$matches
))
{
$itmsk
=
preg_replace
(
'/\|.*?\|/s'
,
''
,
$itmsk
);
$ret
=
substr
(
$matches
[
0
],
1
,
-
1
);
}
return
$ret
;
}
?>
include/game/revattr.func.php
View file @
0daf35e9
...
...
@@ -73,18 +73,31 @@ namespace revattr
$pa
[
'wep_kind'
]
=
'P'
;
$pa
[
'is_wpg'
]
=
1
;
}
//弓没子弹当做斩系
if
(
$pa
[
'wep_kind'
]
==
'B'
&&
$pa
[
'weps'
]
==
$nosta
)
{
$pa
[
'wep_kind'
]
=
'K'
;
$pa
[
'is_wpg'
]
=
1
;
//借用同一个变量吧,总不可能又是枪又是弓……能、能吗?
}
return
$pa
[
'wep_kind'
];
//保险起见……
}
# 获取武器射程
function
get_wep_range
(
&
$pa
)
{
global
$rangeinfo
;
global
$rangeinfo
,
$skillinfo
;
if
(
empty
(
$pa
[
'wep_kind'
]))
get_wep_kind
(
$pa
);
$range
=
isset
(
$rangeinfo
[
$pa
[
'wep_kind'
]])
?
$rangeinfo
[
$pa
[
'wep_kind'
]]
:
NULL
;
//弓系射程随熟练增加,每200点加1,最多加3
if
(
$pa
[
'wep_kind'
]
==
'B'
)
{
$r_add
=
floor
(
$pa
[
$skillinfo
[
$pa
[
'wep_kind'
]]]
/
200
);
if
(
$r_add
>
3
)
$r
=
3
;
$range
+=
$r_add
;
}
# 获取社团技能对武器射程的修正
$range
=
get_clbskill_wep_range
(
$pa
,
$range
);
...
...
@@ -696,6 +709,7 @@ namespace revattr
$pa
[
'wepe_t'
]
=
$pa
[
'wepe'
];
}
//枪托打人 武器伤害=面板数值/5
//弓当斩系武器也用同一个数值好了,懒得多想
elseif
(
isset
(
$pa
[
'is_wpg'
]))
{
$pa
[
'wepe_t'
]
=
round
(
$pa
[
'wepe'
]
/
5
);
...
...
include/game/revbattle.func.php
View file @
0daf35e9
...
...
@@ -266,13 +266,34 @@ namespace revbattle
}
}
}
//先制状态下可以自动给弓上箭
if
(
strpos
(
$pdata
[
'wepk'
],
'WB'
)
===
0
&&
$pdata
[
'weps'
]
===
$nosta
)
{
//$tmp_log = $log;
$pos_a
=
0
;
//遍历所有包裹,寻找最靠前的箭矢装填
for
(
$i
=
1
;
$i
<=
6
;
$i
++
){
if
(
$pdata
[
'itmk'
.
$i
]
==
'GA'
)
{
$pos_a
=
$i
;
break
;
}
}
//直接调用上箭的函数
if
(
$pos_a
)
{
$log
.=
'你及时弯弓搭箭,'
;
include_once
GAME_ROOT
.
'./include/game/item2.func.php'
;
itemuse_ugb
(
$pdata
,
$pos_a
);
}
//$tmp_log_2 = substr($log, strlen($tmp_log));
//$log = $tmp_log;//暂存一下$log,调整显示顺序,不过可能不利于以后扩展,再说吧……
}
//if(!empty($tmp_log_2)) $log .= $tmp_log_2;
}
}
//初始化玩家攻击方式信息
$w1
=
substr
(
$pdata
[
'wepk'
],
1
,
1
);
$w2
=
substr
(
$pdata
[
'wepk'
],
2
,
1
);
if
(
empty
(
$w2
)
||
is_numeric
(
$w2
))
$w2
=
''
;
if
(
empty
(
$w2
)
||
is_numeric
(
$w2
)
||
'|'
==
$w2
)
$w2
=
''
;
if
((
$w1
==
'G'
||
$w1
==
'J'
)
&&
(
$pdata
[
'weps'
]
==
$nosta
))
$w1
=
'P'
;
include
template
(
'battlecmd_rev'
);
...
...
include/global.func.php
View file @
0daf35e9
...
...
@@ -664,12 +664,15 @@ function parse_skinfo_desc($info,$subinfo='',$short='',$tiptype='')
foreach
(
$info
as
$sk
)
{
$csk
=
$itemspkinfo
[
$sk
];
//键值为<:DUMMY:>的属性跳过(注意只是跳过了显示的处理)
if
(
$csk
==
'<:DUMMY:>'
)
continue
;
# 如果不是第一个属性 显示一个 + 号
if
(
$sk_nums
>
0
)
$sk_info
.=
'+'
;
# 检查属性有没有特殊样式
if
(
isset
(
$tps_isk
[
$sk
][
'class'
]))
$csk
=
"<span class=
\"
"
.
$tps_isk
[
$sk
][
'class'
]
.
"
\"
>"
.
$csk
.
"</span>"
;
# 将属性加入显示队列
$sk_info
.=
$csk
;
# 如果不是最后一个属性 显示一个 + 号
if
(
$sk_nums
<
$sk_max
-
1
)
$sk_info
.=
'+'
;
# 检查属性有没有tooltip
if
(
isset
(
$tps_isk
[
$sk
][
'title'
]))
{
...
...
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