Commit 281f9769 authored by Tachibana's avatar Tachibana

eme

parent 633117bf
...@@ -53,7 +53,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if #g>0 and Duel.SelectEffectYesNo(tp,aux.Stringid(m,1)) then if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
else else
......
...@@ -72,8 +72,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,8 +72,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.ddcon(e,tp,eg,ep,ev,re,r,rp) function cm.ddcon(e,tp,eg,ep,ev,re,r,rp)
local tp=GetOwner():GetHandler() return Duel.GetCurrentPhase()~=PHASE_DRAW
return Duel.GetCurrentPhase()~=PHASE_DRAW and tp~=ep
end end
function cm.ddtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.ddtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
local m=40010050 local m=40010050
local cm=_G["c"..m] local cm=_G["c"..m]
cm.named_with_Revenger=1 cm.named_with_Revenger=1
cm.named_with_Reverse=1
function cm.Revenger(c) function cm.Revenger(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.named_with_Revenger return m and m.named_with_Revenger
......
...@@ -74,7 +74,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -74,7 +74,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,4,4,nil) local g1=Duel.SelectMatchingCard(tp,cm.cfilter2,tp,loc,0,4,4,nil)
local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil) local g2=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_MZONE,nil)
if g1:GetCount()>0 and Duel.Release(g1,REASON_EFFECT)>0 and g2:GetCount()>0 then if g1:GetCount()>0 and Duel.Release(g1,REASON_EFFECT)>0 and g2:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g2,REASON_EFFECT)
local sg=Duel.GetMatchingGroup(cm.sspfilter2,tp,LOCATION_DECK,0,nil,e,tp) local sg=Duel.GetMatchingGroup(cm.sspfilter2,tp,LOCATION_DECK,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -11,9 +11,8 @@ end ...@@ -11,9 +11,8 @@ end
function cm.initial_effect(c) function cm.initial_effect(c)
--tohand --tohand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetCondition(cm.thcon) e1:SetCondition(cm.thcon)
...@@ -34,9 +33,7 @@ function cm.initial_effect(c) ...@@ -34,9 +33,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() return re and re:GetHandler().named_with_Revenger
return e:GetHandler():IsReason(REASON_EFFECT) and re:IsActiveType(TYPE_MONSTER)
and cm.Revenger(tc)
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.Revenger(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m) return cm.Revenger(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m)
...@@ -44,27 +41,38 @@ end ...@@ -44,27 +41,38 @@ end
function cm.rfilter(c) function cm.rfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end end
function cm.tgfilter(c)
return c:IsAbleToGrave()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_MZONE,0,1,nil) local b2=Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local off=1
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1)) local ops,opval={},{}
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,0)) if b1 then
else op=Duel.SelectOption(tp,aux.Stringid(m,1))+1 end ops[off]=aux.Stringid(m,0)
e:SetLabel(op) opval[off]=0
if op==0 then off=off+1
end
if b2 then
ops[off]=aux.Stringid(m,1)
opval[off]=1
off=off+1
end
local op=Duel.SelectOption(tp,table.unpack(ops))+1
local sel=opval[op]
e:SetLabel(sel)
if sel==0 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
else else
e:SetCategory(CATEGORY_RELEASE+CATEGORY_TOGRAVE)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end end
end end
function cm.thop(e,tp,eg,ep,ev,re,r,rp) function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then local c=e:GetHandler()
local sel=e:GetLabel()
if sel==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then if g1:GetCount()>0 then
...@@ -76,7 +84,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +84,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_HAND,0,1,1) local g2=Duel.SelectMatchingCard(tp,cm.rfilter,tp,LOCATION_HAND,0,1,1)
if g2:GetCount()>0 and Duel.Release(g2,REASON_EFFECT)>0 then if g2:GetCount()>0 and Duel.Release(g2,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,cm.tgfilter,tp,0,LOCATION_MZONE,1,1,nil) local g3=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.HintSelection(g3) Duel.HintSelection(g3)
Duel.SendtoGrave(g3,REASON_EFFECT) Duel.SendtoGrave(g3,REASON_EFFECT)
end end
......
...@@ -34,8 +34,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,8 +34,10 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,2,2,nil) local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,2,2,nil)
if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT)>0 and c:IsRelateToEffect(e) then if g:GetCount()>0 and Duel.Release(g,REASON_EFFECT) then
Duel.SendtoHand(c,nil,REASON_EFFECT) if c:IsRelateToEffect(e) then
Duel.ConfirmCards(1-tp,c) Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end end
end end
\ No newline at end of file
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cfilter(c) function cm.cfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and cm.Revenger(c) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect() return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and (cm.Revenger(c) or c:IsCode(40010072)) and c:IsType(TYPE_MONSTER) and c:IsReleasableByEffect()
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Revenger(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m) return cm.Revenger(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(m)
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsFaceup() and cm.Revenger(c) and c:IsControler(tp) and c:IsOnField() return c:IsFaceup() and (cm.Revenger(c) or c:IsCode(40010072)) and c:IsControler(tp) and c:IsOnField()
end end
function cm.discon(e,tp,eg,ep,ev,re,r,rp) function cm.discon(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
...@@ -59,7 +59,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.Revenger(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and not c:IsCode(m) return cm.Revenger(c) and c:IsAbleToHand() and not c:IsCode(m)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.thfilter(chkc) end
......
...@@ -38,29 +38,31 @@ function cm.initial_effect(c) ...@@ -38,29 +38,31 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:IsFaceup() and (cm.Revenger(c) or cm.BLASTERdark(c)) and c:IsControler(tp) return c:IsFaceup() and ((cm.Revenger(c) or c:IsCode(40010072)) or cm.BLASTERdark(c)) and c:IsControler(tp)
end end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp) function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(cm.cfilter,1,nil,tp)
end end
function cm.setfilter(c) function cm.setfilter(c)
return cm.Revenger(c) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsSSetable() return cm.Revenger(c) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function cm.setop(e,tp,eg,ep,ev,re,r,rp) function cm.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if #g>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g)
end end
end end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and cm.Revenger(c) return c:IsFaceup() and (cm.Revenger(c) or c:IsCode(40010072))
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return cm.Revenger(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return cm.Revenger(c) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.refilter(c) function cm.refilter(c)
return c:IsFaceup() and cm.Revenger(c) and c:IsReleasableByEffect() return c:IsFaceup() and (cm.Revenger(c) or c:IsCode(40010072)) and c:IsReleasableByEffect()
end end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -7,7 +7,7 @@ function cm.Revenger(c) ...@@ -7,7 +7,7 @@ function cm.Revenger(c)
return m and m.named_with_Revenger return m and m.named_with_Revenger
end end
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableCounterPermit(0x5d) c:EnableCounterPermit(0x588)
--activate --activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -39,6 +39,7 @@ function c85400000.initial_effect(c) ...@@ -39,6 +39,7 @@ function c85400000.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE) e4:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e4:SetCondition(c85400000.ccdd) e4:SetCondition(c85400000.ccdd)
e4:SetTarget(c85400000.cc) e4:SetTarget(c85400000.cc)
e4:SetOperation(c85400000.ccc)
c:RegisterEffect(e4) c:RegisterEffect(e4)
------破坏场上的「一块布丁」 ------破坏场上的「一块布丁」
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
...@@ -166,8 +167,11 @@ function c85400000.bb(e,tp,eg,ep,ev,re,r,rp) ...@@ -166,8 +167,11 @@ function c85400000.bb(e,tp,eg,ep,ev,re,r,rp)
end end
function c85400000.cc(e,tp,eg,ep,ev,re,r,rp,chk) function c85400000.cc(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c85400000.ccc(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.SelectMatchingCard(tp,c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c85400000.fil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,4)) Duel.Hint(HINT_SOUND,0,aux.Stringid(85400000,4))
......
...@@ -64,7 +64,7 @@ function c85401890.initial_effect(c) ...@@ -64,7 +64,7 @@ function c85401890.initial_effect(c)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_LEAVE_FIELD_P) e7:SetCode(EVENT_LEAVE_FIELD_P)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_FZONE)
e7:SetOperation(c85401890.damp) e7:SetOperation(c85401890.damp)
c:RegisterEffect(e7) c:RegisterEffect(e7)
------离场前获得指示物数量 ------离场前获得指示物数量
......
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