Commit b285c68a authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

parent 912553d0
No preview for this file type
...@@ -72,7 +72,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.spfilter1(c,e,tp,lv) function cm.spfilter1(c,e,tp,lv)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==lv return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:GetLevel()==6-lv
end end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel()) return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetLevel())
......
...@@ -31,7 +31,7 @@ function cm.initial_effect(c) ...@@ -31,7 +31,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.ffilter(c,fc,sub,mg,sg) function cm.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0xfa4) return c:IsFusionSetCard(0xfa4) and c:IsType(TYPE_MONSTER)
end end
function cm.costfilter(c,tp) function cm.costfilter(c,tp)
return c:IsSetCard(0xfa4) and c:IsPosition(POS_FACEUP) and c:IsReleasable() return c:IsSetCard(0xfa4) and c:IsPosition(POS_FACEUP) and c:IsReleasable()
......
...@@ -27,7 +27,7 @@ function cm.filter0(c,e) ...@@ -27,7 +27,7 @@ function cm.filter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end end
function cm.filter1(c,e) function cm.filter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e) return not c:IsImmuneToEffect(e)
end end
function cm.filter2(c,e,tp,m,f,chkf) function cm.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ 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 if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp)
if true then if true then
mg1:Merge(Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_SZONE,0,nil,e)) mg1:Merge(Duel.GetMatchingGroup(cm.filter0,tp,LOCATION_SZONE,0,nil,e))
end end
......
...@@ -57,7 +57,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,7 +57,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,chk)
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local tt=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,3,3,nil) local tt=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_HAND,0,3,3,nil)
Duel.ConfirmCards(tt,1-tp) Duel.ConfirmCards(1-tp,tt)
end end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp) function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject() local te=e:GetLabelObject()
...@@ -73,7 +73,7 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.actfilter,tp,LOCATION_DECK,0,nil,tp) local g=Duel.GetMatchingGroup(cm.actfilter,tp,LOCATION_DECK,0,nil,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
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()
...@@ -87,11 +87,11 @@ function cm.costfilter2(c) ...@@ -87,11 +87,11 @@ function cm.costfilter2(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost() return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost()
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.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter1,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,cm.costfilter1,tp,LOCATION_GRAVE,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SendtoDeck(g1,nil,2,REASON_COST) Duel.SendtoDeck(g1,nil,2,REASON_COST)
end end
......
...@@ -35,7 +35,7 @@ function cm.initial_effect(c) ...@@ -35,7 +35,7 @@ function cm.initial_effect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCost(cm.spcost) e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
...@@ -53,7 +53,6 @@ function cm.initial_effect(c) ...@@ -53,7 +53,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp) function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=eg:GetFirst() local rc=eg:GetFirst()
return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE) return rc:IsRelateToBattle() and rc:IsStatus(STATUS_OPPO_BATTLE)
and rc:IsFaceup() and rc:IsSetCard(0x5fae) and rc:IsControler(tp) and rc:IsFaceup() and rc:IsSetCard(0x5fae) and rc:IsControler(tp)
...@@ -65,6 +64,7 @@ function cm.spfilter(c,e,tp) ...@@ -65,6 +64,7 @@ function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanRemoveCounter(tp,0x2fb4,1,REASON_COST) end if chk==0 then return c:IsCanRemoveCounter(tp,0x2fb4,1,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,1,REASON_COST) c:RemoveCounter(tp,0x2fb4,1,REASON_COST)
end end
...@@ -82,7 +82,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +82,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c:IsCanRemoveCounter(tp,0x2fb4,7,REASON_COST) end if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x2fb4,7,REASON_COST) end
c:RemoveCounter(tp,0x2fb4,7,REASON_COST) c:RemoveCounter(tp,0x2fb4,7,REASON_COST)
end end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -41,6 +41,27 @@ function cm.initial_effect(c) ...@@ -41,6 +41,27 @@ function cm.initial_effect(c)
e3:SetTarget(cm.destg) e3:SetTarget(cm.destg)
e3:SetOperation(cm.desop) e3:SetOperation(cm.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spson
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EFFECT_SPSUMMON_CONDITION)
e9:SetValue(aux.FALSE)
c:RegisterEffect(e9)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(cm.spcon)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFlagEffect(tp,m+100)>4
end end
function cm.filter(c) function cm.filter(c)
return ( c:IsDefenseBelow(1000) or c:GetDefense()==0 ) return ( c:IsDefenseBelow(1000) or c:GetDefense()==0 )
...@@ -70,6 +91,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,6 +91,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,m+100,0,0,1)
end end
Duel.RaiseEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,nil) Duel.RaiseEvent(c,EVENT_CUSTOM+m,re,r,rp,ep,nil)
end end
...@@ -87,7 +109,7 @@ function cm.rtdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +109,7 @@ function cm.rtdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
...@@ -97,6 +119,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +119,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.RegisterFlagEffect(tp,m+100,0,0,1)
Duel.Damage(1-tp,1500,REASON_EFFECT) Duel.Damage(1-tp,1500,REASON_EFFECT)
end end
end end
......
...@@ -88,7 +88,7 @@ function cm.igop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function cm.igop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsType(TYPE_MONSTER) and tc:Israce(RACE_FAIRY+RACE_SPELLCASTER) and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) then if tc:IsType(TYPE_MONSTER) and tc:IsRace(RACE_FAIRY+RACE_SPELLCASTER) and tc:IsCanBeSpecialSummoned(e,0,tp,true,false) then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
else else
......
...@@ -60,17 +60,17 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,17 +60,17 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
end end
end end
function cm.filter(c) function cm.cfilter(c)
return c:IsFaceup() return c:IsFaceup()
end end
function cm.filter1(c) function cm.filter1(c)
return c:IsRace(RACE_SPELLCASTER+RACE_FAIRY) and c:IsAbleToHand() return c:IsRace(RACE_SPELLCASTER+RACE_FAIRY) and c:IsAbleToHand()
end end
function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,cm.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function cm.posop(e,tp,eg,ep,ev,re,r,rp) function cm.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -79,7 +79,7 @@ function cm.posop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,7 +79,7 @@ function cm.posop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
local atk=g:GetFirst():GetTextAttack() local atk=g:GetFirst():GetTextAttack()
if atk>0 and tc:IsRelateToEffect(e) and Duel.Recover(tp,atk,REASON_EFFECT)>tc:IsAttack() then if atk>0 and tc:IsRelateToEffect(e) and Duel.Recover(tp,atk,REASON_EFFECT)>tc:GetAttack() then
Duel.SendtoGrave(tc,REASON_EFFECT) Duel.SendtoGrave(tc,REASON_EFFECT)
end end
end end
......
...@@ -50,16 +50,16 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,16 +50,16 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
local opt=e:GetLabel() local opt=e:GetLabel()
if (opt==0 and tc:IsRace(RACE_SPELLCASTER)) or (opt==1 and tc:IsRace(RACE_SPELLCASTER)) then if (opt==2 and tc:IsRace(RACE_SPELLCASTER)) or (opt==4 and tc:IsRace(RACE_SPELLCASTER)) then
Duel.SendtoHand(tc,tp,REASON_EFFECT) Duel.SendtoHand(tc,tp,REASON_EFFECT)
if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end if not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
if opt==0 then if opt==2 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsRace(RACE_SPELLCASTER) then Duel.SendtoHand(tc,tp,REASON_EFFECT) end if tc:IsRace(RACE_SPELLCASTER) then Duel.SendtoHand(tc,tp,REASON_EFFECT) end
elseif opt==1 then elseif opt==4 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end
Duel.ConfirmDecktop(tp,1) Duel.ConfirmDecktop(tp,1)
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
...@@ -94,7 +94,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,7 +94,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-5000) e1:SetValue(-5000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
end end
end end
......
...@@ -37,18 +37,23 @@ function cm.initial_effect(c) ...@@ -37,18 +37,23 @@ function cm.initial_effect(c)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.costfilter(c)
return c:IsRace(RACE_FAIRY+RACE_SPELLCASTER) and c:IsAbleToDeckAsCost()
end
function cm.posfilter(c) function cm.posfilter(c)
return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition() return not c:IsPosition(POS_FACEUP_ATTACK) and c:IsCanChangePosition()
end end
function cm.costfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsAbleToDeckAsCost()
end
function cm.costfilter2(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToDeckAsCost()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_GRAVE,0,nil) if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(cm.costfilter2,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return g and g:GetClassCount(Card.GetRace) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=g:SelectWithSumEqual(Card.GetRace,RACE_FAIRY+RACE_SPELLCASTER,2,2) local g2=Duel.SelectMatchingCard(tp,cm.costfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT) g1:Merge(g2)
Duel.SendtoDeck(g1,nil,2,REASON_COST)
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
...@@ -59,7 +64,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +64,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.IsExistingMatchingCard(cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc:IsAttackPos() then if not tc:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
if tc:IsRace(RACE_DRAGON) then if tc:IsRace(RACE_DRAGON) then
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
......
...@@ -75,9 +75,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,9 +75,9 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end if not Duel.IsPlayerCanDiscardDeck(tp,3) then return end
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
if g:FilterCount(cm.spfilter,nil,e,tp)>0 then if g:FilterCount(cm.spfilter,nil,e,tp)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:FilterSelect(cm.spfilter,tp,1,1,nil,e,tp) local tg=g:FilterSelect(tp,cm.spfilter,1,1,nil,e,tp)
g:Sub(tg) g:Sub(tg)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -39,7 +39,7 @@ function cm.initial_effect(c) ...@@ -39,7 +39,7 @@ function cm.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,3)) e2:SetDescription(aux.Stringid(m,3))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.spcon1) e2:SetCondition(cm.spcon1)
...@@ -97,7 +97,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,7 +97,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp) function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsFaceup() return c:IsFaceup() and Duel.GetTurnPlayer()==tp
end end
function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -110,6 +110,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,6 +110,7 @@ function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e)) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
sg:RemoveCard(c)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
srre.codechangeop(e,tp,eg,ep,ev,re,r,rp) srre.codechangeop(e,tp,eg,ep,ev,re,r,rp)
end end
\ No newline at end of file
...@@ -47,7 +47,7 @@ end ...@@ -47,7 +47,7 @@ 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)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)<c:GetFlagEffectLabel(m+100) end if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and c:GetFlagEffect(m)<c:GetFlagEffectLabel(m+100) end
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,1,nil)
...@@ -92,11 +92,11 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,11 +92,11 @@ function cm.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,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tg=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE,0,nil) local tg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,nil)
local ct=tg:GetClassCount(Card.GetRace) local ct=tg:GetClassCount(Card.GetRace)
if ct>0 then if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,1,ct,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,ct,nil)
if #g>0 then if #g>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
......
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