Commit 2f4d9196 authored by POLYMER's avatar POLYMER

fix

parent eae4d6e4
...@@ -45,7 +45,7 @@ function s.synop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function s.synop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end if not c:IsRelateToEffect(e) or Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)==0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if tc:IsControler(tp) and not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.AdjustAll() Duel.AdjustAll()
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end if mg:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
......
...@@ -4,102 +4,105 @@ ...@@ -4,102 +4,105 @@
local s = c33701015 local s = c33701015
local id = 33701015 local id = 33701015
function s.initial_effect(c) function s.initial_effect(c)
c:SetSPSummonOnce(id) c:SetSPSummonOnce(id)
--Special Summon --Special Summon
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetDescription(aux.Stringid(id, 0)) e1:SetDescription(aux.Stringid(id, 0))
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetRange(LOCATION_HAND + LOCATION_GRAVE) e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Draw --Draw
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE)
e2:SetOperation(s.regop) e2:SetOperation(s.regop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if not s.global_flag then if not s.global_flag then
s.global_flag = true s.global_flag = true
s[0] = 0 s[0] = 0
s[1] = 0 s[1] = 0
local ge1 = Effect.CreateEffect(c) local ge1 = Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND) ge1:SetCode(EVENT_TO_HAND)
ge1:SetOperation(s.ctop) ge1:SetOperation(s.ctop)
Duel.RegisterEffect(ge1, 0) Duel.RegisterEffect(ge1, 0)
local ge2 = Effect.CreateEffect(c) local ge2 = Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) ge2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE + PHASE_DRAW) ge2:SetCode(EVENT_PHASE + PHASE_DRAW)
ge2:SetCountLimit(1) ge2:SetCountLimit(1)
ge2:SetCondition(s.resetop) ge2:SetCondition(s.resetop)
Duel.RegisterEffect(ge2, 0) Duel.RegisterEffect(ge2, 0)
end end
end end
function s.spcon(e, tp, eg, ep, ev, re, r, rp) function s.spcon(e, tp, eg, ep, ev, re, r, rp)
return s[tp] == 0 return s[tp] == 0
end end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk) function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and c:IsCanBeSpecialSummoned(e, 0, tp, false, false) and
Duel.IsPlayerCanDraw(tp, 2) Duel.IsPlayerCanDraw(tp, 2)
end end
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, c, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 2, 0, 0) Duel.SetOperationInfo(0, CATEGORY_DRAW, nil, 2, 0, 0)
end end
function s.spop(e, tp, eg, ep, ev, re, r, rp) function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP_ATTACK) ~= 0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP_ATTACK) ~= 0 then
Duel.Draw(tp, 2, REASON_EFFECT) Duel.Draw(tp, 2, REASON_EFFECT)
end end
end end
function s.ctfilter(c) function s.ctfilter(c,tp)
return not (c:IsReason(REASON_DRAW) or c:IsSetCard(0x144e)) return not (c:IsReason(REASON_DRAW) or c:IsSetCard(0x144e)) and c:IsControler(tp)
end end
function s.ctop(e, tp, eg, ep, ev, re, r, rp) function s.ctop(e, tp, eg, ep, ev, re, r, rp)
s[tp] = s[tp] + eg:FilterCount(s.ctfilter, nil) local ct0=eg:FilterCount(s.ctfilter,nil,0)
local ct1=eg:FilterCount(s.ctfilter,nil,1)
s[0]=s[0]+ct0
s[1]=s[1]+ct1
end end
function s.resetop(e, tp, eg, ep, ev, re, r, rp) function s.resetop(e, tp, eg, ep, ev, re, r, rp)
s[0] = 0 s[0] = 0
s[1] = 0 s[1] = 0
return false return false
end end
function s.regop(e, tp, eg, ep, ev, re, r, rp) function s.regop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsFacedown() or not c:IsSummonType(SUMMON_TYPE_SPECIAL) or Duel.GetTurnPlayer() == effp then if c:IsFacedown() or not c:IsSummonType(SUMMON_TYPE_SPECIAL) or Duel.GetTurnPlayer() == effp then
return return
end end
local effp = c:GetControler() local effp = c:GetControler()
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(s.chainreg) e1:SetOperation(s.chainreg)
e1:SetReset(RESET_PHASE + PHASE_END) e1:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e1, effp) Duel.RegisterEffect(e1, effp)
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.drcon) e2:SetCondition(s.drcon)
e2:SetOperation(s.drop) e2:SetOperation(s.drop)
e2:SetReset(RESET_PHASE + PHASE_END) e2:SetReset(RESET_PHASE + PHASE_END)
Duel.RegisterEffect(e2, effp) Duel.RegisterEffect(e2, effp)
end end
function s.chainreg(e, tp, eg, ep, ev, re, r, rp) function s.chainreg(e, tp, eg, ep, ev, re, r, rp)
e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + 0x1fc0000 + RESET_CHAIN, 0, 1) e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + 0x1fc0000 + RESET_CHAIN, 0, 1)
end end
function s.drcon(e, tp, eg, ep, ev, re, r, rp) function s.drcon(e, tp, eg, ep, ev, re, r, rp)
return ep ~= tp and e:GetHandler():GetFlagEffect(id) ~= 0 return ep ~= tp and e:GetHandler():GetFlagEffect(id) ~= 0
end end
function s.drop(e, tp, eg, ep, ev, re, r, rp) function s.drop(e, tp, eg, ep, ev, re, r, rp)
Duel.Hint(HINT_CARD, 0, id) Duel.Hint(HINT_CARD, 0, id)
Duel.Draw(tp, 1, REASON_EFFECT) Duel.Draw(tp, 1, REASON_EFFECT)
end end
...@@ -65,7 +65,7 @@ function c98920610.gfilter(c) ...@@ -65,7 +65,7 @@ function c98920610.gfilter(c)
end end
function c98920610.condition(e,tp,eg,ep,ev,re,r,rp) function c98920610.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
return loc==LOCATION_GRAVE or loc==LOCATION_HAND or loc==LOCATION_REMOVED return ep==1-tp and (loc==LOCATION_GRAVE or loc==LOCATION_HAND or loc==LOCATION_REMOVED)
end end
function c98920610.operation(e,tp,eg,ep,ev,re,r,rp) function c98920610.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -48,7 +48,7 @@ function c98920706.damcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c98920706.damcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==tp return rp==tp
end end
function c98920706.damtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c98920706.damtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:GetCount()==1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and eg:GetCount()==1 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=eg:Filter(c98920706.sfilter,nil) local g=eg:Filter(c98920706.sfilter,nil)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......
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