変愚蛮怒のメインリポジトリです
Revision | 04eb611277312f8e9747b607d22643c660ac1392 (tree) |
---|---|
Time | 2017-08-22 00:01:15 |
Author | Deskull <desull@user...> |
Commiter | Deskull |
#37359 (2.2.0.48) ランダム・アーティファクトの*スレイ*による生成強化とそれに伴う対邪などの極端な汎用最終ダメージの抑止を追加。(pekiman氏による) / Boost generation power of random artifact by KILL_* flag and suppress extreme versatile damage by kill evil flag and so on.(by pekiman)
@@ -1347,11 +1347,25 @@ static void random_slay(object_type *o_ptr) | ||
1347 | 1347 | { |
1348 | 1348 | case 1: |
1349 | 1349 | case 2: |
1350 | - add_flag(o_ptr->art_flags, TR_SLAY_ANIMAL); | |
1350 | + if (one_in_(4)) | |
1351 | + { | |
1352 | + add_flag(o_ptr->art_flags, TR_KILL_ANIMAL); | |
1353 | + } | |
1354 | + else | |
1355 | + { | |
1356 | + add_flag(o_ptr->art_flags, TR_SLAY_ANIMAL); | |
1357 | + } | |
1351 | 1358 | break; |
1352 | 1359 | case 3: |
1353 | 1360 | case 4: |
1354 | - add_flag(o_ptr->art_flags, TR_SLAY_EVIL); | |
1361 | + if (one_in_(4)) | |
1362 | + { | |
1363 | + add_flag(o_ptr->art_flags, TR_KILL_EVIL); | |
1364 | + } | |
1365 | + else | |
1366 | + { | |
1367 | + add_flag(o_ptr->art_flags, TR_SLAY_EVIL); | |
1368 | + } | |
1355 | 1369 | if (!artifact_bias && one_in_(2)) |
1356 | 1370 | artifact_bias = BIAS_LAW; |
1357 | 1371 | else if (!artifact_bias && one_in_(9)) |
@@ -1359,27 +1373,62 @@ static void random_slay(object_type *o_ptr) | ||
1359 | 1373 | break; |
1360 | 1374 | case 5: |
1361 | 1375 | case 6: |
1362 | - add_flag(o_ptr->art_flags, TR_SLAY_UNDEAD); | |
1376 | + if (one_in_(4)) | |
1377 | + { | |
1378 | + add_flag(o_ptr->art_flags, TR_KILL_UNDEAD); | |
1379 | + } | |
1380 | + else | |
1381 | + { | |
1382 | + add_flag(o_ptr->art_flags, TR_SLAY_UNDEAD); | |
1383 | + } | |
1363 | 1384 | if (!artifact_bias && one_in_(9)) |
1364 | 1385 | artifact_bias = BIAS_PRIESTLY; |
1365 | 1386 | break; |
1366 | 1387 | case 7: |
1367 | 1388 | case 8: |
1368 | - add_flag(o_ptr->art_flags, TR_SLAY_DEMON); | |
1389 | + if (one_in_(4)) | |
1390 | + { | |
1391 | + add_flag(o_ptr->art_flags, TR_KILL_DEMON); | |
1392 | + } | |
1393 | + else | |
1394 | + { | |
1395 | + add_flag(o_ptr->art_flags, TR_SLAY_DEMON); | |
1396 | + } | |
1369 | 1397 | if (!artifact_bias && one_in_(9)) |
1370 | 1398 | artifact_bias = BIAS_PRIESTLY; |
1371 | 1399 | break; |
1372 | 1400 | case 9: |
1373 | 1401 | case 10: |
1374 | - add_flag(o_ptr->art_flags, TR_SLAY_ORC); | |
1402 | + if (one_in_(4)) | |
1403 | + { | |
1404 | + add_flag(o_ptr->art_flags, TR_KILL_ORC); | |
1405 | + } | |
1406 | + else | |
1407 | + { | |
1408 | + add_flag(o_ptr->art_flags, TR_SLAY_ORC); | |
1409 | + } | |
1375 | 1410 | break; |
1376 | 1411 | case 11: |
1377 | 1412 | case 12: |
1378 | - add_flag(o_ptr->art_flags, TR_SLAY_TROLL); | |
1413 | + if (one_in_(4)) | |
1414 | + { | |
1415 | + add_flag(o_ptr->art_flags, TR_KILL_TROLL); | |
1416 | + } | |
1417 | + else | |
1418 | + { | |
1419 | + add_flag(o_ptr->art_flags, TR_SLAY_TROLL); | |
1420 | + } | |
1379 | 1421 | break; |
1380 | 1422 | case 13: |
1381 | 1423 | case 14: |
1382 | - add_flag(o_ptr->art_flags, TR_SLAY_GIANT); | |
1424 | + if (one_in_(4)) | |
1425 | + { | |
1426 | + add_flag(o_ptr->art_flags, TR_KILL_GIANT); | |
1427 | + } | |
1428 | + else | |
1429 | + { | |
1430 | + add_flag(o_ptr->art_flags, TR_SLAY_GIANT); | |
1431 | + } | |
1383 | 1432 | break; |
1384 | 1433 | case 15: |
1385 | 1434 | case 16: |
@@ -1448,7 +1497,14 @@ static void random_slay(object_type *o_ptr) | ||
1448 | 1497 | break; |
1449 | 1498 | case 33: |
1450 | 1499 | case 34: |
1451 | - add_flag(o_ptr->art_flags, TR_SLAY_HUMAN); | |
1500 | + if (one_in_(4)) | |
1501 | + { | |
1502 | + add_flag(o_ptr->art_flags, TR_KILL_HUMAN); | |
1503 | + } | |
1504 | + else | |
1505 | + { | |
1506 | + add_flag(o_ptr->art_flags, TR_SLAY_HUMAN); | |
1507 | + } | |
1452 | 1508 | break; |
1453 | 1509 | default: |
1454 | 1510 | add_flag(o_ptr->art_flags, TR_CHAOTIC); |
@@ -1902,6 +1958,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) | ||
1902 | 1958 | o_ptr->pval = 4; |
1903 | 1959 | } |
1904 | 1960 | |
1961 | + | |
1905 | 1962 | /* give it some plusses... */ |
1906 | 1963 | if (object_is_armour(o_ptr)) |
1907 | 1964 | o_ptr->to_a += randint1(o_ptr->to_a > 19 ? 1 : 20 - o_ptr->to_a); |
@@ -1989,6 +2046,20 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) | ||
1989 | 2046 | else power_level = 3; |
1990 | 2047 | } |
1991 | 2048 | |
2049 | + /*平均対邪ダメージが一定以上なら11/12でダメージ抑制処理を行う*/ | |
2050 | + if(suppression_evil_dam(o_ptr) && !one_in_(12) && object_is_weapon) | |
2051 | + { | |
2052 | + msg_format("抑制処理"); | |
2053 | + do | |
2054 | + { | |
2055 | + if (weakening_artifact(o_ptr) == 0) | |
2056 | + { | |
2057 | + break; | |
2058 | + } | |
2059 | + | |
2060 | + } while (suppression_evil_dam(o_ptr)); | |
2061 | + } | |
2062 | + | |
1992 | 2063 | if (a_scroll) |
1993 | 2064 | { |
1994 | 2065 | char dummy_name[80] = ""; |
@@ -2045,7 +2116,7 @@ bool create_artifact(object_type *o_ptr, bool a_scroll) | ||
2045 | 2116 | object_desc(o_name, o_ptr, 0); |
2046 | 2117 | |
2047 | 2118 | #ifdef JP |
2048 | - msg_format("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」:", max_powers, total_flags, artifact_bias_name[artifact_bias]); | |
2119 | + msg_format("パワー %d で 価値%ld のランダムアーティファクト生成 バイアスは「%s」対邪%d:", max_powers, total_flags, artifact_bias_name[artifact_bias], calc_arm_avgdamage(o_ptr)); | |
2049 | 2120 | #else |
2050 | 2121 | msg_format("Random artifact generated '%s'. (Power:%d, Value:%ld) :", artifact_bias_name[artifact_bias], max_powers, total_flags); |
2051 | 2122 | #endif |
@@ -3788,7 +3859,6 @@ void random_artifact_resistance(object_type * o_ptr, artifact_type *a_ptr) | ||
3788 | 3859 | * @attention この処理はdrop_near()内で普通の固定アーティファクトが重ならない性質に依存する. |
3789 | 3860 | * 仮に2個以上存在可能かつ装備品以外の固定アーティファクトが作成されれば |
3790 | 3861 | * drop_near()関数の返り値は信用できなくなる. |
3791 | - | |
3792 | 3862 | */ |
3793 | 3863 | bool create_named_art(int a_idx, int y, int x) |
3794 | 3864 | { |
@@ -3839,3 +3909,128 @@ bool create_named_art(int a_idx, int y, int x) | ||
3839 | 3909 | /* Drop the artifact from heaven */ |
3840 | 3910 | return drop_near(q_ptr, -1, y, x) ? TRUE : FALSE; |
3841 | 3911 | } |
3912 | +/*対邪平均ダメージの計算処理*/ | |
3913 | +int calc_arm_avgdamage(object_type *o_ptr) | |
3914 | +{ | |
3915 | + u32b flgs[TR_FLAG_SIZE]; | |
3916 | + object_flags(o_ptr, flgs); | |
3917 | + | |
3918 | + int dam = 0; | |
3919 | + dam = (o_ptr->dd * o_ptr->ds + o_ptr->dd) / 2; | |
3920 | + | |
3921 | + if(cheat_xtra) msg_format("素平均%d ", dam); | |
3922 | + if (have_flag(flgs, TR_KILL_EVIL)) | |
3923 | + { | |
3924 | + | |
3925 | + if (have_flag(flgs,TR_FORCE_WEAPON)) | |
3926 | + { | |
3927 | + dam = dam * 1.5 + (o_ptr->dd * o_ptr->ds + o_ptr->dd); | |
3928 | + } | |
3929 | + else | |
3930 | + { | |
3931 | + dam = dam * 3.5; | |
3932 | + } | |
3933 | + if (cheat_xtra) msg_format("X邪計算後%d ", dam); | |
3934 | + } | |
3935 | + else if (!have_flag(flgs, TR_KILL_EVIL) && have_flag(flgs, TR_SLAY_EVIL)) | |
3936 | + { | |
3937 | + | |
3938 | + if (have_flag(flgs, TR_FORCE_WEAPON)) | |
3939 | + { | |
3940 | + dam = dam * 1.5 + (o_ptr->dd * o_ptr->ds + o_ptr->dd); | |
3941 | + } | |
3942 | + else | |
3943 | + { | |
3944 | + dam = dam * 2; | |
3945 | + } | |
3946 | + if (cheat_xtra) msg_format("/邪計算後%d ", dam); | |
3947 | + } | |
3948 | + | |
3949 | + | |
3950 | + if (have_flag(flgs, TR_VORPAL)) | |
3951 | + { | |
3952 | + dam = dam * 1.21; | |
3953 | + if (cheat_xtra) msg_format("/切計算後%d ", dam); | |
3954 | + } | |
3955 | + | |
3956 | + dam = dam + o_ptr->to_d; | |
3957 | + if (cheat_xtra) msg_format("最終対邪%d ", dam); | |
3958 | + return(dam); | |
3959 | +} | |
3960 | + | |
3961 | +int suppression_evil_dam(object_type *o_ptr) | |
3962 | +{ | |
3963 | + int num = 0; | |
3964 | + u32b flgs[TR_FLAG_SIZE]; | |
3965 | + object_flags(o_ptr, flgs); | |
3966 | + | |
3967 | + if (o_ptr->art_flags, TR_VAMPIRIC) | |
3968 | + { | |
3969 | + if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 52)) | |
3970 | + { | |
3971 | + num = 1; | |
3972 | + } | |
3973 | + else if(have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 43)) | |
3974 | + { | |
3975 | + num = 1; | |
3976 | + } | |
3977 | + else if( have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 33)) | |
3978 | + { | |
3979 | + num = 1; | |
3980 | + } | |
3981 | + else if (calc_arm_avgdamage(o_ptr) > 63) | |
3982 | + { | |
3983 | + num = 1; | |
3984 | + } | |
3985 | + } | |
3986 | + else | |
3987 | + { | |
3988 | + if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 1) && (calc_arm_avgdamage(o_ptr) > 65)) | |
3989 | + { | |
3990 | + num = 1; | |
3991 | + } | |
3992 | + else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 2) && (calc_arm_avgdamage(o_ptr) > 52)) | |
3993 | + { | |
3994 | + num = 1; | |
3995 | + } | |
3996 | + else if (have_flag(flgs, TR_BLOWS) && (o_ptr->pval == 3) && (calc_arm_avgdamage(o_ptr) > 40)) | |
3997 | + { | |
3998 | + num = 1; | |
3999 | + } | |
4000 | + else if (calc_arm_avgdamage(o_ptr) > 75) | |
4001 | + { | |
4002 | + num = 1; | |
4003 | + } | |
4004 | + } | |
4005 | + return(num); | |
4006 | +} | |
4007 | + | |
4008 | +int weakening_artifact(object_type *o_ptr) | |
4009 | +{ | |
4010 | + int k_idx = lookup_kind(o_ptr->sval, o_ptr->tval); | |
4011 | + object_kind *k_ptr = &k_info[k_idx]; | |
4012 | + | |
4013 | + if ((k_info[k_idx].dd > o_ptr->dd) || (k_info[k_idx].ds > o_ptr->ds)) | |
4014 | + { | |
4015 | + if (o_ptr->dd > o_ptr->ds) | |
4016 | + { | |
4017 | + o_ptr->dd--; | |
4018 | + } | |
4019 | + else | |
4020 | + { | |
4021 | + o_ptr->ds--; | |
4022 | + } | |
4023 | + return 1; | |
4024 | + } | |
4025 | + | |
4026 | + if (o_ptr->to_d > 11) | |
4027 | + { | |
4028 | + o_ptr->to_d = o_ptr->to_d - damroll(1, 6); | |
4029 | + if (o_ptr->to_d < 10) | |
4030 | + { | |
4031 | + o_ptr->to_d = 10; | |
4032 | + } | |
4033 | + return 1; | |
4034 | + } | |
4035 | + return 0; | |
4036 | +} | |
\ No newline at end of file |
@@ -53,7 +53,7 @@ | ||
53 | 53 | #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */ |
54 | 54 | #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */ |
55 | 55 | #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */ |
56 | -#define FAKE_VER_EXTRA 47 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
56 | +#define FAKE_VER_EXTRA 48 /*!< ゲームのバージョン番号定義(エクストラ番号) */ | |
57 | 57 | |
58 | 58 | |
59 | 59 | /*! |