Commit 5e7ea0fe authored by VanillaSalt's avatar VanillaSalt

fix

parent 0b543c29
...@@ -23,7 +23,7 @@ function c10118318.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +23,7 @@ function c10118318.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(Duel.GetTurnPlayer(),10118318,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(Duel.GetTurnPlayer(),10118318,RESET_PHASE+PHASE_END,0,1)
end end
function c10118318.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10118318.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetTurnPlayer()~=tp or Duel.GetFlagEffect(tp,10118318)==0 end if chk==0 then return Duel.GetFlagEffect(tp,10118318)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
......
...@@ -43,6 +43,8 @@ function c10275411.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,6 +43,8 @@ function c10275411.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10275411,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(10275411,0))
local mg=g1:Select(tp,1,1,nil) local mg=g1:Select(tp,1,1,nil)
local oc=mg:GetFirst():GetOverlayTarget()
Duel.Overlay(tc,mg) Duel.Overlay(tc,mg)
Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end end
end end
...@@ -32,10 +32,10 @@ function c12444060.initial_effect(c) ...@@ -32,10 +32,10 @@ function c12444060.initial_effect(c)
end end
end end
function c12444060.checkop(e,tp,eg,ep,ev,re,r,rp) function c12444060.checkop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(Duel.GetTurnPlayer(),12444061,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(Duel.GetTurnPlayer(),12444060,RESET_PHASE+PHASE_END,0,1)
end end
function c12444060.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c12444060.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetTurnPlayer()~=tp or Duel.GetFlagEffect(tp,12444060)==0) and Duel.GetFlagEffect(tp,12444061)==0 end if chk==0 then return Duel.GetFlagEffect(tp,12444060)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
......
...@@ -101,7 +101,7 @@ function c12670770.spfilter(c,e,tp) ...@@ -101,7 +101,7 @@ function c12670770.spfilter(c,e,tp)
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c12670770.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c12670770.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetTurnPlayer()~=tp or Duel.GetFlagEffect(tp,12670770)==0 end if chk==0 then return Duel.GetFlagEffect(tp,12670770)==0 end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP) e1:SetCode(EFFECT_CANNOT_BP)
......
...@@ -32,7 +32,7 @@ function c24838456.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c24838456.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
Duel.SetTargetCard(dg) Duel.SetTargetCard(dg)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,dg,dg:GetCount(),0,0)
end end
function c24838456.activate(e,tp,eg,ep,ev,re,r,rp) function c24838456.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
......
...@@ -6,7 +6,7 @@ function c33746252.initial_effect(c) ...@@ -6,7 +6,7 @@ function c33746252.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable spsummon --act limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -32,14 +32,14 @@ function c46871387.filter(c) ...@@ -32,14 +32,14 @@ function c46871387.filter(c)
end end
function c46871387.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c46871387.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46871387.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c46871387.filter(chkc) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(c46871387.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c46871387.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c46871387.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c46871387.thop(e,tp,eg,ep,ev,re,r,rp) function c46871387.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -47,7 +47,9 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,9 @@ function c47660516.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetOverlayGroup(tp,0,1) local g1=Duel.GetOverlayGroup(tp,0,1)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47660516,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47660516,0))
local mg2=g1:Select(tp,1,1,nil) local mg2=g1:Select(tp,1,1,nil)
local oc=mg2:GetFirst():GetOverlayTarget()
Duel.Overlay(sc,mg2) Duel.Overlay(sc,mg2)
Duel.RaiseSingleEvent(oc,EVENT_DETACH_MATERIAL,e,0,0,0,0)
end end
end end
end end
...@@ -3,11 +3,11 @@ function c51865604.initial_effect(c) ...@@ -3,11 +3,11 @@ function c51865604.initial_effect(c)
--draw --draw
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51865604,0)) e1:SetDescription(aux.Stringid(51865604,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c51865604.condition) e1:SetCondition(c51865604.condition)
e1:SetCost(c51865604.cost)
e1:SetTarget(c51865604.target) e1:SetTarget(c51865604.target)
e1:SetOperation(c51865604.operation) e1:SetOperation(c51865604.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -31,6 +31,10 @@ end ...@@ -31,6 +31,10 @@ end
function c51865604.condition(e,tp,eg,ep,ev,re,r,rp) function c51865604.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c51865604.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c51865604.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c51865604.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,51865604)==0 end
Duel.RegisterFlagEffect(tp,51865604,RESET_PHASE+PHASE_END,0,1)
end
function c51865604.target(e,tp,eg,ep,ev,re,r,rp,chk) function c51865604.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
......
...@@ -61,7 +61,7 @@ function c6351548.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -61,7 +61,7 @@ function c6351548.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c6351548.tdop(e,tp,eg,ep,ev,re,r,rp) function c6351548.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,0,REASON_EFFECT) Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)
end end
end end
...@@ -14,8 +14,9 @@ function c8316565.cfilter(c) ...@@ -14,8 +14,9 @@ function c8316565.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) return c:IsFaceup() and c:IsSetCard(0x84)
end end
function c8316565.condition(e,tp,eg,ep,ev,re,r,rp) function c8316565.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.IsExistingMatchingCard(c8316565.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c8316565.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetCurrentPhase()==PHASE_BATTLE and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) and ph>PHASE_MAIN1 and ph<PHASE_MAIN2 and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end end
function c8316565.target(e,tp,eg,ep,ev,re,r,rp,chk) function c8316565.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -25,7 +25,9 @@ function c9354555.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,9 @@ function c9354555.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c9354555.filter1,tp,LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c9354555.filter1,tp,LOCATION_HAND,0,nil)
if g:GetCount()<3 then return end if g:GetCount()<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.SendtoDeck(g:Select(tp,3,3,nil),nil,2,REASON_EFFECT) local dg=g:Select(tp,3,3,nil)
Duel.ConfirmCards(1-tp,dg)
Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
local sg=Duel.GetMatchingGroup(c9354555.filter2,tp,LOCATION_DECK,0,nil) local sg=Duel.GetMatchingGroup(c9354555.filter2,tp,LOCATION_DECK,0,nil)
if sg:GetCount()==0 then return end if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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