Commit 9f66cebb authored by gg123gg's avatar gg123gg Committed by GitHub

Merge pull request #2 from purerosefallen/丘依儿fix

Add files via upload
parents b44cd50b 1196cb71
--小小的捉弄 --小小的捉弄
function c12005022.initial_effect(c) function c12005022.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_TODECK+CATEGORY_TOGRAVE+CATEGORY_DRAW+CATEGORY_TODECK) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_CHAINING)
e1:SetCode(EVENT_CHAINING) e1:SetCondition(c12005022.condition)
e1:SetCondition(c12005022.condition) e1:SetTarget(c12005022.target)
e1:SetTarget(c12005022.target) e1:SetOperation(c12005022.activate)
e1:SetOperation(c12005022.activate) c:RegisterEffect(e1)
c:RegisterEffect(e1) --asdasdasd
--asdasdasd local e2=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(12005022,0))
e2:SetDescription(aux.Stringid(12005022,0)) e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_GRAVE)
e2:SetRange(LOCATION_GRAVE) e2:SetTarget(c12005022.tdtg)
e2:SetTarget(c12005022.tdtg) e2:SetOperation(c12005022.tdop)
e2:SetOperation(c12005022.tdop) c:RegisterEffect(e2)
c:RegisterEffect(e2) end
end function c12005022.spfilter(c,e,tp)
function c12005022.spfilter(c,e,tp) return c:IsSetCard(0xfbb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0xfbb) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
end function c12005022.cfilter(c)
function c12005022.cfilter(c) return c:IsType(TYPE_COUNTER) and c:IsAbleToDeck()
return c:IsType(TYPE_COUNTER) and c:IsAbleToDeck() end
end function c12005022.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c12005022.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler()
local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12005022.cfilter(chkc) and chkc~=c end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c12005022.cfilter(chkc) and chkc~=c end if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c12005022.cfilter,tp,LOCATION_GRAVE,0,2,c) and c:IsAbleToDeck() end
and Duel.IsExistingTarget(c12005022.cfilter,tp,LOCATION_GRAVE,0,2,c) and c:IsAbleToDeck() end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g=Duel.SelectTarget(tp,c12005022.cfilter,tp,LOCATION_GRAVE,0,2,2,c)
local g=Duel.SelectTarget(tp,c12005022.cfilter,tp,LOCATION_GRAVE,0,2,2,c) local rg=g:Clone()
local rg=g:Clone() rg:AddCard(c)
rg:AddCard(c) Duel.SetOperationInfo(0,CATEGORY_TODECK,rg,rg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,rg,rg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end
end function c12005022.tdop(e,tp,eg,ep,ev,re,r,rp)
function c12005022.tdop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler()
local c=e:GetHandler() if not c:IsAbleToDeck() or not c:IsRelateToEffect(e) then return end
if not c:IsAbleToDeck() or not c:IsRelateToEffect(e) then return end local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local sg=tg:Filter(Card.IsRelateToEffect,nil,e)
local sg=tg:Filter(Card.IsRelateToEffect,nil,e) sg:AddCard(c)
sg:AddCard(c) if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>1 then
if Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)>1 then local og=Duel.GetOperatedGroup()
local og=Duel.GetOperatedGroup() if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then
if og:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp)
Duel.ShuffleDeck(tp) end
end Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT) end
end end
end function c12005022.condition(e,tp,eg,ep,ev,re,r,rp)
function c12005022.condition(e,tp,eg,ep,ev,re,r,rp) if re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND) then return Duel.IsPlayerCanDraw(tp,1) end
if re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND) then return Duel.IsPlayerCanDraw(tp,1) end if re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON) then return Duel.IsChainNegatable(ev) end
if re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON) then return Duel.IsChainNegatable(ev) end return true
return true end
end function c12005022.target(e,tp,eg,ep,ev,re,r,rp,chk)
function c12005022.target(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler()
local c=e:GetHandler() if chk==0 then return true end
if chk==0 then return true end Duel.SetTargetPlayer(1-tp)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetParam(100)
Duel.SetTargetParam(100) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100) local ex=Duel.GetOperationInfo(ev,CATEGORY_REMOVE)
local ex=Duel.GetOperationInfo(ev,CATEGORY_REMOVE) if re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) then
if re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) then e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end end
if re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND) then if re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND) then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) e:SetCategory(CATEGORY_DRAW)
end Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
if re:IsHasCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) or ex then end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD) if re:IsHasCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) or ex then
end e:SetCategory(CATEGORY_DESTROY)
if re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON) then Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) end
end if re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON) then
end e:SetCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON)
function c12005022.activate(e,tp,eg,ep,ev,re,r,rp) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
local c,rc=e:GetHandler(),re:GetHandler() end
if Duel.Damage(1-tp,100,REASON_EFFECT)<=0 then return end end
local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c12005022.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON) function c12005022.activate(e,tp,eg,ep,ev,re,r,rp)
local b2=re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND) local c,rc=e:GetHandler(),re:GetHandler()
local b3=(re:IsHasCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) or ex) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) if Duel.Damage(1-tp,100,REASON_EFFECT)<=0 then return end
local b4=re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON) local b1=c:IsAbleToDeck() and Duel.IsExistingMatchingCard(c12005022.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
if not (b1 or b2 or b3 or b4) then return end local b2=re:IsHasCategory(CATEGORY_DRAW+CATEGORY_TOHAND)
Duel.BreakEffect() local b3=(re:IsHasCategory(CATEGORY_DESTROY+CATEGORY_REMOVE) or ex) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
if b1 and Duel.SelectYesNo(tp,aux.Stringid(12005022,1)) then local b4=re:IsHasCategory(CATEGORY_DISABLE+CATEGORY_NEGATE+CATEGORY_DISABLE_SUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if not (b1 or b2 or b3 or b4) then return end
local sg=Duel.SelectMatchingCard(tp,c12005022.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) Duel.BreakEffect()
if Duel.SpecialSummon(sg,0,tp,tp,false,false)~=0 and c:IsRelateToEffect(e) then if b1 and Duel.SelectYesNo(tp,aux.Stringid(12005022,1)) then
c:CancelToGrave(true) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.SendtoDeck(c,nil,0,REASON_EFFECT) local sg=Duel.SelectMatchingCard(tp,c12005022.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
end if Duel.SpecialSummon(sg,0,tp,tp,false,false)~=0 and c:IsRelateToEffect(e) then
end c:CancelToGrave(true)
if b2 then Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT) end
end end
if b3 and Duel.SelectYesNo(tp,aux.Stringid(12005022,3)) then if b2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Draw(tp,1,REASON_EFFECT)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) end
Duel.HintSelection(tg) if b3 and Duel.SelectYesNo(tp,aux.Stringid(12005022,3)) then
Duel.SendtoGrave(tg,REASON_EFFECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
end local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if b4 then Duel.HintSelection(tg)
Duel.NegateActivation(ev) Duel.SendtoGrave(tg,REASON_EFFECT)
end end
if b4 then
Duel.NegateActivation(ev)
end
end end
\ No newline at end of file
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