OSDN Git Service

[Refactor] #37287 #37353 型の置換。 / Type replacement.
authorDeskull <deskull@users.sourceforge.jp>
Tue, 13 Nov 2018 16:52:42 +0000 (01:52 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Tue, 13 Nov 2018 16:52:42 +0000 (01:52 +0900)
18 files changed:
src/cmd-spell.c
src/cmd-spell.h
src/externs.h
src/melee1.c
src/realm-arcane.c
src/realm-chaos.c
src/realm-craft.c
src/realm-crusade.c
src/realm-daemon.c
src/realm-death.c
src/realm-life.c
src/realm-nature.c
src/realm-song.c
src/realm-sorcery.c
src/realm-trump.c
src/spells2.c
src/z-rand.c
src/z-rand.h

index a0d6d03..9b8f065 100644 (file)
@@ -32,7 +32,7 @@
  * @param base 固定値\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_string_dice(cptr str, DICE_NUMBER dice, int sides, int base)\r
+cptr info_string_dice(cptr str, DICE_NUMBER dice, DICE_SID sides, int base)\r
 {\r
        /* Fix value */\r
        if (!dice)\r
@@ -55,7 +55,7 @@ cptr info_string_dice(cptr str, DICE_NUMBER dice, int sides, int base)
  * @param base 固定値\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_damage(DICE_NUMBER dice, int sides, int base)\r
+cptr info_damage(DICE_NUMBER dice, DICE_SID sides, int base)\r
 {\r
        return info_string_dice(_("損傷:", "dam "), dice, sides, base);\r
 }\r
@@ -66,7 +66,7 @@ cptr info_damage(DICE_NUMBER dice, int sides, int base)
  * @param sides ダイス目\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_duration(int base, int sides)\r
+cptr info_duration(int base, DICE_SID sides)\r
 {\r
        return format(_("期間:%d+1d%d", "dur %d+1d%d"), base, sides);\r
 }\r
@@ -88,7 +88,7 @@ cptr info_range(POSITION range)
  * @param base 固定値\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_heal(DICE_NUMBER dice, int sides, int base)\r
+cptr info_heal(DICE_NUMBER dice, DICE_SID sides, int base)\r
 {\r
        return info_string_dice(_("回復:", "heal "), dice, sides, base);\r
 }\r
@@ -99,7 +99,7 @@ cptr info_heal(DICE_NUMBER dice, int sides, int base)
  * @param sides ダイス目\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_delay(int base, int sides)\r
+cptr info_delay(int base, DICE_SID sides)\r
 {\r
        return format(_("遅延:%d+1d%d", "delay %d+1d%d"), base, sides);\r
 }\r
@@ -122,7 +122,7 @@ cptr info_multi_damage(HIT_POINT dam)
  * @param sides ダイス目\r
  * @return フォーマットに従い整形された文字列\r
  */\r
-cptr info_multi_damage_dice(DICE_NUMBER dice, int sides)\r
+cptr info_multi_damage_dice(DICE_NUMBER dice, DICE_SID sides)\r
 {\r
        return format(_("損傷:各%dd%d", "dam %dd%d each"), dice, sides);\r
 }\r
@@ -147,7 +147,7 @@ cptr info_power(int power)
 /*\r
  * Generate power info string such as "power 1d100"\r
  */\r
-cptr info_power_dice(DICE_NUMBER dice, int sides)\r
+cptr info_power_dice(DICE_NUMBER dice, DICE_SID sides)\r
 {\r
        return format(_("効力:%dd%d", "power %dd%d"), dice, sides);\r
 }\r
index fa7a700..24144a2 100644 (file)
@@ -1,13 +1,13 @@
 \r
-extern cptr info_string_dice(cptr str, DICE_NUMBER dice, int sides, int base);\r
-extern cptr info_damage(DICE_NUMBER dice, int sides, int base);\r
-extern cptr info_duration(int base, int sides);\r
+extern cptr info_string_dice(cptr str, DICE_NUMBER dice, DICE_SID sides, int base);\r
+extern cptr info_damage(DICE_NUMBER dice, DICE_SID sides, int base);\r
+extern cptr info_duration(int base, DICE_SID sides);\r
 extern cptr info_range(POSITION range);\r
-extern cptr info_heal(DICE_NUMBER dice, int sides, int base);\r
-extern cptr info_delay(int base, int sides);\r
+extern cptr info_heal(DICE_NUMBER dice, DICE_SID sides, int base);\r
+extern cptr info_delay(int base, DICE_SID sides);\r
 extern cptr info_multi_damage(HIT_POINT dam);\r
-extern cptr info_multi_damage_dice(DICE_NUMBER dice, int sides);\r
+extern cptr info_multi_damage_dice(DICE_NUMBER dice, DICE_SID sides);\r
 extern cptr info_power(int power);\r
-extern cptr info_power_dice(DICE_NUMBER dice, int sides);\r
+extern cptr info_power_dice(DICE_NUMBER dice, DICE_SID sides);\r
 extern cptr info_radius(POSITION rad);\r
 extern cptr info_weight(WEIGHT weight);\r
index ec2c60d..7021c5b 100644 (file)
@@ -1000,8 +1000,8 @@ extern void cast_shuffle(void);
 extern bool_hack life_stream(bool_hack message, bool_hack virtue);
 extern bool_hack heroism(int base);
 extern bool_hack berserk(int base);
-extern bool_hack cure_light_wounds(DICE_NUMBER dice, int sides);
-extern bool_hack cure_serious_wounds(DICE_NUMBER dice, int sides);
+extern bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides);
+extern bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides);
 extern bool_hack cure_critical_wounds(HIT_POINT pow);
 extern bool_hack true_healing(HIT_POINT pow);
 extern bool_hack restore_mana(bool_hack magic_eater);
index 0bad8e3..8b41721 100644 (file)
@@ -116,7 +116,7 @@ HIT_POINT critical_norm(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, BI
  * and which also do at least 20 damage, or, sometimes, N damage.
  * This is used only to determine "cuts" and "stuns".
  */
-static int monster_critical(DICE_NUMBER dice, int sides, HIT_POINT dam)
+static int monster_critical(DICE_NUMBER dice, DICE_SID sides, HIT_POINT dam)
 {
        int max = 0;
        int total = dice * sides;
index 2a7b52a..a495b09 100644 (file)
@@ -25,7 +25,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 3;
+                       DICE_SID sides = 3;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -106,7 +106,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = plev / 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -138,7 +138,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_light_wounds(dice, sides);
@@ -309,7 +309,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_serious_wounds(4, 8);
@@ -350,7 +350,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = 30;
+                       DICE_SID sides = 30;
                        int base = 20;
 
                        if (info) return info_damage(dice, sides, base);
@@ -370,7 +370,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 6;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -511,7 +511,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -529,7 +529,7 @@ cptr do_arcane_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
index 43740e5..a29cbe0 100644 (file)
@@ -29,7 +29,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + ((plev - 1) / 5);
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -64,7 +64,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = plev / 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = (plev / 10) + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -99,7 +99,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3;
-                       int sides = 5;
+                       DICE_SID sides = 5;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -132,7 +132,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 8 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -151,7 +151,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 8 + ((plev - 5) / 4);
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -203,7 +203,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 10 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -240,7 +240,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 11 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -296,7 +296,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 12;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (cast)
                        {
@@ -348,7 +348,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 5 + plev / 10;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -400,7 +400,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -461,7 +461,7 @@ cptr do_chaos_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 9 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
index 3705760..669a50a 100644 (file)
@@ -226,7 +226,7 @@ cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 3 * plev;
-                       int sides = 25;
+                       DICE_SID sides = 25;
 
                        if (info) return info_duration(base, sides);
 
@@ -272,7 +272,7 @@ cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
@@ -289,7 +289,7 @@ cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 30;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_duration(base, sides);
 
@@ -327,7 +327,7 @@ cptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = plev;
-                       int sides = 20 + plev;
+                       DICE_SID sides = 20 + plev;
 
                        if (info) return info_duration(base, sides);
 
index 2a57094..e8a128e 100644 (file)
@@ -27,7 +27,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("電撃のボルトもしくはビームを放つ。", "Fires a bolt or beam of lightning.");
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
                        if (info) return info_damage(dice, sides, 0);
                        if (cast)
                        {
@@ -100,7 +100,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 9;
-                       int sides = 2;
+                       DICE_SID sides = 2;
                        if (info) return info_multi_damage_dice(dice, sides);
                        if (cast)
                        {
@@ -172,7 +172,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与え、邪悪なモンスターを恐怖させる。",
                        "Damages all undead and demons in sight, and scares all evil monsters in sight.");
                {
-                       int sides = plev;
+                       DICE_SID sides = plev;
                        int power = plev;
                        if (info) return info_damage(1, sides, 0);
                        if (cast)
@@ -214,7 +214,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 3 * plev;
+                       DICE_SID sides = 3 * plev;
 
                        if (info) return info_duration(base, sides);
 
@@ -317,7 +317,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全てのアンデッド及び悪魔にダメージを与える。", "Damages all undead and demons in sight.");
 
                {
-                       int sides = plev * 4;
+                       DICE_SID sides = plev * 4;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -334,7 +334,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の全ての邪悪なモンスターにダメージを与える。", "Damages all evil monsters in sight.");
 
                {
-                       int sides = plev * 4;
+                       DICE_SID sides = plev * 4;
 
                        if (info) return info_damage(1, sides, 0);
 
@@ -456,7 +456,7 @@ cptr do_crusade_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 12;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (cast)
                        {
index 5ff2db7..71939c0 100644 (file)
@@ -28,7 +28,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -115,7 +115,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 6 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -150,7 +150,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3;
-                       int sides = 6;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -227,7 +227,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 11 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -308,7 +308,7 @@ cptr do_daemon_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 30;
-                       int sides = 25;
+                       DICE_SID sides = 25;
 
                        if (info) return info_duration(base, sides);
 
index ec18b73..af388f2 100644 (file)
@@ -47,7 +47,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
                        POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -197,7 +197,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 3;
-                       int sides = 6;
+                       DICE_SID sides = 6;
                        POSITION rad = (plev < 30) ? 2 : 3;
                        int base;
 
@@ -224,7 +224,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 8 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -291,7 +291,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = plev * 2;
+                       DICE_SID sides = plev * 2;
                        int base = plev * 2;
 
                        if (info) return info_damage(dice, sides, base);
@@ -397,7 +397,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 4 + (plev - 5) / 4;
-                       int sides = 8;
+                       DICE_SID sides = 8;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -474,7 +474,7 @@ cptr do_death_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("視界内の生命のあるモンスターにダメージを与える。", "Damages all living monsters in sight.");
 
                {
-                       int sides = plev * 3;
+                       DICE_SID sides = plev * 3;
 
                        if (info) return info_damage(1, sides, 0);
 
index 411c12c..78835b3 100644 (file)
@@ -24,7 +24,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("怪我と体力を少し回復させる。", "Heals cut and HP a little.");
                {
                        DICE_NUMBER dice = 2;
-                       int sides = 10;
+                       DICE_SID sides = 10;
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_light_wounds(dice, sides);                 
                }
@@ -50,7 +50,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("1体のモンスターに小ダメージを与える。抵抗されると無効。", "Wounds a monster a little unless resisted.");
                {
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -67,7 +67,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("光源が照らしている範囲か部屋全体を永久に明るくする。", "Lights up nearby area and the inside of a room permanently.");
                {
                        DICE_NUMBER dice = 2;
-                       int sides = plev / 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -101,7 +101,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("怪我と体力を中程度回復させる。", "Heals cut and HP more.");
                {
                        DICE_NUMBER dice = 4;
-                       int sides = 10;
+                       DICE_SID sides = 10;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_serious_wounds(dice, sides);
@@ -142,7 +142,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (name) return _("重傷", "Cause Medium Wounds");
                if (desc) return _("1体のモンスターに中ダメージを与える。抵抗されると無効。", "Wounds a monster unless resisted.");
                {
-                       int sides = 8 + (plev - 5) / 4;
+                       DICE_SID sides = 8 + (plev - 5) / 4;
                        DICE_NUMBER dice = 8;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -160,7 +160,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("体力を大幅に回復させ、負傷と朦朧状態も全快する。", "Heals cut, stun and HP greatly.");
                {
                        DICE_NUMBER dice = 8;
-                       int sides = 10;
+                       DICE_SID sides = 10;
 
                        if (info) return info_heal(dice, sides, 0);
                        if (cast) (void)cure_critical_wounds(damroll(dice, sides));
@@ -263,7 +263,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = plev * 5;
+                       DICE_SID sides = plev * 5;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -296,7 +296,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 5 + (plev - 5) / 3;
-                       int sides = 15;
+                       DICE_SID sides = 15;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -314,7 +314,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -331,7 +331,7 @@ cptr do_life_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
index 6f51f35..ca87ef8 100644 (file)
@@ -45,7 +45,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 3 + (plev - 1) / 5;\r
-                       int sides = 4;\r
+                       DICE_SID sides = 4;\r
                        POSITION range = plev / 6 + 2;\r
 \r
                        if (info) return format("%s%dd%d %s%d", s_dam, dice, sides, s_rng, range);\r
@@ -104,7 +104,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 2;\r
-                       int sides = plev / 2;\r
+                       DICE_SID sides = plev / 2;\r
                        POSITION rad = (plev / 10) + 1;\r
 \r
                        if (info) return info_damage(dice, sides, 0);\r
@@ -165,7 +165,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 2;\r
-                       int sides = 8;\r
+                       DICE_SID sides = 8;\r
 \r
                        if (info) return info_heal(dice, sides, 0);\r
 \r
@@ -184,7 +184,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 1;\r
-                       int sides = 30;\r
+                       DICE_SID sides = 30;\r
                        int base = 20;\r
 \r
                        if (info) return info_damage(dice, sides, base);\r
@@ -204,7 +204,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 3 + (plev - 5) / 4;\r
-                       int sides = 8;\r
+                       DICE_SID sides = 8;\r
 \r
                        if (info) return info_damage(dice, sides, 0);\r
 \r
@@ -244,7 +244,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 5 + (plev - 5) / 4;\r
-                       int sides = 8;\r
+                       DICE_SID sides = 8;\r
 \r
                        if (info) return info_damage(dice, sides, 0);\r
 \r
@@ -262,7 +262,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        DICE_NUMBER dice = 6;\r
-                       int sides = 8;\r
+                       DICE_SID sides = 8;\r
 \r
                        if (info) return info_damage(dice, sides, 0);\r
 \r
@@ -329,7 +329,7 @@ cptr do_nature_spell(SPELL_IDX spell, BIT_FLAGS mode)
 \r
                {\r
                        int base = 20;\r
-                       int sides = 30;\r
+                       DICE_SID sides = 30;\r
 \r
                        if (info) return info_duration(base, sides);\r
 \r
index 6e6646d..ace0d8f 100644 (file)
@@ -141,7 +141,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 4 + (plev - 1) / 5;
-                       int sides = 4;
+                       DICE_SID sides = 4;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -169,7 +169,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = plev / 10;
-                       int sides = 2;
+                       DICE_SID sides = 2;
 
                        if (info) return info_power_dice(dice, sides);
 
@@ -196,7 +196,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = 6;
+                       DICE_SID sides = 6;
 
                        if (info) return info_heal(dice, sides, 0);
 
@@ -217,7 +217,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = plev / 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -364,7 +364,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = plev * 3 / 2;
+                       DICE_SID sides = plev * 3 / 2;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -470,7 +470,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 10 + plev / 5;
-                       int sides = 7;
+                       DICE_SID sides = 7;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -513,7 +513,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 10 + plev / 15;
-                       int sides = 6;
+                       DICE_SID sides = 6;
 
                        if (info) return info_power_dice(dice, sides);
 
@@ -700,7 +700,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 15 + (plev - 1) / 2;
-                       int sides = 10;
+                       DICE_SID sides = 10;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -722,7 +722,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -845,7 +845,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 1;
-                       int sides = plev * 3;
+                       DICE_SID sides = plev * 3;
 
                        if (info) return info_damage(dice, sides, 0);
 
@@ -871,7 +871,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 15;
-                       int sides = 10;
+                       DICE_SID sides = 10;
 
                        if (info) return info_heal(dice, sides, 0);
 
@@ -909,7 +909,7 @@ cptr do_music_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 50 + plev;
-                       int sides = 10;
+                       DICE_SID sides = 10;
                        POSITION rad = 0;
 
                        if (info) return info_damage(dice, sides, 0);
index d76a14d..7951151 100644 (file)
@@ -76,7 +76,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 2;
-                       int sides = plev / 2;
+                       DICE_SID sides = plev / 2;
                        POSITION rad = plev / 10 + 1;
 
                        if (info) return info_damage(dice, sides, 0);
@@ -242,7 +242,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = plev;
-                       int sides = 20 + plev;
+                       DICE_SID sides = 20 + plev;
 
                        if (info) return info_duration(base, sides);
 
@@ -324,7 +324,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
@@ -380,7 +380,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
@@ -428,7 +428,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        DICE_NUMBER dice = 7;
-                       int sides = 7;
+                       DICE_SID sides = 7;
                        int base = plev;
 
                        if (info) return info_damage(dice, sides, base);
@@ -465,7 +465,7 @@ cptr do_sorcery_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
index f894d0a..9081bb3 100644 (file)
@@ -105,7 +105,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 25;
-                       int sides = 30;
+                       DICE_SID sides = 30;
 
                        if (info) return info_duration(base, sides);
 
@@ -292,7 +292,7 @@ cptr do_trump_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                {
                        int base = 15;
-                       int sides = 20;
+                       DICE_SID sides = 20;
 
                        if (info) return info_delay(base, sides);
 
index fa0502b..2e164cc 100644 (file)
@@ -5022,7 +5022,7 @@ bool_hack berserk(int base)
        return ident;
 }
 
-bool_hack cure_light_wounds(DICE_NUMBER dice, int sides)
+bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
 {
        bool_hack ident = FALSE;
        if (hp_player(damroll(dice, sides))) ident = TRUE;
@@ -5032,7 +5032,7 @@ bool_hack cure_light_wounds(DICE_NUMBER dice, int sides)
        return ident;
 }
 
-bool_hack cure_serious_wounds(DICE_NUMBER dice, int sides)
+bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
 {
        bool_hack ident = FALSE;
        if (hp_player(damroll(dice, sides))) ident = TRUE;
index 258aa67..3a6d6bc 100644 (file)
@@ -401,7 +401,7 @@ s16b randnor(int mean, int stand)
 /*
  * Generates damage for "2d6" style dice rolls
  */
-s16b damroll(int num, int sides)
+s16b damroll(DICE_NUMBER num, DICE_SID sides)
 {
        int i, sum = 0;
        for (i = 0; i < num; i++) sum += randint1(sides);
@@ -412,7 +412,7 @@ s16b damroll(int num, int sides)
 /*
  * Same as above, but always maximal
  */
-s16b maxroll(int num, int sides)
+s16b maxroll(DICE_NUMBER num, DICE_SID sides)
 {
        return (num * sides);
 }
index a002d18..8b8801c 100644 (file)
@@ -95,8 +95,8 @@ extern void Rand_state_backup(u32b* backup_state);
 extern void Rand_state_restore(u32b* backup_state);
 extern s32b Rand_div(s32b m);
 extern s16b randnor(int mean, int stand);
-extern s16b damroll(int num, int sides);
-extern s16b maxroll(int num, int sides);
+extern s16b damroll(int num, DICE_SID sides);
+extern s16b maxroll(int num, DICE_SID sides);
 extern s32b div_round(s32b n, s32b d);
 extern s32b Rand_external(s32b m);