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 Nov 28, 2024
2 parents 8adb092 + ef10eb7 commit 6e2fc7c
Show file tree
Hide file tree
Showing 42 changed files with 312 additions and 316 deletions.
72 changes: 36 additions & 36 deletions lib/edit/BaseitemDefinitions.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16506,15 +16506,15 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 10
},
{
"depth": 12,
"rarity": 2
"rarity": 4
}
]
},
Expand All @@ -16539,15 +16539,15 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 10
},
{
"depth": 14,
"rarity": 2
"rarity": 4
}
]
},
Expand Down Expand Up @@ -16671,19 +16671,19 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 10
},
{
"depth": 20,
"rarity": 3
"rarity": 6
},
{
"depth": 22,
"rarity": 2
"rarity": 4
}
]
},
Expand All @@ -16708,19 +16708,19 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 10
},
{
"depth": 20,
"rarity": 3
"rarity": 6
},
{
"depth": 24,
"rarity": 2
"rarity": 4
}
]
},
Expand All @@ -16745,19 +16745,19 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 12
},
{
"depth": 20,
"rarity": 3
"rarity": 8
},
{
"depth": 26,
"rarity": 2
"rarity": 6
}
]
},
Expand All @@ -16782,19 +16782,19 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 12
},
{
"depth": 20,
"rarity": 3
"rarity": 8
},
{
"depth": 28,
"rarity": 2
"rarity": 6
}
]
},
Expand All @@ -16819,19 +16819,19 @@
"allocations": [
{
"depth": 1,
"rarity": 10
"rarity": 15
},
{
"depth": 10,
"rarity": 5
"rarity": 12
},
{
"depth": 20,
"rarity": 3
"rarity": 8
},
{
"depth": 30,
"rarity": 2
"rarity": 6
}
]
},
Expand All @@ -16856,19 +16856,19 @@
"allocations": [
{
"depth": 1,
"rarity": 12
"rarity": 20
},
{
"depth": 10,
"rarity": 6
"rarity": 16
},
{
"depth": 20,
"rarity": 4
"depth": 25,
"rarity": 12
},
{
"depth": 40,
"rarity": 3
"rarity": 8
}
]
},
Expand All @@ -16893,19 +16893,19 @@
"allocations": [
{
"depth": 1,
"rarity": 12
"rarity": 20
},
{
"depth": 10,
"rarity": 6
"rarity": 16
},
{
"depth": 20,
"rarity": 4
"depth": 25,
"rarity": 12
},
{
"depth": 50,
"rarity": 3
"rarity": 8
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/artifact/random-art-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ static std::string name_unnatural_random_artifact(PlayerType *player_ptr, ItemEn
}

constexpr auto prompt = _("このアーティファクトを何と名付けますか?", "What do you want to call the artifact? ");
object_aware(player_ptr, o_ptr);
object_aware(player_ptr, *o_ptr);
o_ptr->mark_as_known();
o_ptr->ident |= IDENT_FULL_KNOWN;
o_ptr->randart_name.reset();
Expand Down
2 changes: 1 addition & 1 deletion src/birth/inventory-initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void wield_all(PlayerType *player_ptr)
*/
static void add_outfit(PlayerType *player_ptr, ItemEntity &item)
{
object_aware(player_ptr, &item);
object_aware(player_ptr, item);
item.mark_as_known();
const auto slot = store_item_to_inventory(player_ptr, &item);
autopick_alter_item(player_ptr, slot, false);
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-item/cmd-eat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void exe_eat_food(PlayerType *player_ptr, INVENTORY_IDX i_idx)

/* The player is now aware of the object */
if (ident && !o_ptr->is_aware()) {
object_aware(player_ptr, o_ptr);
object_aware(player_ptr, *o_ptr);
gain_exp(player_ptr, (level + (player_ptr->lev >> 1)) / player_ptr->lev);
}

Expand Down
2 changes: 1 addition & 1 deletion src/floor/floor-object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*/
static void object_mention(PlayerType *player_ptr, ItemEntity &item)
{
object_aware(player_ptr, &item);
object_aware(player_ptr, item);
item.mark_as_known();
item.ident |= (IDENT_FULL_KNOWN);
const auto item_name = describe_flavor(player_ptr, item, 0);
Expand Down
28 changes: 13 additions & 15 deletions src/io-dump/random-art-info-dumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,18 @@
#include <sstream>

/*!
* @brief ランダムアーティファクト1件をスポイラー出力する /
* Create a spoiler file entry for an artifact
* @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
* @brief ランダムアーティファクト1件をスポイラー出力する
* @param item ランダムアーティファクトへの参照
* @param art_ptr 記述内容を収めた構造体参照ポインタ
* Fill in an object description structure for a given object
*/
static void spoiler_print_randart(ItemEntity *o_ptr, const ArtifactsDumpInfo *art_ptr, std::ofstream &ofs)
static void spoiler_print_randart(const ItemEntity &item, const ArtifactsDumpInfo *art_ptr, std::ofstream &ofs)
{
const auto finalizer = util::make_finalizer([art_ptr, &ofs]() {
ofs << spoiler_indent << art_ptr->misc_desc << "\n\n";
});
const auto *pval_ptr = &art_ptr->pval_info;
ofs << art_ptr->description << '\n';
if (!o_ptr->is_fully_known()) {
if (!item.is_fully_known()) {
ofs << format(_("%s不明\n", "%sUnknown\n"), spoiler_indent.data());
return;
}
Expand All @@ -53,17 +51,17 @@ static void spoiler_print_randart(ItemEntity *o_ptr, const ArtifactsDumpInfo *ar
/*!
* @brief ランダムアーティファクト内容をスポイラー出力するサブルーチン /
* @param player_ptr プレイヤーへの参照ポインタ
* @param o_ptr ランダムアーティファクトのオブジェクト構造体参照ポインタ
* @param item ランダムアーティファクトのオブジェクト構造体参照ポインタ
* @param tval 出力したいランダムアーティファクトの種類
*/
static void spoil_random_artifact_aux(PlayerType *player_ptr, ItemEntity *o_ptr, ItemKindType tval, std::ofstream &ofs)
static void spoil_random_artifact_aux(PlayerType *player_ptr, const ItemEntity &item, ItemKindType tval, std::ofstream &ofs)
{
if (!o_ptr->is_known() || !o_ptr->is_random_artifact() || (o_ptr->bi_key.tval() != tval)) {
if (!item.is_known() || !item.is_random_artifact() || (item.bi_key.tval() != tval)) {
return;
}

const auto artifacts_list = random_artifact_analyze(player_ptr, o_ptr);
spoiler_print_randart(o_ptr, &artifacts_list, ofs);
const auto artifacts_list = random_artifact_analyze(player_ptr, item);
spoiler_print_randart(item, &artifacts_list, ofs);
}

/*!
Expand All @@ -84,24 +82,24 @@ void spoil_random_artifact(PlayerType *player_ptr)
for (auto tval : tval_list) {
for (int i = INVEN_MAIN_HAND; i < INVEN_TOTAL; i++) {
auto &item = player_ptr->inventory_list[i];
spoil_random_artifact_aux(player_ptr, &item, tval, ofs);
spoil_random_artifact_aux(player_ptr, item, tval, ofs);
}

for (int i = 0; i < INVEN_PACK; i++) {
auto &item = player_ptr->inventory_list[i];
spoil_random_artifact_aux(player_ptr, &item, tval, ofs);
spoil_random_artifact_aux(player_ptr, item, tval, ofs);
}

const auto *store_ptr = &towns_info[1].stores[StoreSaleType::HOME];
for (int i = 0; i < store_ptr->stock_num; i++) {
auto &item = store_ptr->stock[i];
spoil_random_artifact_aux(player_ptr, item.get(), tval, ofs);
spoil_random_artifact_aux(player_ptr, *item, tval, ofs);
}

store_ptr = &towns_info[1].stores[StoreSaleType::MUSEUM];
for (int i = 0; i < store_ptr->stock_num; i++) {
auto &item = store_ptr->stock[i];
spoil_random_artifact_aux(player_ptr, item.get(), tval, ofs);
spoil_random_artifact_aux(player_ptr, *item, tval, ofs);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lore/lore-calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void add_lore_of_damage_skill(PlayerType *player_ptr, lore_type *lore_ptr, Monst
return;
}

const auto monrace_id = lore_ptr->r_idx;
const auto monrace_id = lore_ptr->monrace_id;
const auto base_damage = monspell_race_damage(player_ptr, ms_type, monrace_id, BASE_DAM);
const auto dice_num = monspell_race_damage(player_ptr, ms_type, monrace_id, DICE_NUM);
const auto dice_side = monspell_race_damage(player_ptr, ms_type, monrace_id, DICE_SIDE);
Expand Down
10 changes: 5 additions & 5 deletions src/lore/lore-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ lore_msg::lore_msg(std::string_view msg, byte color)
{
}

lore_type::lore_type(MonraceId r_idx, monster_lore_mode mode)
: r_idx(r_idx)
lore_type::lore_type(MonraceId monrace_id, monster_lore_mode mode)
: monrace_id(monrace_id)
, mode(mode)
, msex(MonsterSex::NONE)
, method(RaceBlowMethodType::NONE)
{
this->nightmare = ironman_nightmare && (mode != MONSTER_LORE_DEBUG);
this->r_ptr = &monraces_info[r_idx];
this->r_ptr = &MonraceList::get_instance().get_monrace(monrace_id);
this->speed = this->nightmare ? this->r_ptr->speed + 5 : this->r_ptr->speed;
this->drop_gold = this->r_ptr->r_drop_gold;
this->drop_item = this->r_ptr->r_drop_item;
Expand All @@ -65,12 +65,12 @@ bool lore_type::has_reinforce() const

bool lore_type::is_details_known() const
{
return MonraceList::get_instance().get_monrace(this->r_idx).is_details_known();
return MonraceList::get_instance().get_monrace(this->monrace_id).is_details_known();
}

bool lore_type::is_blow_damage_known(int num_blow) const
{
return MonraceList::get_instance().get_monrace(this->r_idx).is_blow_damage_known(num_blow);
return MonraceList::get_instance().get_monrace(this->monrace_id).is_blow_damage_known(num_blow);
}

std::vector<lore_msg> lore_type::build_speed_description() const
Expand Down
4 changes: 2 additions & 2 deletions src/lore/lore-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ struct lore_msg {
};

struct lore_type {
lore_type(MonraceId r_idx, monster_lore_mode mode);
lore_type(MonraceId monrace_id, monster_lore_mode mode);

#ifndef JP
bool sin = false;
Expand All @@ -61,7 +61,7 @@ struct lore_type {
concptr q = "";
byte qc = 0;

MonraceId r_idx;
MonraceId monrace_id;
BIT_FLAGS mode;
MonsterSex msex;
RaceBlowMethodType method;
Expand Down
2 changes: 1 addition & 1 deletion src/market/bounty.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ bool exchange_cash(PlayerType *player_ptr)

ItemEntity prize_item(prize_list[num - 1]);
ItemMagicApplier(player_ptr, &prize_item, player_ptr->current_floor_ptr->object_level, AM_NO_FIXED_ART).execute();
object_aware(player_ptr, &prize_item);
object_aware(player_ptr, prize_item);
prize_item.mark_as_known();

/*
Expand Down
Loading

0 comments on commit 6e2fc7c

Please sign in to comment.