From f15d8139a9a3dc7760aab7bec243eeeef525c70a Mon Sep 17 00:00:00 2001 From: deskull Date: Tue, 7 Aug 2012 04:29:58 +0000 Subject: [PATCH] =?utf8?q?=E3=83=A2=E3=83=B3=E3=82=B9=E3=82=BF=E3=83=BC?= =?utf8?q?=E3=81=AE=E7=94=9F=E6=88=90=E9=9A=8E=E5=B1=A4=E3=83=96=E3=83=BC?= =?utf8?q?=E3=82=B9=E3=83=88=E6=8C=87=E5=90=91=E3=81=8C=EF=BC=92=E9=87=8D?= =?utf8?q?=E3=81=AB=E3=81=AA=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=9F?= =?utf8?q?=E3=82=81=E3=80=81=E3=80=8C=E5=AE=9F=E8=B3=AA=E6=82=AA=E5=A4=A2?= =?utf8?q?=E3=83=A2=E3=83=BC=E3=83=89=E6=99=82=E6=84=8F=E5=A4=96=E3=81=AE?= =?utf8?q?=E6=B7=B1=E5=B1=A4=E7=94=9F=E6=88=90=E7=A2=BA=E7=8E=87=E3=81=8C?= =?utf8?q?=E5=80=8D=EF=BC=8B=E3=81=95=E3=82=89=E3=81=AB=E4=BD=8E=E7=A2=BA?= =?utf8?q?=E7=8E=87=E3=81=A7=EF=BC=92=E9=87=8D=E3=83=96=E3=83=BC=E3=82=B9?= =?utf8?q?=E3=83=88=E3=81=8B=E3=81=8B=E3=82=8B=E5=8F=AF=E8=83=BD=E6=80=A7?= =?utf8?q?=E3=80=8D=E3=81=A7=E3=81=82=E3=81=A3=E3=81=9F=E7=8A=B6=E6=85=8B?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=80=82=20DEFINE=E4=B8=8A=E3=81=A7?= =?utf8?q?=E6=98=8E=E8=A8=98=E3=81=97=E3=81=9F=E7=94=9F=E6=88=90=E7=A2=BA?= =?utf8?q?=E7=8E=87=E3=82=92=E5=AE=9F=E8=B3=AA=E5=80=8D=E3=81=AB=E3=81=97?= =?utf8?q?=E3=80=81=E3=83=96=E3=83=BC=E3=82=B9=E3=83=88=E3=81=AE=E9=99=90?= =?utf8?q?=E7=95=8C=E5=80=A4=E3=82=92=E8=8B=A5=E5=B9=B2=E4=B8=8A=E3=81=92?= =?utf8?q?=E3=81=A6=E3=80=81=E3=81=AA=E3=82=8B=E3=81=B9=E3=81=8F=E5=85=83?= =?utf8?q?=E3=81=AE=E3=81=BE=E3=81=BE=E3=81=AE=E3=83=90=E3=83=A9=E3=83=B3?= =?utf8?q?=E3=82=B9=E3=81=8B=E3=81=A4=E3=80=81=E7=9B=B4=E6=84=9F=E7=9A=84?= =?utf8?q?=E3=81=AB=E5=88=86=E3=81=8B=E3=82=8A=E3=82=84=E3=81=99=E3=81=84?= =?utf8?q?=E5=BD=A2=E3=81=AB=E7=9B=B4=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/defines.h | 6 +++--- src/monster2.c | 23 ++--------------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/defines.h b/src/defines.h index ad7b20850..055682b1d 100644 --- a/src/defines.h +++ b/src/defines.h @@ -628,13 +628,13 @@ #define GREAT_OBJ 10 /* - * There is a 1/50 (2%) chance of inflating the requested monster_level + * There is a 1/25 (4%) chance of inflating the requested monster_level * during the creation of a monsters (see "get_mon_num()" in "monster.c"). * Lower values yield harder monsters more often. */ -#define NASTY_MON_BASE 50 /* 1/chance of inflated monster level */ +#define NASTY_MON_BASE 25 #define NASTY_MON_MAX 3 -#define NASTY_MON_PLUS_MAX 20 +#define NASTY_MON_PLUS_MAX 25 /* 1/x chance of hurting even if invulnerable! */ #define PENETRATE_INVULNERABILITY 13 diff --git a/src/monster2.c b/src/monster2.c index a0290ef81..bef1212ae 100644 --- a/src/monster2.c +++ b/src/monster2.c @@ -1253,13 +1253,9 @@ static int mysqrt(int n) s16b get_mon_num(int level) { int i, j, p; - int r_idx; - long value, total; - monster_race *r_ptr; - alloc_entry *table = alloc_race_table; int pls_kakuritu, pls_level; @@ -1268,7 +1264,7 @@ s16b get_mon_num(int level) if (level > MAX_DEPTH - 1) level = MAX_DEPTH - 1; pls_kakuritu = MAX(NASTY_MON_MAX, NASTY_MON_BASE - ((dungeon_turn / (TURNS_PER_TICK * 2500L) - hoge / 10))); - pls_level = MIN(NASTY_MON_PLUS_MAX, 3 + dungeon_turn / (TURNS_PER_TICK * 20000L) - hoge / 40); + pls_level = MIN(NASTY_MON_PLUS_MAX, 3 + dungeon_turn / (TURNS_PER_TICK * 20000L) - hoge / 40 + MIN(5, level / 10)) ; if (d_info[dungeon_type].flags1 & DF1_MAZE) { @@ -1293,20 +1289,7 @@ s16b get_mon_num(int level) if (!randint0(pls_kakuritu)) { /* Pick a level bonus */ - int d = MIN(5, level / 10) + pls_level; - - /* Boost the level */ - level += d; - } - - /* Occasional "nasty" monster */ - if (!randint0(pls_kakuritu)) - { - /* Pick a level bonus */ - int d = MIN(5, level / 10) + pls_level; - - /* Boost the level */ - level += d; + level += pls_level; } } } @@ -1362,7 +1345,6 @@ s16b get_mon_num(int level) /* No legal monsters */ if (total <= 0) return (0); - /* Pick a monster */ value = randint0(total); @@ -1376,7 +1358,6 @@ s16b get_mon_num(int level) value = value - table[i].prob3; } - /* Power boost */ p = randint0(100); -- 2.11.0