@@ -2321,43 +2398,22 @@ function rscost.lpcost2(base_pay, max_pay, is_lab)
...
@@ -2321,43 +2398,22 @@ function rscost.lpcost2(base_pay, max_pay, is_lab)
end
end
end
end
end
end
--cost: tribute self
function rscost.releaseself(check_mzone, check_exzone)
return function(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler()
if chk == 0 then return c:IsReleasable() and (not check_mzone or Duel.GetMZoneCount(tp, c, tp) > 0) and (not check_exzone or Duel.GetLocationCountFromEx(tp, tp, c, exmzone) > 0) end
Duel.Release(c, REASON_COST)
end
end
--cost: register flag to lim_ activate (Quick Effect activates once per chain, e.g)
--cost: register flag to lim_ activate (Quick Effect activates once per chain, e.g)
function rscost.regflag(flag_code, reset_list)
functionrscost.chnlim(flag_code,isplayer)
if not reset_list then reset_list = RESET_CHAIN end
if type(reset_list) ~= "table" then reset_list = { reset_list } end
local reset_count= reset_list[2]
if not reset_count then reset_count = 1 end
returnfunction(e,tp,eg,ep,ev,re,r,rp,chk)
returnfunction(e,tp,eg,ep,ev,re,r,rp,chk)
localc=e:GetHandler()
localc=e:GetHandler()
flag_code=flag_codeorc:GetOriginalCode()
flag_code=flag_codeorc:GetOriginalCode()
if chk == 0 then return c:GetFlagEffect(flag_code) == 0 end
function rsop.SelectSSet_Operation(sp, solve_parama)
return function(tg, ...)
local setp, targetp, confirm, hint = table.unpack(solve_parama)
setp = setp or sp
targetp = targetp or setp
confirm = confirm or true
--hint = hint or true
if #tg <= 0 then return 0, tg end
--rsop.CheckOperationHint(tg, hint)
--because Duel.SSet use confirm as parameter, so, i have no choice but directly make it hint.(in other solve_fun, the order is first hint and second confirm)