RushDuel.NoCostCheck
Alias: RD.NoCostCheck. Requires the matching Rush Duel Lua bootstrap.
Signature
lua
RushDuel.NoCostCheck(function cost, int flag_effect) -> functionDescription
Wraps a cost callback with a Rush cost-waiver check. An applicable player effect with the specified code waives the cost when its value is 1 or its value callback returns true; otherwise the original cost callback receives all arguments.
Parameters
costfunction: Cost callback to invoke when no waiver applies.flag_effectint: Player-effect code that can waive this cost.
Returns
function: Wrapped cost callback.
Source
Rush/Utilities/RDCost.lua:124
lua
function RushDuel.NoCostCheck(cost, flag_effect)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local effects = {Duel.IsPlayerAffectedByEffect(tp, flag_effect)}
for _, effect in ipairs(effects) do
local val = effect:GetValue()
if val == 1 then
return true
elseif val(effect, e, tp, eg, ep, ev, re, r, rp) then
return true
end
end
return cost(e, tp, eg, ep, ev, re, r, rp, chk)
end
endUsed By
Generated from the local Rush/Scripts/ folder and rush_cards.cdb.
No indexed local card script currently calls this function.
This can mean the function is unused in the current script set, is only called through an alias, or is available for future/manual scripts.