Commit db84ee03 authored by TanakaKotoha's avatar TanakaKotoha

daniaozhuanzhuanzhuan

parent 2138dcef
Pipeline #2500 passed with stages
in 43 minutes and 18 seconds
......@@ -21,7 +21,7 @@ function c21520150.initial_effect(c)
c:RegisterEffect(e2)
end
function c21520150.cfilter(c)
return c:IsFaceup() and c:IsCode(21520133)
return c:IsFaceup() and c:IsCode(21520133) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c21520150.condition(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
......@@ -36,7 +36,7 @@ function c21520150.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c21520150.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if not Duel.NegateActivation(ev) then return end
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT)
......@@ -47,8 +47,8 @@ function c21520150.dcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c21520150.dtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) end
local ct=Duel.GetMatchingGroupCount(c21520150.cfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and ct>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
......
......@@ -28,7 +28,7 @@ function c21520155.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp)
end
function c21520155.spfilter(c,lc,e,tp)
return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,true) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
--[[ if c:IsLocation(LOCATION_EXTRA) then
return aux.IsCodeListed(c,lc:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
elseif c:IsLocation(LOCATION_GRAVE) then
......@@ -54,7 +54,7 @@ function c21520155.operation(e,tp,eg,ep,ev,re,r,rp)
local exg=Duel.GetMatchingGroup(c21520155.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,nil,rg:GetFirst(),e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=exg:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 then
if Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)>0 then
sg:GetFirst():CompleteProcedure()
Duel.ShuffleDeck(tp)
else
......
......@@ -29,12 +29,8 @@ function c21520156.rfilter(c,e,tp)
and Duel.IsExistingMatchingCard(c21520156.spfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil,c,e,tp)
end
function c21520156.spfilter(c,lc,e,tp)
if c:IsLocation(LOCATION_EXTRA) then
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
return c:IsCanBeSpecialSummoned(e,0,tp,false,true) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
and Duel.GetLocationCountFromEx(tp,tp,lc,c)>0
elseif c:IsLocation(LOCATION_GRAVE) then
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsSetCard(0xa491) and not c:IsCode(lc:GetCode()) and c:IsLevel(lc:GetLevel())
and Duel.GetMZoneCount(tp,lc)>0 end
end
function c21520156.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c21520156.rfilter(chkc,e,tp) end
......@@ -52,7 +48,7 @@ function c21520156.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(sg,0,tp,tp,false,true,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
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