Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/0.0.0.54 alpha #4438

Merged
merged 23 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4d2e7a3
Merge pull request #4426 from sikabane-works/hotfix/initial-error
sikabane-works Apr 27, 2024
fdf4a0e
(Flavor)[Add] クッソ汚い噂定期。
sikabane-works Apr 28, 2024
5bfb0c9
Merge pull request #4429 from sikabane-works/flavor/20240428
sikabane-works Apr 28, 2024
bcc9af1
(Monster)[Update] `大型の` テンプレート実装。
sikabane-works Apr 28, 2024
5bd3291
Merge pull request #4430 from sikabane-works/monster/add-large-template
sikabane-works Apr 28, 2024
30d3528
[Refactor] #3325 単数形のMonsterRaceInfo::blow をblows に修正した
Hourier Apr 28, 2024
9c63713
[Refactor] #3325 変更範囲のコード調整
sikabane-works Apr 28, 2024
3612e8a
Merge pull request #4420 from sikabane-works/merge/heng#3327
sikabane-works Apr 28, 2024
53baa57
[Refactor] #3326 アビリティスコア減少処理をdecrease_ability_*() にまとめた
Hourier May 20, 2023
42c0ff1
Merge pull request #4431 from sikabane-works/merge/heng#3328
sikabane-works Apr 29, 2024
e190f32
[Refactor] #3330 PlayerRace にだけ依存する関数get_summon_symbol_from_player() …
Hourier May 20, 2023
7fb55f6
[Refactor] #3330 PlayerClass にだけ依存する関数get_subtitle_candidates() を移した
Hourier May 20, 2023
b691f6d
Merge pull request #4432 from sikabane-works/merge/heng#3331
sikabane-works Apr 29, 2024
bacf9c6
[Refactor] take_hit_mon() 及び関連する関数群の引数をconcptr からstring_view に変えた
Hourier May 20, 2023
9e0bead
Merge pull request #4433 from sikabane-works/merge/heng#3332
sikabane-works Apr 29, 2024
e1223d8
(Interface)[Fix] モンスターの状態異常がHPバーがなくなった後も消えない不具合を修正。
sikabane-works Apr 29, 2024
8e4a615
Merge pull request #4434 from sikabane-works/fix/display-monster-status
sikabane-works Apr 29, 2024
f294c74
(Flavor)[Add] クッソ汚い噂定期。
sikabane-works Apr 29, 2024
3ce18cf
Merge pull request #4435 from sikabane-works/flavor/add-20240429
sikabane-works Apr 29, 2024
7541566
(Monster)[Add] N:2139:ノレンモドキヒトクイクラゲ
sikabane-works Apr 29, 2024
0495af1
(Monster)[Add] N:2140:人面犬
sikabane-works Apr 29, 2024
5f3a00e
Merge pull request #4436 from sikabane-works/monster/add-20240429
sikabane-works Apr 29, 2024
c685a21
(Version) 0.0.0.54-Alpha
sikabane-works Apr 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doxygen/Bakabakaband.doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = Bakabakaband
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.0.0.53-Alpha
PROJECT_NUMBER = 0.0.0.54-Alpha

# 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
25 changes: 25 additions & 0 deletions lib/edit/MonsterRaceDefinitions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39023,6 +39023,31 @@ S:1_IN_3
S:TELE_AWAY | TELE_TO | BLINK
D:時空や物質的存在そのものを搔き乱すエルドラージの変種の一つだ。

N:2139:ノレンモドキヒトクイクラゲ
E:Man eater jellyfish faked noren
G:':R
I:130:7d7:20:40:0
W:13:7:30:0:0
B:HIT:PARALYZE:5d5
B:HIT:TERRIFY:5d5
F:NEVER_MOVE | NONLIVING | NO_FEAR |
F:STUPID | EMPTY_MIND | COLD_BLOOD | CHAR_MULTI | NO_CONF | NO_SLEEP |
F:EVIL | IM_COLD | FORCE_MAXHP | IM_ELEC | IM_POIS
D:$It resembles a normal noren until some poor fool visitor too close!
D:哀れで愚かな来客が近づいて来るまでは普通の暖簾に似ている。

N:2140:人面犬
E:Jinmenken
G:C:y
I:110:10d10:15:20:40
W:18:2:130:0:0
B:BITE:HURT:3d4
B:BITE:HURT:3d4
B:CLAW:HURT:3d6
F:RAND_25 | WILD_TOWN
F:OPEN_DOOR | BASH_DOOR | DROP_SKELETON | DROP_CORPSE
F:HUMAN | ANIMAL | EVIL | FRIENDS
D:人間の顔をした犬。日本でまれによく見かける珍獣だ。

# N: serial number : monster name
# G: symbol : color
Expand Down
22 changes: 22 additions & 0 deletions lib/file/rumors_j.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ R:MONSTER:*:タフという言葉は{Name}のためにある。
N:0:Default
14へ行け。
42TH ZONE!
#BAKABAKA-2260
ひでにバニシュ&デスをかませ。
NTR趣味を持て……鬼龍のように……
冷静さを取り戻せるといいのですが。
北斗神拳の奥義は一々生えてくるそうだ。
ノーカウントなんだ!この勝負は!
人類の原始時代に恐竜はまだ生きていたんだ。俺は詳しいんだ。
イッちゃうでござるって言え。
お前が修行僧か青魔導師ならばまず、森部のじーさんの奥義を習いに行け。
次回の馬鹿馬鹿蛮怒では、キャラの向きの概念が実装されるそうだ。
魔法少女が世界の災厄でない時空は稀だそうだ。
#BAKABAKA-2250
ひでを九層地獄に送り込め。
ひたすら猿展開に走れ……鬼龍のように……
コンテンツについて緩い時代には版権を乗り越えて別のキャラがぬるっと出ることもあったものだ。
いつだって計画はデスマーチと隣り合わせにある。
ひでほんとひで。
デビルひではひでそのものと比較すれば極めて虚弱だ。
モザイクがあった方が却って卑猥に見えることもあるだろう。
チン毛……いや、石毛の奴はどこに行ったんだ?
鬼龍の息子は居たような居なかったような者が無数にいる、これがシュレディンガーの息子だ(適当)
ああ^~軍靴(ぐんくつ)の響きが来るう^~
#BAKABAKA-2240
ひでを114514分油で煮込め。
性欲を持て……鬼龍のように……
Expand Down
6 changes: 3 additions & 3 deletions src/avatar/avatar-changer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ void AvatarChanger::change_virtue_wild_thief()
auto *r_ptr = &monraces_info[m_ptr->r_idx];
auto innocent = true;
auto thief = false;
for (auto i = 0; i < MAX_NUM_BLOWS; i++) {
if (r_ptr->blow[i].d_dice != 0) {
for (const auto &blow : r_ptr->blows) {
if (blow.d_dice != 0) {
innocent = false;
}

if ((r_ptr->blow[i].effect == RaceBlowEffectType::EAT_ITEM) || (r_ptr->blow[i].effect == RaceBlowEffectType::EAT_GOLD)) {
if ((blow.effect == RaceBlowEffectType::EAT_ITEM) || (blow.effect == RaceBlowEffectType::EAT_GOLD)) {
thief = true;
}
}
Expand Down
30 changes: 1 addition & 29 deletions src/cmd-io/cmd-diary.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "cmd-io/cmd-diary.h"
#include "cmd-io/diary-subtitle-table.h"
#include "core/asking-player.h"
#include "core/show-file.h"
#include "game-option/play-record-options.h"
Expand All @@ -17,43 +16,16 @@
#include "util/int-char-converter.h"
#include "view/display-messages.h"
#include "world/world.h"
#include <span>
#include <sstream>
#include <string>

/*!
* @brief 日記のサブタイトルの候補一覧を取得する
*
* 候補一覧の先頭は「最高の肉体を求めて」、末尾は「最高の頭脳を求めて」で
* あるため、プレイヤーの職業に従い範囲を決定する。
*
* @return 候補一覧を参照するstd::spanオブジェクト
*/
static auto get_subtitle_candidates(PlayerType *player_ptr)
{
std::span<const std::string> candidates(diary_subtitles);
const auto max = diary_subtitles.size();

PlayerClass pc(player_ptr);

if (pc.is_tough()) {
return candidates.subspan(0, max - 1);
}

if (pc.is_wizard()) {
return candidates.subspan(1);
}

return candidates.subspan(1, max - 2);
}

/*!
* @brief 日記のタイトル表記と内容出力
* @param player_ptr プレイヤーへの参照ポインタ
*/
static void display_diary(PlayerType *player_ptr)
{
const auto subtitle_candidates = get_subtitle_candidates(player_ptr);
const auto subtitle_candidates = PlayerClass(player_ptr).get_subtitle_candidates();
const auto choice = Rand_external(subtitle_candidates.size());
const auto &subtitle = subtitle_candidates[choice];
#ifdef JP
Expand Down
28 changes: 17 additions & 11 deletions src/dungeon/quest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,38 +185,44 @@ void determine_random_questor(PlayerType *player_ptr, QuestType *q_ptr)
MonsterRaceId r_idx;
while (true) {
r_idx = get_mon_num(player_ptr, 0, q_ptr->level + 5 + randint1(q_ptr->level / 10), GMN_ARENA);
MonsterRaceInfo *r_ptr;
r_ptr = &monraces_info[r_idx];
if (r_ptr->kind_flags.has_not(MonsterKindType::UNIQUE)) {
const auto &monrace = monraces_info[r_idx];
if (monrace.kind_flags.has_not(MonsterKindType::UNIQUE)) {
continue;
}
if (r_ptr->flags8 & RF8_NO_QUEST) {

if (monrace.flags8 & RF8_NO_QUEST) {
continue;
}
if (r_ptr->flags1 & RF1_QUESTOR) {

if (monrace.flags1 & RF1_QUESTOR) {
continue;
}
if (r_ptr->rarity > 100) {

if (monrace.rarity > 100) {
continue;
}
if (r_ptr->behavior_flags.has(MonsterBehaviorType::FRIENDLY)) {

if (monrace.behavior_flags.has(MonsterBehaviorType::FRIENDLY)) {
continue;
}
if (r_ptr->feature_flags.has(MonsterFeatureType::AQUATIC)) {

if (monrace.feature_flags.has(MonsterFeatureType::AQUATIC)) {
continue;
}
if (r_ptr->wilderness_flags.has(MonsterWildernessType::WILD_ONLY)) {

if (monrace.wilderness_flags.has(MonsterWildernessType::WILD_ONLY)) {
continue;
}
if (r_ptr->no_suitable_questor_bounty()) {

if (monrace.no_suitable_questor_bounty()) {
continue;
}

/*
* Accept monsters that are 2 - 6 levels
* out of depth depending on the quest level
*/
if (r_ptr->level > (q_ptr->level + (q_ptr->level / 20))) {
if (monrace.level > (q_ptr->level + (q_ptr->level / 20))) {
break;
}
}
Expand Down
41 changes: 3 additions & 38 deletions src/effect/effect-player-resist-hurt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

// 毒を除く4元素.
void effect_player_elements(
PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, int (*damage_func)(PlayerType *, int, concptr, bool))
PlayerType *player_ptr, EffectPlayerType *ep_ptr, std::string_view attack_message, int (*damage_func)(PlayerType *, int, std::string_view, bool))
{
if (player_ptr->effects()->blindness()->is_blind()) {
msg_print(attack_message);
Expand Down Expand Up @@ -467,41 +467,6 @@ void effect_player_dark(PlayerType *player_ptr, EffectPlayerType *ep_ptr)
ep_ptr->get_damage = take_hit(player_ptr, DAMAGE_ATTACK, ep_ptr->dam, ep_ptr->killer);
}

static void effect_player_time_one_disability(PlayerType *player_ptr)
{
constexpr std::array<std::pair<int, std::string_view>, 6> candidates = { {
{ A_STR, _("強く", "strong") },
{ A_INT, _("聡明で", "bright") },
{ A_WIS, _("賢明で", "wise") },
{ A_DEX, _("器用で", "agile") },
{ A_CON, _("健康で", "hale") },
{ A_CHR, _("美しく", "beautiful") },
} };

const auto &[k, act] = rand_choice(candidates);

msg_format(_("あなたは以前ほど%sなくなってしまった...。", "You're not as %s as you used to be..."), act.data());
player_ptr->stat_cur[k] = (player_ptr->stat_cur[k] * 3) / 4;
if (player_ptr->stat_cur[k] < 3) {
player_ptr->stat_cur[k] = 3;
}

RedrawingFlagsUpdater::get_instance().set_flag(StatusRedrawingFlag::BONUS);
}

static void effect_player_time_all_disabilities(PlayerType *player_ptr)
{
msg_print(_("あなたは以前ほど力強くなくなってしまった...。", "You're not as powerful as you used to be..."));
for (int k = 0; k < A_MAX; k++) {
player_ptr->stat_cur[k] = (player_ptr->stat_cur[k] * 7) / 8;
if (player_ptr->stat_cur[k] < 3) {
player_ptr->stat_cur[k] = 3;
}
}

RedrawingFlagsUpdater::get_instance().set_flag(StatusRedrawingFlag::BONUS);
}

static void effect_player_time_addition(PlayerType *player_ptr)
{
switch (randint1(10)) {
Expand All @@ -522,10 +487,10 @@ static void effect_player_time_addition(PlayerType *player_ptr)
case 7:
case 8:
case 9:
effect_player_time_one_disability(player_ptr);
msg_print(player_ptr->decrease_ability_random());
break;
case 10:
effect_player_time_all_disabilities(player_ptr);
msg_print(player_ptr->decrease_ability_all());
break;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/effect/effect-player-resist-hurt.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#pragma once

#include "system/angband.h"
#include <string_view>

class EffectPlayerType;
class PlayerType;
void effect_player_elements(
PlayerType *player_ptr, EffectPlayerType *ep_ptr, concptr attack_message, int (*damage_func)(PlayerType *, int, concptr, bool));
PlayerType *player_ptr, EffectPlayerType *ep_ptr, std::string_view attack_message, int (*damage_func)(PlayerType *, int, std::string_view, bool));
void effect_player_poison(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
void effect_player_nuke(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
void effect_player_missile(PlayerType *player_ptr, EffectPlayerType *ep_ptr);
Expand Down
10 changes: 5 additions & 5 deletions src/info-reader/race-reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ errr parse_monraces_info(std::string_view buf, angband_header *)
// B:blow_type:blow_effect:dice
size_t i = 0;
for (; i < 4; i++) {
if (r_ptr->blow[i].method == RaceBlowMethodType::NONE) {
if (r_ptr->blows[i].method == RaceBlowMethodType::NONE) {
break;
}
}
Expand All @@ -265,16 +265,16 @@ errr parse_monraces_info(std::string_view buf, angband_header *)
return PARSE_ERROR_INVALID_FLAG;
}

r_ptr->blow[i].method = rbm->second;
r_ptr->blow[i].effect = rbe->second;
r_ptr->blows[i].method = rbm->second;
r_ptr->blows[i].effect = rbe->second;

if (tokens.size() < 4) {
return PARSE_ERROR_NONE;
}

const auto &dice = str_split(tokens[3], 'd', false, 2);
info_set_value(r_ptr->blow[i].d_dice, dice[0]);
info_set_value(r_ptr->blow[i].d_side, dice[1]);
info_set_value(r_ptr->blows[i].d_dice, dice[0]);
info_set_value(r_ptr->blows[i].d_side, dice[1]);
} else if (tokens[0] == "F") {
// F:flags
if (tokens.size() < 2 || tokens[1].size() == 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/lore/combat-types-setter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

void set_monster_blow_method(lore_type *lore_ptr, int m)
{
RaceBlowMethodType method = lore_ptr->r_ptr->blow[m].method;
RaceBlowMethodType method = lore_ptr->r_ptr->blows[m].method;
lore_ptr->p = nullptr;
lore_ptr->pc = TERM_WHITE;
switch (method) {
Expand Down Expand Up @@ -130,7 +130,7 @@ void set_monster_blow_method(lore_type *lore_ptr, int m)

void set_monster_blow_effect(lore_type *lore_ptr, int m)
{
RaceBlowEffectType effect = lore_ptr->r_ptr->blow[m].effect;
RaceBlowEffectType effect = lore_ptr->r_ptr->blows[m].effect;
lore_ptr->q = nullptr;
lore_ptr->qc = TERM_WHITE;
switch (effect) {
Expand Down
18 changes: 10 additions & 8 deletions src/lore/lore-calculator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,25 @@ bool know_armour(MonsterRaceId r_idx, const bool know_everything)
*/
bool know_damage(MonsterRaceId r_idx, int i)
{
auto *r_ptr = &monraces_info[r_idx];
DEPTH level = r_ptr->level;
int32_t a = r_ptr->r_blows[i];

int32_t d1 = r_ptr->blow[i].d_dice;
int32_t d2 = r_ptr->blow[i].d_side;
int32_t d = d1 * d2;
const auto &monrace = monraces_info[r_idx];
auto level = monrace.level;
auto a = monrace.r_blows[i];
auto d1 = monrace.blows[i].d_dice;
auto d2 = monrace.blows[i].d_side;
auto d = d1 * d2;

if (d >= ((4 + level) * MAX_UCHAR) / 80) {
d = ((4 + level) * MAX_UCHAR - 1) / 80;
}

if ((4 + level) * a > 80 * d) {
return true;
}
if (r_ptr->kind_flags.has_not(MonsterKindType::UNIQUE)) {

if (monrace.kind_flags.has_not(MonsterKindType::UNIQUE)) {
return false;
}

if ((4 + level) * (2 * a) > 80 * d) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/lore/lore-store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ int lore_do_probe(PlayerType *player_ptr, MonsterRaceId r_idx)
}
r_ptr->r_wake = r_ptr->r_ignore = MAX_UCHAR;

for (int i = 0; i < 4; i++) {
if (r_ptr->blow[i].effect != RaceBlowEffectType::NONE || r_ptr->blow[i].method != RaceBlowMethodType::NONE) {
for (auto i = 0; i < 4; i++) {
if (r_ptr->blows[i].effect != RaceBlowEffectType::NONE || r_ptr->blows[i].method != RaceBlowMethodType::NONE) {
if (r_ptr->r_blows[i] != MAX_UCHAR) {
n++;
}
Expand Down
12 changes: 6 additions & 6 deletions src/market/arena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,14 @@ bool monster_arena_comm(PlayerType *player_ptr)
clear_bldg(4, 10);

prt(_("モンスター 倍率", "Monsters Odds"), 4, 4);
for (int i = 0; i < 4; i++) {
auto *r_ptr = &monraces_info[battle_mon_list[i]];
for (auto i = 0; i < 4; i++) {
const auto &monrace = monraces_info[battle_mon_list[i]];
std::string name;
if (r_ptr->kind_flags.has(MonsterKindType::UNIQUE)) {
name = _(r_ptr->name, "Fake ");
name.append(_("もどき", r_ptr->name));
if (monrace.kind_flags.has(MonsterKindType::UNIQUE)) {
name = _(monrace.name, "Fake ");
name.append(_("もどき", monrace.name));
} else {
name = r_ptr->name;
name = monrace.name;
name.append(_(" ", ""));
}

Expand Down
Loading
Loading