7 #include "mind/mind-cavalry.h"
8 #include "cmd-action/cmd-pet.h"
9 #include "floor/floor.h"
10 #include "monster/smart-learn-types.h"
11 #include "monster/monster2.h"
12 #include "pet/pet-fall-off.h"
13 #include "player/player-skill.h"
17 * @param creature_ptr プレーヤーへの参照ポインタ
18 * @return 結果はどうあれ騎乗したらTRUE
20 bool rodeo(player_type *creature_ptr)
22 GAME_TEXT m_name[MAX_NLEN];
27 if (creature_ptr->riding) {
28 msg_print(_("今は乗馬中だ。", "You ARE riding."));
32 if (!do_cmd_riding(creature_ptr, TRUE))
35 m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
36 r_ptr = &r_info[m_ptr->r_idx];
37 monster_desc(creature_ptr, m_name, m_ptr, 0);
38 msg_format(_("%sに乗った。", "You ride on %s."), m_name);
45 if (r_ptr->flags1 & RF1_UNIQUE)
48 rlev = 60 + (rlev - 60) / 2;
49 if ((randint1(creature_ptr->skill_exp[GINOU_RIDING] / 120 + creature_ptr->lev * 2 / 3) > rlev) && one_in_(2)
50 && !creature_ptr->current_floor_ptr->inside_arena && !creature_ptr->phase_out && !(r_ptr->flags7 & (RF7_GUARDIAN)) && !(r_ptr->flags1 & (RF1_QUESTOR))
51 && (rlev < creature_ptr->lev * 3 / 2 + randint0(creature_ptr->lev / 5))) {
52 msg_format(_("%sを手なずけた。", "You tame %s."), m_name);
53 set_pet(creature_ptr, m_ptr);
55 msg_format(_("%sに振り落とされた!", "You have been thrown off by %s."), m_name);
56 process_fall_off_horse(creature_ptr, 1, TRUE);
58 /* 落馬処理に失敗してもとにかく乗馬解除 */
59 creature_ptr->riding = 0;