Commit 39103329 authored by GuGu's avatar GuGu

Update c22271103.lua 代传

parent 05daaf3b
Pipeline #20100 passed with stage
in 6 seconds
......@@ -85,19 +85,23 @@ function c22271103.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c22271103.filter(c)
return c:IsCode(22271101) and c:IsSSetable()
function c22271103.filter(c,e,tp)
return c:IsCode(22271101) and ((c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0) or (c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0))
end
function c22271103.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22271103.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_SZONE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c22271103.filter,tp,LOCATION_GRAVE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22271103.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c22271103.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c22271103.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c22271103.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function c22271103.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SSet(tp,tc) end
end
\ No newline at end of file
if tc:IsRelateToEffect(e) then
if tc:IsType(TYPE_MONSTER) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.SSet(tp,tc,tp)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment