Commit 94efbb17 authored by CubeRuler's avatar CubeRuler

fixed

parent addc10e7
...@@ -8,10 +8,10 @@ function cm.initial_effect(c) ...@@ -8,10 +8,10 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m) e1:SetCountLimit(1)
e1:SetCondition(cm.setcon) e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg) e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop) e1:SetOperation(cm.setop)
...@@ -23,7 +23,7 @@ function cm.initial_effect(c) ...@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1) e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon) e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
......
...@@ -94,7 +94,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028) e3:SetCode(m)
e3:SetTargetRange(1,0) e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
......
...@@ -75,7 +75,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and c:IsRace(RACE_ZOMBIE) return re:IsActiveType(TYPE_MONSTER) and rc:IsRace(RACE_ZOMBIE)
end end
--hand --hand
function cm.handcon(e) function cm.handcon(e)
......
...@@ -19,6 +19,7 @@ function cm.initial_effect(c) ...@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e5:SetCategory(CATEGORY_TOGRAVE) e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE) e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(cm.tgcon)
e5:SetTarget(cm.tgtg) e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop) e5:SetOperation(cm.tgop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
...@@ -46,6 +47,10 @@ function cm.indop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,6 +47,10 @@ function cm.indop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
end end
--tograve --tograve
function cm.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_LINK)
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 chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
......
...@@ -35,8 +35,7 @@ function cm.initial_effect(c) ...@@ -35,8 +35,7 @@ function cm.initial_effect(c)
--disable --disable
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE) e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_PZONE) e4:SetRange(LOCATION_PZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1) e4:SetCountLimit(1)
...@@ -53,17 +52,18 @@ function cm.initial_effect(c) ...@@ -53,17 +52,18 @@ function cm.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--control --control
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_CONTROL) e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetType(EFFECT_TYPE_IGNITION) e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetTarget(cm.cttg) e6:SetTarget(cm.cttg)
e6:SetOperation(cm.ctop) e6:SetOperation(cm.ctop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function cm.splimit(e,c) function cm.splimit(e,c)
return not c:IsSetCard(0xaa) return not c:IsSetCard(0x37f6)
end end
function cm.sprfilter(c) function cm.sprfilter(c)
return c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and c:IsReleasable() return c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and c:IsReleasable()
...@@ -121,24 +121,24 @@ end ...@@ -121,24 +121,24 @@ end
function cm.target(e,c) function cm.target(e,c)
return c~=e:GetHandler() and c:IsAttribute(ATTRIBUTE_DARK) return c~=e:GetHandler() and c:IsAttribute(ATTRIBUTE_DARK)
end end
function cm.cfilter(c)
return c:IsFaceup() and not c:IsAttribute(ATTRIBUTE_DARK)
end
function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,cm.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1) local e1=Effect.CreateEffect(c)
end
if not tc:IsAttribute(ATTRIBUTE_DARK) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE) e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetValue(ATTRIBUTE_DARK) e1:SetValue(ATTRIBUTE_DARK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -87,7 +88,7 @@ function cm.tgfilter(c) ...@@ -87,7 +88,7 @@ function cm.tgfilter(c)
return c:IsCode(30700010) and c:IsAbleToGrave() return c:IsCode(30700010) and c:IsAbleToGrave()
end end
function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
......
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
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_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.thtg) e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop) e1:SetOperation(cm.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_DELAY) e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCode(EVENT_DESTROYED) e8:SetCode(EVENT_DESTROYED)
e8:SetCountLimit(1,m) e8:SetCountLimit(1,m+20000)
e8:SetTarget(cm.srtg) e8:SetTarget(cm.srtg)
e8:SetOperation(cm.srop) e8:SetOperation(cm.srop)
c:RegisterEffect(e8) c:RegisterEffect(e8)
...@@ -61,7 +61,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -87,12 +87,11 @@ function cm.spfilter(c,e,tp) ...@@ -87,12 +87,11 @@ function cm.spfilter(c,e,tp)
end end
function cm.spfilter2(c,e,tp,code) function cm.spfilter2(c,e,tp,code)
return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9341) return c:IsType(TYPE_MONSTER) and c:IsType(TYPE_FUSION) and c:IsSetCard(0x9341)
and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and not c:IsCode(code)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end if chkc then return eg:IsContains(chkc) and chkc:IsControler(tp) and cm.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return eg:IsExists(cm.spfilter,1,nil,e,tp) end
and eg:IsExists(cm.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp) local g=eg:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
......
...@@ -219,7 +219,7 @@ function youfu.excon1(e,tp,eg,ep,ev,re,r,rp) ...@@ -219,7 +219,7 @@ function youfu.excon1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141) return re and re:GetHandler():IsCode(10701101,10701141)
end end
function youfu.excon2(e,tp,eg,ep,ev,re,r,rp) function youfu.excon2(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701211) return e:GetHandler():IsReason(REASON_EFFECT) and re and re:GetHandler():IsCode(10701211)
end 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