Commit ef6eb476 authored by TanakaKotoha's avatar TanakaKotoha

homo

parent 1aa74192
...@@ -52,7 +52,7 @@ function cm.initial_effect(c) ...@@ -52,7 +52,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function cm.econ(e,tp) function cm.econ(e,tp)
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,e:GetHandler(),12031000) return Duel.IsExistingMatchingCard(Card.IsCode,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler(),12031000)
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
...@@ -86,4 +86,4 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,4 +86,4 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
if bc:IsRelateToBattle() then if bc:IsRelateToBattle() then
Duel.SendtoGrave(bc,REASON_RULE+REASON_EFFECT) Duel.SendtoGrave(bc,REASON_RULE+REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -44,7 +44,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
local te=tc:GetActivateEffect() local te=tc:GetActivateEffect()
te:UseCountLimit(tp,1,true) te:UseCountLimit(tp,1,true)
local tep=tc:GetControler() local tep=tc:GetControler()
......
...@@ -9,7 +9,7 @@ function cm.initial_effect(c) ...@@ -9,7 +9,7 @@ function cm.initial_effect(c)
--tohand --tohand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1)) e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_TOHAND) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
......
...@@ -120,7 +120,7 @@ end ...@@ -120,7 +120,7 @@ end
function cm.actop(e,tp,eg,ep,ev,re,r,rp) function cm.actop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE,0,nil,TYPE_MONSTER) local g=Duel.GetMatchingGroup(Card.IsType,1-tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
if g:GetCount()<4 then if g:GetCount()<5 then
Duel.SendtoGrave(g,REASON_RULE) Duel.SendtoGrave(g,REASON_RULE)
elseif g:GetCount()>4 then elseif g:GetCount()>4 then
local tc=g:RandomSelect(tp,4) local tc=g:RandomSelect(tp,4)
......
...@@ -75,23 +75,24 @@ function c33400426.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -75,23 +75,24 @@ function c33400426.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.IsExistingMatchingCard(c33400426.cccfilter2,tp,LOCATION_MZONE,0,1,nil))) Duel.IsExistingMatchingCard(c33400426.cccfilter2,tp,LOCATION_MZONE,0,1,nil)))
then then
e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
end end
end end
function c33400426.thfilter2(c,code) function c33400426.thfilter2(c,code)
return c:IsSetCard(0x9343) and not c:IsCode(code) and c:IsAbleToHand() return c:IsSetCard(0x9343) and not c:IsCode(code) and c:IsAbleToHand()
end end
function c33400426.thop(e,tp,eg,ep,ev,re,r,rp) function c33400426.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and Duel.IsExistingTarget(c33400426.thfilter2,tp,LOCATION_DECK,0,1,nil,tc:GetCode())then if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) and Duel.IsExistingMatchingCard(c33400426.thfilter2,tp,LOCATION_DECK,0,1,nil,tc:GetCode())then
if Duel.SelectYesNo(tp,aux.Stringid(33400426,0)) then if Duel.SelectYesNo(tp,aux.Stringid(33400426,0)) then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.SelectMatchingCard(tp,c33400426.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()) local g=Duel.SelectMatchingCard(tp,c33400426.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
end end
local c=e:GetHandler()
--inactivatable --inactivatable
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
......
...@@ -34,6 +34,7 @@ function c33400436.initial_effect(c) ...@@ -34,6 +34,7 @@ function c33400436.initial_effect(c)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,33400436) e3:SetCountLimit(1,33400436)
e3:SetCondition(c33400436.condition) e3:SetCondition(c33400436.condition)
e3:SetCost(c33400436.atkcost)
e3:SetTarget(c33400436.destg) e3:SetTarget(c33400436.destg)
e3:SetOperation(c33400436.operation3) e3:SetOperation(c33400436.operation3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -35,23 +35,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,23 +35,27 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function cm.spfilter(c,e,tp) function cm.tgfilter(c,e,tp)
return c:IsAbleToGrave() and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end
function cm.spfilter(c,e,tp,tc)
return c:IsCode(81011005) return c:IsCode(81011005)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,tc,c)>0
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.filter,nil,tp) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):Filter(cm.filter,nil,tp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local tg=g:Filter(Card.IsRelateToEffect,nil,re) local tg=g:Filter(Card.IsRelateToEffect,nil,re)
local sg=Duel.GetMatchingGroup(cm.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) if tg:IsExists(cm.tgfilter,1,nil,e,tp) and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
if tg:GetCount()>0 and sg:GetCount()>0 and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=tg:Select(tp,1,1,nil):GetFirst() local tc=tg:FilterSelect(tp,cm.tgfilter,1,1,nil,e,tp):GetFirst()
if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end if Duel.SendtoGrave(tc,REASON_EFFECT)==0 or not tc:IsLocation(LOCATION_GRAVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=sg:Select(tp,1,1,nil):GetFirst() local sc=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil):GetFirst()
if Duel.SpecialSummonStep(sc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then sc:SetMaterial(nil)
if Duel.SpecialSummonStep(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) then
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_INDESTRUCTABLE_BATTLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
......
...@@ -327,6 +327,7 @@ ...@@ -327,6 +327,7 @@
!setname 0x97f5 公主形态 !setname 0x97f5 公主形态
!setname 0x7f6 苍空 !setname 0x7f6 苍空
!setname 0x17f6 PB !setname 0x17f6 PB
!setname 0xf7f6 PBFA
!setname 0x7f7 断绝之妖精 !setname 0x7f7 断绝之妖精
!setname 0x7f8 敢达 !setname 0x7f8 敢达
!counter 0x7f3 调停指示物 !counter 0x7f3 调停指示物
......
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