Commit a34caac2 authored by fallenstardust's avatar fallenstardust
parent aaf6b9a5
Pipeline #24023 passed with stages
in 49 seconds
--哥布林降下部队
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--disable --disable
...@@ -9,7 +8,6 @@ function s.initial_effect(c) ...@@ -9,7 +8,6 @@ function s.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetLabelObject(e0)
e1:SetCondition(s.discon) e1:SetCondition(s.discon)
e1:SetTarget(s.distg) e1:SetTarget(s.distg)
e1:SetOperation(s.disop) e1:SetOperation(s.disop)
...@@ -47,7 +45,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,7 +45,7 @@ function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.disop(e,tp,eg,ep,ev,re,r,rp) function s.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsDefensePos() then return end if not c:IsRelateToEffect(e) or c:IsDefensePos() or not c:IsCanChangePosition() then return end
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0) Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,0,0)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsDefensePos() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) if c:IsFaceup() and c:IsDefensePos() and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e)
...@@ -65,26 +63,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,26 +63,11 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
end --cancel target
function s.rcon(e) local e2=Effect.CreateEffect(c)
return e:GetOwner():IsHasCardTarget(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
end e2:SetCode(EVENT_CHANGE_POS)
e2:SetCondition(s.recon)
--to hand e2:SetOperation(s.reop)
function s.thcon(e,tp,eg,ep,ev,re,r,rp) c:RegisterEffect(e2)
return eg:IsExists(Card.IsControler,1,nil,1-tp)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,c,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SendtoHand(c,nil,REASON_EFFECT) 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