妖精
- UID
- 2351
- 精华
- 0
- 积分
- 108
- 威望
- 0 度
- 性别
- 男
|
阁楼
大 中
小 发表于 2013-5-27 17:37 只看该作者
关于敏捷与命中计算公式分析[申精]
找了半天没找到有人分析,自己动手了..
$ v) @- b* U9 S7 j- @妖城在线论坛4 n# _! j2 O, S$ F0 t9 [
代码取至GMSV.. 复制内容到剪贴板 代码:bool __cdecl BATTLE_DuckCheck(int a1, int a2)
{
int v2; // eax@1
bool v3; // edx@1
int v5; // eax@3
int v6; // eax@8
signed int v7; // eax@14
long double v8; // fst7@14
long double v9; // fst6@14
long double v10; // fst5@14
long double v11; // fst4@14
signed int v12; // eax@18
long double v13; // fst3@22
__int16 v14; // ax@23
long double v15; // t1@24
long double v16; // fst3@24
long double v17; // fst4@24
long double v18; // t2@25
long double v19; // fst4@25
long double v20; // fst5@25
long double v21; // fst4@27
long double v22; // fst3@27
long double v23; // fst2@27
long double v24; // t1@30
long double v25; // fst3@30
long double v26; // fst5@30
long double v27; // fst4@30
signed int v28; // eax@30
long double v29; // t2@34
long double v30; // fst5@34
long double v31; // fst6@34
long double v32; // fst5@34
long double v33; // fst7@34
bool v34; // eax@38
__int16 v35; // ax@45
char v36; // al@47
float v37[2]; // [sp+4h] [bp-90h]@34
signed int v38; // [sp+8h] [bp-8Ch]@15
float v39; // [sp+Ch] [bp-88h]@37
int v40; // [sp+20h] [bp-74h]@23
__int16 v41; // [sp+24h] [bp-70h]@23
__int16 v42; // [sp+26h] [bp-6Eh]@23
float v43; // [sp+28h] [bp-6Ch]@15
char v44; // [sp+2Ch] [bp-68h]@1
memcpy(&v44, &unk_817D290, 0x4Cu); //敏捷加成常量
v10D6A5D0 = 1120403456;
v2 = BATTLE_CanMoveCheck(a2);
v3 = 0;
if ( v2 )
{
v5 = BATTLE_GetDamageReact(a2);
v3 = 0;
if ( v5 <= 0 )
{
if ( *(_BYTE *)(a2 + 1136) < 0 )
{
*(_DWORD *)(a2 + 1136) &= 0xFFFFFF7Fu;
return 0;
}
if ( *(_BYTE *)(a2 + 1136) & 0x40 || (v6 = *(_DWORD *)(a2 + 1112), v6 == 1) || v6 == 42 || v6 == 43 || v6 == 44 )
return 0;
if ( v6 != 60 || (v36 = BATTLE_checkEquipmentEffect(a2), v3 = 0, v36 & 8) )
{
if ( *(_DWORD *)(a1 + 1112) == 42 )
return 0;
v7 = *(_DWORD *)(a1 + 1416);
v8 = (long double)*(signed int *)(a1 + 1348); //攻击者命中修正
v9 = (long double)*(signed int *)(a2 + 1352); //被攻击者闪躲修正
v10 = (long double)*(signed int *)(a1 + 1176); //攻击者敏捷
v11 = (long double)*(signed int *)(a2 + 1176); //被攻击者敏捷
if ( v7 ) //判断攻击者是否有敏捷BUFF加倍
{
v38 = *(_DWORD *)(a1 + 1416);
v43 = v10 + (long double)v7 * 0.01 * v10;
v10 = v43;
}
if ( v10 < 0.0 )
v10 = 0.0; //负敏修正为0
v12 = *(_DWORD *)(a2 + 1416);
if ( v12 ) //判断被攻击者是否有敏捷BUFF加倍
{
v38 = *(_DWORD *)(a2 + 1416);
v43 = v11 + (long double)v12 * 0.01 * v11;
v11 = v43;
}
if ( v11 < 0.0 )
v11 = 0.0; //负敏修正为0
v13 = v10;
if ( v10 <= 241.0 ) // 判断攻击者敏捷是否到达241 --传说中的240敏捷理论 其实是241.
{
LOBYTE(v35) = v42;
HIBYTE(v35) = 12;
v41 = v35;
}
else
{
LOBYTE(v14) = v42;
HIBYTE(v14) = 12;
v41 = v14;
v40 = (signed int)(v10 - 241.0);
v38 = (signed int)(v10 - 241.0);
v43 = 0.3 * (long double)v38 + 241.0; //攻击者敏捷*0.3
v13 = v43;
}
v15 = v13;
v16 = v11;
v17 = v15;
if ( v16 <= 241.0 ) // 判断被攻击者敏捷是否到达241
{
v20 = v16;
}
else
{
v18 = v17;
v19 = v16 - 241.0;
v40 = (signed int)v19;
v38 = (signed int)v19;
v43 = 0.3 * (long double)(signed int)v19 + 241.0; //被攻击者敏捷*0.3
v17 = v18;
v20 = v43;
}
if ( v17 >= 1.0 )
{
v22 = 1.0;
v23 = v17;
v21 = 1.0;
}
else
{
v21 = 1.0;
v22 = 1.0;
v23 = 1.0;
}
if ( v21 > v20 )
v20 = v22;
v24 = v22;
v25 = v20;
v26 = v24;
v27 = v25 / v23 * 10.0;
v40 = (signed int)v27;
v28 = (signed int)v27;
if ( (signed int)v27 <= 9 )
v28 = 10;
if ( v28 > 28 )
v28 = 28;
v29 = v26;
v30 = v9 + (long double)*(signed int *)(a2 + 1248) + v37[v28]; //v30 = 被攻击者闪躲+技能闪躲加成+敏捷闪躲加成
v31 = v29;
v32 = v30 - (long double)*(signed int *)(a1 + 1244) - v8; //v32 = v30-攻击者技能命中加成-攻击者命中
v33 = 70.0; //设置闪躲最大百分比为70
if ( v32 <= 70.0 )
v33 = v32;
if ( v31 > v33 )
v33 = v31;
v39 = v33;
v34 = v39 >= (long double)(signed int)RAND(1, 100); //取1-100的随机数 如果大于或等于被攻击者最终闪躲值则命中
v10D6A5D0 = v39;
v3 = v34;
}
}
}
return v3;
} 所以得出 241敏捷只是PK的最低门槛, 而不是到了241就不需要敏捷了.. 敏捷对于命中还是很大关系..
3 t4 k* t2 m2 G* b5 [1 `魔力私服,最新魔力宝贝私服技术交流
; {& v1 d0 m2 h魔力私服,最新魔力宝贝私服技术交流敏捷闪躲加成常量数组 魔力私服,最新魔力宝贝私服技术交流/ h! f7 D4 @# H; U8 w: j* H
魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表' V2 o5 [2 F2 D
1.000000 5.000000 10.00000 15.00000 —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート: }# D c$ l( e3 {0 s
20.00000 25.00000 30.00000 35.00000 —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート/ n- `* v' ~7 `' x; T
40.00000 45.00000 50.00000 52.50000 —魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート+ A' J' c# t' Y- E& m# e Q- c
55.00000 57.50000 60.00000 62.50000
* j, E% M" e) R+ g' w( X+ g魔力私服,最新魔力宝贝私服技术交流65.00000 67.50000 70.00000 魔力私服,最新魔力私服,魔力宝贝私服,魔力宝贝私服技术,魔力宝贝私服,私服架设技术,妖城,FLASH,电影,黑客,网络,网吧,破解,入侵,注册表; O) X# v& ]# s
—魔力私服,魔力宝贝私服技术,DELPHI编程,魔力寶貝, 魔力宝贝, 크로스게이트,クロスゲート; o- Z+ {0 c6 V! w* R
[ 本帖最后由 taishanci 于 2013-6-2 19:08 编辑 ]
|