@@ -5,7 +5,11 @@ import {
55 ModCallback ,
66 RoomType ,
77} from "isaac-typescript-definitions" ;
8- import { Callback , spawnCollectible } from "isaacscript-common" ;
8+ import {
9+ anyPlayerHasCollectible ,
10+ Callback ,
11+ spawnCollectible ,
12+ } from "isaacscript-common" ;
913import type { EIDExtended } from "../../compat/EID" ;
1014import { Debugger } from "../../util/debug" ;
1115import { charmEnemy , getEnemies , isCharmable } from "../../util/enemies" ;
@@ -41,11 +45,10 @@ export class MicrophoneItem extends ActiveItem {
4145
4246 const room = Game ( ) . GetRoom ( ) ;
4347 const inAngelRoom = room . GetType ( ) === RoomType . ANGEL ;
44-
4548 for ( const enemy of enemies ) {
4649 if ( inAngelRoom ) {
4750 if ( enemy . Type === EntityType . URIEL ) {
48- if ( ! player . HasCollectible ( CollectibleType . KEY_PIECE_1 ) ) {
51+ if ( ! anyPlayerHasCollectible ( CollectibleType . KEY_PIECE_1 ) ) {
4952 spawnCollectible (
5053 CollectibleType . KEY_PIECE_1 ,
5154 room . FindFreePickupSpawnPosition ( enemy . Position ) ,
@@ -57,7 +60,7 @@ export class MicrophoneItem extends ActiveItem {
5760 }
5861
5962 if ( enemy . Type === EntityType . GABRIEL ) {
60- if ( ! player . HasCollectible ( CollectibleType . KEY_PIECE_2 ) ) {
63+ if ( ! anyPlayerHasCollectible ( CollectibleType . KEY_PIECE_2 ) ) {
6164 spawnCollectible (
6265 CollectibleType . KEY_PIECE_2 ,
6366 room . FindFreePickupSpawnPosition ( enemy . Position ) ,
0 commit comments