Commit 9b79974b authored by Nemo Ma's avatar Nemo Ma

fix

parent 035c5051
--shrimp captain of dragon palace --shrimp captain of dragon palace
local m=11451420 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--effect1 --effect1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -59,15 +58,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -59,15 +58,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(cm.chainop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end end
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetOperation(cm.chainop)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end end
function cm.chainop(e,tp,eg,ep,ev,re,r,rp) function cm.chainop(e,tp,eg,ep,ev,re,r,rp)
if re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and ep==tp then if re:GetHandler():IsAttribute(ATTRIBUTE_WATER) and ep==tp then
......
--crad guard of dragon palace --crad guard of dragon palace
local m=11451421 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--effect1 --effect1
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -70,17 +69,16 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,17 +69,16 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if e:GetHandler():IsRelateToEffect(e) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP) then Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(function(e,c) return c:IsSetCard(0x6978) and c:IsFaceup() end)
e3:SetValue(function(e,re,r,rp) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then return 1 else return 0 end end)
Duel.RegisterEffect(e3,tp)
end
end end
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetTarget(function(e,c) return c:IsSetCard(0x6978) and c:IsFaceup() end)
e3:SetValue(function(e,re,r,rp) if bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0 then return 1 else return 0 end end)
Duel.RegisterEffect(e3,tp)
end end
function cm.condition2(e,tp,eg,ep,ev,re,r,rp) function cm.condition2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.filter3,1,nil,1-tp) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) return eg:IsExists(cm.filter3,1,nil,1-tp) and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
......
...@@ -35,16 +35,16 @@ function cm.initial_effect(c) ...@@ -35,16 +35,16 @@ function cm.initial_effect(c)
e3:SetOperation(c22348098.thop) e3:SetOperation(c22348098.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c22348098.cfilter(c) function c22348098.cfilter(c,e)
local tp=c:GetControler() local tp=e:GetHandler():GetControler()
return c:IsFaceup() and c:IsSetCard(0x703) and c:IsControler(tp) and c:IsAbleToGrave() return c:IsFaceup() and c:IsSetCard(0x703) and c:IsControler(tp) and c:IsAbleToGrave()
end end
function c22348098.spcon(e,tp,eg,ep,ev,re,r,rp) function c22348098.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c22348098.cfilter,1,nil,tp) return eg:IsExists(c22348098.cfilter,1,nil,e)
end end
function c22348098.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c22348098.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c22348098.cfilter,1,nil,tp) end if chk==0 then return eg:IsExists(c22348098.cfilter,1,nil,e) end
local tg=Group.Filter(eg,c22348098.cfilter,nil) local tg=Group.Filter(eg,c22348098.cfilter,nil,e)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,0,0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,tg,0,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end end
...@@ -52,7 +52,7 @@ function c22348098.spfilter(c,e,tp) ...@@ -52,7 +52,7 @@ function c22348098.spfilter(c,e,tp)
return c:IsSetCard(0x703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x703) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22348098.spop(e,tp,eg,ep,ev,re,r,rp) function c22348098.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Group.Filter(eg,c22348098.cfilter,nil) local tg=Group.Filter(eg,c22348098.cfilter,nil,e)
if tg:GetCount()>0 then if tg:GetCount()>0 then
local bbb=Duel.SendtoGrave(tg,REASON_EFFECT) local bbb=Duel.SendtoGrave(tg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -76,7 +76,7 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,7 +76,7 @@ function cm.srop(e,tp,eg,ep,ev,re,r,rp)
aux.GCheckAdditional=aux.dncheck aux.GCheckAdditional=aux.dncheck
local tg=g:SelectSubGroup(tp,cm.srgfilter,false,1,#g,e:GetHandler():GetLevel()) local tg=g:SelectSubGroup(tp,cm.srgfilter,false,1,#g,e:GetHandler():GetLevel())
aux.GCheckAdditional=nil aux.GCheckAdditional=nil
if tg:GetCount()>0 then if tg and tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
end end
......
...@@ -126,11 +126,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,11 +126,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:AddCounter(cm.counter,ct) if ct>0 then tc:AddCounter(cm.counter,ct) end
end end
end end
\ No newline at end of file
...@@ -103,11 +103,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,11 +103,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:AddCounter(cm.counter,ct) if ct>0 then tc:AddCounter(cm.counter,ct) end
end end
end end
\ No newline at end of file
...@@ -32,7 +32,6 @@ function cm.initial_effect(c) ...@@ -32,7 +32,6 @@ function cm.initial_effect(c)
e4:SetDescription(aux.Stringid(m,1)) e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,33330021)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
e4:SetCondition(cm.fdcon) e4:SetCondition(cm.fdcon)
...@@ -103,11 +102,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -103,11 +102,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:AddCounter(cm.counter,ct) if ct>0 then tc:AddCounter(cm.counter,ct) end
end end
end end
\ No newline at end of file
...@@ -32,7 +32,6 @@ function cm.initial_effect(c) ...@@ -32,7 +32,6 @@ function cm.initial_effect(c)
e4:SetDescription(aux.Stringid(m,1)) e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,m)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
e4:SetCondition(cm.fdcon) e4:SetCondition(cm.fdcon)
...@@ -104,11 +103,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,11 +103,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:AddCounter(cm.counter,ct) if ct>0 then tc:AddCounter(cm.counter,ct) end
end end
end end
\ No newline at end of file
...@@ -32,7 +32,6 @@ function cm.initial_effect(c) ...@@ -32,7 +32,6 @@ function cm.initial_effect(c)
e4:SetDescription(aux.Stringid(m,1)) e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_LEAVE_FIELD) e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,m)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetLabelObject(e3) e4:SetLabelObject(e3)
e4:SetCondition(cm.fdcon) e4:SetCondition(cm.fdcon)
...@@ -116,11 +115,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,11 +115,11 @@ function cm.fdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.fdfilter2),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
local tep=tc:GetControler() local tep=tc:GetControler()
local cost=te:GetCost() local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
tc:AddCounter(cm.counter,ct) if ct>0 then tc:AddCounter(cm.counter,ct) end
end end
end end
\ No newline at end of file
...@@ -125,6 +125,6 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -125,6 +125,6 @@ function cm.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.scfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.scfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
\ No newline at end of file
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