Commit 25282909 authored by GuGu's avatar GuGu

Update c10371.lua

parent e7028a54
Pipeline #29186 passed with stage
in 7 seconds
...@@ -11,25 +11,26 @@ function c10371.initial_effect(c) ...@@ -11,25 +11,26 @@ function c10371.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- --
end end
function c10371.thfilter(c,e,tp,ft) function c10371.thfilter(c,e,tp)
return c:IsSetCard(0x200) and c:IsAbleToHand() and c:IsFaceup() local b1=c:IsLocation(LOCATION_MZONE) and Duel.GetMZoneCount(tp,c)>0
and ((c:IsLocation(LOCATION_MZONE) and (ft>0 or c:GetSequence()<5)) or (c:IsLocation(LOCATION_REMOVED) and ft>0)) local b2=c:IsLocation(LOCATION_REMOVED) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,10070,0,0x4011,c:GetTextAttack(),c:GetTextDefense(),0,1,RACE_FAIRY,ATTRIBUTE_WIND) return c:IsSetCard(0x200) and c:IsAbleToHand() and c:IsFaceup() and c:IsType(TYPE_MONSTER) and (b1 or b2)
and Duel.IsPlayerCanSpecialSummonMonster(tp,10070,0x208,0x4011,c:GetTextAttack(),c:GetTextDefense(),1,RACE_FAIRY,ATTRIBUTE_LIGHT)
end end
function c10371.tg(e,tp,eg,ep,ev,re,r,rp,chk) function c10371.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.IsExistingMatchingCard(c10371.thfilter,tp,LOCATION_REMOVED+LOCATION_MZONE,0,1,nil,e,tp,ft) end if chkc then return chkc:IsLocation(LOCATION_REMOVED+LOCATION_MZONE) and chkc:IsControler(tp) and c10371.thfilter(chkc,e,tp) end
local g=Duel.SelectTarget(tp,c10371.thfilter,tp,LOCATION_REMOVED+LOCATION_MZONE,0,1,1,nil,e,tp,ft) if chk==0 then return Duel.IsExistingMatchingCard(c10371.thfilter,tp,LOCATION_REMOVED+LOCATION_MZONE,0,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c10371.thfilter,tp,LOCATION_REMOVED+LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED+LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED+LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
-- --
function c10371.op(e,tp,eg,ep,ev,re,r,rp) function c10371.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,10070,0,0x4011,tc:GetTextAttack(),tc:GetTextDefense(),0,1,RACE_FAIRY,ATTRIBUTE_WIND) then if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,10070,0x208,0x4011,c:GetTextAttack(),c:GetTextDefense(),1,RACE_FAIRY,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,10070) local token=Duel.CreateToken(tp,10070)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)<1 then return end if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)<1 then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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