Commit 24e8096c authored by DailyShana's avatar DailyShana

fix

MACR 01-19, 40-45, 49-52, 65-68
parent 6856ee1a
...@@ -66,11 +66,12 @@ end ...@@ -66,11 +66,12 @@ end
function c122520.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c122520.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local t=Duel.GetAttackTarget() local t=Duel.GetAttackTarget()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil end if chk==0 then return Duel.GetAttacker()==e:GetHandler() and t~=nil end
Duel.SetTargetCard(t)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,t,1,0,0)
end end
function c122520.desop(e,tp,eg,ep,ev,re,r,rp) function c122520.desop(e,tp,eg,ep,ev,re,r,rp)
local t=Duel.GetAttackTarget() local t=Duel.GetFirstTarget()
if t~=nil and t:IsRelateToBattle() then if t:IsRelateToBattle() then
Duel.Destroy(t,REASON_EFFECT) Duel.Destroy(t,REASON_EFFECT)
end end
end end
...@@ -36,9 +36,9 @@ function c15092394.descost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,9 +36,9 @@ function c15092394.descost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c15092394.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15092394.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack()) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack())
end end
...@@ -67,7 +67,7 @@ function c15092394.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +67,7 @@ function c15092394.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
end end
end end
...@@ -18,7 +18,7 @@ function c22211622.initial_effect(c) ...@@ -18,7 +18,7 @@ function c22211622.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_PZONE) e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(c22211622.rccon) e2:SetCondition(c22211622.rccon)
e2:SetTarget(c22211622.rctg) e2:SetTarget(c22211622.rctg)
e2:SetOperation(c22211622.rcop) e2:SetOperation(c22211622.rcop)
...@@ -65,27 +65,29 @@ function c22211622.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,27 +65,29 @@ function c22211622.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c22211622.rcfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c22211622.rcfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c22211622.rcfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c22211622.rcfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack()) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack())
end end
function c22211622.rcop(e,tp,eg,ep,ev,re,r,rp) function c22211622.rcop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if e:GetHandler():IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Recover(p,tc:GetAttack(),REASON_EFFECT) Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT)
end end
end end
function c22211622.desfilter(c,ft)
if ft<-1 then return false end
return c:IsFaceup() and (ft>=0 or c:IsLocation(LOCATION_MZONE))
end
function c22211622.spfilter(c,e,tp) function c22211622.spfilter(c,e,tp)
return c:IsType(TYPE_XYZ+TYPE_PENDULUM) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_XYZ+TYPE_PENDULUM) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22211622.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22211622.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=c end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c22211622.desfilter(chkc,ft) and chkc~=c end
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c) if chk==0 then return Duel.IsExistingTarget(c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,c,ft)
and Duel.IsExistingMatchingCard(c22211622.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c22211622.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,c) local g=Duel.SelectTarget(tp,c22211622.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,ft)
g:AddCard(c) g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
...@@ -34,7 +34,7 @@ function c49820233.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,7 +34,7 @@ function c49820233.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
if e:GetLabel()==1 then if e:GetLabel()==1 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil) local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
end end
...@@ -43,7 +43,7 @@ function c49820233.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c49820233.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD) local ct=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)
if ct>0 and Duel.Damage(p,ct*200,REASON_EFFECT)~=0 and e:GetLabel()==1 then if ct>0 and Duel.Damage(p,ct*200,REASON_EFFECT)~=0 and e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.HintSelection(g) Duel.HintSelection(g)
......
...@@ -7,7 +7,7 @@ function c51497409.initial_effect(c) ...@@ -7,7 +7,7 @@ function c51497409.initial_effect(c)
e1:SetDescription(aux.Stringid(51497409,0)) e1:SetDescription(aux.Stringid(51497409,0))
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c51497409.cost) e1:SetCost(c51497409.cost)
...@@ -37,16 +37,13 @@ function c51497409.ddtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,16 +37,13 @@ function c51497409.ddtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c51497409.ddfilter,tp,LOCATION_ONFIELD,0,1,nil) end and Duel.IsExistingTarget(c51497409.ddfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c51497409.ddfilter,tp,LOCATION_ONFIELD,0,1,1,nil) local g=Duel.SelectTarget(tp,c51497409.ddfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c51497409.ddop(e,tp,eg,ep,ev,re,r,rp) function c51497409.ddop(e,tp,eg,ep,ev,re,r,rp)
local g,p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local tc=Duel.GetFirstTarget()
g=g:Filter(Card.IsRelateToEffect,nil,e) if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)>0 then Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(p,d,REASON_EFFECT)
end end
end end
function c51497409.incon(e,tp,eg,ep,ev,re,r,rp) function c51497409.incon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -6,7 +6,7 @@ function c60832978.initial_effect(c) ...@@ -6,7 +6,7 @@ function c60832978.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(c60832978.target1) e1:SetTarget(c60832978.target1)
e1:SetOperation(c60832978.operation) e1:SetOperation(c60832978.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
...@@ -19,7 +19,7 @@ function c60832978.initial_effect(c) ...@@ -19,7 +19,7 @@ function c60832978.initial_effect(c)
e3:SetCountLimit(1,60832978) e3:SetCountLimit(1,60832978)
e3:SetCost(c60832978.cost) e3:SetCost(c60832978.cost)
e3:SetTarget(c60832978.target2) e3:SetTarget(c60832978.target2)
e3:SetOperation(c60832978.operation) e3:SetOperation(c60832978.operation2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c60832978.filter1(c) function c60832978.filter1(c)
...@@ -31,7 +31,7 @@ function c60832978.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,7 @@ function c60832978.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60832978.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c60832978.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c60832978.operation(e,tp,eg,ep,ev,re,r,rp) function c60832978.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
...@@ -56,3 +56,15 @@ function c60832978.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -56,3 +56,15 @@ function c60832978.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c60832978.filter2,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c60832978.filter2,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c60832978.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRace(RACE_FIEND) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1)
end
end
...@@ -9,13 +9,13 @@ function c62645025.initial_effect(c) ...@@ -9,13 +9,13 @@ function c62645025.initial_effect(c)
e1:SetTarget(c62645025.target) e1:SetTarget(c62645025.target)
e1:SetOperation(c62645025.activate) e1:SetOperation(c62645025.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c62645025.drcon) e2:SetCondition(c62645025.drcon)
e2:SetCost(c62645025.drcost) e2:SetCost(c62645025.drcost)
e2:SetTarget(c62645025.drtg) e2:SetTarget(c62645025.drtg)
......
...@@ -32,12 +32,14 @@ function c62899696.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,12 +32,14 @@ function c62899696.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c62899696.filter(tc,c,tp) function c62899696.filter(tc,c,tp)
if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end if not tc:IsFaceup() or not tc:IsCanBeSynchroMaterial() then return false end
c:RegisterFlagEffect(62899696,0,0,1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL) e1:SetCode(EFFECT_SYNCHRO_MATERIAL)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
local res=Duel.IsExistingMatchingCard(c62899696.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg) local res=Duel.IsExistingMatchingCard(c62899696.synfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
c:ResetFlagEffect(62899696)
e1:Reset() e1:Reset()
return res return res
end end
...@@ -45,22 +47,11 @@ function c62899696.synfilter(c,mg) ...@@ -45,22 +47,11 @@ function c62899696.synfilter(c,mg)
return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg) return c:IsAttribute(ATTRIBUTE_WIND) and c:IsSynchroSummonable(nil,mg)
end end
function c62899696.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c62899696.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c62899696.filter(chkc,e:GetHandler(),tp) end
c:RegisterFlagEffect(62899696,0,0,1) if chk==0 then return Duel.IsExistingTarget(c62899696.filter,tp,0,LOCATION_MZONE,1,nil,e:GetHandler(),tp) end
if chkc then
local res=chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c62899696.filter(chkc,c,tp)
c:ResetFlagEffect(62899696)
return res
end
if chk==0 then
local res=Duel.IsExistingTarget(c62899696.filter,tp,0,LOCATION_MZONE,1,nil,c,tp)
c:ResetFlagEffect(62899696)
return res
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c62899696.filter,tp,0,LOCATION_MZONE,1,1,nil,c,tp) Duel.SelectTarget(tp,c62899696.filter,tp,0,LOCATION_MZONE,1,1,nil,e:GetHandler(),tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
c:ResetFlagEffect(62899696)
end end
function c62899696.spop(e,tp,eg,ep,ev,re,r,rp) function c62899696.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -50,6 +50,7 @@ function c69610326.pctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -50,6 +50,7 @@ function c69610326.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp) function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
...@@ -58,7 +59,6 @@ function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +59,6 @@ function c69610326.pcop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c69610326.splimit) e1:SetTarget(c69610326.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if not c:IsRelateToEffect(e) then return end
local seq=c:GetSequence() local seq=c:GetSequence()
if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end if not Duel.CheckLocation(tp,LOCATION_SZONE,13-seq) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
......
...@@ -52,6 +52,9 @@ function c7161742.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,6 +52,9 @@ function c7161742.spop(e,tp,eg,ep,ev,re,r,rp)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetCode(EFFECT_CANNOT_SUMMON)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e3,tp)
end end
function c7161742.splimit(e,c) function c7161742.splimit(e,c)
return not c:IsType(TYPE_FUSION) return not c:IsType(TYPE_FUSION)
......
...@@ -13,10 +13,9 @@ function c73734821.initial_effect(c) ...@@ -13,10 +13,9 @@ function c73734821.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_SOLVED) e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c73734821.atkcon) e2:SetCondition(c73734821.atkcon)
e2:SetCost(c73734821.atkcost)
e2:SetOperation(c73734821.atkop) e2:SetOperation(c73734821.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
...@@ -47,10 +46,6 @@ function c73734821.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,10 +46,6 @@ function c73734821.atkcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and rp==tp and e:GetHandler():GetFlagEffect(1)>0 and rp==tp and e:GetHandler():GetFlagEffect(1)>0
end end
function c73734821.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(73734821)==0 end
e:GetHandler():RegisterFlagEffect(73734821,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c73734821.atkop(e,tp,eg,ep,ev,re,r,rp) function c73734821.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
...@@ -97,9 +92,9 @@ function c73734821.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,9 +92,9 @@ function c73734821.descon(e,tp,eg,ep,ev,re,r,rp)
end end
function c73734821.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73734821.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c73734821.desop(e,tp,eg,ep,ev,re,r,rp) function c73734821.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,6 +21,7 @@ function c76647978.initial_effect(c) ...@@ -21,6 +21,7 @@ function c76647978.initial_effect(c)
e2:SetTarget(c76647978.sptg) e2:SetTarget(c76647978.sptg)
e2:SetOperation(c76647978.spop) e2:SetOperation(c76647978.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end end
function c76647978.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c76647978.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end if chk==0 then return Duel.CheckLPCost(tp,2000) end
...@@ -71,22 +72,23 @@ function c76647978.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,22 +72,23 @@ function c76647978.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(76647978,RESET_EVENT+0x1fe0000,0,1) tc:RegisterFlagEffect(76647978,RESET_EVENT+0x1fe0000,0,1)
tc:CompleteProcedure() tc:CompleteProcedure()
e:GetLabelObject():SetLabelObject(tc)
end end
function c76647978.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c76647978.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c76647978.mgfilter(c,e,tp,fusc,mg) function c76647978.mgfilter(c,e,tp,fusc,mg)
return not c:IsControler(tp) or not c:IsLocation(LOCATION_GRAVE) return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
or bit.band(c:GetReason(),0x40008)~=0x40008 or c:GetReasonCard()~=fusc and bit.band(c:GetReason(),0x40008)==0x40008 and c:GetReasonCard()==fusc
or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
or not fusc:CheckFusionMaterial(mg,c) and fusc:CheckFusionMaterial(mg,c)
end end
function c76647978.spfilter(c,e,tp,lc) function c76647978.spfilter(c,e,tp,lc)
if c:IsFaceup() and c:GetFlagEffect(76647978)~=0 then if c:IsFaceup() and c:GetFlagEffect(76647978)~=0 and c==e:GetLabelObject() then
local mg=c:GetMaterial() local mg=c:GetMaterial()
return mg:GetCount()>0 and mg:GetCount()<=lc return mg:GetCount()>0 and mg:GetCount()<=lc
and not mg:IsExists(c76647978.mgfilter,1,nil,e,tp,c,mg) and mg:IsExists(c76647978.mgfilter,1,nil,e,tp,c,mg)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
else return false end else return false end
end end
...@@ -104,7 +106,7 @@ function c76647978.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +106,7 @@ function c76647978.spop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local mg=tc:GetMaterial() local mg=tc:GetMaterial()
if mg:GetCount()>0 and mg:GetCount()<=Duel.GetLocationCount(tp,LOCATION_MZONE) if mg:GetCount()>0 and mg:GetCount()<=Duel.GetLocationCount(tp,LOCATION_MZONE)
and not mg:IsExists(c76647978.mgfilter,1,nil,e,tp,tc) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then and mg:IsExists(c76647978.mgfilter,1,nil,e,tp,tc) and not Duel.IsPlayerAffectedByEffect(tp,59822133) then
local sc=mg:GetFirst() local sc=mg:GetFirst()
while sc do while sc do
if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then if Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP) then
......
...@@ -8,6 +8,7 @@ function c9000988.initial_effect(c) ...@@ -8,6 +8,7 @@ function c9000988.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c9000988.condition) e1:SetCondition(c9000988.condition)
e1:SetTarget(c9000988.target) e1:SetTarget(c9000988.target)
e1:SetOperation(c9000988.operation) e1:SetOperation(c9000988.operation)
...@@ -37,7 +38,7 @@ function c9000988.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -37,7 +38,7 @@ function c9000988.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9000988.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c9000988.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c9000988.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c9000988.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c9000988.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c9000988.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c9000988.operation(e,tp,eg,ep,ev,re,r,rp) function c9000988.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -11,6 +11,7 @@ function c9030160.initial_effect(c) ...@@ -11,6 +11,7 @@ function c9030160.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c9030160.condition) e2:SetCondition(c9030160.condition)
e2:SetValue(c9030160.evalue) e2:SetValue(c9030160.evalue)
...@@ -20,6 +21,7 @@ function c9030160.initial_effect(c) ...@@ -20,6 +21,7 @@ function c9030160.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_UNRELEASABLE_SUM) e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetTargetRange(0,LOCATION_MZONE) e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetCondition(c9030160.condition) e3:SetCondition(c9030160.condition)
e3:SetValue(1) e3:SetValue(1)
......
...@@ -6,7 +6,7 @@ function c96227613.initial_effect(c) ...@@ -6,7 +6,7 @@ function c96227613.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_AVAILABLE_BD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetCondition(c96227613.ndcon) e1:SetCondition(c96227613.ndcon)
e1:SetValue(0) e1:SetValue(0)
...@@ -84,17 +84,21 @@ function c96227613.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,17 +84,21 @@ function c96227613.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c96227613.desfilter(c,ft)
if ft<-1 then return false end
return c:IsFaceup() and (ft>=0 or c:IsLocation(LOCATION_MZONE))
end
function c96227613.spfilter(c,e,tp) function c96227613.spfilter(c,e,tp)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_FUSION+TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c96227613.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c96227613.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=c end local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c96227613.desfilter(chkc,ft) and chkc~=c end
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c) if chk==0 then return Duel.IsExistingTarget(c96227613.desfilter,tp,LOCATION_ONFIELD,0,1,c,ft)
and Duel.IsExistingMatchingCard(c96227613.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c96227613.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,c) local g=Duel.SelectTarget(tp,c96227613.desfilter,tp,LOCATION_ONFIELD,0,1,1,c,ft)
g:AddCard(c) g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
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