Commit cd5a61c5 authored by Nemo Ma's avatar Nemo Ma

Update c88990247.lua

parent 7639a20c
...@@ -18,7 +18,6 @@ function c88990247.initial_effect(c) ...@@ -18,7 +18,6 @@ function c88990247.initial_effect(c)
e3:SetCode(EFFECT_SPSUMMON_CONDITION) e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(aux.penlimit) e3:SetValue(aux.penlimit)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--回手tohand --回手tohand
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(88990247,1)) e5:SetDescription(aux.Stringid(88990247,1))
...@@ -63,13 +62,14 @@ function c88990247.initial_effect(c) ...@@ -63,13 +62,14 @@ function c88990247.initial_effect(c)
end end
--Return Hand --Return Hand
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(101009011,1)) e8:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e8:SetCategory(CATEGORY_TOHAND)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetRange(LOCATION_PZONE) e8:SetRange(LOCATION_PZONE)
e8:SetCountLimit(1,101009011+100)
e8:SetCode(EVENT_PHASE+PHASE_END) e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetOperation(c88990247.SpiritReturnReg) e8:SetCountLimit(1)
e8:SetCondition(c88990247.thcon2)
e8:SetTarget(c88990247.rettg)
e8:SetOperation(c88990247.thop2)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function c88990247.splimit(e,c,tp,sumtp,sumpos) function c88990247.splimit(e,c,tp,sumtp,sumpos)
...@@ -101,7 +101,6 @@ function c88990247.retop(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,7 +101,6 @@ function c88990247.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
--禁止连锁
function c88990247.chainop(e,tp,eg,ep,ev,re,r,rp) function c88990247.chainop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if rc:IsSetCard(0xb3) then if rc:IsSetCard(0xb3) then
...@@ -111,55 +110,20 @@ end ...@@ -111,55 +110,20 @@ end
function c88990247.chainlm(e,rp,tp) function c88990247.chainlm(e,rp,tp)
return tp==rp return tp==rp
end end
--Return Hand function c88990247.thcon2(e,tp,eg,ep,ev,re,r,rp)
function c88990247.SpiritReturnReg(e,tp,eg,ep,ev,re,r,rp) return tp==Duel.GetTurnPlayer()
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetDescription(1104)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1ee0000+RESET_PHASE+PHASE_END)
e1:SetCondition(aux.SpiritReturnCondition)
e1:SetTarget(c88990247.SpiritReturnTarget)
e1:SetOperation(c88990247.SpiritReturnOperation)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
c:RegisterEffect(e2)
end end
function c88990247.filter(c) function c88990247.thfilter2(c)
return c:IsSetCard(0xb3) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0xb3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c88990247.SpiritReturnTarget(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:IsHasType(EFFECT_TYPE_TRIGGER_F) then
return true
else
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil)
end
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end end
function c88990247.SpiritReturnOperation(e,tp,eg,ep,ev,re,r,rp) function c88990247.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) then
and Duel.IsExistingMatchingCard(c88990247.filter,tp,LOCATION_DECK,0,1,nil) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.BreakEffect() local g=Duel.SelectMatchingCard(tp,c88990247.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(88990247,1)) if g:GetCount()>0 then
local g=Duel.SelectMatchingCard(tp,c88990247.filter,tp,LOCATION_DECK,0,1,1,nil,tp) Duel.SendtoHand(g,nil,REASON_EFFECT)
local tc=g:GetFirst() Duel.ConfirmCards(1-tp,g)
if tc then
local b1=tc:IsAbleToHand()
if b1 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
Duel.ConfirmCards(1-tp,tc)
end end
end end
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