Commit ecb824ad authored by VanillaSalt's avatar VanillaSalt

new

parent f3d01457
...@@ -49,7 +49,7 @@ end ...@@ -49,7 +49,7 @@ end
function c43730887.operation(e,tp,eg,ep,ev,re,r,rp) function c43730887.operation(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 c:IsRelateToEffect(re) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
end end
end end
......
--左腕の代償
function c86541496.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c86541496.cost)
e1:SetTarget(c86541496.target)
e1:SetOperation(c86541496.activate)
c:RegisterEffect(e1)
if not c86541496.global_check then
c86541496.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SSET)
ge1:SetOperation(c86541496.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c86541496.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(rp,86541496,RESET_PHASE+PHASE_END,0,1)
end
function c86541496.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,0,e:GetHandler())
if chk==0 then return Duel.GetFlagEffect(tp,86541496)==0
and g:GetCount()>1 and g:GetCount()==g:FilterCount(Card.IsAbleToRemoveAsCost,nil) end
Duel.Remove(g,POS_FACEUP,REASON_COST)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SSET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c86541496.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c86541496.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86541496.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c86541496.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86541496.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
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