Skip to content

Commit 6f739e7

Browse files
authored
"Card.IsAbleToX" functions updates
Updated the "Card.IsAbleToX" functions for location changes to return false if the card is already in that location.
1 parent b1335d9 commit 6f739e7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

proc_workaround.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
--Utilities to be added to the core
22

3+
--[[
4+
update the "Card.IsAbleToX" functions for location changes to return false if the card is already in that location
5+
--]]
6+
local function card_isableto_update(func,loc)
7+
return function(card,...)
8+
return not card:IsLocation(loc) and func(card,...)
9+
end
10+
end
11+
Card.IsAbleToHand=card_isableto_update(Card.IsAbleToHand,LOCATION_HAND)
12+
Card.IsAbleToDeck=card_isableto_update(Card.IsAbleToDeck,LOCATION_DECK)
13+
Card.IsAbleToExtra=card_isableto_update(Card.IsAbleToExtra,LOCATION_EXTRA)
14+
Card.IsAbleToGrave=card_isableto_update(Card.IsAbleToGrave,LOCATION_GRAVE)
15+
Card.IsAbleToRemove=card_isableto_update(Card.IsAbleToRemove,LOCATION_REMOVED)
16+
317
--[[
418
allow EFFECT_EXTRA_RELEASE_NONSUM effects to work on cards in the Extra Deck
519
used by "Duel Evolution - Assault Zone"

0 commit comments

Comments
 (0)