Skip to content

Commit

Permalink
You can now pick up gold in frail corners
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamPlenty committed Jul 24, 2022
1 parent 9b1973d commit 763aee0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/magic.c
Expand Up @@ -584,7 +584,8 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind,
}
PlayerNumber slb_owner;
slb_owner = slabmap_owner(slb);
if ((mapblk->flags & SlbAtFlg_Blocking) != 0)
TbBool subtile_is_liquid = ( (subtile_has_water_on_top(stl_x, stl_y)) || (subtile_has_lava_on_top(stl_x, stl_y)) );
if ( ((mapblk->flags & SlbAtFlg_Blocking) != 0) && (!subtile_is_liquid) )
{
if ((can_cast & PwCast_Claimable) != 0)
{
Expand Down Expand Up @@ -626,7 +627,7 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind,
{
if ((can_cast & PwCast_Claimable) != 0)
{
if (slab_kind_is_liquid(slb->kind))
if ( (slab_kind_is_liquid(slb->kind)) || (subtile_is_liquid) )
{
return false;
}
Expand All @@ -641,6 +642,10 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind,
if (slbattr->category == SlbAtCtg_Unclaimed) {
return true;
}
if (subtile_is_liquid)
{
return true;
}
}
if ((can_cast & PwCast_NeutrlGround) != 0)
{
Expand Down
1 change: 1 addition & 0 deletions src/packets_input.c
Expand Up @@ -261,6 +261,7 @@ TbBool process_dungeon_control_packet_dungeon_control(long plyr_idx)
{
if (player->primary_cursor_state == CSt_PickAxe)
{
player->thing_under_hand = 0;
get_dungeon_highlight_user_roomspace(&playeradd->render_roomspace, player->id_number, stl_x, stl_y);
tag_cursor_blocks_dig(player->id_number, stl_x, stl_y, player->full_slab_cursor);
}
Expand Down

0 comments on commit 763aee0

Please sign in to comment.