Skip to content

Commit

Permalink
Minor declarations update for is_removeable and is_removeable_as_cost
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Jul 22, 2023
1 parent c2534af commit 1e704d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions card.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3602,7 +3602,7 @@ int32_t card::is_destructable_by_effect(effect* peffect, uint8_t playerid) {
}
return TRUE;
}
int32_t card::is_removeable(uint8_t playerid, int32_t pos, uint32_t reason) {
int32_t card::is_removeable(uint8_t playerid, uint8_t pos, uint32_t reason) {
if(!pduel->game_field->is_player_can_remove(playerid, this, reason))
return FALSE;
if(is_affected_by_effect(EFFECT_CANNOT_REMOVE))
Expand All @@ -3611,7 +3611,7 @@ int32_t card::is_removeable(uint8_t playerid, int32_t pos, uint32_t reason) {
return FALSE;
return TRUE;
}
int32_t card::is_removeable_as_cost(uint8_t playerid, int32_t pos) {
int32_t card::is_removeable_as_cost(uint8_t playerid, uint8_t pos) {
uint32_t redirect = 0;
uint32_t dest = LOCATION_REMOVED;
if(current.location == LOCATION_REMOVED)
Expand All @@ -3620,18 +3620,18 @@ int32_t card::is_removeable_as_cost(uint8_t playerid, int32_t pos) {
return FALSE;
if(!is_removeable(playerid, pos, REASON_COST))
return FALSE;
int32_t redirchk = FALSE;
bool redirchk = false;
auto op_param = sendto_param;
sendto_param.location = dest;
if (current.location & LOCATION_ONFIELD)
redirect = leave_field_redirect(REASON_COST) & 0xffff;
if(redirect) {
redirchk = TRUE;
redirchk = true;
dest = redirect;
}
redirect = destination_redirect(dest, REASON_COST) & 0xffff;
if(redirect) {
redirchk = TRUE;
redirchk = true;
dest = redirect;
}
sendto_param = op_param;
Expand Down
4 changes: 2 additions & 2 deletions card.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ class card : public lua_obj_helper<PARAM_TYPE_CARD> {
int32_t is_destructable_by_battle(card* pcard);
effect* check_indestructable_by_effect(effect* peffect, uint8_t playerid);
int32_t is_destructable_by_effect(effect* peffect, uint8_t playerid);
int32_t is_removeable(uint8_t playerid, int32_t pos = 0x5/*POS_FACEUP*/, uint32_t reason = 0x40/*REASON_EFFECT*/);
int32_t is_removeable_as_cost(uint8_t playerid, int32_t pos = 0x5/*POS_FACEUP*/);
int32_t is_removeable(uint8_t playerid, uint8_t pos = POS_FACEUP, uint32_t reason = REASON_EFFECT);
int32_t is_removeable_as_cost(uint8_t playerid, uint8_t pos = POS_FACEUP);
int32_t is_releasable_by_summon(uint8_t playerid, card* pcard);
int32_t is_releasable_by_nonsummon(uint8_t playerid);
int32_t is_releasable_by_effect(uint8_t playerid, effect* peffect);
Expand Down

0 comments on commit 1e704d5

Please sign in to comment.