Commit 5ef2dce8 authored by 想象力很好的毛虫's avatar 想象力很好的毛虫 Committed by GitHub

Fix リブロマンサー・アフェクテッド (#2981)

parent 61e55fae
......@@ -22,6 +22,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
......@@ -29,15 +30,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local _,hg=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local hc=hg:GetFirst()
local chk=hc:IsType(TYPE_RITUAL)
if hc:IsControler(tp) and hc:IsRelateToEffect(e)
local tg=Duel.GetTargetsRelateToChain()
local hc=e:GetLabelObject()
if hc and hc:IsControler(tp) and hc:IsRelateToEffect(e)
and Duel.SendtoHand(hc,nil,REASON_EFFECT)>0 and hc:IsLocation(LOCATION_HAND) then
local _,tg=Duel.GetOperationInfo(0,CATEGORY_CONTROL)
local tc=tg:GetFirst()
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e)
and Duel.GetControl(tc,tp)>0 and not chk then
local tc=(tg-hc):GetFirst()
if tc and tc:IsControler(1-tp) and tc:IsRelateToEffect(e)
and Duel.GetControl(tc,tp)>0 and not hc:IsType(TYPE_RITUAL) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
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