isaacscript-common 69.5.0 → 71.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +16 -0
- package/dist/isaacscript-common.lua +183 -40
- package/dist/src/functions/challenges.d.ts +15 -1
- package/dist/src/functions/challenges.d.ts.map +1 -1
- package/dist/src/functions/challenges.lua +18 -0
- package/dist/src/objects/challengeBosses.d.ts +2 -0
- package/dist/src/objects/challengeBosses.d.ts.map +1 -1
- package/dist/src/objects/challengeBosses.lua +4 -2
- package/dist/src/objects/challengeCharacters.d.ts +5 -1
- package/dist/src/objects/challengeCharacters.d.ts.map +1 -1
- package/dist/src/objects/challengeCharacters.lua +4 -2
- package/dist/src/objects/challengeCollectibles.d.ts +56 -0
- package/dist/src/objects/challengeCollectibles.d.ts.map +1 -0
- package/dist/src/objects/challengeCollectibles.lua +80 -0
- package/dist/src/objects/challengeNames.lua +1 -1
- package/dist/src/objects/challengeTrinkets.d.ts +56 -0
- package/dist/src/objects/challengeTrinkets.d.ts.map +1 -0
- package/dist/src/objects/challengeTrinkets.lua +57 -0
- package/package.json +2 -2
- package/src/classes/ModFeature.ts +1 -1
- package/src/functions/challenges.ts +32 -1
- package/src/objects/challengeBosses.ts +3 -1
- package/src/objects/challengeCharacters.ts +6 -2
- package/src/objects/challengeCollectibles.ts +298 -0
- package/src/objects/challengeNames.ts +1 -1
- package/src/objects/challengeTrinkets.ts +56 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
4
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
|
+
--- Contains the extra starting collectibles for each challenge. Challenges that do not grant extra
|
|
6
|
+
-- starting collectibles are represented by an empty array.
|
|
7
|
+
--
|
|
8
|
+
-- Taken from the "challenges.xml" file.
|
|
9
|
+
____exports.CHALLENGE_COLLECTIBLES = {
|
|
10
|
+
[Challenge.NULL] = {},
|
|
11
|
+
[Challenge.PITCH_BLACK] = {},
|
|
12
|
+
[Challenge.HIGH_BROW] = {CollectibleType.NUMBER_ONE, CollectibleType.BUTT_BOMBS, CollectibleType.E_COLI, CollectibleType.FLUSH},
|
|
13
|
+
[Challenge.HEAD_TRAUMA] = {CollectibleType.SMALL_ROCK, CollectibleType.IRON_BAR, CollectibleType.TINY_PLANET, CollectibleType.SOY_MILK},
|
|
14
|
+
[Challenge.DARKNESS_FALLS] = {CollectibleType.PENTAGRAM, CollectibleType.RAZOR_BLADE, CollectibleType.SACRIFICIAL_DAGGER, CollectibleType.DARK_MATTER},
|
|
15
|
+
[Challenge.TANK] = {CollectibleType.BUCKET_OF_LARD, CollectibleType.INFAMY, CollectibleType.THUNDER_THIGHS},
|
|
16
|
+
[Challenge.SOLAR_SYSTEM] = {CollectibleType.HALO_OF_FLIES, CollectibleType.TRANSCENDENCE, CollectibleType.DISTANT_ADMIRATION, CollectibleType.FOREVER_ALONE},
|
|
17
|
+
[Challenge.SUICIDE_KING] = {CollectibleType.MY_REFLECTION, CollectibleType.MR_MEGA, CollectibleType.IPECAC},
|
|
18
|
+
[Challenge.CAT_GOT_YOUR_TONGUE] = {CollectibleType.GUPPYS_TAIL, CollectibleType.GUPPYS_HEAD, CollectibleType.GUPPYS_HAIRBALL},
|
|
19
|
+
[Challenge.DEMO_MAN] = {CollectibleType.DR_FETUS, CollectibleType.REMOTE_DETONATOR},
|
|
20
|
+
[Challenge.CURSED] = {CollectibleType.RAW_LIVER, CollectibleType.COMPASS, CollectibleType.TREASURE_MAP, CollectibleType.BLUE_MAP},
|
|
21
|
+
[Challenge.GLASS_CANNON] = {CollectibleType.LOKIS_HORNS, CollectibleType.EPIC_FETUS},
|
|
22
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS] = {CollectibleType.LEMON_MISHAP, CollectibleType.NINE_VOLT, CollectibleType.HABIT},
|
|
23
|
+
[Challenge.BEANS] = {
|
|
24
|
+
CollectibleType.BEAN,
|
|
25
|
+
CollectibleType.NINE_VOLT,
|
|
26
|
+
CollectibleType.BLACK_BEAN,
|
|
27
|
+
CollectibleType.PYRO,
|
|
28
|
+
CollectibleType.BUTT_BOMBS
|
|
29
|
+
},
|
|
30
|
+
[Challenge.ITS_IN_THE_CARDS] = {CollectibleType.BATTERY, CollectibleType.DECK_OF_CARDS, CollectibleType.NINE_VOLT, CollectibleType.STARTER_DECK},
|
|
31
|
+
[Challenge.SLOW_ROLL] = {CollectibleType.MY_REFLECTION, CollectibleType.CUPIDS_ARROW, CollectibleType.POLYPHEMUS},
|
|
32
|
+
[Challenge.COMPUTER_SAVY] = {CollectibleType.SPOON_BENDER, CollectibleType.TECHNOLOGY, CollectibleType.TECHNOLOGY_2},
|
|
33
|
+
[Challenge.WAKA_WAKA] = {CollectibleType.ANTI_GRAVITY, CollectibleType.STRANGE_ATTRACTOR},
|
|
34
|
+
[Challenge.HOST] = {CollectibleType.MULLIGAN, CollectibleType.SPIDERBABY},
|
|
35
|
+
[Challenge.FAMILY_MAN] = {
|
|
36
|
+
CollectibleType.BROTHER_BOBBY,
|
|
37
|
+
CollectibleType.SISTER_MAGGY,
|
|
38
|
+
CollectibleType.DADS_KEY,
|
|
39
|
+
CollectibleType.BFFS,
|
|
40
|
+
CollectibleType.ROTTEN_BABY
|
|
41
|
+
},
|
|
42
|
+
[Challenge.PURIST] = {},
|
|
43
|
+
[Challenge.XXXXXXXXL] = {},
|
|
44
|
+
[Challenge.SPEED] = {},
|
|
45
|
+
[Challenge.BLUE_BOMBER] = {CollectibleType.BROTHER_BOBBY, CollectibleType.KAMIKAZE, CollectibleType.MR_MEGA, CollectibleType.PYROMANIAC},
|
|
46
|
+
[Challenge.PAY_TO_PLAY] = {CollectibleType.SACK_OF_PENNIES, CollectibleType.MONEY_EQUALS_POWER},
|
|
47
|
+
[Challenge.HAVE_A_HEART] = {CollectibleType.CHARM_OF_THE_VAMPIRE},
|
|
48
|
+
[Challenge.I_RULE] = {CollectibleType.LADDER, CollectibleType.MOMS_KNIFE, CollectibleType.TRINITY_SHIELD, CollectibleType.BOOMERANG},
|
|
49
|
+
[Challenge.BRAINS] = {CollectibleType.BOBS_BRAIN, CollectibleType.BOBS_BRAIN, CollectibleType.BOBS_BRAIN, CollectibleType.THUNDER_THIGHS},
|
|
50
|
+
[Challenge.PRIDE_DAY] = {CollectibleType.RAINBOW_BABY, CollectibleType.THREE_DOLLAR_BILL},
|
|
51
|
+
[Challenge.ONANS_STREAK] = {CollectibleType.CHOCOLATE_MILK},
|
|
52
|
+
[Challenge.GUARDIAN] = {CollectibleType.HOLY_GRAIL, CollectibleType.ISAACS_HEART, CollectibleType.PUNCHING_BAG, CollectibleType.SPEAR_OF_DESTINY},
|
|
53
|
+
[Challenge.BACKASSWARDS] = {},
|
|
54
|
+
[Challenge.APRILS_FOOL] = {},
|
|
55
|
+
[Challenge.POKEY_MANS] = {CollectibleType.MOMS_EYESHADOW, CollectibleType.FRIEND_BALL},
|
|
56
|
+
[Challenge.ULTRA_HARD] = {CollectibleType.BOOK_OF_REVELATIONS, CollectibleType.CAFFEINE_PILL},
|
|
57
|
+
[Challenge.PONG] = {CollectibleType.CUPIDS_ARROW, CollectibleType.RUBBER_CEMENT},
|
|
58
|
+
[Challenge.SCAT_MAN] = {
|
|
59
|
+
CollectibleType.SKATOLE,
|
|
60
|
+
CollectibleType.POOP,
|
|
61
|
+
CollectibleType.NINE_VOLT,
|
|
62
|
+
CollectibleType.BUTT_BOMBS,
|
|
63
|
+
CollectibleType.BUTT_BOMBS,
|
|
64
|
+
CollectibleType.BUTT_BOMBS,
|
|
65
|
+
CollectibleType.E_COLI,
|
|
66
|
+
CollectibleType.BFFS,
|
|
67
|
+
CollectibleType.THUNDER_THIGHS,
|
|
68
|
+
CollectibleType.DIRTY_MIND
|
|
69
|
+
},
|
|
70
|
+
[Challenge.BLOODY_MARY] = {CollectibleType.BOOK_OF_BELIAL, CollectibleType.BLOOD_BAG, CollectibleType.ANEMIC, CollectibleType.BLOOD_OATH},
|
|
71
|
+
[Challenge.BAPTISM_BY_FIRE] = {CollectibleType.GUPPYS_PAW, CollectibleType.SCHOOLBAG, CollectibleType.URN_OF_SOULS},
|
|
72
|
+
[Challenge.ISAACS_AWAKENING] = {CollectibleType.TRINITY_SHIELD, CollectibleType.SPIRIT_SWORD, CollectibleType.MOMS_BRACELET},
|
|
73
|
+
[Challenge.SEEING_DOUBLE] = {245},
|
|
74
|
+
[Challenge.PICA_RUN] = {CollectibleType.MOMS_PURSE, CollectibleType.MOMS_BOX, CollectibleType.MARBLES},
|
|
75
|
+
[Challenge.HOT_POTATO] = {},
|
|
76
|
+
[Challenge.CANTRIPPED] = {},
|
|
77
|
+
[Challenge.RED_REDEMPTION] = {CollectibleType.DADS_KEY},
|
|
78
|
+
[Challenge.DELETE_THIS] = {CollectibleType.TMTRAINER}
|
|
79
|
+
}
|
|
80
|
+
return ____exports
|
|
@@ -16,7 +16,7 @@ ____exports.CHALLENGE_NAMES = {
|
|
|
16
16
|
[Challenge.DEMO_MAN] = "Demo Man",
|
|
17
17
|
[Challenge.CURSED] = "Cursed!",
|
|
18
18
|
[Challenge.GLASS_CANNON] = "Glass Cannon",
|
|
19
|
-
[Challenge.
|
|
19
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS] = "When Life Gives You Lemons",
|
|
20
20
|
[Challenge.BEANS] = "Beans!",
|
|
21
21
|
[Challenge.ITS_IN_THE_CARDS] = "It's In The Cards",
|
|
22
22
|
[Challenge.SLOW_ROLL] = "Slow Roll",
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Contains the starting trinket for each challenge. Challenges that do not grant a starting trinket
|
|
4
|
+
* will have a value of `undefined`.
|
|
5
|
+
*
|
|
6
|
+
* Taken from the "challenges.xml" file.
|
|
7
|
+
*/
|
|
8
|
+
export declare const CHALLENGE_TRINKETS: {
|
|
9
|
+
readonly 0: undefined;
|
|
10
|
+
readonly 1: undefined;
|
|
11
|
+
readonly 2: TrinketType.PETRIFIED_POOP;
|
|
12
|
+
readonly 3: undefined;
|
|
13
|
+
readonly 4: undefined;
|
|
14
|
+
readonly 5: undefined;
|
|
15
|
+
readonly 6: undefined;
|
|
16
|
+
readonly 7: undefined;
|
|
17
|
+
readonly 8: undefined;
|
|
18
|
+
readonly 9: TrinketType.MATCH_STICK;
|
|
19
|
+
readonly 10: TrinketType.CHILDS_HEART;
|
|
20
|
+
readonly 11: undefined;
|
|
21
|
+
readonly 12: undefined;
|
|
22
|
+
readonly 13: undefined;
|
|
23
|
+
readonly 14: undefined;
|
|
24
|
+
readonly 15: undefined;
|
|
25
|
+
readonly 16: undefined;
|
|
26
|
+
readonly 17: undefined;
|
|
27
|
+
readonly 18: TrinketType.TICK;
|
|
28
|
+
readonly 19: undefined;
|
|
29
|
+
readonly 20: undefined;
|
|
30
|
+
readonly 21: undefined;
|
|
31
|
+
readonly 22: undefined;
|
|
32
|
+
readonly 23: undefined;
|
|
33
|
+
readonly 24: undefined;
|
|
34
|
+
readonly 25: undefined;
|
|
35
|
+
readonly 26: undefined;
|
|
36
|
+
readonly 27: undefined;
|
|
37
|
+
readonly 28: TrinketType.RAINBOW_WORM;
|
|
38
|
+
readonly 29: undefined;
|
|
39
|
+
readonly 30: undefined;
|
|
40
|
+
readonly 31: undefined;
|
|
41
|
+
readonly 32: undefined;
|
|
42
|
+
readonly 33: undefined;
|
|
43
|
+
readonly 34: undefined;
|
|
44
|
+
readonly 35: undefined;
|
|
45
|
+
readonly 36: TrinketType.MYSTERIOUS_CANDY;
|
|
46
|
+
readonly 37: TrinketType.CHILDS_HEART;
|
|
47
|
+
readonly 38: TrinketType.MAGGYS_FAITH;
|
|
48
|
+
readonly 39: undefined;
|
|
49
|
+
readonly 40: undefined;
|
|
50
|
+
readonly 41: undefined;
|
|
51
|
+
readonly 42: undefined;
|
|
52
|
+
readonly 43: undefined;
|
|
53
|
+
readonly 44: undefined;
|
|
54
|
+
readonly 45: undefined;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=challengeTrinkets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"challengeTrinkets.d.ts","sourceRoot":"","sources":["../../../src/objects/challengeTrinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CgC,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
4
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
5
|
+
--- Contains the starting trinket for each challenge. Challenges that do not grant a starting trinket
|
|
6
|
+
-- will have a value of `undefined`.
|
|
7
|
+
--
|
|
8
|
+
-- Taken from the "challenges.xml" file.
|
|
9
|
+
____exports.CHALLENGE_TRINKETS = {
|
|
10
|
+
[Challenge.NULL] = nil,
|
|
11
|
+
[Challenge.PITCH_BLACK] = nil,
|
|
12
|
+
[Challenge.HIGH_BROW] = TrinketType.PETRIFIED_POOP,
|
|
13
|
+
[Challenge.HEAD_TRAUMA] = nil,
|
|
14
|
+
[Challenge.DARKNESS_FALLS] = nil,
|
|
15
|
+
[Challenge.TANK] = nil,
|
|
16
|
+
[Challenge.SOLAR_SYSTEM] = nil,
|
|
17
|
+
[Challenge.SUICIDE_KING] = nil,
|
|
18
|
+
[Challenge.CAT_GOT_YOUR_TONGUE] = nil,
|
|
19
|
+
[Challenge.DEMO_MAN] = TrinketType.MATCH_STICK,
|
|
20
|
+
[Challenge.CURSED] = TrinketType.CHILDS_HEART,
|
|
21
|
+
[Challenge.GLASS_CANNON] = nil,
|
|
22
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS] = nil,
|
|
23
|
+
[Challenge.BEANS] = nil,
|
|
24
|
+
[Challenge.ITS_IN_THE_CARDS] = nil,
|
|
25
|
+
[Challenge.SLOW_ROLL] = nil,
|
|
26
|
+
[Challenge.COMPUTER_SAVY] = nil,
|
|
27
|
+
[Challenge.WAKA_WAKA] = nil,
|
|
28
|
+
[Challenge.HOST] = TrinketType.TICK,
|
|
29
|
+
[Challenge.FAMILY_MAN] = nil,
|
|
30
|
+
[Challenge.PURIST] = nil,
|
|
31
|
+
[Challenge.XXXXXXXXL] = nil,
|
|
32
|
+
[Challenge.SPEED] = nil,
|
|
33
|
+
[Challenge.BLUE_BOMBER] = nil,
|
|
34
|
+
[Challenge.PAY_TO_PLAY] = nil,
|
|
35
|
+
[Challenge.HAVE_A_HEART] = nil,
|
|
36
|
+
[Challenge.I_RULE] = nil,
|
|
37
|
+
[Challenge.BRAINS] = nil,
|
|
38
|
+
[Challenge.PRIDE_DAY] = TrinketType.RAINBOW_WORM,
|
|
39
|
+
[Challenge.ONANS_STREAK] = nil,
|
|
40
|
+
[Challenge.GUARDIAN] = nil,
|
|
41
|
+
[Challenge.BACKASSWARDS] = nil,
|
|
42
|
+
[Challenge.APRILS_FOOL] = nil,
|
|
43
|
+
[Challenge.POKEY_MANS] = nil,
|
|
44
|
+
[Challenge.ULTRA_HARD] = nil,
|
|
45
|
+
[Challenge.PONG] = nil,
|
|
46
|
+
[Challenge.SCAT_MAN] = TrinketType.MYSTERIOUS_CANDY,
|
|
47
|
+
[Challenge.BLOODY_MARY] = TrinketType.CHILDS_HEART,
|
|
48
|
+
[Challenge.BAPTISM_BY_FIRE] = TrinketType.MAGGYS_FAITH,
|
|
49
|
+
[Challenge.ISAACS_AWAKENING] = nil,
|
|
50
|
+
[Challenge.SEEING_DOUBLE] = nil,
|
|
51
|
+
[Challenge.PICA_RUN] = nil,
|
|
52
|
+
[Challenge.HOT_POTATO] = nil,
|
|
53
|
+
[Challenge.CANTRIPPED] = nil,
|
|
54
|
+
[Challenge.RED_REDEMPTION] = nil,
|
|
55
|
+
[Challenge.DELETE_THIS] = nil
|
|
56
|
+
}
|
|
57
|
+
return ____exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "71.0.0",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"main": "dist/src/index",
|
|
26
26
|
"types": "dist/index.rollup.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^
|
|
28
|
+
"isaac-typescript-definitions": "^36.0.0"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -215,7 +215,7 @@ function initDecoratedCallbacks(
|
|
|
215
215
|
);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
// eslint-disable-next-line
|
|
218
|
+
// eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/prefer-destructuring
|
|
219
219
|
const mod = modFeature["mod"];
|
|
220
220
|
|
|
221
221
|
if (init) {
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
BossID,
|
|
3
|
+
CollectibleType,
|
|
4
|
+
PlayerType,
|
|
5
|
+
TrinketType,
|
|
6
|
+
} from "isaac-typescript-definitions";
|
|
2
7
|
import { Challenge } from "isaac-typescript-definitions";
|
|
3
8
|
import {
|
|
4
9
|
CHALLENGE_BOSSES,
|
|
@@ -8,10 +13,12 @@ import {
|
|
|
8
13
|
CHALLENGE_CHARACTERS,
|
|
9
14
|
DEFAULT_CHALLENGE_CHARACTER,
|
|
10
15
|
} from "../objects/challengeCharacters";
|
|
16
|
+
import { CHALLENGE_COLLECTIBLES } from "../objects/challengeCollectibles";
|
|
11
17
|
import {
|
|
12
18
|
CHALLENGE_NAMES,
|
|
13
19
|
DEFAULT_CHALLENGE_NAME,
|
|
14
20
|
} from "../objects/challengeNames";
|
|
21
|
+
import { CHALLENGE_TRINKETS } from "../objects/challengeTrinkets";
|
|
15
22
|
import { log } from "./log";
|
|
16
23
|
|
|
17
24
|
/**
|
|
@@ -59,6 +66,17 @@ export function getChallengeCharacter(challenge: Challenge): PlayerType {
|
|
|
59
66
|
return challengeCharacter ?? DEFAULT_CHALLENGE_CHARACTER;
|
|
60
67
|
}
|
|
61
68
|
|
|
69
|
+
/**
|
|
70
|
+
* Get the extra starting collectibles for a challenge. This will only work for vanilla challenges.
|
|
71
|
+
*
|
|
72
|
+
* For modded challenges, an empty array will be returned.
|
|
73
|
+
*/
|
|
74
|
+
export function getChallengeCollectibles(
|
|
75
|
+
challenge: Challenge,
|
|
76
|
+
): readonly CollectibleType[] {
|
|
77
|
+
return CHALLENGE_COLLECTIBLES[challenge];
|
|
78
|
+
}
|
|
79
|
+
|
|
62
80
|
/**
|
|
63
81
|
* Get the proper name for a `Challenge` enum. This will only work for vanilla challenges.
|
|
64
82
|
*
|
|
@@ -71,6 +89,19 @@ export function getChallengeName(challenge: Challenge): string {
|
|
|
71
89
|
return challengeName ?? DEFAULT_CHALLENGE_NAME;
|
|
72
90
|
}
|
|
73
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Get the extra starting trinket for a challenge. This will only work for vanilla challenges.
|
|
94
|
+
*
|
|
95
|
+
* If a challenge does not grant a starting trinket, `undefined` will be returned.
|
|
96
|
+
*
|
|
97
|
+
* For modded challenges, `undefined` will be returned.
|
|
98
|
+
*/
|
|
99
|
+
export function getChallengeTrinket(
|
|
100
|
+
challenge: Challenge,
|
|
101
|
+
): TrinketType | undefined {
|
|
102
|
+
return CHALLENGE_TRINKETS[challenge];
|
|
103
|
+
}
|
|
104
|
+
|
|
74
105
|
/** Helper function to see if the player is playing any challenge. */
|
|
75
106
|
export function onAnyChallenge(): boolean {
|
|
76
107
|
const challenge = Isaac.GetChallenge();
|
|
@@ -3,6 +3,8 @@ import { BossID, Challenge } from "isaac-typescript-definitions";
|
|
|
3
3
|
export const DEFAULT_CHALLENGE_BOSS_ID = BossID.MOM;
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
+
* Contains the boss goal for each challenge.
|
|
7
|
+
*
|
|
6
8
|
* Taken from the "challenges.xml" file.
|
|
7
9
|
*
|
|
8
10
|
* @see https://bindingofisaacrebirth.fandom.com/wiki/Challenges
|
|
@@ -20,7 +22,7 @@ export const CHALLENGE_BOSSES = {
|
|
|
20
22
|
[Challenge.DEMO_MAN]: BossID.MOMS_HEART, // 9
|
|
21
23
|
[Challenge.CURSED]: BossID.MOM, // 10
|
|
22
24
|
[Challenge.GLASS_CANNON]: BossID.SATAN, // 11
|
|
23
|
-
[Challenge.
|
|
25
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS]: BossID.MOM, // 12
|
|
24
26
|
[Challenge.BEANS]: BossID.MOM, // 13
|
|
25
27
|
[Challenge.ITS_IN_THE_CARDS]: BossID.MOM, // 14
|
|
26
28
|
[Challenge.SLOW_ROLL]: BossID.MOM, // 15
|
|
@@ -2,7 +2,11 @@ import { Challenge, PlayerType } from "isaac-typescript-definitions";
|
|
|
2
2
|
|
|
3
3
|
export const DEFAULT_CHALLENGE_CHARACTER = PlayerType.ISAAC;
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Contains the starting character for each challenge.
|
|
7
|
+
*
|
|
8
|
+
* Taken from the "challenges.xml" file.
|
|
9
|
+
*/
|
|
6
10
|
export const CHALLENGE_CHARACTERS = {
|
|
7
11
|
[Challenge.NULL]: DEFAULT_CHALLENGE_CHARACTER, // 0
|
|
8
12
|
[Challenge.PITCH_BLACK]: DEFAULT_CHALLENGE_CHARACTER, // 1
|
|
@@ -16,7 +20,7 @@ export const CHALLENGE_CHARACTERS = {
|
|
|
16
20
|
[Challenge.DEMO_MAN]: DEFAULT_CHALLENGE_CHARACTER, // 9
|
|
17
21
|
[Challenge.CURSED]: PlayerType.MAGDALENE, // 10
|
|
18
22
|
[Challenge.GLASS_CANNON]: PlayerType.JUDAS, // 11
|
|
19
|
-
[Challenge.
|
|
23
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS]: DEFAULT_CHALLENGE_CHARACTER, // 12
|
|
20
24
|
[Challenge.BEANS]: DEFAULT_CHALLENGE_CHARACTER, // 13
|
|
21
25
|
[Challenge.ITS_IN_THE_CARDS]: DEFAULT_CHALLENGE_CHARACTER, // 14
|
|
22
26
|
[Challenge.SLOW_ROLL]: DEFAULT_CHALLENGE_CHARACTER, // 15
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
import { Challenge, CollectibleType } from "isaac-typescript-definitions";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Contains the extra starting collectibles for each challenge. Challenges that do not grant extra
|
|
5
|
+
* starting collectibles are represented by an empty array.
|
|
6
|
+
*
|
|
7
|
+
* Taken from the "challenges.xml" file.
|
|
8
|
+
*/
|
|
9
|
+
export const CHALLENGE_COLLECTIBLES = {
|
|
10
|
+
// 0
|
|
11
|
+
[Challenge.NULL]: [],
|
|
12
|
+
|
|
13
|
+
// 1
|
|
14
|
+
[Challenge.PITCH_BLACK]: [],
|
|
15
|
+
|
|
16
|
+
// 2
|
|
17
|
+
[Challenge.HIGH_BROW]: [
|
|
18
|
+
CollectibleType.NUMBER_ONE, // 6
|
|
19
|
+
CollectibleType.BUTT_BOMBS, // 209
|
|
20
|
+
CollectibleType.E_COLI, // 236
|
|
21
|
+
CollectibleType.FLUSH, // 291
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
// 3
|
|
25
|
+
[Challenge.HEAD_TRAUMA]: [
|
|
26
|
+
CollectibleType.SMALL_ROCK, // 90
|
|
27
|
+
CollectibleType.IRON_BAR, // 201
|
|
28
|
+
CollectibleType.TINY_PLANET, // 233
|
|
29
|
+
CollectibleType.SOY_MILK, // 330
|
|
30
|
+
],
|
|
31
|
+
|
|
32
|
+
// 4
|
|
33
|
+
[Challenge.DARKNESS_FALLS]: [
|
|
34
|
+
CollectibleType.PENTAGRAM, // 51
|
|
35
|
+
CollectibleType.RAZOR_BLADE, // 126
|
|
36
|
+
CollectibleType.SACRIFICIAL_DAGGER, // 172
|
|
37
|
+
CollectibleType.DARK_MATTER, // 259
|
|
38
|
+
],
|
|
39
|
+
|
|
40
|
+
// 5
|
|
41
|
+
[Challenge.TANK]: [
|
|
42
|
+
CollectibleType.BUCKET_OF_LARD, // 129
|
|
43
|
+
CollectibleType.INFAMY, // 242
|
|
44
|
+
CollectibleType.THUNDER_THIGHS, // 314
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
// 6
|
|
48
|
+
[Challenge.SOLAR_SYSTEM]: [
|
|
49
|
+
CollectibleType.HALO_OF_FLIES, // 10
|
|
50
|
+
CollectibleType.TRANSCENDENCE, // 20
|
|
51
|
+
CollectibleType.DISTANT_ADMIRATION, // 57
|
|
52
|
+
CollectibleType.FOREVER_ALONE, // 128
|
|
53
|
+
],
|
|
54
|
+
|
|
55
|
+
// 7
|
|
56
|
+
[Challenge.SUICIDE_KING]: [
|
|
57
|
+
CollectibleType.MY_REFLECTION, // 5
|
|
58
|
+
CollectibleType.MR_MEGA, // 106
|
|
59
|
+
CollectibleType.IPECAC, // 149
|
|
60
|
+
],
|
|
61
|
+
|
|
62
|
+
// 8
|
|
63
|
+
[Challenge.CAT_GOT_YOUR_TONGUE]: [
|
|
64
|
+
CollectibleType.GUPPYS_TAIL, // 134
|
|
65
|
+
CollectibleType.GUPPYS_HEAD, // 145
|
|
66
|
+
CollectibleType.GUPPYS_HAIRBALL, // 187
|
|
67
|
+
],
|
|
68
|
+
|
|
69
|
+
// 9
|
|
70
|
+
[Challenge.DEMO_MAN]: [
|
|
71
|
+
CollectibleType.DR_FETUS, // 52
|
|
72
|
+
CollectibleType.REMOTE_DETONATOR, // 137
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
// 10
|
|
76
|
+
[Challenge.CURSED]: [
|
|
77
|
+
CollectibleType.RAW_LIVER, // 16
|
|
78
|
+
CollectibleType.COMPASS, // 21
|
|
79
|
+
CollectibleType.TREASURE_MAP, // 54
|
|
80
|
+
CollectibleType.BLUE_MAP, // 246
|
|
81
|
+
],
|
|
82
|
+
|
|
83
|
+
// 11
|
|
84
|
+
[Challenge.GLASS_CANNON]: [
|
|
85
|
+
CollectibleType.LOKIS_HORNS, // 87
|
|
86
|
+
CollectibleType.EPIC_FETUS, // 168
|
|
87
|
+
],
|
|
88
|
+
|
|
89
|
+
// 12
|
|
90
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS]: [
|
|
91
|
+
CollectibleType.LEMON_MISHAP, // 56
|
|
92
|
+
CollectibleType.NINE_VOLT, // 116
|
|
93
|
+
CollectibleType.HABIT, // 156
|
|
94
|
+
],
|
|
95
|
+
|
|
96
|
+
// 13
|
|
97
|
+
[Challenge.BEANS]: [
|
|
98
|
+
CollectibleType.BEAN, // 111
|
|
99
|
+
CollectibleType.NINE_VOLT, // 116
|
|
100
|
+
CollectibleType.BLACK_BEAN, // 180
|
|
101
|
+
CollectibleType.PYRO, // 190
|
|
102
|
+
CollectibleType.BUTT_BOMBS, // 209
|
|
103
|
+
],
|
|
104
|
+
|
|
105
|
+
// 14
|
|
106
|
+
[Challenge.ITS_IN_THE_CARDS]: [
|
|
107
|
+
CollectibleType.BATTERY, // 63
|
|
108
|
+
CollectibleType.DECK_OF_CARDS, // 85
|
|
109
|
+
CollectibleType.NINE_VOLT, // 116
|
|
110
|
+
CollectibleType.STARTER_DECK, // 251
|
|
111
|
+
],
|
|
112
|
+
|
|
113
|
+
// 15
|
|
114
|
+
[Challenge.SLOW_ROLL]: [
|
|
115
|
+
CollectibleType.MY_REFLECTION, // 5
|
|
116
|
+
CollectibleType.CUPIDS_ARROW, // 48
|
|
117
|
+
CollectibleType.POLYPHEMUS, // 169
|
|
118
|
+
],
|
|
119
|
+
|
|
120
|
+
// 16
|
|
121
|
+
[Challenge.COMPUTER_SAVY]: [
|
|
122
|
+
CollectibleType.SPOON_BENDER, // 3
|
|
123
|
+
CollectibleType.TECHNOLOGY, // 68
|
|
124
|
+
CollectibleType.TECHNOLOGY_2, // 152
|
|
125
|
+
],
|
|
126
|
+
|
|
127
|
+
// 17
|
|
128
|
+
[Challenge.WAKA_WAKA]: [
|
|
129
|
+
CollectibleType.ANTI_GRAVITY, // 222
|
|
130
|
+
CollectibleType.STRANGE_ATTRACTOR, // 315
|
|
131
|
+
],
|
|
132
|
+
|
|
133
|
+
// 18
|
|
134
|
+
[Challenge.HOST]: [
|
|
135
|
+
CollectibleType.MULLIGAN, // 151
|
|
136
|
+
CollectibleType.SPIDERBABY, // 211
|
|
137
|
+
],
|
|
138
|
+
|
|
139
|
+
// 19
|
|
140
|
+
[Challenge.FAMILY_MAN]: [
|
|
141
|
+
CollectibleType.BROTHER_BOBBY, // 8
|
|
142
|
+
CollectibleType.SISTER_MAGGY, // 67
|
|
143
|
+
CollectibleType.DADS_KEY, // 175
|
|
144
|
+
CollectibleType.BFFS, // 247
|
|
145
|
+
CollectibleType.ROTTEN_BABY, // 268
|
|
146
|
+
],
|
|
147
|
+
|
|
148
|
+
// 20
|
|
149
|
+
[Challenge.PURIST]: [],
|
|
150
|
+
|
|
151
|
+
// 21
|
|
152
|
+
[Challenge.XXXXXXXXL]: [],
|
|
153
|
+
|
|
154
|
+
// 22
|
|
155
|
+
[Challenge.SPEED]: [],
|
|
156
|
+
|
|
157
|
+
// 23
|
|
158
|
+
[Challenge.BLUE_BOMBER]: [
|
|
159
|
+
CollectibleType.BROTHER_BOBBY, // 8
|
|
160
|
+
CollectibleType.KAMIKAZE, // 40
|
|
161
|
+
CollectibleType.MR_MEGA, // 106
|
|
162
|
+
CollectibleType.PYROMANIAC, // 223
|
|
163
|
+
],
|
|
164
|
+
|
|
165
|
+
// 24
|
|
166
|
+
[Challenge.PAY_TO_PLAY]: [
|
|
167
|
+
CollectibleType.SACK_OF_PENNIES, // 94
|
|
168
|
+
CollectibleType.MONEY_EQUALS_POWER, // 109
|
|
169
|
+
],
|
|
170
|
+
|
|
171
|
+
// 25
|
|
172
|
+
[Challenge.HAVE_A_HEART]: [
|
|
173
|
+
CollectibleType.CHARM_OF_THE_VAMPIRE, // 62
|
|
174
|
+
],
|
|
175
|
+
|
|
176
|
+
// 26
|
|
177
|
+
[Challenge.I_RULE]: [
|
|
178
|
+
CollectibleType.LADDER, // 60
|
|
179
|
+
CollectibleType.MOMS_KNIFE, // 114
|
|
180
|
+
CollectibleType.TRINITY_SHIELD, // 243
|
|
181
|
+
CollectibleType.BOOMERANG, // 338
|
|
182
|
+
],
|
|
183
|
+
|
|
184
|
+
// 27
|
|
185
|
+
[Challenge.BRAINS]: [
|
|
186
|
+
CollectibleType.BOBS_BRAIN, // 273
|
|
187
|
+
CollectibleType.BOBS_BRAIN, // 273
|
|
188
|
+
CollectibleType.BOBS_BRAIN, // 273
|
|
189
|
+
CollectibleType.THUNDER_THIGHS, // 314
|
|
190
|
+
],
|
|
191
|
+
|
|
192
|
+
// 28
|
|
193
|
+
[Challenge.PRIDE_DAY]: [
|
|
194
|
+
CollectibleType.RAINBOW_BABY, // 174
|
|
195
|
+
CollectibleType.THREE_DOLLAR_BILL, // 191
|
|
196
|
+
],
|
|
197
|
+
|
|
198
|
+
// 29
|
|
199
|
+
[Challenge.ONANS_STREAK]: [
|
|
200
|
+
CollectibleType.CHOCOLATE_MILK, // 69
|
|
201
|
+
],
|
|
202
|
+
|
|
203
|
+
// 30
|
|
204
|
+
[Challenge.GUARDIAN]: [
|
|
205
|
+
CollectibleType.HOLY_GRAIL, // 184
|
|
206
|
+
CollectibleType.ISAACS_HEART, // 276
|
|
207
|
+
CollectibleType.PUNCHING_BAG, // 281
|
|
208
|
+
CollectibleType.SPEAR_OF_DESTINY, // 400
|
|
209
|
+
],
|
|
210
|
+
|
|
211
|
+
// 31
|
|
212
|
+
[Challenge.BACKASSWARDS]: [],
|
|
213
|
+
|
|
214
|
+
// 32
|
|
215
|
+
[Challenge.APRILS_FOOL]: [],
|
|
216
|
+
|
|
217
|
+
// 33
|
|
218
|
+
[Challenge.POKEY_MANS]: [
|
|
219
|
+
CollectibleType.MOMS_EYESHADOW, // 200
|
|
220
|
+
CollectibleType.FRIEND_BALL, // 382
|
|
221
|
+
],
|
|
222
|
+
|
|
223
|
+
// 34
|
|
224
|
+
[Challenge.ULTRA_HARD]: [
|
|
225
|
+
CollectibleType.BOOK_OF_REVELATIONS, // 78
|
|
226
|
+
CollectibleType.CAFFEINE_PILL, // 340
|
|
227
|
+
],
|
|
228
|
+
|
|
229
|
+
// 35
|
|
230
|
+
[Challenge.PONG]: [
|
|
231
|
+
CollectibleType.CUPIDS_ARROW, // 48
|
|
232
|
+
CollectibleType.RUBBER_CEMENT, // 221
|
|
233
|
+
],
|
|
234
|
+
|
|
235
|
+
// 36
|
|
236
|
+
[Challenge.SCAT_MAN]: [
|
|
237
|
+
CollectibleType.SKATOLE, // 9
|
|
238
|
+
CollectibleType.POOP, // 36
|
|
239
|
+
CollectibleType.NINE_VOLT, // 116
|
|
240
|
+
CollectibleType.BUTT_BOMBS, // 209
|
|
241
|
+
CollectibleType.BUTT_BOMBS, // 209
|
|
242
|
+
CollectibleType.BUTT_BOMBS, // 209
|
|
243
|
+
CollectibleType.E_COLI, // 236
|
|
244
|
+
CollectibleType.BFFS, // 247
|
|
245
|
+
CollectibleType.THUNDER_THIGHS, // 314
|
|
246
|
+
CollectibleType.DIRTY_MIND, // 576
|
|
247
|
+
],
|
|
248
|
+
|
|
249
|
+
// 37
|
|
250
|
+
[Challenge.BLOODY_MARY]: [
|
|
251
|
+
// Note that in "challenges.xml", it also includes "-584", which removes Book of Virtues from
|
|
252
|
+
// Bethany.
|
|
253
|
+
CollectibleType.BOOK_OF_BELIAL, // 34
|
|
254
|
+
CollectibleType.BLOOD_BAG, // 119
|
|
255
|
+
CollectibleType.ANEMIC, // 214
|
|
256
|
+
CollectibleType.BLOOD_OATH, // 569
|
|
257
|
+
],
|
|
258
|
+
|
|
259
|
+
// 38
|
|
260
|
+
[Challenge.BAPTISM_BY_FIRE]: [
|
|
261
|
+
// Note that in "challenges.xml", it also includes "-584", which removes Book of Virtues from
|
|
262
|
+
// Bethany.
|
|
263
|
+
CollectibleType.GUPPYS_PAW, // 133
|
|
264
|
+
CollectibleType.SCHOOLBAG, // 534
|
|
265
|
+
CollectibleType.URN_OF_SOULS, // 640
|
|
266
|
+
],
|
|
267
|
+
|
|
268
|
+
// 39
|
|
269
|
+
[Challenge.ISAACS_AWAKENING]: [
|
|
270
|
+
CollectibleType.TRINITY_SHIELD, // 243
|
|
271
|
+
CollectibleType.SPIRIT_SWORD, // 579
|
|
272
|
+
CollectibleType.MOMS_BRACELET, // 604
|
|
273
|
+
],
|
|
274
|
+
|
|
275
|
+
// 40
|
|
276
|
+
[Challenge.SEEING_DOUBLE]: [245],
|
|
277
|
+
|
|
278
|
+
// 41
|
|
279
|
+
[Challenge.PICA_RUN]: [
|
|
280
|
+
CollectibleType.MOMS_PURSE, // 139
|
|
281
|
+
CollectibleType.MOMS_BOX, // 439
|
|
282
|
+
CollectibleType.MARBLES, // 538
|
|
283
|
+
],
|
|
284
|
+
|
|
285
|
+
// 42
|
|
286
|
+
[Challenge.HOT_POTATO]: [],
|
|
287
|
+
|
|
288
|
+
// 43
|
|
289
|
+
[Challenge.CANTRIPPED]: [],
|
|
290
|
+
|
|
291
|
+
// 44
|
|
292
|
+
[Challenge.RED_REDEMPTION]: [
|
|
293
|
+
CollectibleType.DADS_KEY, // 175
|
|
294
|
+
],
|
|
295
|
+
|
|
296
|
+
// 45
|
|
297
|
+
[Challenge.DELETE_THIS]: [CollectibleType.TMTRAINER],
|
|
298
|
+
} as const satisfies Record<Challenge, readonly CollectibleType[]>;
|
|
@@ -16,7 +16,7 @@ export const CHALLENGE_NAMES = {
|
|
|
16
16
|
[Challenge.DEMO_MAN]: "Demo Man", // 9
|
|
17
17
|
[Challenge.CURSED]: "Cursed!", // 10
|
|
18
18
|
[Challenge.GLASS_CANNON]: "Glass Cannon", // 11
|
|
19
|
-
[Challenge.
|
|
19
|
+
[Challenge.WHEN_LIFE_GIVES_YOU_LEMONS]: "When Life Gives You Lemons", // 12
|
|
20
20
|
[Challenge.BEANS]: "Beans!", // 13
|
|
21
21
|
[Challenge.ITS_IN_THE_CARDS]: "It's In The Cards", // 14
|
|
22
22
|
[Challenge.SLOW_ROLL]: "Slow Roll", // 15
|