-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(memory): remove d2:classic support focus on d2r * feat(memory): read units * build: binparse 2.1 * feat: more d2r struts * refactor: cleanup lint Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
266557b
commit c2cc311
Showing
34 changed files
with
1,058 additions
and
375 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import o from 'ospec'; | ||
import { getNpcFlags } from '../npc.js'; | ||
|
||
o.spec('NpcFlags', () => { | ||
o('should ignore weird values', () => { | ||
o(getNpcFlags(-1)).deepEquals({ isNormal: true }); | ||
o(getNpcFlags(372)).deepEquals({ isNormal: true }); | ||
}); | ||
|
||
o('should get all the flags', () => { | ||
o(getNpcFlags(0b11111111)).deepEquals({ | ||
isNormal: false, | ||
isSuperUnique: true, | ||
isChampion: true, | ||
isUnique: true, | ||
isMinion: true, | ||
isPossessed: true, | ||
isGhostly: true, | ||
}); | ||
}); | ||
|
||
o('should get some flags', () => { | ||
o(getNpcFlags(0b1010101)).deepEquals({ isNormal: false, isChampion: true, isMinion: true, isGhostly: true }); | ||
}); | ||
}); |
Oops, something went wrong.