Commit 3e5382c0 authored by mercury233's avatar mercury233

fix

parent 262a0ac5
...@@ -45,7 +45,6 @@ function c101005026.initial_effect(c) ...@@ -45,7 +45,6 @@ function c101005026.initial_effect(c)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(101005026,1)) e5:SetDescription(aux.Stringid(101005026,1))
e5:SetCategory(CATEGORY_TOHAND) e5:SetCategory(CATEGORY_TOHAND)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_DESTROYED) e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c101005026.thcon) e5:SetCondition(c101005026.thcon)
...@@ -97,16 +96,14 @@ function c101005026.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,16 +96,14 @@ function c101005026.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_EFFECT) and rp~=tp and c:GetPreviousControler()==tp return c:IsReason(REASON_EFFECT) and rp~=tp and c:GetPreviousControler()==tp
end end
function c101005026.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101005026.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_DECK) and c101005026.thfilter(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c101005026.thfilter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c101005026.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101005026.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c101005026.thop(e,tp,eg,ep,ev,re,r,rp) function c101005026.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c101005026.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.ConfirmCards(1-tp,tc) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end end
end end
...@@ -61,15 +61,12 @@ function c101005033.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,15 +61,12 @@ function c101005033.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsSummonType(SUMMON_TYPE_SYNCHRO) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
end end
function c101005033.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101005033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO)
return pg:GetCount()<=0 and Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(c101005033.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c101005033.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c101005033.spop(e,tp,eg,ep,ev,re,r,rp) function c101005033.spop(e,tp,eg,ep,ev,re,r,rp)
local pg=aux.GetMustBeMaterialGroup(tp,Group.CreateGroup(),tp,nil,nil,REASON_SYNCHRO) if Duel.GetLocationCountFromEx(tp)<=0 then return end
if Duel.GetLocationCountFromEx(tp)<=0 or pg:GetCount()>0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c101005033.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c101005033.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then if tc and Duel.SpecialSummon(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP)>0 then
......
...@@ -22,7 +22,7 @@ function c101005051.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c101005051.spcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return aux.exccon(e) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end end
function c101005051.cfilter(c) function c101005051.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and aux.SpElimFilter(c,true) return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function c101005051.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101005051.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
......
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