Commit 94efbb17 authored by CubeRuler's avatar CubeRuler

fixed

parent addc10e7
Pipeline #16672 passed with stages
in 35 minutes and 32 seconds
......@@ -8,10 +8,10 @@ function cm.initial_effect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
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:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,m)
e1:SetCountLimit(1)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
......@@ -23,7 +23,7 @@ function cm.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m+1)
e3:SetCountLimit(1,m)
e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
......
......@@ -94,7 +94,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(92345028)
e3:SetCode(m)
e3:SetTargetRange(1,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
......
......@@ -75,7 +75,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.aclimit(e,re,tp)
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
--hand
function cm.handcon(e)
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE)
e5:SetCondition(cm.tgcon)
e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
......@@ -46,6 +47,10 @@ function cm.indop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e2,tp)
end
--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)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
......
......@@ -35,8 +35,7 @@ function cm.initial_effect(c)
--disable
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_PZONE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1)
......@@ -53,17 +52,18 @@ function cm.initial_effect(c)
c:RegisterEffect(e5)
--control
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_CONTROL)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetRange(LOCATION_MZONE)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCountLimit(1)
e6:SetTarget(cm.cttg)
e6:SetOperation(cm.ctop)
c:RegisterEffect(e6)
end
function cm.splimit(e,c)
return not c:IsSetCard(0xaa)
return not c:IsSetCard(0x37f6)
end
function cm.sprfilter(c)
return c:IsSetCard(0x37f6) and c:IsType(TYPE_PENDULUM) and c:IsReleasable()
......@@ -121,24 +121,24 @@ end
function cm.target(e,c)
return c~=e:GetHandler() and c:IsAttribute(ATTRIBUTE_DARK)
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)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
if not tc:IsAttribute(ATTRIBUTE_DARK) then
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
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)
end
end
......@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
......@@ -87,7 +88,7 @@ function cm.tgfilter(c)
return c:IsCode(30700010) and c:IsAbleToGrave()
end
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_NEGATE,eg,1,0,0)
end
......
......@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
......
......@@ -35,7 +35,7 @@ function cm.initial_effect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCode(EVENT_DESTROYED)
e8:SetCountLimit(1,m)
e8:SetCountLimit(1,m+20000)
e8:SetTarget(cm.srtg)
e8:SetOperation(cm.srop)
c:RegisterEffect(e8)
......@@ -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)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(1-tp,g)
end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
......@@ -87,12 +87,11 @@ function cm.spfilter(c,e,tp)
end
function cm.spfilter2(c,e,tp,code)
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
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(cm.spfilter,1,nil,e,tp) end
if chk==0 then return eg:IsExists(cm.spfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
......
......@@ -219,7 +219,7 @@ function youfu.excon1(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(10701101,10701141)
end
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
......
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