Commit 8bcd4210 authored by VanillaSalt's avatar VanillaSalt

fix

parent 23e24241
......@@ -38,7 +38,7 @@ function c22842126.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c22842126.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local dr=Duel.Draw(p,d,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end
function c22842126.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -57,7 +57,7 @@ end
function c23064604.tdcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c23064604.tgfilter(c,tp)
function c23064604.tgfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c23064604.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -79,13 +79,14 @@ function c23064604.tdop(e,tp,eg,ep,ev,re,r,rp)
local tg2=g:Select(tp,1,1,nil)
tg1:Merge(tg2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 then
local sg=nil
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
if tg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(23064604,3)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=tg:RandomSelect(tp,1)
sg=tg:RandomSelect(tp,1)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
sg=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
end
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
......@@ -110,12 +111,12 @@ function c23064604.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c23064604.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c23064604.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c23064604.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c23064604.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c23064604.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
......
......@@ -32,14 +32,14 @@ function c54241725.initial_effect(c)
e3:SetOperation(c54241725.spop)
c:RegisterEffect(e3)
end
function c54241725.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
function c54241725.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
if c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,0) and c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,0) and Duel.SelectYesNo(tp,94) then
if c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,0) and c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,0,chkc) and Duel.SelectYesNo(tp,94) then
e:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(c54241725.drop)
c54241725.drcost(e,tp,eg,ep,ev,re,r,rp,1)
c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,1)
c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,1,chkc)
e:GetHandler():RegisterFlagEffect(0,RESET_CHAIN,EFFECT_FLAG_CLIENT_HINT,1,0,65)
else
e:SetCategory(0)
......@@ -54,7 +54,7 @@ end
function c54241725.tdfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
function c54241725.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c54241725.tdfilter(chkc) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c54241725.tdfilter,tp,LOCATION_GRAVE,0,2,nil) end
......
......@@ -53,10 +53,11 @@ function c59463312.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c59463312.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -27,7 +27,7 @@ function c91718579.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x59)
end
function c91718579.tgcon(e)
return Duel.IsExistingMatchingCard(c91718579.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
return Duel.IsExistingMatchingCard(c91718579.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end
function c91718579.atlimit(e,c)
return c:IsFaceup() and c:IsSetCard(0x59)
......@@ -57,10 +57,10 @@ function c91718579.effop(e,tp,eg,ep,ev,re,r,rp)
if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_TYPE)
e2:SetValue(TYPE_MONSTER+TYPE_EFFECT+TYPE_XYZ)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e2)
rc:RegisterEffect(e2,true)
end
end
function c91718579.poscon(e,tp,eg,ep,ev,re,r,rp)
......@@ -75,7 +75,7 @@ function c91718579.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c91718579.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or tc:IsDefencePos() or not tc:IsRelateToEffect(e) then return end
if tc:IsDefencePos() or not tc:IsRelateToEffect(e) then return end
if Duel.ChangePosition(tc,POS_FACEUP_DEFENCE)==0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -2,7 +2,7 @@
function c95457011.initial_effect(c)
--summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95457012,0))
e1:SetDescription(aux.Stringid(95457011,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -16,13 +16,12 @@ function c95457011.initial_effect(c)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(95457012,1))
e3:SetDescription(aux.Stringid(95457011,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,95457012)
e3:SetCondition(c95457011.thcon)
e3:SetTarget(c95457011.thtg)
e3:SetOperation(c95457011.thop)
c:RegisterEffect(e3)
......@@ -36,11 +35,12 @@ function c95457011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c95457011.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c95457011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c95457011.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -54,9 +54,6 @@ end
function c95457011.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c95457011.thcon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_RETURN)
end
function c95457011.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
......
......@@ -56,7 +56,7 @@ end
function c96570609.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE
end
function c96570609.tgfilter(c,tp)
function c96570609.tgfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function c96570609.spfilter(c,e,tp)
......@@ -80,7 +80,8 @@ function c96570609.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg2=g:Select(tp,1,1,nil)
tg1:Merge(tg2)
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 then
if Duel.SendtoGrave(tg1,REASON_EFFECT)~=0 and tg1:IsExists(Card.IsLocation,2,nil,LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c96570609.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
......@@ -101,7 +102,7 @@ function c96570609.thop(e,tp,eg,ep,ev,re,r,rp)
end
function c96570609.sumcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()~=tp and ph==PHASE_MAIN1 or ph==PHASE_MAIN2
return Duel.GetTurnPlayer()~=tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c96570609.cfilter(c)
return c:IsSetCard(0xbe) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c: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