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

Backport features from k8IVAN #665

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7aa508c
Merge remote-tracking branch 'upstream/master'
red-kangaroo Jun 17, 2019
fb047bf
Merge remote-tracking branch 'upstream/master'
red-kangaroo Jul 24, 2019
2e947f0
Merge remote-tracking branch 'upstream/master'
red-kangaroo Sep 7, 2019
bd0f631
Merge remote-tracking branch 'upstream/master'
red-kangaroo Jan 1, 2020
938977b
Merge remote-tracking branch 'upstream/master'
red-kangaroo Feb 26, 2020
4fe377f
Merge remote-tracking branch 'upstream/master'
red-kangaroo Mar 1, 2020
3c83f9d
Merge remote-tracking branch 'upstream/master'
red-kangaroo Mar 20, 2020
48579bb
Merge remote-tracking branch 'upstream/master'
red-kangaroo Oct 7, 2021
dcc6987
Merge remote-tracking branch 'upstream/master'
red-kangaroo Feb 8, 2022
a8ad968
Merge remote-tracking branch 'upstream/master'
red-kangaroo Apr 22, 2022
e2918b9
Merge branch 'Attnam:master' into master
red-kangaroo Aug 15, 2022
2927f6c
Merge remote-tracking branch 'upstream/master'
Feb 11, 2025
452b45c
cicd: VS 17 2022
Feb 11, 2025
aa11d8e
refact: Add gitignore
Feb 11, 2025
35233ec
fix: Feline brackets
Feb 11, 2025
3c9ba9f
fix: Aslona wizard RAND call
Feb 11, 2025
ace77df
Add some art
red-kangaroo Aug 15, 2022
c88a043
Add opposed random check
red-kangaroo Sep 30, 2022
98318e7
feat: Make Lobh-se vomit more
Feb 11, 2025
bdd0ea8
feat: Skeleton puppy drools ectoplasm
Feb 11, 2025
f9cea19
feat: Sound resistance helps against siren song
Feb 12, 2025
28b4735
fix: Mirror imp death should not replace terrain
Feb 12, 2025
0ac2840
doc: Lantern lore by Dark-Star2018
Feb 12, 2025
2fcf992
fix: Messed up merge
Feb 13, 2025
e934279
fix: Plural fish
Feb 12, 2025
e3f677a
fix: Make sure that goblin living quarters are big enough
Feb 12, 2025
a6eb41d
feat: Allow opening chests in wilderness
Feb 13, 2025
3ee851f
Merge branch 'master' into k8
ryfactor Feb 14, 2025
111357e
Merge branch 'master' into master
ryfactor Feb 14, 2025
d5027f1
fix: Tailoring mode info loads twice
Feb 14, 2025
86f2700
doc: INSTALL with VS 2022
Feb 14, 2025
7fbd9e1
feat: Make crafting an experimental option
Feb 14, 2025
6744a07
feat: Make more new options default
Feb 14, 2025
c031e66
feat: Consistent crafting command
Feb 14, 2025
bb68966
feat: Quaff in NetHack scheme
Feb 14, 2025
78e46fb
cicd: Dev version
Feb 14, 2025
0becf4b
Merge branch 'master' into k8
Feb 14, 2025
3343f25
feat: Halloween surprise
Feb 16, 2025
38d11ac
fix: Skeleton puppy drools blood
Feb 17, 2025
de0f9e7
fix: Duplicate fields in scripts
Feb 17, 2025
207afb6
doc: Known issue with localtime
Feb 20, 2025
303883c
feat: Equip both paired items
Feb 20, 2025
e836ef7
fix: CStr, not festring
Feb 21, 2025
1205611
fix: BlurMemory and Amnesia fail in wilderness
Feb 21, 2025
e7ba98f
feat: Show weight in kg
Feb 21, 2025
8399cb2
fix: No need for doubled brackets
Feb 21, 2025
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
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Do not track these files.

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]
__pycache__

# Log files
log/
*.log

# Package files
*.jar
/*egg-info/

# Maven
target/

# JetBrains IDE
.idea/
venv/

# Visual Studio
.vs*

# Unit test reports
TEST*.xml

# Generated by MacOS
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

# Temporary files
~$*.doc*
~$*.xls*
~$*.ppt*
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ project(ivan CXX C)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

set(VERSION_MAJOR 0)
set(VERSION_MINOR 59)
set(VERSION_MINOR 60)
set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}")
#set(VERSION_PATCH 0)
#set(VERSION_PATCH dev)
#set(PROJECT_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")

set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
Expand Down
2 changes: 1 addition & 1 deletion CMakeSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"configurations": [
{
"name": "x86-Release",
"generator": "Visual Studio 15 2017",
"generator": "Visual Studio 17 2022",
"configurationType": "Release",
"inheritEnvironments": [
"msvc_x86"
Expand Down
2 changes: 1 addition & 1 deletion Doc/HowTo/ConfigSyntax.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

{
let S = "string", N = "number", T = "truth", C = "cycle";
let OPTIONS = new Map([["DefaultName",S],["FantasyNamePattern",S],["DefaultPetName",S],["AutoSaveInterval",N],["AltAdentureInfo",T],["BeNice",T],["HoldPosMaxDist",N],["MemorizeEquipmentMode",C],["WarnAboutVeryDangerousMonsters",T],["AutoDropLeftOvers",T],["SmartOpenCloseApply",T],["CenterOnPlayerAfterLook",T],["ShowGodInfo",T],["ShowMapAtDetectMaterial",T],["GoOnStopMode",C],["WaitNeutralsMoveAway",T],["Contrast",N],["WindowWidth",N],["WindowHeight",N],["GraphicsScale",C],["FullScreenMode",T],["ScalingQuality",C],["LookZoom",T],["XBRZScale",C],["XBRZSquaresAroundPlayer",N],["SilhouetteScale",C],["AltSilhouette",C],["AltSilhouettePreventColorGlitch",C],["AltListItemPos",C],["AltListItemWidth",N],["StackListPageLength",N],["DungeonGfxScale",C],["OutlinedGfx",T],["FrameSkip",N],["ShowItemsAtPlayerSquare",C],["RotateTimesPerSquare",C],["HitIndicator",C],["ShowMap",C],["PlaySounds",T],["Volume",N],["MIDIOutputDevice",C],["DirectionKeyMap",C],["SaveGameSortMode",C],["ShowTurn",T],["ShowFullDungeonName",T],["SelectedBkgColor",S],["AllowImportOldSavegame",T],["SavegameSafely",T],["HideWeirdHitAnimationsThatLookLikeMiss",T],["GenerateDefinesValidator",T]]);
let OPTIONS = new Map([["DefaultName",S],["FantasyNamePattern",S],["DefaultPetName",S],["AutoSaveInterval",N],["AltAdventureInfo",T],["BeNice",T],["HoldPosMaxDist",N],["MemorizeEquipmentMode",C],["WarnAboutVeryDangerousMonsters",T],["AutoDropLeftOvers",T],["SmartOpenCloseApply",T],["CenterOnPlayerAfterLook",T],["ShowGodInfo",T],["ShowMapAtDetectMaterial",T],["GoOnStopMode",C],["WaitNeutralsMoveAway",T],["Contrast",N],["WindowWidth",N],["WindowHeight",N],["GraphicsScale",C],["FullScreenMode",T],["ScalingQuality",C],["LookZoom",T],["XBRZScale",C],["XBRZSquaresAroundPlayer",N],["SilhouetteScale",C],["AltSilhouette",C],["AltSilhouettePreventColorGlitch",C],["AltListItemPos",C],["AltListItemWidth",N],["StackListPageLength",N],["DungeonGfxScale",C],["OutlinedGfx",T],["FrameSkip",N],["ShowItemsAtPlayerSquare",C],["RotateTimesPerSquare",C],["HitIndicator",C],["ShowMap",C],["PlaySounds",T],["Volume",N],["MIDIOutputDevice",C],["DirectionKeyMap",C],["SaveGameSortMode",C],["ShowTurn",T],["ShowFullDungeonName",T],["SelectedBkgColor",S],["AllowImportOldSavegame",T],["SavegameSafely",T],["HideWeirdHitAnimationsThatLookLikeMiss",T],["GenerateDefinesValidator",T]]);
let VARIABLES = new Map([["XSize",30],["YSize",30]]);

let isdigit = function (char) { return /[0-9]/.test(char); };
Expand Down
17 changes: 17 additions & 0 deletions Doc/Lore/Fiction/Lantern.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Many are the names in the common tongues for the great blessing which holy Legifer hath bestowed on us: "Lumes", "Glims", "Lanthorns", "Little-stars", "Twinkleboxes" and countless others in the tongue of Man alone. Many more exist in the languages of Dwarven-kind or the Elvish kindred and even the barbaric blabber of the Orcs, far more than could be mentioned.

Yet how poor and pitiful is the gratitude returned to the lord of Order for these daily wonders despite the great benefit that they provide! Little do we seem to think of what should happen if His blessing were to be withdrawn across the world, leaving us all groping in the dark. So for the further enlightenment of the reader (in every meaning of the term) here is the known history of His generosity:

In ages long past when cities had not begun and villages were but rudely built of straw-daubed walls with hide rooves, all except the highest of nobles lit torches for their homes within and without. Often naught else could be had: rushes burned but would only grow on the banks of warm rivers while coal mining scarce existed past tiny pits. Immeasurable was the amount of labor to keep the fickle fires of countless torches fed well enough to burn brightly but also guard them from catching aflame to everything else!

Of all the torments of the forces of Chaos in those hard days, few were of greater delight in their loathesome eyes than to set a feeble spirit to flitter about a torch or luchina so that it leaned closely to a curtain to set it ablaze, or topple a poorly fixed oil lamp to the floor to spread flaming liquid all about. Such wicked conjurations gained the name chandl-wyghts (or "candle devils" in more modern speech). in time the more devious servants of darkness learnt to use the mere threat of the spirits for extortion that proved of greater effect than the wanton destructiveness of the spirits themselves. Sigils of protection began to be sold by such merchants who would trade in them that offered a tenday or a month or a season's worth of respite despite furious efforts to quell such round-about funding of evil. Even these sigils in turn became targets for a few bold charlatans, selling counterfeit sigils that held no magic protection at all. However, these forgeries were especially dangerous; risking fates far worse than death for the makers unfortunate enough to be caught by the 'true' salers.

At length this ville traffic reached the household of a leader of an early guild of chandlers whose name has been lost to the ages. He apparently found one morning a threat scribbled upon a scrap of parchment to pay his tithe to the temple instead for 'insuring' the safety of his family and home. As his very life's work was the proper making of lights and fire-guarding, his rage was so kindled that he at once ran to the temple to shout with such a voice that half the village heard his oaths, demanding some means of the Lawful gods to stop his tormentors. Such had been his devotion to that no less than Iustitia herself appeared on the threshold of the temple. With a voice of thunder she proclaimed a call to holy war upon evil to last until the sun had set that day.

Of what events transpired that day we know little, save that every man and strong boy for miles around grabbed such arms and armor that were at hand to answer Iustitia's summon to go forth putting a great many dens of evil to the sword. As the last flickers of daylight vanished over the horizon, the mighty archangel vanished to leave behind something most wondrous. A massive tablet stood where she had been, made of a material like glass yet far stronger that no man had ever seen the like of before. It would at some length be given the name "illithium" by learned men of the time. The lengthy canticle of holy words the tablet bore wove a spell that lit a brilliant white glow from within a vessel held by the one with the patience to complete the wearisome chant. As if this gift were not great enough, so amazing was Legifer's grace that even a simple-minded apprentice was able to complete it so long as his attention stayed unbroken.

As quickly as they could be made, skilled smiths began fashioning more vessels for these blessed lights out of tin or brass with many piercings to let out the light from within. But the tradesman who had first begged Legifer's aid crafted the first true lantern encompassed with glass, knowing its affinity to the god. By the time the pious man went to his eternal reward he claimed to have fashioned at least a hundred-score lanterns with his own hands - and likely so!

With the dispersal of these blessed lights all across the lands, not only were the ruinous powers sorely hurt but also many who would have perished in some firey tragedy hath lived full lives instead. Countless hearths and halls came to be lit without smoke or a pence's worth of tinder. To say nothing of the relief to forest-wardens when the common man needed far less wood throughout the year.

Now let thy mind be enlightened by the full truth of Legifer's beneficence, that you may reflect upon his gift to the full measure.
Binary file modified Graphics/Char.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Graphics/nuke.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 32 additions & 16 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ cd build
cmake .. # ".." refers to the parent directory of "build"
make
make install
Note: This will make changes to /usr/bin, and you have to either run "sudo make install" instead, or log in as root.

Note: This will make changes to /usr/bin, and you have to either run "sudo make install" instead, or log in as root.
Note: Wizard Mode is disabled by default. To enable it run:

mkdir build
Expand All @@ -40,19 +41,19 @@ like this: CMAKE_CXX_FLAGS="-DFELIST_WAITKEYUP"

Under DOS:

If you have DJGPP 2.03+ and gcc 2.952+
installed, type:
If you have DJGPP 2.03+ and gcc 2.952+ installed, type:

make -f ivandj.mak

--------------------------------------

Under Windows - Microsoft Visual Studio 2017 (or better):
Under Windows - Microsoft Visual Studio 2022:

You will need to install the C++ tools with CMake support, along with Git integrations from the Visual Studio Installer.
We will not be using Visual Studio in the traditional way with everything squished into a solution file.
Instead we will use Visual Studio to open a repo folder with a top-level CMakeLists.txt, in conjunction with a CMakeSettings.json file to create the cmake build files.
Then we will use msvc to compile ivan.exe, with the help of libraries we install from vcpkg using Powershell (PS).
You will need to install the C++ tools with CMake support, along with Git integrations from the Visual Studio Installer.
We will not be using Visual Studio in the traditional way with everything squished into a solution file.
Instead we will use Visual Studio to open a repo folder with a top-level CMakeLists.txt, in conjunction with
a CMakeSettings.json file to create the cmake build files.
Then we will use msvc to compile ivan.exe, with the help of libraries we install from vcpkg using Powershell (PS).

Install vcpkg and install the needed libraries using Powershell:
Here is a condensed summary of applicable instructions from https://github.com/microsoft/vcpkg
Expand All @@ -76,15 +77,16 @@ zlib:x86-windows 1.2.11-5 A compressio

Clone attnam/ivan into a directory (for example C:\Users\yourname\source\repos\ivan)

Open Microsoft Visual Studio (2017)
Open Microsoft Visual Studio 2022

Go File->Open Folder

Select C:\Users\yourname\source\repos\ivan

Some stuff will happen automatically. The CMakeSettings.json file will be found, and the CMake cache will be generated.

Next to the green "play" button is some text (Select Startup Item...) in a gray dropdown menu. Select "ivan.exe (Install) (ivan\ivan.exe)".
Next to the green "play" button is some text (Select Startup Item...) in a gray dropdown menu.
Select "ivan.exe (Install) (ivan\ivan.exe)".

"Build" will appear in the menu next to "CMake". Click Build->ivan.exe (Install) (ivan\ivan.exe) F7

Expand All @@ -93,6 +95,14 @@ This will build ivan.exe and install all the components, automatically copying t
The build folder is located in C:\Users\yourname\CMakeBuilds\some-long-code-here-abcdef123456\install\x86-Release\ivan
Go there and hit ivan.exe, and you're playing IVAN built using Microsoft Visual Studio!!!

--------------------------------------

Under Windows - Microsoft Visual Studio OTHER THAN 2022:

Instructions are the same as for Microsoft Visual Studio 2022, except that you must open CMakeSettings.json
in the project folder and change the generator to your version of VS. For example:

"generator": "Visual Studio 15 2017"

--------------------------------------

Expand Down Expand Up @@ -136,11 +146,13 @@ Follow instructions on the page to install correctly.

Run MSYS2.exe from either the "-msys64" or "-msys32" folder, depending on your system, and type these commands
$ pacman -Syu
Proceed with installation (option Y), then exit by closing the terminal window. The terminal window will crash and burn eventually but may take some time to do so.
Proceed with installation (option Y), then exit by closing the terminal window.
The terminal window will crash and burn eventually but may take some time to do so.

Run MSYS2.exe again:
$ pacman -Su
proceed with installation (option Y). This will take a long time to download all the packages, depending on your download speed
Proceed with installation (option Y).
This will take a long time to download all the packages, depending on your download speed.

$ pacman -S git
Proceed with installation (option Y) etcetera
Expand All @@ -159,18 +171,20 @@ $ pacman -S mingw-w64-i686-SDL2_mixer

$ pacman -S mingw-w64-i686-pkg-config

Now the MSYS2 build system is installed, you only need to follow the instructions below to keep IVAN up to date
Now the MSYS2 build system is installed, you only need to follow the instructions below to keep IVAN up to date.

Create an empty folder in \ivan\ called msys2
run MinGW32.exe (from your "-msys64" or "-msys32" folder, whichever is applicable) and change directory to your newly created \ivan\msys2\ folder
Run MinGW32.exe (from your "-msys64" or "-msys32" folder, whichever is applicable) and change directory to your
newly created \ivan\msys2\ folder.

In MinGW32.exe type the following commands, respecting the direction of the slashes:
$ cmake .. -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=C:/ivan/inst_msys2
$ make -j4 install

Navigate to \ivan\inst_msys2\ivan and you will find the ivan.exe executable!

You will probably need to copy a bunch of DLLs into the directory where ivan.exe is located. These may include the following, likely not an exhaustive list, but they can be found under for example C:\-msys64\mingw32\bin:
You will probably need to copy a bunch of DLLs into the directory where ivan.exe is located. These may include
the following, likely not an exhaustive list, but they can be found under for example C:\-msys64\mingw32\bin:
libpng16-16.dll
libstdc++-6.dll
libwinpthread-1.dll
Expand All @@ -180,7 +194,9 @@ libSDL2_mixer-2-0-0.dll
libmad-0.dll


Use dependencywalker if you need to check for missing libraries, and if you get the message: "error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)" then you need to include zlib1.dll
Use dependencywalker if you need to check for missing libraries, and if you get the message:
"error cannot find entrypoint inflateValidate (in dll libpng16-16.dll)"
then you need to include zlib1.dll

--------------------------------------

Expand Down
6 changes: 4 additions & 2 deletions Main/Include/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ class game
static long GetScore();
static truth TweraifIsFree();
static truth IsXMas();
static truth IsSamhain();
static int AddToItemDrawVector(const itemvector&);
static void ClearItemDrawVector();
static void ItemEntryDrawer(bitmap*, v2, uint);
Expand Down Expand Up @@ -501,17 +502,18 @@ class game
static void SetEnterImage(cbitmap* What) { EnterImage = What; }
static void SetEnterTextDisplacement(v2 What){ EnterTextDisplacement = What; }
static int getDefaultItemsListWidth(){ return iListWidth; }
static void AddDebugDrawOverlayFunction(dbgdrawoverlay ddo){vDbgDrawOverlayFunctions.push_back(ddo);}
static void AddDebugDrawOverlayFunction(dbgdrawoverlay ddo){ vDbgDrawOverlayFunctions.push_back(ddo); }
static int GetCurrentDungeonTurnsCount(){return iCurrentDungeonTurn;}
static int GetSaveFileVersionHardcoded();
static void ValidateCommandKeys(char Key1,char Key2,char Key3);
static void ValidateCommandKeys(char Key1, char Key2, char Key3);
static truth ConfigureCustomKeys();
static festring ToCharIfPossible(int i);
static truth ValidateCustomCmdKey(int iNewKey, int iIgnoreIndex, bool bMoveKeys);
static festring GetMoveKeyDesc(int i);
static void LoadCustomCommandKeys();
static int GetWorldShape() { return WorldShape; }
static void SetWorldShape(int What) { WorldShape = What; }
static bool OpposedCheck(int first, int second, int cap = 5);
private:
static void UpdateCameraCoordinate(int&, int, int, int);
static cchar* const Alignment[];
Expand Down
13 changes: 8 additions & 5 deletions Main/Include/iconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ class ivanconfig
static truth GetLookZoom() { return LookZoom.Value; }
static truth IsXBRZScale() { return XBRZScale.Value; }
static truth IsAutoPickupThrownItems() { return AutoPickupThrownItems.Value; }
static truth IsAltAdentureInfo() { return AltAdentureInfo.Value; }
static truth IsAltAdventureInfo() { return AltAdventureInfo.Value; }
static truth UseDescriptiveHP() { return DescriptiveHP.Value; }
static truth GetNoPet() { return StartWithNoPet.Value; }
static truth GetPet() { return StartWithPet.Value; }
static int GetXBRZSquaresAroundPlayer() { return XBRZSquaresAroundPlayer.Value; }
static int GetStartingDungeonGfxScale() { return iStartingDungeonGfxScale; }
static int GetStartingFontGfx() { return iStartingFontGfx; }
Expand All @@ -83,6 +83,7 @@ class ivanconfig
static int GetWorldShapeConfig() { return WorldShapeConfig.Value; }
static int GetWorldSeedConfig() { return WorldSeedConfig.Value; }
static int GetWorldSizeNumber() { return WorldSizeConfig.Value; }
static truth IsCraftingEnabled() { return CraftingEnabled.Value; }

#ifndef __DJGPP__
static int GetGraphicsScale() { return GraphicsScale.Value; }
Expand Down Expand Up @@ -196,7 +197,7 @@ class ivanconfig
static stringoption SelectedBkgColor;
static stringoption AutoPickUpMatching;
static numberoption AutoSaveInterval;
static truthoption AltAdentureInfo;
static truthoption AltAdventureInfo;
static truthoption CenterOnPlayerAfterLook;
static scrollbaroption Contrast;
static truthoption ShowGodInfo;
Expand Down Expand Up @@ -231,7 +232,7 @@ class ivanconfig
static truthoption XBRZScale;
static truthoption AutoPickupThrownItems;
static truthoption DescriptiveHP;
static truthoption StartWithNoPet;
static truthoption StartWithPet;

static cycleoption SaveGameSortMode;
static cycleoption DistLimitMagicMushrooms;
Expand Down Expand Up @@ -262,12 +263,14 @@ class ivanconfig
static scrollbaroption Volume;
static scrollbaroption SfxVolume;
static cycleoption MIDIOutputDevice;

static cycleoption WorldSizeConfig;
static cycleoption LandTypeConfig;
static cycleoption WorldShapeConfig;
static numberoption WorldSeedConfig;

static truthoption CraftingEnabled;

#ifndef __DJGPP__
static cycleoption GraphicsScale;
static truthoption FullScreenMode;
Expand Down
15 changes: 11 additions & 4 deletions Main/Source/char.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1615,8 +1615,8 @@ truth character::TryMove(v2 MoveVector, truth Important, truth Run, truth* pbWai
}
else
MoveTo = MoveTo; // Flat (default)


if(CanMove()
&& GetArea()->IsValidPos(MoveTo)
&& (CanMoveOn(GetNearWSquare(MoveTo))
Expand Down Expand Up @@ -9374,7 +9374,7 @@ void character::ShowAdventureInfo() const
{
graphics::SetAllowStretchedBlit();

if(ivanconfig::IsAltAdentureInfo())
if(ivanconfig::IsAltAdventureInfo())
{
ShowAdventureInfoAlt();
}
Expand Down Expand Up @@ -12687,7 +12687,14 @@ truth character::ReceiveSirenSong(character* Siren)
if(Siren->GetRelation(this) != HOSTILE)
return false;

if(RAND_N(GetAttribute(WILL_POWER)) > RAND_N(Siren->GetAttribute(CHARISMA)))
// Since siren song is a sound-based attack, modify base resistance by any sound resistance the character may have.
int songResist = GetAttribute(WILL_POWER);
if(!IsHumanoid())
songResist *= 1 + GetResistance(SOUND);
else if(HasHead())
songResist *= 1 + dynamic_cast<humanoid*>(this)->GetHead()->GetTotalResistance(SOUND);

if(game::OpposedCheck(songResist, Siren->GetAttribute(CHARISMA)))
{
if(IsPlayer())
ADD_MESSAGE("The beautiful song of %s makes you feel a little sad.", Siren->CHAR_NAME(DEFINITE));
Expand Down
Loading