Skip to content

Commit

Permalink
add arrow-poison tilecodes (#1032)
Browse files Browse the repository at this point in the history
* add arrow-poison tilecodes

* format

* change arrow tilecodes to load game assets

* add tilecodes to valid, fix poison sheet
  • Loading branch information
SereneRuby12 authored Oct 9, 2023
1 parent df22565 commit 464d330
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modlunky2/levels/tile_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@
"punishball_attach_top",
"punishball_attach_left",
"punishball_attach_right",
"arrow_wooden",
"arrow_metal",
"arrow_wooden_poison",
"arrow_metal_poison",
"venom",
]
)

Expand Down
4 changes: 4 additions & 0 deletions src/modlunky2/sprites/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ItemSheet(BaseSpriteLoader):
"goldbars": (15, 0, 16, 1),
"rock": (0, 1, 1, 2),
"arrow_wood": (1, 1, 2, 2),
"arrow_wooden": (1, 1, 2, 2),
"arrow_stub": (2, 1, 3, 2),
"urn_tall": (3, 1, 4, 2),
"urn_short": (4, 1, 5, 2),
Expand Down Expand Up @@ -94,8 +95,11 @@ class ItemSheet(BaseSpriteLoader):
"crossbow_empty_held": (2, 4, 3, 5),
"crosbow_loaded_held": (3, 4, 4, 5),
"metal_arrow": (4, 4, 5, 5),
"arrow_metal": (4, 4, 5, 5),
"wood_arrow_poisoned": (5, 4, 6, 5),
"metal_arrow_poisoned": (6, 4, 7, 5),
"arrow_wooden_poison": (5, 4, 6, 5),
"arrow_metal_poison": (6, 4, 7, 5),
"telepack": (7, 4, 8, 5),
"back_telepack": (7, 4, 8, 5),
"telepack_on_rope": (8, 4, 9, 5),
Expand Down
9 changes: 9 additions & 0 deletions src/modlunky2/sprites/tilecode_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,18 @@ class StickyTrapSheet(BaseSpriteLoader):
}


class PoisonSheet(BaseSpriteLoader):
_sprite_sheet_path = Path("static/images/venom.png")
_chunk_size = 128
_chunk_map = {
"venom": (0, 0, 1, 1),
}


EXTRA_TILECODE_CLASSES = [
ChainAndBlocksCeilingSheet,
SpikeballTrapSheet,
StickyTrapSheet,
TreasureVaultChestSheet,
PoisonSheet,
]
Binary file added src/modlunky2/static/images/venom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 464d330

Please sign in to comment.