Commit 6010f7f8 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent 6be75a82
No preview for this file type
...@@ -2,99 +2,99 @@ ...@@ -2,99 +2,99 @@
local m=66915000 local m=66915000
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP) e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(cm.eqtg) e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop) e2:SetOperation(cm.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup --atkup
local e22=Effect.CreateEffect(c) local e22=Effect.CreateEffect(c)
e22:SetType(EFFECT_TYPE_SINGLE) e22:SetType(EFFECT_TYPE_SINGLE)
e22:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e22:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e22:SetRange(LOCATION_MZONE) e22:SetRange(LOCATION_MZONE)
e22:SetCode(EFFECT_UPDATE_ATTACK) e22:SetCode(EFFECT_UPDATE_ATTACK)
e22:SetValue(cm.val) e22:SetValue(cm.val)
c:RegisterEffect(e22) c:RegisterEffect(e22)
--draw --draw
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND) e3:SetCategory(CATEGORY_DRAW+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(cm.spcon) e3:SetCondition(cm.spcon)
e3:SetTarget(cm.drtg) e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop) e3:SetOperation(cm.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.val(e,c) function cm.val(e,c)
return c:GetEquipCount()*100 return c:GetEquipCount()*100
end end
function cm.filter(c,cc) function cm.filter(c,cc)
return c:IsSetCard(0x374) and c:IsType(TYPE_SPELL+TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc) return c:IsSetCard(0x374) and c:IsType(TYPE_SPELL) and c:IsType(TYPE_CONTINUOUS) and not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_ONFIELD,cc)
end end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end and Duel.IsExistingTarget(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp) function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit) e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function cm.eqlimit(e,c) function cm.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsCode(66915001) return c:IsFaceup() and c:IsCode(66915001)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_SZONE,0,1,nil) return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_SZONE,0,1,nil)
end end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_SZONE)
end end
function cm.pfilter(c) function cm.pfilter(c)
return c:IsFaceup() and c:IsCode(66915001) and c:IsAbleToHand() return c:IsFaceup() and c:IsCode(66915001) and c:IsAbleToHand()
end end
function cm.drop(e,tp,eg,ep,ev,re,r,rp) function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.Draw(p,d,REASON_EFFECT)~=0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.SelectMatchingCard(tp,cm.pfilter,tp,LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.pfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--璀璨的星辉 --璀璨的星辉
function c66915001.initial_effect(c) function c66915001.initial_effect(c)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD) e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(2,66915001) e1:SetCountLimit(2,66915001)
e1:SetCondition(c66915001.spcon) e1:SetCondition(c66915001.spcon)
e1:SetTarget(c66915001.target) e1:SetTarget(c66915001.target)
e1:SetOperation(c66915001.spop) e1:SetOperation(c66915001.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--move --move
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_IGNITION) e11:SetType(EFFECT_TYPE_IGNITION)
e11:SetRange(LOCATION_MZONE) e11:SetRange(LOCATION_MZONE)
e11:SetCountLimit(1) e11:SetCountLimit(1)
e11:SetCondition(c66915001.seqcon) e11:SetCondition(c66915001.seqcon)
e11:SetOperation(c66915001.seqop) e11:SetOperation(c66915001.seqop)
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c66915001.eftg) e5:SetTarget(c66915001.eftg)
e5:SetLabelObject(e11) e5:SetLabelObject(e11)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--spsummon limit --spsummon limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetTarget(c66915001.sumlimit) e2:SetTarget(c66915001.sumlimit)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c66915001.filter(c,e,tp) function c66915001.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsSetCard(0x1374) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsSetCard(0x1374) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c66915001.spcon(e,tp,eg,ep,ev,re,r,rp) function c66915001.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c66915001.filters,tp,LOCATION_SZONE,0,1,nil) return Duel.IsExistingMatchingCard(c66915001.filters,tp,LOCATION_SZONE,0,1,nil)
end end
function c66915001.filters(c,e) function c66915001.filters(c,e)
return c:IsSetCard(0x374) and c:IsFaceup() return c:IsSetCard(0x374) and c:IsFaceup()
end end
function c66915001.target(e,tp,eg,ep,ev,re,r,rp,chk) function c66915001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66915001.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c66915001.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c66915001.spop(e,tp,eg,ep,ev,re,r,rp) function c66915001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c66915001.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c66915001.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end Duel.Hint(HINT_MUSIC,0,aux.Stringid(81013009,2))
end
end end
function c66915001.seqcon(e,tp,eg,ep,ev,re,r,rp) function c66915001.seqcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence() local seq=e:GetHandler():GetSequence()
if seq>4 then return false end if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) return (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1))
end end
function c66915001.seqop(e,tp,eg,ep,ev,re,r,rp) function c66915001.seqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end if not c:IsRelateToEffect(e) or c:IsControler(1-tp) then return end
local seq=c:GetSequence() local seq=c:GetSequence()
if seq>4 then return end if seq>4 then return end
if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1)) if (seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then or (seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) then
local flag=0 local flag=0
if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.replace(flag,0x1,seq-1) end if seq>0 and Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) then flag=bit.replace(flag,0x1,seq-1) end
if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.replace(flag,0x1,seq+1) end if seq<4 and Duel.CheckLocation(tp,LOCATION_MZONE,seq+1) then flag=bit.replace(flag,0x1,seq+1) end
flag=bit.bxor(flag,0xff) flag=bit.bxor(flag,0xff)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag) local s=Duel.SelectDisableField(tp,1,LOCATION_MZONE,0,flag)
local nseq=0 local nseq=0
if s==1 then nseq=0 if s==1 then nseq=0
elseif s==2 then nseq=1 elseif s==2 then nseq=1
elseif s==4 then nseq=2 elseif s==4 then nseq=2
elseif s==8 then nseq=3 elseif s==8 then nseq=3
else nseq=4 end else nseq=4 end
Duel.MoveSequence(c,nseq) Duel.MoveSequence(c,nseq)
end end
end end
function c66915001.eftg(e,c) function c66915001.eftg(e,c)
local seq=c:GetSequence() local seq=c:GetSequence()
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x1374) return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x1374)
and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==1 and seq<5 and math.abs(e:GetHandler():GetSequence()-seq)==1
end end
function c66915001.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c66915001.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374) return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0x1374)
end end
--星曜观星台 --星曜观星台
function c66915002.initial_effect(c) function c66915002.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,66915002) e1:SetCountLimit(1,66915002)
e1:SetTarget(c66915002.target) e1:SetTarget(c66915002.target)
e1:SetOperation(c66915002.activate) e1:SetOperation(c66915002.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--spsummon --spsummon
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(66915002,1)) e5:SetDescription(aux.Stringid(66915002,1))
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,66915002) e5:SetCountLimit(1,66915002)
e5:SetCost(c66915002.descost) e5:SetCost(c66915002.descost)
e5:SetTarget(c66915002.targets) e5:SetTarget(c66915002.targets)
e5:SetOperation(c66915002.activates) e5:SetOperation(c66915002.activates)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_REMAIN_FIELD) e3:SetCode(EFFECT_REMAIN_FIELD)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c66915002.filter(c) function c66915002.filter(c)
return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001) return ((c:IsType(TYPE_CONTINUOUS) and c:IsSetCard(0x374)) or c:IsCode(66915001)) and c:IsSSetable()
end end
function c66915002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66915002.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c66915002.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c66915002.filter,tp,LOCATION_DECK,0,1,nil) end
end end
function c66915002.activate(e,tp,eg,ep,ev,re,r,rp) function c66915002.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c66915002.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
local tc=g:GetFirst() local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) if tc:IsType(TYPE_TRAP) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
end tc:RegisterEffect(e1)
end
end
end end
function c66915002.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c66915002.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function c66915002.targets(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c66915002.targets(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66915002.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66915002.filter(chkc) end
local ct=Duel.GetLocationCount(tp,LOCATION_SZONE) local ct=Duel.GetLocationCount(tp,LOCATION_SZONE)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_GRAVE) then ct=ct-1 end if e:IsHasType(EFFECT_TYPE_ACTIVATE) and not e:GetHandler():IsLocation(LOCATION_GRAVE) then ct=ct-1 end
if chk==0 then return ct>0 and Duel.IsExistingTarget(c66915002.filter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return ct>0 and Duel.IsExistingTarget(c66915002.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c66915002.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c66915002.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end end
function c66915002.activates(e,tp,eg,ep,ev,re,r,rp) function c66915002.activates(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsSSetable() then if tc:IsRelateToEffect(e) and tc:IsSSetable() then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler()) if tc:IsType(TYPE_TRAP) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
end tc:RegisterEffect(e1)
end
end
end end
\ No newline at end of file
...@@ -2,68 +2,70 @@ ...@@ -2,68 +2,70 @@
local m=66915007 local m=66915007
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA) e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(cm.spcon) e2:SetCondition(cm.spcon)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tograve --tograve
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetTarget(cm.tgtg) e3:SetTarget(cm.tgtg)
e3:SetOperation(cm.tgop) e3:SetOperation(cm.tgop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--cannot be link material --cannot be link material
local e33=Effect.CreateEffect(c) local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_SINGLE) e33:SetType(EFFECT_TYPE_SINGLE)
e33:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e33:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e33:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e33:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e33:SetValue(1) e33:SetValue(1)
c:RegisterEffect(e33) c:RegisterEffect(e33)
end end
function cm.spfilter(c) function cm.spfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) return c:IsType(TYPE_CONTINUOUS) and c:IsAbleToGraveAsCost() and c:IsSetCard(0x374) and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil) return not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,nil)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND+LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.filter(c) function cm.filter(c)
return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001) return ((c:GetType()==TYPE_SPELL+TYPE_CONTINUOUS or c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS)and c:IsSetCard(0x374)) and c:IsSSetable() or c:IsCode(66915001)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
end end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp) function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g) Duel.SSet(tp,g)
local tc=g:GetFirst() local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) if tc:IsType(TYPE_TRAP) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
end tc:RegisterEffect(e1)
end
end
end end
...@@ -39,15 +39,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,15 +39,4 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CopyEffect(gc:GetCode(),RESET_EVENT+RESETS_STANDARD) tc:CopyEffect(gc:GetCode(),RESET_EVENT+RESETS_STANDARD)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(cm.splimit)
Duel.RegisterEffect(e1,tp)
end
function cm.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end end
...@@ -2,119 +2,128 @@ ...@@ -2,119 +2,128 @@
local m=66915020 local m=66915020
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
cm.dfc_front_side=66915019 cm.dfc_front_side=66915019
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
local e11=Effect.CreateEffect(c) local e11=Effect.CreateEffect(c)
e11:SetCategory(CATEGORY_TODECK+CATEGORY_DECKDES+CATEGORY_TOGRAVE) e11:SetCategory(CATEGORY_TODECK+CATEGORY_DECKDES+CATEGORY_TOGRAVE)
e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e11:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e11:SetCode(EVENT_SPSUMMON_SUCCESS) e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetCondition(cm.condition) e11:SetCondition(cm.condition)
e11:SetTarget(cm.target) e11:SetTarget(cm.target)
e11:SetOperation(cm.operation) e11:SetOperation(cm.operation)
c:RegisterEffect(e11) c:RegisterEffect(e11)
--atkdown --atkdown
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m) e3:SetCountLimit(1,m)
e3:SetCost(cm.cost) e3:SetCost(cm.cost)
e3:SetTarget(cm.atktg) e3:SetTarget(cm.atktg)
e3:SetOperation(cm.atkop) e3:SetOperation(cm.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.filter(c) function cm.filter(c)
return c:IsSetCard(0x1374) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x1374) and c:IsAbleToGraveAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsCode(66915018) return re and re:GetHandler():IsCode(66915018)
end end
function cm.tdfilter(c) function cm.tdfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_SZONE,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_SZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function cm.thfilter1(c) function cm.thfilter1(c)
return (c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSetCard(0x374) or c:IsCode(66915001)) and c:IsSSetable() return (c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSetCard(0x374) or c:IsCode(66915001)) and c:IsSSetable()
end end
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_SZONE,0,nil) local g=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_SZONE,0,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT) local ct=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
if ct>=1 then local hg1=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
Duel.BreakEffect() local hg2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,nil)
local e1=Effect.CreateEffect(e:GetHandler()) if ct>=1 then
e1:SetType(EFFECT_TYPE_SINGLE) Duel.BreakEffect()
e1:SetCode(EFFECT_UPDATE_ATTACK) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetValue(1000) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e:GetHandler():RegisterEffect(e1) e1:SetValue(1000)
end e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
local hg1=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil) e:GetHandler():RegisterEffect(e1)
if ct>=2 and hg1:GetCount()>0 then end
Duel.BreakEffect() if ct>=2 and hg1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.BreakEffect()
local ag=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
if ag:GetCount()>0 then local ag=Duel.SelectMatchingCard(tp,cm.thfilter1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SSet(tp,ag) if ag:GetCount()>0 then
end Duel.SSet(tp,ag)
end local tc=ag:GetFirst()
local hg2=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,nil) if tc:IsType(TYPE_TRAP) then
if ct>=3 and hg1:GetCount()>=2 then local e1=Effect.CreateEffect(e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) e1:SetType(EFFECT_TYPE_SINGLE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,2,2,nil) e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
if g:GetCount()>0 then e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
Duel.SendtoHand(g,nil,REASON_EFFECT) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.ConfirmCards(1-tp,g) tc:RegisterEffect(e1)
end end
end end
if ct==4 then end
local e2=Effect.CreateEffect(e:GetHandler()) if ct>=3 and hg2:GetCount()>=2 then
e2:SetType(EFFECT_TYPE_FIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,2,2,nil)
e2:SetCode(EFFECT_CANNOT_ACTIVATE) if g:GetCount()>0 then
e2:SetReset(RESET_PHASE+PHASE_END) Duel.SendtoHand(g,nil,REASON_EFFECT)
e2:SetTargetRange(0,LOCATION_GRAVE) Duel.ConfirmCards(1-tp,g)
Duel.RegisterEffect(e2,tp) end
end end
end if ct==4 then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,LOCATION_GRAVE)
Duel.RegisterEffect(e2,tp)
end
end
end end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
end end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
local tc=e:GetHandler():GetAttack()/2 local tc=e:GetHandler():GetAttack()/2
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
local sc=g:GetFirst() local sc=g:GetFirst()
while sc do while sc do
local preatk=sc:GetAttack() local preatk=sc:GetAttack()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-tc) e1:SetValue(-tc)
sc:RegisterEffect(e1) sc:RegisterEffect(e1)
if preatk~=0 and sc:IsAttack(0) then dg:AddCard(sc) end if preatk~=0 and sc:IsAttack(0) then dg:AddCard(sc) end
sc=g:GetNext() sc=g:GetNext()
end end
Duel.SendtoGrave(dg,REASON_RULE) Duel.SendtoGrave(dg,REASON_RULE)
end end
end end
\ No newline at end of file
...@@ -115,7 +115,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -115,7 +115,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,true,POS_FACEUP)
g:GetFirst():CompleteProcedure() g:GetFirst():CompleteProcedure()
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,2)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(81005036,0))
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
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