Skip to content

Commit

Permalink
Merge pull request #4110 from sikabane-works/release/0.0.0.51-Alpha
Browse files Browse the repository at this point in the history
Release/0.0.0.51 alpha
  • Loading branch information
sikabane-works authored Jan 1, 2024
2 parents 2fe0b81 + a89e396 commit 8a9abc0
Show file tree
Hide file tree
Showing 227 changed files with 2,794 additions and 2,812 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-spoiler-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true

- name: Install required packages
run: |
Expand Down
5 changes: 3 additions & 2 deletions Bakabakaband/Bakabakaband/Bakabakaband.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@
<ClCompile Include="..\..\src\load\item\item-loader-factory.cpp" />
<ClCompile Include="..\..\src\load\monster\monster-loader-factory.cpp" />
<ClCompile Include="..\..\src\load\player-class-specific-data-loader.cpp" />
<ClCompile Include="..\..\src\monster-race\race-brightness-mask.cpp" />
<ClCompile Include="..\..\src\monster-race\race-feature-mask.cpp" />
<ClCompile Include="..\..\src\object-enchant\enchanter-factory.cpp" />
<ClCompile Include="..\..\src\mspell\mspell-attack\abstract-mspell.cpp" />
Expand Down Expand Up @@ -620,7 +621,6 @@
<ClCompile Include="..\..\src\view\display-map.cpp" />
<ClCompile Include="..\..\src\view\display-self-info.cpp" />
<ClCompile Include="..\..\src\view\display-scores.cpp" />
<ClCompile Include="..\..\src\window\display-sub-window-items.cpp" />
<ClCompile Include="..\..\src\window\display-sub-window-spells.cpp" />
<ClCompile Include="..\..\src\window\display-sub-windows.cpp" />
<ClCompile Include="..\..\src\window\main-window-left-frame.cpp" />
Expand Down Expand Up @@ -973,6 +973,8 @@
<ClInclude Include="..\..\src\monster-race\monster-aura-types.h" />
<ClInclude Include="..\..\src\monster-race\monster-kind-mask.h" />
<ClInclude Include="..\..\src\monster-race\race-behavior-flags.h" />
<ClInclude Include="..\..\src\monster-race\race-brightness-flags.h" />
<ClInclude Include="..\..\src\monster-race\race-brightness-mask.h" />
<ClInclude Include="..\..\src\monster-race\race-drop-flags.h" />
<ClInclude Include="..\..\src\monster-race\race-feature-flags.h" />
<ClInclude Include="..\..\src\monster-race\race-feature-mask.h" />
Expand Down Expand Up @@ -1823,7 +1825,6 @@
<ClInclude Include="..\..\src\view\display-monster-status.h" />
<ClInclude Include="..\..\src\view\display-self-info.h" />
<ClInclude Include="..\..\src\view\display-scores.h" />
<ClInclude Include="..\..\src\window\display-sub-window-items.h" />
<ClInclude Include="..\..\src\window\display-sub-window-spells.h" />
<ClInclude Include="..\..\src\window\display-sub-windows.h" />
<ClInclude Include="..\..\src\window\main-window-left-frame.h" />
Expand Down
30 changes: 18 additions & 12 deletions Bakabakaband/Bakabakaband/Bakabakaband.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -812,9 +812,6 @@
<ClCompile Include="..\..\src\spell\range-calc.cpp">
<Filter>spell</Filter>
</ClCompile>
<ClCompile Include="..\..\src\specific-object\bow.cpp">
<Filter>specific-object</Filter>
</ClCompile>
<ClCompile Include="..\..\src\specific-object\chest.cpp">
<Filter>specific-object</Filter>
</ClCompile>
Expand Down Expand Up @@ -1526,9 +1523,6 @@
<ClCompile Include="..\..\src\window\main-window-equipments.cpp">
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="..\..\src\window\display-sub-window-items.cpp">
<Filter>window</Filter>
</ClCompile>
<ClCompile Include="..\..\src\window\display-sub-windows.cpp">
<Filter>window</Filter>
</ClCompile>
Expand Down Expand Up @@ -2476,6 +2470,12 @@
<ClCompile Include="..\..\src\system\dungeon-info.cpp">
<Filter>system</Filter>
</ClCompile>
<ClCompile Include="..\..\src\system\terrain-type-definition.cpp">
<Filter>system</Filter>
</ClCompile>
<ClCompile Include="..\..\src\monster-race\race-brightness-mask.cpp">
<Filter>monster-race</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\combat\shoot.h">
Expand Down Expand Up @@ -3414,9 +3414,6 @@
<ClInclude Include="..\..\src\realm\realm-song-numbers.h">
<Filter>realm</Filter>
</ClInclude>
<ClInclude Include="..\..\src\specific-object\bow.h">
<Filter>specific-object</Filter>
</ClInclude>
<ClInclude Include="..\..\src\specific-object\chest.h">
<Filter>specific-object</Filter>
</ClInclude>
Expand Down Expand Up @@ -4257,9 +4254,6 @@
<ClInclude Include="..\..\src\window\main-window-equipments.h">
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="..\..\src\window\display-sub-window-items.h">
<Filter>window</Filter>
</ClInclude>
<ClInclude Include="..\..\src\window\display-sub-windows.h">
<Filter>window</Filter>
</ClInclude>
Expand Down Expand Up @@ -5378,6 +5372,18 @@
<ClInclude Include="..\..\src\system\dungeon-info.h">
<Filter>system</Filter>
</ClInclude>
<<<<<<< HEAD:Bakabakaband/Bakabakaband/Bakabakaband.vcxproj.filters
=======
<ClInclude Include="..\..\src\system\terrain-type-definition.h">
<Filter>system</Filter>
</ClInclude>
<ClInclude Include="..\..\src\monster-race\race-brightness-flags.h">
<Filter>monster-race</Filter>
</ClInclude>
<ClInclude Include="..\..\src\monster-race\race-brightness-mask.h">
<Filter>monster-race</Filter>
</ClInclude>
>>>>>>> 985454096 ([Refactor] モンスターの明かり・闇フラグをFlagGroup化):Hengband/Hengband/Hengband.vcxproj.filters
</ItemGroup>
<ItemGroup>
<None Include="..\..\src\wall.bmp" />
Expand Down
6 changes: 3 additions & 3 deletions Build-Windows-Release-Package.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ function BuildPackage ($package_name, $package_unique_files, $build_conf) {
Copy-Item -Verbose -Recurse -Path .\lib -Destination $bakabakabandDir -Exclude Makefile.am, *.raw, .gitattributes
Copy-Item -Verbose -Path .\lib\apex\h_scores.raw -Destination $bakabakabandDir\lib\apex
Remove-Item -Verbose -Exclude delete.me -Recurse -Path $bakabakabandDir\lib\save\*, $bakabakabandDir\lib\user\*
Remove-Item -Verbose -Exclude music.cfg -Path $bakabakabandDir\lib\xtra\music\*
Remove-Item -Verbose -Exclude music.cfg, readme.txt, *.mp3 -Path $bakabakabandDir\lib\xtra\music\*

# zipアーカイブ作成
$package_path = Join-Path $(Get-Location) "${package_name}.zip"
Get-ChildItem -Path $tempDir | Compress-Archive -Force -Verbose -DestinationPath $package_path

# 作業用テンポラリフォルダ削除
$tempDir | Where-Object { Test-Path $_ } | ForEach-Object { Get-ChildItem $_ -File -Recurse | Remove-Item; $_ } | Remove-Item -Recurse
$tempDir | Where-Object { Test-Path $_ } | ForEach-Object { Get-ChildItem $_ -File -Recurse | Remove-Item; $_ } | Remove-Item -Recurse -Force
}

# 日本語版
BuildPackage -package_name Bakabakaband-$Version-jp -package_unique_files .\readme.md, .\autopick.txt -build_conf Release
# 英語版
BuildPackage -package_name Bakabakaband-$Version-en -package_unique_files .\readme_eng.md, .\autopick_eng.txt -build_conf English-Release
BuildPackage -package_name Bakabakaband-$Version-en -package_unique_files .\readme-eng.md, .\autopick_eng.txt -build_conf English-Release
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.50-Alpha
PROJECT_NUMBER = 0.0.0.51-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
14 changes: 14 additions & 0 deletions lib/edit/MonsterRaceDefinitions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38217,6 +38217,20 @@ S:1_IN_5 | SHOOT
D:$This helicopter is about to explode.
D:今にも爆発しそうなヘリコプターだ。

N:2085:シャア専用サク
E:Saku Char custom
G:H:r
I:120:30d14:12:50:10
W:30:5:0:400:0:0
B:HIT:HURT:1d12
F:PREVENT_SUDDEN_MAGIC |
F:EMPTY_MIND | COLD_BLOOD | BASH_DOOR |
F:IM_FIRE | IM_COLD | IM_POIS
F:NO_CONF | NO_SLEEP | NO_FEAR | NONLIVING |
S:1_IN_2 |
S:MISSILE
D:色々通常の三倍なサクらしいが、そんなに三倍ではないようだ。

# N: serial number : monster name
# G: symbol : color
# I: speed : hit points : vision : armor class : alertness
Expand Down
3 changes: 2 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,8 @@ hengband_SOURCES = \
monster-race/race-ability-flags.h \
monster-race/race-ability-mask.cpp monster-race/race-ability-mask.h \
monster-race/race-behavior-flags.h \
monster-race/race-brightness-flags.h \
monster-race/race-brightness-mask.h monster-race/race-brightness-mask.cpp \
monster-race/race-drop-flags.h \
monster-race/race-feature-flags.h \
monster-race/race-feature-mask.cpp monster-race/race-feature-mask.h \
Expand Down Expand Up @@ -994,7 +996,6 @@ hengband_SOURCES = \
view/status-first-page.cpp view/status-first-page.h \
view/status-bars-table.cpp view/status-bars-table.h \
\
window/display-sub-window-items.cpp window/display-sub-window-items.h \
window/display-sub-window-spells.cpp window/display-sub-window-spells.h \
window/display-sub-windows.cpp window/display-sub-windows.h \
window/main-window-left-frame.cpp window/main-window-left-frame.h \
Expand Down
19 changes: 10 additions & 9 deletions src/action/activation-execution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ static void decide_activation_level(ae_type *ae_ptr)
return;
}

if (((ae_ptr->o_ptr->tval == ItemKindType::RING) || (ae_ptr->o_ptr->tval == ItemKindType::AMULET)) && ae_ptr->o_ptr->is_ego()) {
const auto tval = ae_ptr->o_ptr->bi_key.tval();
if (((tval == ItemKindType::RING) || (tval == ItemKindType::AMULET)) && ae_ptr->o_ptr->is_ego()) {
ae_ptr->lev = egos_info[ae_ptr->o_ptr->ego_idx].level;
ae_ptr->broken = egos_info[ae_ptr->o_ptr->ego_idx].broken_rate;
}
Expand Down Expand Up @@ -190,10 +191,10 @@ static bool activate_artifact(PlayerType *player_ptr, ItemEntity *o_ptr)

switch (act_ptr->index) {
case RandomArtActType::BR_FIRE:
o_ptr->timeout = ((o_ptr->tval == ItemKindType::RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
o_ptr->timeout = o_ptr->bi_key == BaseitemKey(ItemKindType::RING, SV_RING_FLAMES) ? 200 : 250;
return true;
case RandomArtActType::BR_COLD:
o_ptr->timeout = ((o_ptr->tval == ItemKindType::RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
o_ptr->timeout = o_ptr->bi_key == BaseitemKey(ItemKindType::RING, SV_RING_ICE) ? 200 : 250;
return true;
case RandomArtActType::TERROR:
o_ptr->timeout = 3 * (player_ptr->lev + 10);
Expand All @@ -208,7 +209,7 @@ static bool activate_artifact(PlayerType *player_ptr, ItemEntity *o_ptr)

static bool activate_whistle(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::WHISTLE) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::WHISTLE) {
return false;
}

Expand Down Expand Up @@ -240,7 +241,7 @@ static bool activate_whistle(PlayerType *player_ptr, ae_type *ae_ptr)

static bool scouter_probing(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::HELM || ae_ptr->o_ptr->sval != SV_SCOUTER) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::HELM || ae_ptr->o_ptr->bi_key.sval() != SV_SCOUTER) {
return false;
}

Expand All @@ -250,7 +251,7 @@ static bool scouter_probing(PlayerType *player_ptr, ae_type *ae_ptr)

static bool activate_firethrowing(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::BOW || ae_ptr->o_ptr->sval != SV_FLAMETHROWER) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::BOW || ae_ptr->o_ptr->bi_key.sval() != SV_FLAMETHROWER) {
return false;
}

Expand All @@ -266,7 +267,7 @@ static bool activate_firethrowing(PlayerType *player_ptr, ae_type *ae_ptr)

static bool activate_rosmarinus(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::BOW || ae_ptr->o_ptr->sval != SV_ROSMARINUS) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::BOW || ae_ptr->o_ptr->bi_key.sval() != SV_ROSMARINUS) {
return false;
}

Expand All @@ -281,7 +282,7 @@ static bool activate_rosmarinus(PlayerType *player_ptr, ae_type *ae_ptr)

static bool activate_stungun(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::JUNK || ae_ptr->o_ptr->sval != SV_STUNGUN) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::JUNK || ae_ptr->o_ptr->bi_key.sval() != SV_STUNGUN) {
return false;
}

Expand All @@ -299,7 +300,7 @@ static bool activate_stungun(PlayerType *player_ptr, ae_type *ae_ptr)

static bool activate_raygun(PlayerType *player_ptr, ae_type *ae_ptr)
{
if (ae_ptr->o_ptr->tval != ItemKindType::BOW || ae_ptr->o_ptr->sval != SV_RAYGUN) {
if (ae_ptr->o_ptr->bi_key.tval() != ItemKindType::BOW || ae_ptr->o_ptr->bi_key.sval() != SV_RAYGUN) {
return false;
}

Expand Down
8 changes: 4 additions & 4 deletions src/action/open-util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ OBJECT_IDX chest_check(FloorType *floor_ptr, POSITION y, POSITION x, bool trappe
{
auto *g_ptr = &floor_ptr->grid_array[y][x];
for (const auto this_o_idx : g_ptr->o_idx_list) {
ItemEntity *o_ptr;
o_ptr = &floor_ptr->o_list[this_o_idx];
if ((o_ptr->tval == ItemKindType::CHEST) && (((!trapped) && (o_ptr->pval)) || /* non empty */
((trapped) && (o_ptr->pval > 0)))) { /* trapped only */
const auto &item = floor_ptr->o_list[this_o_idx];
const auto is_empty = trapped || (item.pval == 0);
const auto trapped_only = trapped && (item.pval > 0);
if ((item.bi_key.tval() == ItemKindType::CHEST) && (!is_empty || trapped_only)) {
return this_o_idx;
}
}
Expand Down
6 changes: 1 addition & 5 deletions src/artifact/fixed-art-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ bool make_artifact(PlayerType *player_ptr, ItemEntity *o_ptr)
continue;
}

if (a_ref.bi_key.tval() != o_ptr->tval) {
continue;
}

if (a_ref.bi_key.sval() != o_ptr->sval) {
if (a_ref.bi_key != o_ptr->bi_key) {
continue;
}

Expand Down
19 changes: 10 additions & 9 deletions src/artifact/random-art-generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@

static bool weakening_artifact(ItemEntity *o_ptr)
{
const auto bi_id = lookup_baseitem_id({ o_ptr->tval, o_ptr->sval });
auto *k_ptr = &baseitems_info[bi_id];
const auto bi_id = lookup_baseitem_id(o_ptr->bi_key);
const auto &baseitem = baseitems_info[bi_id];
auto flags = object_flags(o_ptr);

if (flags.has(TR_KILL_EVIL)) {
Expand All @@ -53,12 +53,12 @@ static bool weakening_artifact(ItemEntity *o_ptr)
return true;
}

if (k_ptr->dd < o_ptr->dd) {
if (baseitem.dd < o_ptr->dd) {
o_ptr->dd--;
return true;
}

if (k_ptr->ds < o_ptr->ds) {
if (baseitem.ds < o_ptr->ds) {
o_ptr->ds--;
return true;
}
Expand Down Expand Up @@ -178,7 +178,8 @@ static bool decide_random_art_cursed(const bool a_scroll, ItemEntity *o_ptr)
return true;
}

if (((o_ptr->tval == ItemKindType::AMULET) || (o_ptr->tval == ItemKindType::RING)) && o_ptr->is_cursed()) {
const auto tval = o_ptr->bi_key.tval();
if (((tval == ItemKindType::AMULET) || (tval == ItemKindType::RING)) && o_ptr->is_cursed()) {
return true;
}

Expand Down Expand Up @@ -215,7 +216,7 @@ static void invest_powers(PlayerType *player_ptr, ItemEntity *o_ptr, int *powers
break;
case 3:
case 4:
if (one_in_(2) && o_ptr->is_weapon_ammo() && (o_ptr->tval != ItemKindType::BOW)) {
if (one_in_(2) && o_ptr->is_weapon_ammo() && (o_ptr->bi_key.tval() != ItemKindType::BOW)) {
if (a_cursed && !one_in_(13)) {
break;
}
Expand Down Expand Up @@ -254,7 +255,7 @@ static void strengthen_pval(ItemEntity *o_ptr)
{
if (o_ptr->art_flags.has(TR_BLOWS)) {
o_ptr->pval = randint1(2);
if ((o_ptr->tval == ItemKindType::SWORD) && (o_ptr->sval == SV_HAYABUSA)) {
if (o_ptr->bi_key == BaseitemKey(ItemKindType::SWORD, SV_HAYABUSA)) {
o_ptr->pval++;
}
} else {
Expand Down Expand Up @@ -323,7 +324,7 @@ static void invest_negative_modified_value(ItemEntity *o_ptr)

static void reset_flags_poison_needle(ItemEntity *o_ptr)
{
if ((o_ptr->tval != ItemKindType::SWORD) || (o_ptr->sval != SV_POISON_NEEDLE)) {
if (o_ptr->bi_key != BaseitemKey(ItemKindType::SWORD, SV_POISON_NEEDLE)) {
return;
}

Expand Down Expand Up @@ -466,7 +467,7 @@ bool become_random_artifact(PlayerType *player_ptr, ItemEntity *o_ptr, bool a_sc
}

invest_negative_modified_value(o_ptr);
if (((o_ptr->artifact_bias == BIAS_MAGE) || (o_ptr->artifact_bias == BIAS_INT)) && (o_ptr->tval == ItemKindType::GLOVES)) {
if (((o_ptr->artifact_bias == BIAS_MAGE) || (o_ptr->artifact_bias == BIAS_INT)) && (o_ptr->bi_key.tval() == ItemKindType::GLOVES)) {
o_ptr->art_flags.set(TR_FREE_ACT);
}

Expand Down
4 changes: 3 additions & 1 deletion src/artifact/random-art-misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ static void invest_misc_hit_dice(ItemEntity *o_ptr)
o_ptr->art_flags.set(TR_SHOW_MODS);
HIT_PROB bonus_h = 4 + (HIT_PROB)randint1(11);
int bonus_d = 4 + (int)randint1(11);
if ((o_ptr->tval != ItemKindType::SWORD) && (o_ptr->tval != ItemKindType::POLEARM) && (o_ptr->tval != ItemKindType::HAFTED) && (o_ptr->tval != ItemKindType::DIGGING) && (o_ptr->tval != ItemKindType::GLOVES) && (o_ptr->tval != ItemKindType::RING)) {
const auto is_weapon = o_ptr->is_melee_weapon();
const auto tval = o_ptr->bi_key.tval();
if (!is_weapon && (tval != ItemKindType::GLOVES) && (tval != ItemKindType::RING)) {
bonus_h /= 2;
bonus_d /= 2;
}
Expand Down
9 changes: 6 additions & 3 deletions src/artifact/random-art-pval-investor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static bool random_art_bias_charisma(ItemEntity *o_ptr)

static bool random_art_bias_magic_mastery(ItemEntity *o_ptr)
{
if ((o_ptr->tval != ItemKindType::GLOVES) || o_ptr->art_flags.has(TR_MAGIC_MASTERY)) {
if ((o_ptr->bi_key.tval() != ItemKindType::GLOVES) || o_ptr->art_flags.has(TR_MAGIC_MASTERY)) {
return false;
}

Expand Down Expand Up @@ -135,7 +135,10 @@ static bool switch_random_art_bias(ItemEntity *o_ptr)

static bool random_art_bias_decrease_mana(ItemEntity *o_ptr)
{
if (((o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY)) || (o_ptr->tval != ItemKindType::SOFT_ARMOR) || (o_ptr->sval != SV_ROBE) || o_ptr->art_flags.has(TR_DEC_MANA) || !one_in_(3)) {
auto should_skip = (o_ptr->artifact_bias != BIAS_MAGE) && (o_ptr->artifact_bias != BIAS_PRIESTLY);
should_skip |= o_ptr->bi_key != BaseitemKey(ItemKindType::SOFT_ARMOR, SV_ROBE);
should_skip |= o_ptr->art_flags.has(TR_DEC_MANA);
if (should_skip || !one_in_(3)) {
return false;
}

Expand Down Expand Up @@ -249,7 +252,7 @@ void random_plus(ItemEntity *o_ptr)
break;
case 22:
case 23:
if (o_ptr->tval == ItemKindType::BOW) {
if (o_ptr->bi_key.tval() == ItemKindType::BOW) {
random_plus(o_ptr);
break;
}
Expand Down
Loading

0 comments on commit 8a9abc0

Please sign in to comment.