変愚蛮怒のメインリポジトリです
Revision | 2e085b31c55769e03bd51519d255af3620121cd7 (tree) |
---|---|
Time | 2018-12-13 21:28:50 |
Author | Deskull <deskull@user...> |
Commiter | Deskull |
[Feature] #38796 マーフォーク用の水流耐性実装。 / Implement resist water for Merfolk.
@@ -5412,19 +5412,21 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO | ||
5412 | 5412 | if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!")); |
5413 | 5413 | if (!CHECK_MULTISHADOW()) |
5414 | 5414 | { |
5415 | - if (!p_ptr->resist_sound) | |
5415 | + if (!p_ptr->resist_sound && !p_ptr->resist_water) | |
5416 | 5416 | { |
5417 | 5417 | set_stun(p_ptr->stun + randint1(40)); |
5418 | 5418 | } |
5419 | - if (!p_ptr->resist_conf) | |
5419 | + if (!p_ptr->resist_conf && !p_ptr->resist_water) | |
5420 | 5420 | { |
5421 | 5421 | set_confused(p_ptr->confused + randint1(5) + 5); |
5422 | 5422 | } |
5423 | 5423 | |
5424 | - if (one_in_(5)) | |
5424 | + if (one_in_(5) && !p_ptr->resist_water) | |
5425 | 5425 | { |
5426 | 5426 | inven_damage(set_cold_destroy, 3); |
5427 | 5427 | } |
5428 | + | |
5429 | + if (p_ptr->resist_water) get_damage /= 4; | |
5428 | 5430 | } |
5429 | 5431 | |
5430 | 5432 | get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell); |
@@ -5947,9 +5949,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO | ||
5947 | 5949 | |
5948 | 5950 | learn_spell(monspell); |
5949 | 5951 | p_ptr->redraw |= (PR_MANA); |
5950 | - | |
5951 | - p_ptr->window |= (PW_PLAYER); | |
5952 | - p_ptr->window |= (PW_SPELL); | |
5952 | + p_ptr->window |= (PW_PLAYER | PW_SPELL); | |
5953 | 5953 | |
5954 | 5954 | if (who > 0) |
5955 | 5955 | { |
@@ -1248,6 +1248,7 @@ struct player_type | ||
1248 | 1248 | bool resist_neth; /* Resist nether */ |
1249 | 1249 | bool resist_fear; /* Resist fear */ |
1250 | 1250 | bool resist_time; /* Resist time */ |
1251 | + bool resist_water; /* Resist water */ | |
1251 | 1252 | |
1252 | 1253 | bool reflect; /* Reflect 'bolt' attacks */ |
1253 | 1254 | bool sh_fire; /* Fiery 'immolation' effect */ |
@@ -3290,6 +3290,7 @@ void calc_bonuses(void) | ||
3290 | 3290 | p_ptr->resist_blind = FALSE; |
3291 | 3291 | p_ptr->resist_neth = FALSE; |
3292 | 3292 | p_ptr->resist_time = FALSE; |
3293 | + p_ptr->resist_water = FALSE; | |
3293 | 3294 | p_ptr->resist_fear = FALSE; |
3294 | 3295 | p_ptr->reflect = FALSE; |
3295 | 3296 | p_ptr->sh_fire = FALSE; |
@@ -3770,6 +3771,8 @@ void calc_bonuses(void) | ||
3770 | 3771 | p_ptr->resist_pois = TRUE; |
3771 | 3772 | p_ptr->hold_exp = TRUE; |
3772 | 3773 | break; |
3774 | + case RACE_MERFOLK: | |
3775 | + p_ptr->resist_water = TRUE; | |
3773 | 3776 | default: |
3774 | 3777 | /* Do nothing */ |
3775 | 3778 | ; |