summaryrefslogtreecommitdiff
path: root/src/dungeon_random_1.c
diff options
context:
space:
mode:
authorCheng Hann Gan <chenghanngan.us@gmail.com>2021-12-12 15:52:06 -0500
committerGitHub <noreply@github.com>2021-12-12 12:52:06 -0800
commitc53bdc35f8bdd401e90dfae263a3f5fc9182f86b (patch)
tree6111353227b153e4aa56422d91e4e79288ce7376 /src/dungeon_random_1.c
parenta34c9ab91b553fcb1f72b94eb912b94bea58885b (diff)
Dungeon random/AI decomp + converted positions to structs (#83)
* Decomped RollPercentChance() * Decomped DungeonRandomCapped() * Decomped DungeonRandom() * Decomped FindRockItemTargets() -Added position struct.
Diffstat (limited to 'src/dungeon_random_1.c')
-rw-r--r--src/dungeon_random_1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dungeon_random_1.c b/src/dungeon_random_1.c
new file mode 100644
index 0000000..a6941f3
--- /dev/null
+++ b/src/dungeon_random_1.c
@@ -0,0 +1,13 @@
+#include "global.h"
+#include "dungeon_random_1.h"
+
+#include "dungeon_random.h"
+
+bool8 RollPercentChance(s32 percentChance)
+{
+ if (DungeonRandomCapped(100) < percentChance)
+ {
+ return TRUE;
+ }
+ return FALSE;
+}