7 #include "mind/mind-cavalry.h"
8 #include "cmd-action/cmd-pet.h"
9 #include "monster-race/monster-race.h"
10 #include "monster-race/race-flags1.h"
11 #include "monster-race/race-flags7.h"
12 #include "monster/monster-describer.h"
13 #include "monster/monster-info.h"
14 #include "monster/monster-status-setter.h"
15 #include "monster/smart-learn-types.h"
16 #include "pet/pet-fall-off.h"
17 #include "player/player-skill.h"
18 #include "system/floor-type-definition.h"
19 #include "view/display-messages.h"
23 * @param creature_ptr プレーヤーへの参照ポインタ
24 * @return 結果はどうあれ騎乗したらTRUE
26 bool rodeo(player_type *creature_ptr)
28 GAME_TEXT m_name[MAX_NLEN];
33 if (creature_ptr->riding) {
34 msg_print(_("今は乗馬中だ。", "You ARE riding."));
38 if (!do_cmd_riding(creature_ptr, TRUE))
41 m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
42 r_ptr = &r_info[m_ptr->r_idx];
43 monster_desc(creature_ptr, m_name, m_ptr, 0);
44 msg_format(_("%sに乗った。", "You ride on %s."), m_name);
51 if (r_ptr->flags1 & RF1_UNIQUE)
54 rlev = 60 + (rlev - 60) / 2;
55 if ((randint1(creature_ptr->skill_exp[GINOU_RIDING] / 120 + creature_ptr->lev * 2 / 3) > rlev) && one_in_(2)
56 && !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->phase_out && !(r_ptr->flags7 & (RF7_GUARDIAN)) && !(r_ptr->flags1 & (RF1_QUESTOR))
57 && (rlev < creature_ptr->lev * 3 / 2 + randint0(creature_ptr->lev / 5))) {
58 msg_format(_("%sを手なずけた。", "You tame %s."), m_name);
59 set_pet(creature_ptr, m_ptr);
61 msg_format(_("%sに振り落とされた!", "You have been thrown off by %s."), m_name);
62 process_fall_off_horse(creature_ptr, 1, TRUE);
64 /* 落馬処理に失敗してもとにかく乗馬解除 */
65 creature_ptr->riding = 0;