Commit f86e6922 authored by VanillaSalt's avatar VanillaSalt

fix

parent e1d1bd13
...@@ -59,11 +59,11 @@ end ...@@ -59,11 +59,11 @@ end
function c20785975.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c20785975.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,10420) end and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c20785975.spop(e,tp,eg,ep,ev,re,r,rp) function c20785975.spop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,10420) then return end if not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,94380860) then return end
if e:GetHandler():IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -65,12 +65,12 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,12 +65,12 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
tc1:RegisterEffect(e1) tc1:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
tc1:RegisterEffect(e2) tc2:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT) e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
tc2:RegisterEffect(e3) tc1:RegisterEffect(e3)
local e4=e3:Clone() local e4=e3:Clone()
tc2:RegisterEffect(e4) tc2:RegisterEffect(e4)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
...@@ -51,6 +51,7 @@ function c28388296.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,6 +51,7 @@ function c28388296.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c28388296.operation(e,tp,eg,ep,ev,re,r,rp) function c28388296.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c28388296.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c28388296.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
......
...@@ -39,7 +39,7 @@ function c29400787.cfilter(e,c) ...@@ -39,7 +39,7 @@ function c29400787.cfilter(e,c)
return c:IsFacedown() return c:IsFacedown()
end end
function c29400787.thcon(e,tp,eg,ep,ev,re,r,rp) function c29400787.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()~=nil return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end end
function c29400787.filter(c) function c29400787.filter(c)
return c:IsSetCard(0x8d) and c:IsAbleToHand() return c:IsSetCard(0x8d) and c:IsAbleToHand()
......
...@@ -16,6 +16,7 @@ function c46659709.initial_effect(c) ...@@ -16,6 +16,7 @@ function c46659709.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CHAIN_UNIQUE)
e2:SetCost(c46659709.cost) e2:SetCost(c46659709.cost)
e2:SetTarget(c46659709.target) e2:SetTarget(c46659709.target)
e2:SetOperation(c46659709.operation) e2:SetOperation(c46659709.operation)
......
...@@ -11,10 +11,13 @@ function c50920465.initial_effect(c) ...@@ -11,10 +11,13 @@ function c50920465.initial_effect(c)
e1:SetOperation(c50920465.operation) e1:SetOperation(c50920465.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50920465.cfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_HAND,0,1,c,e,tp)
end
function c50920465.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c50920465.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,50920465)==0 if chk==0 then return Duel.GetFlagEffect(tp,50920465)==0
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c50920465.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD,nil) Duel.DiscardHand(tp,c50920465.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp)
Duel.RegisterFlagEffect(tp,50920465,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,50920465,RESET_PHASE+PHASE_END,0,1)
end end
function c50920465.filter(c,e,tp) function c50920465.filter(c,e,tp)
...@@ -23,7 +26,6 @@ function c50920465.filter(c,e,tp) ...@@ -23,7 +26,6 @@ function c50920465.filter(c,e,tp)
end end
function c50920465.target(e,tp,eg,ep,ev,re,r,rp,chk) function c50920465.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c50920465.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
......
...@@ -34,6 +34,7 @@ function c56051086.initial_effect(c) ...@@ -34,6 +34,7 @@ function c56051086.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_RECOVER) e4:SetCode(EVENT_RECOVER)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c56051086.damcon) e4:SetCondition(c56051086.damcon)
e4:SetTarget(c56051086.damtg) e4:SetTarget(c56051086.damtg)
e4:SetOperation(c56051086.damop) e4:SetOperation(c56051086.damop)
...@@ -62,7 +63,6 @@ function c56051086.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +63,6 @@ function c56051086.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
...@@ -12,7 +12,6 @@ function c57734012.initial_effect(c) ...@@ -12,7 +12,6 @@ function c57734012.initial_effect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c57734012.condition) e2:SetCondition(c57734012.condition)
e2:SetCost(c57734012.cost)
e2:SetTarget(c57734012.target) e2:SetTarget(c57734012.target)
e2:SetOperation(c57734012.activate) e2:SetOperation(c57734012.activate)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -35,10 +34,6 @@ end ...@@ -35,10 +34,6 @@ end
function c57734012.condition(e,tp,eg,ep,ev,re,r,rp) function c57734012.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():GetFlagEffect(57734012)~=0 return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity() and e:GetHandler():GetFlagEffect(57734012)~=0
end end
function c57734012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,57734012)==0 end
Duel.RegisterFlagEffect(tp,57734012,0,0,0)
end
function c57734012.filter1(c,e,tp) function c57734012.filter1(c,e,tp)
local no=c.xyz_number local no=c.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) return no and no>=101 and no<=107 and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
...@@ -50,9 +45,10 @@ function c57734012.filter2(c,e,tp,no) ...@@ -50,9 +45,10 @@ function c57734012.filter2(c,e,tp,no)
end end
function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk) function c57734012.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,23516703) or c23516703[tp]==0) if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,23516703) or c23516703[tp]==0)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,57734012)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c57734012.filter1,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA)
Duel.RegisterFlagEffect(tp,57734012,0,0,0)
end end
function c57734012.activate(e,tp,eg,ep,ev,re,r,rp) function c57734012.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,23516703) and c23516703[tp]>0 then return end if Duel.IsPlayerAffectedByEffect(tp,23516703) and c23516703[tp]>0 then return 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