Skip to content

Commit

Permalink
Merge branch 'develop' into macos-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
backwardsEric committed Jul 14, 2024
2 parents ce7770a + a346b14 commit 59bd893
Show file tree
Hide file tree
Showing 12 changed files with 171 additions and 41 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(hengband, 3.0.1.16-Beta)
AC_INIT(hengband, 3.0.1.17-Beta)

AC_CONFIG_MACRO_DIRS([m4])
AC_CONFIG_HEADERS(src/autoconf.h)
Expand Down
2 changes: 1 addition & 1 deletion doxygen/Hengband.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = Hengband
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.0.1.16-Beta
PROJECT_NUMBER = 3.0.1.17-Beta

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
5 changes: 4 additions & 1 deletion hengband.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%define version 3.0.1.15
%define version 3.0.1.16
%define release 1

Summary: hengband %{version}
Expand Down Expand Up @@ -151,6 +151,9 @@ exit 0
%license lib/help/jlicense.txt

%changelog
* Tue Jul 02 2024 whitehara <white@vx-xv.com>
- hengband RPM 3.0.1.16(Beta)

* Fri Jun 21 2024 whitehara <white@vx-xv.com>
- hengband RPM 3.0.1.15(Beta)

Expand Down
65 changes: 65 additions & 0 deletions lib/edit/MonraceDefinitions.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -87348,6 +87348,71 @@
"ja": "彼女は元々優しい心の持ち主だったが、とある学園の者に利用され、大罪を犯し大事なものを根こそぎ奪われた。哀れで救いたくなるような者であると同時に軽蔑・嫌悪に値する者でもある。その目は復讐の炎に燃えており、復讐の妨げとなるあなたはどうしようもないゴミとみなされている。",
"en": "She had a kind heart, but was taken advantage of by someone at a certain school, committed a serious crime, then all of her precious things were burned. She is deserving of contempt and, in her misery, compassion. Her eyes burn with revenge. She counts you, obstructing her revenge, as one of the hopeless scum."
}
},
{
"id": 1363,
"name": {
"ja": "地獄の出店",
"en": "Hell's market stall"
},
"symbol": {
"character": "7",
"color": "Dark Gray"
},
"level": 30,
"hit_point": "30d20",
"speed": 10,
"rarity": 4,
"exp": 300,
"alertness": 0,
"armor_class": 80,
"vision": 10,
"blows": [
{
"method": "BEG",
"effect": "EAT_FOOD",
"damage_dice": "12d6"
},
{
"method": "BEG",
"effect": "EAT_GOLD",
"damage_dice": "12d6"
},
{
"method": "BEG",
"effect": "EAT_ITEM",
"damage_dice": "12d6"
},
{
"method": "BEG",
"effect": "EAT_ITEM",
"damage_dice": "12d6"
}
],
"flags": [
"EVIL",
"UNDEAD",
"COLD_BLOOD",
"NONLIVING",
"NEVER_MOVE",
"EMPTY_MIND",
"RES_NETH",
"NO_CONF",
"NO_SLEEP",
"NO_FEAR",
"DROP_3D2",
"DROP_4D2"
],
"skill": {
"probability": "1_IN_10",
"list": [
"SHRIEK"
]
},
"flavor": {
"ja": "それは冒険者の来店を待っている。持ち物を狙って…",
"en": "It waits for your coming. Aims at your things..."
}
}
]
}
2 changes: 1 addition & 1 deletion src/monster-floor/one-monster-placer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ std::optional<MONSTER_IDX> place_monster_one(PlayerType *player_ptr, MONSTER_IDX
}

if (r_ptr->misc_flags.has(MonsterMiscType::CHAMELEON)) {
choose_chameleon_polymorph(player_ptr, g_ptr->m_idx, summoner_m_idx);
choose_chameleon_polymorph(player_ptr, g_ptr->m_idx, *g_ptr, summoner_m_idx);

r_ptr = &m_ptr->get_monrace();

Expand Down
25 changes: 14 additions & 11 deletions src/monster/monster-list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ MonsterRaceId get_mon_num(PlayerType *player_ptr, DEPTH min_level, DEPTH max_lev
* @brief カメレオンの王の変身対象となるモンスターかどうか判定する / Hack -- the index of the summoning monster
* @param r_idx モンスター種族ID
* @param m_idx 変身するモンスターのモンスターID
* @param grid カメレオンの足元の地形
* @param summoner_m_idx モンスターの召喚による場合、召喚者のモンスターID
* @return 対象にできるならtrueを返す
*/
static bool monster_hook_chameleon_lord(PlayerType *player_ptr, MonsterRaceId r_idx, MONSTER_IDX m_idx, std::optional<MONSTER_IDX> summoner_m_idx)
static bool monster_hook_chameleon_lord(PlayerType *player_ptr, MonsterRaceId r_idx, MONSTER_IDX m_idx, const Grid &grid, std::optional<MONSTER_IDX> summoner_m_idx)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *r_ptr = &monraces_info[r_idx];
Expand All @@ -225,11 +226,11 @@ static bool monster_hook_chameleon_lord(PlayerType *player_ptr, MonsterRaceId r_
return false;
}

if (m_ptr->is_explodable()) {
if (r_ptr->is_explodable()) {
return false;
}

if (!monster_can_cross_terrain(player_ptr, floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) {
if (!monster_can_cross_terrain(player_ptr, grid.feat, r_ptr, 0)) {
return false;
}

Expand All @@ -248,11 +249,12 @@ static bool monster_hook_chameleon_lord(PlayerType *player_ptr, MonsterRaceId r_
* @brief カメレオンの変身対象となるモンスターかどうか判定する / Hack -- the index of the summoning monster
* @param r_idx モンスター種族ID
* @param m_idx 変身するモンスターのモンスターID
* @param grid カメレオンの足元の地形
* @param summoner_m_idx モンスターの召喚による場合、召喚者のモンスターID
* @return 対象にできるならtrueを返す
* @todo グローバル変数対策の上 monster_hook.cへ移す。
*/
static bool monster_hook_chameleon(PlayerType *player_ptr, MonsterRaceId r_idx, MONSTER_IDX m_idx, std::optional<MONSTER_IDX> summoner_m_idx)
static bool monster_hook_chameleon(PlayerType *player_ptr, MonsterRaceId r_idx, MONSTER_IDX m_idx, const Grid &grid, std::optional<MONSTER_IDX> summoner_m_idx)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *r_ptr = &monraces_info[r_idx];
Expand All @@ -269,11 +271,11 @@ static bool monster_hook_chameleon(PlayerType *player_ptr, MonsterRaceId r_idx,
return false;
}

if (m_ptr->is_explodable()) {
if (r_ptr->is_explodable()) {
return false;
}

if (!monster_can_cross_terrain(player_ptr, floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].feat, r_ptr, 0)) {
if (!monster_can_cross_terrain(player_ptr, grid.feat, r_ptr, 0)) {
return false;
}

Expand All @@ -295,7 +297,7 @@ static bool monster_hook_chameleon(PlayerType *player_ptr, MonsterRaceId r_idx,
return hook_pf(player_ptr, r_idx);
}

static std::optional<MonsterRaceId> polymorph_of_chameleon(PlayerType *player_ptr, MONSTER_IDX m_idx, const std::optional<MONSTER_IDX> summoner_m_idx)
static std::optional<MonsterRaceId> polymorph_of_chameleon(PlayerType *player_ptr, MONSTER_IDX m_idx, const Grid &grid, const std::optional<MONSTER_IDX> summoner_m_idx)
{
auto *floor_ptr = player_ptr->current_floor_ptr;
auto *m_ptr = &floor_ptr->m_list[m_idx];
Expand All @@ -306,8 +308,8 @@ static std::optional<MonsterRaceId> polymorph_of_chameleon(PlayerType *player_pt
}

auto hook_fp = old_unique ? monster_hook_chameleon_lord : monster_hook_chameleon;
auto hook = [m_idx, summoner_m_idx, hook_fp](PlayerType *player_ptr, MonsterRaceId r_idx) {
return hook_fp(player_ptr, r_idx, m_idx, summoner_m_idx);
auto hook = [m_idx, grid, summoner_m_idx, hook_fp](PlayerType *player_ptr, MonsterRaceId r_idx) {
return hook_fp(player_ptr, r_idx, m_idx, grid, summoner_m_idx);
};
get_mon_num_prep_chameleon(player_ptr, std::move(hook));

Expand Down Expand Up @@ -338,14 +340,15 @@ static std::optional<MonsterRaceId> polymorph_of_chameleon(PlayerType *player_pt
* @brief カメレオンの変身処理
* @param player_ptr プレイヤーへの参照ポインタ
* @param m_idx 変身処理を受けるモンスター情報のID
* @param grid カメレオンの足元の地形
* @param summoner_m_idx モンスターの召喚による場合、召喚者のモンスターID
*/
void choose_chameleon_polymorph(PlayerType *player_ptr, MONSTER_IDX m_idx, std::optional<MONSTER_IDX> summoner_m_idx)
void choose_chameleon_polymorph(PlayerType *player_ptr, MONSTER_IDX m_idx, const Grid &grid, std::optional<MONSTER_IDX> summoner_m_idx)
{
auto &floor = *player_ptr->current_floor_ptr;
auto &monster = floor.m_list[m_idx];

auto new_monrace_id = polymorph_of_chameleon(player_ptr, m_idx, summoner_m_idx);
auto new_monrace_id = polymorph_of_chameleon(player_ptr, m_idx, grid, summoner_m_idx);
if (!new_monrace_id) {
return;
}
Expand Down
3 changes: 2 additions & 1 deletion src/monster/monster-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ enum class MonsterRaceId : int16_t;
class FloorType;
class MonsterRaceInfo;
class PlayerType;
class Grid;
MONSTER_IDX m_pop(FloorType *floor_ptr);

MonsterRaceId get_mon_num(PlayerType *player_ptr, DEPTH min_level, DEPTH max_level, BIT_FLAGS mode);
void choose_chameleon_polymorph(PlayerType *player_ptr, MONSTER_IDX m_idx, std::optional<MONSTER_IDX> summoner_m_idx = std::nullopt);
void choose_chameleon_polymorph(PlayerType *player_ptr, MONSTER_IDX m_idx, const Grid &grid, std::optional<MONSTER_IDX> summoner_m_idx = std::nullopt);
int get_monster_crowd_number(FloorType *floor_ptr, MONSTER_IDX m_idx);
10 changes: 6 additions & 4 deletions src/monster/monster-processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,14 @@ void process_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)

decide_drop_from_monster(player_ptr, m_idx, turn_flags_ptr->is_riding_mon);
if (m_ptr->mflag2.has(MonsterConstantFlagType::CHAMELEON) && one_in_(13) && !m_ptr->is_asleep()) {
choose_chameleon_polymorph(player_ptr, m_idx);

const auto &new_monrace = m_ptr->get_monrace();
const auto &floor = *player_ptr->current_floor_ptr;

const auto old_m_name = monster_desc(player_ptr, m_ptr, 0);

choose_chameleon_polymorph(player_ptr, m_idx, floor.get_grid(Pos2D(m_ptr->fy, m_ptr->fx)));

const auto &new_monrace = m_ptr->get_monrace();

if (m_idx == player_ptr->riding) {
msg_format(_("突然%sが変身した。", "Suddenly, %s transforms!"), old_m_name.data());
if (new_monrace.misc_flags.has_not(MonsterMiscType::RIDING)) {
Expand All @@ -137,7 +139,7 @@ void process_monster(PlayerType *player_ptr, MONSTER_IDX m_idx)
}
}

m_ptr->set_individual_speed(player_ptr->current_floor_ptr->inside_arena);
m_ptr->set_individual_speed(floor.inside_arena);

const auto old_maxhp = m_ptr->max_maxhp;
if (new_monrace.misc_flags.has(MonsterMiscType::FORCE_MAXHP)) {
Expand Down
5 changes: 4 additions & 1 deletion src/monster/monster-status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "system/player-type-definition.h"
#include "system/redrawing-flags-updater.h"
#include "timed-effect/timed-effects.h"
#include "tracking/health-bar-tracker.h"
#include "util/bit-flags-calculator.h"
#include "view/display-messages.h"
#if JP
Expand Down Expand Up @@ -354,7 +355,9 @@ void process_monsters_mtimed(PlayerType *player_ptr, int mtimed_idx)

/* Process the monsters (backwards) */
for (auto i = floor_ptr->mproc_max[mtimed_idx] - 1; i >= 0; i--) {
process_monsters_mtimed_aux(player_ptr, cur_mproc_list[i], mtimed_idx);
const auto m_idx = cur_mproc_list[i];
process_monsters_mtimed_aux(player_ptr, m_idx, mtimed_idx);
HealthBarTracker::get_instance().set_flag_if_tracking(m_idx);
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/spell-realm/spells-crusade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ bool cast_wrath_of_the_god(PlayerType *player_ptr, int dam, POSITION rad)
continue;
}

auto should_cast = in_bounds(&floor, pos_explode.y, pos_explode.x);
should_cast &= !cave_stop_disintegration(&floor, pos_explode.y, pos_explode.x);
auto should_cast = in_bounds(&floor, pos_explode.y, pos_explode.x) && !cave_stop_disintegration(&floor, pos_explode.y, pos_explode.x);
should_cast &= in_disintegration_range(&floor, pos_target.y, pos_target.x, pos_explode.y, pos_explode.x);
if (!should_cast) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/system/angband-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ constexpr std::string_view ROOT_VARIANT_NAME("Hengband");
#define H_VER_MAJOR 3 //!< ゲームのバージョン定義(メジャー番号)
#define H_VER_MINOR 0 //!< ゲームのバージョン定義(マイナー番号)
#define H_VER_PATCH 1 //!< ゲームのバージョン定義(パッチ番号)
#define H_VER_EXTRA 16 //!< ゲームのバージョン定義(エクストラ番号)
#define H_VER_EXTRA 17 //!< ゲームのバージョン定義(エクストラ番号)

/*!
* @brief セーブファイルのバージョン(3.0.0から導入)
Expand Down
Loading

0 comments on commit 59bd893

Please sign in to comment.