変愚蛮怒のメインリポジトリです
Revision | 9b6497cb053839e0b632be11ab666474c4780a1e (tree) |
---|---|
Time | 2019-01-14 21:46:46 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
Merge remote-tracking branch 'remotes/origin/MERFOLK'
# Conflicts:
# src/cmd-pet.c
# src/cmd1.c
@@ -496,8 +496,8 @@ B:$0:A:3:request Quest:0:0:q:6:0 | ||
496 | 496 | B:0:A:3:クエスト:0:0:q:6:0 |
497 | 497 | B:$0:A:4:Teleport to other town:500:500:m:42:0 |
498 | 498 | B:0:A:4:他の町へ移動:500:500:m:42:0 |
499 | -B:$0:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
500 | -B:0:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
499 | +B:$0:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
500 | +B:0:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
501 | 501 | |
502 | 502 | B:$1:N:Mayor:Uldrik:Human |
503 | 503 | B:1:N:村長:ウルドリック:人間 |
@@ -321,8 +321,8 @@ B:$4:A:2:Listen for rumors:10:10:u:19:0 | ||
321 | 321 | B:4:A:2:噂を聞く:10:10:u:19:0 |
322 | 322 | B:$4:A:3:Teleport to other town:500:500:m:42:0 |
323 | 323 | B:4:A:3:他の町へ移動:500:500:m:42:0 |
324 | -B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
325 | -B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
324 | +B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
325 | +B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
326 | 326 | |
327 | 327 | B:$5:N:Beastmaster:Lorien:Elf |
328 | 328 | B:5:N:モンスター仙人:ロリエン:エルフ |
@@ -264,8 +264,8 @@ B:$4:A:2:Listen for rumors:10:10:u:19:0 | ||
264 | 264 | B:4:A:2:噂を聞く:10:10:u:19:0 |
265 | 265 | B:$4:A:3:Teleport to other town:500:500:m:42:0 |
266 | 266 | B:4:A:3:他の町へ移動:500:500:m:42:0 |
267 | -B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
268 | -B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
267 | +B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
268 | +B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
269 | 269 | |
270 | 270 | B:$5:N:Beastmaster:Draxle:Draconian |
271 | 271 | B:5:N:モンスター仙人:ドラクスル:ドラコニアン |
@@ -171,8 +171,8 @@ B:$4:A:2:Listen for rumors:10:10:u:19:0 | ||
171 | 171 | B:4:A:2:噂を聞く:10:10:u:19:0 |
172 | 172 | B:$4:A:3:Teleport to other town:500:500:m:42:0 |
173 | 173 | B:4:A:3:他の町へ移動:500:500:m:42:0 |
174 | -B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
175 | -B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
174 | +B:$4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
175 | +B:4:R:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
176 | 176 | |
177 | 177 | B:$5:N:Beastmaster:Aradreth:Elf |
178 | 178 | B:5:N:モンスター仙人:アラドレス:エルフ |
@@ -252,8 +252,8 @@ B:$13:A:0:Recall to dungeon:0:150:r:33:0 | ||
252 | 252 | B:13:A:0:ダンジョンへ帰還:0:150:r:33:0 |
253 | 253 | B:$13:A:1:Teleport to dungeon-level:100000:1000000:t:34:0 |
254 | 254 | B:13:A:1:階を指定してテレポート:100000:1000000:t:34:0 |
255 | -B:$13:R:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | |
256 | -B:13:R:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | |
255 | +B:$13:R:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | |
256 | +B:13:R:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0 | |
257 | 257 | B:$13:M:0:0:0:0:0:2:0:0:0:0 |
258 | 258 | B:13:M:0:0:0:0:0:2:0:0:0:0 |
259 | 259 |
@@ -128,8 +128,8 @@ B:$4:A:1:Buy food and drink:2:2:f:18:1 | ||
128 | 128 | B:4:A:1:食事をする:2:2:f:18:1 |
129 | 129 | B:$4:A:2:Listen for rumors:10:10:u:19:0 |
130 | 130 | B:4:A:2:噂を聞く:10:10:u:19:0 |
131 | -B:$4:R:2:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
132 | -B:4:R:2:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0 | |
131 | +B:$4:R:2:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
132 | +B:4:R:2:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:1:0:0:0:0:0:1:1:0:1:0:1:1:1:0:1 | |
133 | 133 | B:$4:A:3:Identify item:100:100:i:44:0 |
134 | 134 | B:4:A:3:アイテム鑑定:100:100:i:44:0 |
135 | 135 |
@@ -152,8 +152,8 @@ B:$14:A:0:Request quest:0:0:q:6:1 | ||
152 | 152 | B:14:A:0:クエスト:0:0:q:6:1 |
153 | 153 | B:$14:A:1:Cure mutation:1000:5000:m:35:0 |
154 | 154 | B:14:A:1:突然変異を治療する:1000:5000:m:35:0 |
155 | -B:$14:R:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0 | |
156 | -B:14:R:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0 | |
155 | +B:$14:R:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0 | |
156 | +B:14:R:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:1:0:0:0:0:0:0:0:0 | |
157 | 157 | B:$14:M:0:0:0:2:0:0:0:0:0:0 |
158 | 158 | B:14:M:0:0:0:2:0:0:0:0:0:0 |
159 | 159 |
@@ -119,7 +119,9 @@ static concptr race_jouhou[MAX_RACES] = | ||
119 | 119 | |
120 | 120 | "クターとしている無表情の謎の生物です。彼らは外見がかわいらしいため、魅力が高いです。彼らは混乱しません。なぜなら、混乱してもクターとしているため変わりないからです。しかも、そのクターとしている外見から敵に見つかりにくいです。しかし、彼らは注意力が少ないため探索や知覚能力は悪いです。彼らはレベルが上がると横に伸びてACを上げる技を覚えますが、伸びている間は魔法防御能力は低くなってしまいます。", |
121 | 121 | |
122 | -"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。" | |
122 | +"アンドロイドは機械の身体を持つ人工的な存在です。魔法をうまく使うことはできませんが、戦士としては非常に優れています。彼らは他の種族のように経験値を得て成長するということはありません。身体に身につける装備によって成長します。ただし、指輪、アミュレット、光源は成長に影響しません。彼らは毒の耐性を持ち、麻痺知らずで、生命力を吸収されることがありません。また、身体が頑丈なのでACにボーナスを得ます。しかし身体のいたるところに電子回路が組み込まれているため、電撃によって通常よりも大きなダメージを受けてしまいます。彼らは食物からほとんど動力を得られませんが、油を補給する事で動力源を得る事ができます。", | |
123 | + | |
124 | +"マーフォーク実装中", | |
123 | 125 | |
124 | 126 | #else |
125 | 127 |
@@ -197,6 +199,8 @@ static concptr race_jouhou[MAX_RACES] = | ||
197 | 199 | |
198 | 200 | "An android is a artificial creation with a body of machinery. They are poor at spell casting, but they make excellent warriors. They don't acquire experience like other races, but rather gain in power as they attach new equipment to their frame. Rings, amulets, and lights do not influence growth. Androids are resistant to poison, can move freely, and are immune to exp-draining attacks. Moreover, because of their hard metallic bodies, they get a bonus to AC. Androids have electronic circuits throughout their body and must beware of electric shocks. They gain very little nutrition from the food of mortals, but they can use flasks of oil as their energy source." |
199 | 201 | |
202 | +"Merfolk implementing.", | |
203 | + | |
200 | 204 | #endif |
201 | 205 | }; |
202 | 206 |
@@ -1228,6 +1232,7 @@ static void get_history(void) | ||
1228 | 1232 | case RACE_HUMAN: |
1229 | 1233 | case RACE_BARBARIAN: |
1230 | 1234 | case RACE_DUNADAN: |
1235 | + case RACE_MERFOLK: | |
1231 | 1236 | { |
1232 | 1237 | chart = 1; |
1233 | 1238 | break; |
@@ -2318,6 +2323,13 @@ void player_outfit(void) | ||
2318 | 2323 | } |
2319 | 2324 | q_ptr = &forge; |
2320 | 2325 | |
2326 | + if (p_ptr->prace == RACE_MERFOLK) | |
2327 | + { | |
2328 | + object_prep(q_ptr, lookup_kind(TV_RING, SV_RING_LEVITATION_FALL)); | |
2329 | + q_ptr->number = 1; | |
2330 | + add_outfit(q_ptr); | |
2331 | + } | |
2332 | + | |
2321 | 2333 | if ((p_ptr->pclass == CLASS_RANGER) || (p_ptr->pclass == CLASS_CAVALRY)) |
2322 | 2334 | { |
2323 | 2335 | /* Hack -- Give the player some arrows */ |
@@ -1150,7 +1150,6 @@ bool rakuba(HIT_POINT dam, bool force) | ||
1150 | 1150 | |
1151 | 1151 | |
1152 | 1152 | p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON); |
1153 | - | |
1154 | 1153 | p_ptr->redraw |= (PR_EXTRA); |
1155 | 1154 | |
1156 | 1155 | /* Update health track of mount */ |
@@ -823,14 +823,15 @@ bool player_can_enter(FEAT_IDX feature, BIT_FLAGS16 mode) | ||
823 | 823 | */ |
824 | 824 | bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode) |
825 | 825 | { |
826 | + POSITION oy = p_ptr->y; | |
827 | + POSITION ox = p_ptr->x; | |
826 | 828 | cave_type *c_ptr = &cave[ny][nx]; |
829 | + cave_type *oc_ptr = &cave[oy][ox]; | |
827 | 830 | feature_type *f_ptr = &f_info[c_ptr->feat]; |
831 | + feature_type *of_ptr = &f_info[oc_ptr->feat]; | |
828 | 832 | |
829 | 833 | if (!(mpe_mode & MPE_STAYING)) |
830 | 834 | { |
831 | - POSITION oy = p_ptr->y; | |
832 | - POSITION ox = p_ptr->x; | |
833 | - cave_type *oc_ptr = &cave[oy][ox]; | |
834 | 835 | MONSTER_IDX om_idx = oc_ptr->m_idx; |
835 | 836 | MONSTER_IDX nm_idx = c_ptr->m_idx; |
836 | 837 |
@@ -899,6 +900,14 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode) | ||
899 | 900 | msg_print(_("ここでは素早く動けない。", "You cannot run in here.")); |
900 | 901 | set_action(ACTION_NONE); |
901 | 902 | } |
903 | + if (p_ptr->prace == RACE_MERFOLK) | |
904 | + { | |
905 | + if(have_flag(f_ptr->flags, FF_WATER) ^ have_flag(of_ptr->flags, FF_WATER)) | |
906 | + { | |
907 | + p_ptr->update |= PU_BONUS; | |
908 | + update_creature(p_ptr); | |
909 | + } | |
910 | + } | |
902 | 911 | } |
903 | 912 | |
904 | 913 | if (mpe_mode & MPE_ENERGY_USE) |
@@ -670,11 +670,12 @@ | ||
670 | 670 | #define RACE_S_FAIRY 34 |
671 | 671 | #define RACE_KUTAR 35 |
672 | 672 | #define RACE_ANDROID 36 |
673 | +#define RACE_MERFOLK 37 | |
673 | 674 | |
674 | 675 | /* |
675 | 676 | * Maximum number of player "race" types (see "table.c", etc) |
676 | 677 | */ |
677 | -#define MAX_RACES 37 | |
678 | +#define MAX_RACES 38 | |
678 | 679 | |
679 | 680 | |
680 | 681 | /* |
@@ -1650,7 +1650,7 @@ static void process_world_aux_hp_and_sp(void) | ||
1650 | 1650 | } |
1651 | 1651 | |
1652 | 1652 | if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) && |
1653 | - !p_ptr->levitation && !p_ptr->can_swim) | |
1653 | + !p_ptr->levitation && !p_ptr->can_swim && !p_ptr->resist_water) | |
1654 | 1654 | { |
1655 | 1655 | if (p_ptr->total_weight > weight_limit()) |
1656 | 1656 | { |
@@ -3752,7 +3752,7 @@ static errr parse_line_feature(char *buf) | ||
3752 | 3752 | static errr parse_line_building(char *buf) |
3753 | 3753 | { |
3754 | 3754 | int i; |
3755 | - char *zz[37]; | |
3755 | + char *zz[1000]; | |
3756 | 3756 | int index; |
3757 | 3757 | char *s; |
3758 | 3758 |
@@ -3838,11 +3838,13 @@ static errr parse_line_building(char *buf) | ||
3838 | 3838 | /* Building Classes */ |
3839 | 3839 | case 'C': |
3840 | 3840 | { |
3841 | - if (tokenize(s + 2, MAX_CLASS, zz, 0) == MAX_CLASS) | |
3841 | + int n; | |
3842 | + n = tokenize(s + 2, MAX_CLASS, zz, 0); | |
3843 | + if (n <= MAX_CLASS) | |
3842 | 3844 | { |
3843 | 3845 | for (i = 0; i < MAX_CLASS; i++) |
3844 | - { | |
3845 | - building[index].member_class[i] = (CLASS_IDX)atoi(zz[i]); | |
3846 | + { | |
3847 | + building[index].member_class[i] = ((i > n) ? (CLASS_IDX)atoi(zz[i]) : 1); | |
3846 | 3848 | } |
3847 | 3849 | |
3848 | 3850 | break; |
@@ -3854,11 +3856,13 @@ static errr parse_line_building(char *buf) | ||
3854 | 3856 | /* Building Races */ |
3855 | 3857 | case 'R': |
3856 | 3858 | { |
3857 | - if (tokenize(s+2, MAX_RACES, zz, 0) == MAX_RACES) | |
3859 | + int n; | |
3860 | + n = tokenize(s + 2, MAX_RACES, zz, 0); | |
3861 | + if (n <= MAX_RACES) | |
3858 | 3862 | { |
3859 | 3863 | for (i = 0; i < MAX_RACES; i++) |
3860 | 3864 | { |
3861 | - building[index].member_race[i] = (RACE_IDX)atoi(zz[i]); | |
3865 | + building[index].member_race[i] = ((i > n) ? (RACE_IDX)atoi(zz[i]) : 1); | |
3862 | 3866 | } |
3863 | 3867 | |
3864 | 3868 | break; |
@@ -3870,11 +3874,13 @@ static errr parse_line_building(char *buf) | ||
3870 | 3874 | /* Building Realms */ |
3871 | 3875 | case 'M': |
3872 | 3876 | { |
3873 | - if (tokenize(s+2, MAX_MAGIC, zz, 0) == MAX_MAGIC) | |
3877 | + int n; | |
3878 | + n = tokenize(s + 2, MAX_MAGIC, zz, 0); | |
3879 | + if (n <= MAX_MAGIC) | |
3874 | 3880 | { |
3875 | 3881 | for (i = 0; i < MAX_MAGIC; i++) |
3876 | 3882 | { |
3877 | - building[index].member_realm[i+1] = (REALM_IDX)atoi(zz[i]); | |
3883 | + building[index].member_realm[i+1] = ((i > n) ? (REALM_IDX)atoi(zz[i]) : 1); | |
3878 | 3884 | } |
3879 | 3885 | |
3880 | 3886 | break; |
@@ -5400,19 +5400,21 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI | ||
5400 | 5400 | if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!")); |
5401 | 5401 | if (!CHECK_MULTISHADOW()) |
5402 | 5402 | { |
5403 | - if (!p_ptr->resist_sound) | |
5403 | + if (!p_ptr->resist_sound && !p_ptr->resist_water) | |
5404 | 5404 | { |
5405 | 5405 | set_stun(p_ptr->stun + randint1(40)); |
5406 | 5406 | } |
5407 | - if (!p_ptr->resist_conf) | |
5407 | + if (!p_ptr->resist_conf && !p_ptr->resist_water) | |
5408 | 5408 | { |
5409 | 5409 | set_confused(p_ptr->confused + randint1(5) + 5); |
5410 | 5410 | } |
5411 | 5411 | |
5412 | - if (one_in_(5)) | |
5412 | + if (one_in_(5) && !p_ptr->resist_water) | |
5413 | 5413 | { |
5414 | 5414 | inven_damage(set_cold_destroy, 3); |
5415 | 5415 | } |
5416 | + | |
5417 | + if (p_ptr->resist_water) get_damage /= 4; | |
5416 | 5418 | } |
5417 | 5419 | |
5418 | 5420 | get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell); |
@@ -2768,6 +2768,22 @@ const player_race race_info[MAX_RACES] = | ||
2768 | 2768 | 0, |
2769 | 2769 | 0x0800001, |
2770 | 2770 | }, |
2771 | + { | |
2772 | +#ifdef JP | |
2773 | + "マーフォーク", | |
2774 | +#endif | |
2775 | + "Merfolk", | |
2776 | + | |
2777 | + { -1, 0, 2, 1, -1, 1}, | |
2778 | + 2, 3, 2, 1, 6, 11, -1, 5, | |
2779 | + 10, 130, | |
2780 | + 24, 16, | |
2781 | + 66, 6, 130, 15, | |
2782 | + 62, 6, 100, 10, | |
2783 | + 2, | |
2784 | + 0xE77E7FF, | |
2785 | + }, | |
2786 | + | |
2771 | 2787 | }; |
2772 | 2788 | |
2773 | 2789 |
@@ -1358,6 +1358,7 @@ struct player_type | ||
1358 | 1358 | bool resist_neth; /* Resist nether */ |
1359 | 1359 | bool resist_fear; /* Resist fear */ |
1360 | 1360 | bool resist_time; /* Resist time */ |
1361 | + bool resist_water; /* Resist water */ | |
1361 | 1362 | |
1362 | 1363 | bool reflect; /* Reflect 'bolt' attacks */ |
1363 | 1364 | bool sh_fire; /* Fiery 'immolation' effect */ |
@@ -3079,22 +3079,22 @@ s16b calc_num_fire(object_type *o_ptr) | ||
3079 | 3079 | */ |
3080 | 3080 | void calc_bonuses(void) |
3081 | 3081 | { |
3082 | - int i, j, hold, neutral[2]; | |
3083 | - int new_speed; | |
3084 | - int default_hand = 0; | |
3085 | - int empty_hands_status = empty_hands(TRUE); | |
3086 | - int extra_blows[2]; | |
3087 | - object_type *o_ptr; | |
3082 | + int i, j, hold, neutral[2]; | |
3083 | + int new_speed; | |
3084 | + int default_hand = 0; | |
3085 | + int empty_hands_status = empty_hands(TRUE); | |
3086 | + int extra_blows[2]; | |
3087 | + object_type *o_ptr; | |
3088 | 3088 | BIT_FLAGS flgs[TR_FLAG_SIZE]; |
3089 | - bool omoi = FALSE; | |
3090 | - bool yoiyami = FALSE; | |
3091 | - bool down_saving = FALSE; | |
3089 | + bool omoi = FALSE; | |
3090 | + bool yoiyami = FALSE; | |
3091 | + bool down_saving = FALSE; | |
3092 | 3092 | #if 0 |
3093 | - bool have_dd_s = FALSE, have_dd_t = FALSE; | |
3093 | + bool have_dd_s = FALSE, have_dd_t = FALSE; | |
3094 | 3094 | #endif |
3095 | - bool have_sw = FALSE, have_kabe = FALSE; | |
3096 | - bool easy_2weapon = FALSE; | |
3097 | - bool riding_levitation = FALSE; | |
3095 | + bool have_sw = FALSE, have_kabe = FALSE; | |
3096 | + bool easy_2weapon = FALSE; | |
3097 | + bool riding_levitation = FALSE; | |
3098 | 3098 | OBJECT_IDX this_o_idx, next_o_idx = 0; |
3099 | 3099 | const player_race *tmp_rp_ptr; |
3100 | 3100 |
@@ -3115,9 +3115,12 @@ void calc_bonuses(void) | ||
3115 | 3115 | bool old_see_inv = p_ptr->see_inv; |
3116 | 3116 | bool old_mighty_throw = p_ptr->mighty_throw; |
3117 | 3117 | |
3118 | + /* Current feature under player. */ | |
3119 | + feature_type *f_ptr = &f_info[cave[p_ptr->y][p_ptr->x].feat]; | |
3120 | + | |
3118 | 3121 | /* Save the old armor class */ |
3119 | - s16b old_dis_ac = p_ptr->dis_ac; | |
3120 | - s16b old_dis_to_a = p_ptr->dis_to_a; | |
3122 | + ARMOUR_CLASS old_dis_ac = p_ptr->dis_ac; | |
3123 | + ARMOUR_CLASS old_dis_to_a = p_ptr->dis_to_a; | |
3121 | 3124 | |
3122 | 3125 | |
3123 | 3126 | /* Clear extra blows/shots */ |
@@ -3216,6 +3219,7 @@ void calc_bonuses(void) | ||
3216 | 3219 | p_ptr->resist_blind = FALSE; |
3217 | 3220 | p_ptr->resist_neth = FALSE; |
3218 | 3221 | p_ptr->resist_time = FALSE; |
3222 | + p_ptr->resist_water = FALSE; | |
3219 | 3223 | p_ptr->resist_fear = FALSE; |
3220 | 3224 | p_ptr->reflect = FALSE; |
3221 | 3225 | p_ptr->sh_fire = FALSE; |
@@ -3696,6 +3700,9 @@ void calc_bonuses(void) | ||
3696 | 3700 | p_ptr->resist_pois = TRUE; |
3697 | 3701 | p_ptr->hold_exp = TRUE; |
3698 | 3702 | break; |
3703 | + case RACE_MERFOLK: | |
3704 | + p_ptr->resist_water = TRUE; | |
3705 | + break; | |
3699 | 3706 | default: |
3700 | 3707 | /* Do nothing */ |
3701 | 3708 | ; |
@@ -4809,6 +4816,20 @@ void calc_bonuses(void) | ||
4809 | 4816 | /* Searching slows the player down */ |
4810 | 4817 | if (p_ptr->action == ACTION_SEARCH) new_speed -= 10; |
4811 | 4818 | |
4819 | + /* Feature bonus */ | |
4820 | + if(p_ptr->prace == RACE_MERFOLK) | |
4821 | + { | |
4822 | + if (have_flag(f_ptr->flags, FF_WATER)) | |
4823 | + { | |
4824 | + new_speed += (2 + p_ptr->lev / 10); | |
4825 | + } | |
4826 | + else if (!p_ptr->levitation) | |
4827 | + { | |
4828 | + new_speed -= 2; | |
4829 | + } | |
4830 | + } | |
4831 | + | |
4832 | + | |
4812 | 4833 | /* Actual Modifier Bonuses (Un-inflate stat bonuses) */ |
4813 | 4834 | p_ptr->to_a += ((int)(adj_dex_ta[p_ptr->stat_ind[A_DEX]]) - 128); |
4814 | 4835 | p_ptr->to_d[0] += ((int)(adj_str_td[p_ptr->stat_ind[A_STR]]) - 128); |