Commit fca01d36 authored by Nemo Ma's avatar Nemo Ma

fix

parent 3cf8b13d
......@@ -47,37 +47,8 @@ function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
--local g1=g:SelectSubGroup(tp,aux.dlvcheck,false,1,1)
local g=Duel.SelectMatchingCard(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.ChangePosition(g1,POS_FACEDOWN_ATTACK)
local tc=g1:GetFirst()
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+RESETS_STANDARD-RESET_TURN_SET)
e1:SetCondition(cm.flipcon)
e1:SetOperation(cm.flipop)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
--e2:SetCondition(cm.rcon)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
Duel.RegisterEffect(e3,tp)
end
function cm.flipcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:IsFacedown() and Duel.GetTurnPlayer()==tc:GetControler() and tc:GetFlagEffect(m)~=0 and Duel.GetFlagEffect(tp,40010160)==0
end
function cm.flipop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.ChangePosition(tc,POS_FACEUP_ATTACK)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelAbove(1)
......@@ -132,7 +103,7 @@ function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if g1:GetCount()>0 then
Duel.SpecialSummon(g1,0,tp,tp,false,false,POS_FACEUP)
end
if (not c:GetOriginalCode(40009487)) and c:GetOverlayGroup():IsExists(cm.grfilter,1,nil) and c:IsRelateToEffect(e) then
if (not c:GetOriginalCode(40009487)) and c:GetOverlayGroup():IsExists(cm.grfilter,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=sg:FilterSelect(tp,cm.toexfilter,1,1,nil,tp):GetFirst()
if sc and Duel.SendtoDeck(sc,nil,0,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsControler(tp) and not c:IsImmuneToEffect(e) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and c:IsCanBeXyzMaterial(sc) and sc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0 then
......
......@@ -16,7 +16,7 @@ function cm.ovfilter(c)
return c:IsCanOverlay() and c:IsFaceup() and cm.ovtfilter(c) and Duel.GetMZoneCount(tp,c,tp) > 0
end
function cm.ovtfilter(c)
return c:CheckSetCard("BlazeMaiden") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS)
return c:CheckSetCard("BlazeTalisman") and c:IsComplexType(TYPE_SPELL+TYPE_CONTINUOUS)
end
function cm.npfilter(c)
return c:IsFaceup() and c:IsOriginalCodeRule(40010232)
......
......@@ -28,7 +28,7 @@ function cm.initial_effect(c)
end
function cm.matfilter1(c)
return c:IsSynchroType(TYPE_TUNER) or (c:IsLevel(3) and c:CheckSetCard("BlazeMaiden"))
return c:IsSynchroType(TYPE_TUNER) or c:CheckSetCard("BlazeMaiden")
end
function cm.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsDiscardable()
......@@ -38,7 +38,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,cm.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function cm.spfilter(c,e,tp)
return ((c:CheckSetCard("Vairina") and c:IsType(TYPE_RITUAL)) or c:IsCode(40009579)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,false)
return ((c:CheckSetCard("Vairina") and c:IsType(TYPE_RITUAL)) or c:IsCode(40009579)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,true,true)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) end
......@@ -51,7 +51,7 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,false,POS_FACEUP)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)
end
tc:CompleteProcedure()
end
......
......@@ -4,7 +4,7 @@ local m , cm = rscf.DefineCard(40009792,"BlazeMaiden")
function cm.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,"BlazeMaiden"),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),true)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(cm.ffilter),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_FIRE),true)
aux.AddContactFusionProcedure(c,Card.IsAbleToGraveAsCost,LOCATION_MZONE,LOCATION_MZONE,Duel.SendtoGrave,REASON_COST)
--to hand
local e1=Effect.CreateEffect(c)
......@@ -27,7 +27,9 @@ function cm.initial_effect(c)
{cm.tffilter,"tf",LOCATION_GRAVE }),cm.tgop)
end
function cm.ffilter(c)
return c:CheckSetCard("BlazeMaiden")
end
function cm.thfilter(c)
return c:CheckSetCard("BlazeTalisman") and c:IsType(TYPE_SPELL) and c:IsAbleToHand()
......
......@@ -5,7 +5,7 @@ cm.named_with_linkjoker=1
cm.named_with_ChaosBreaker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.ChaosBreaker(c)
local m=_G["c"..c:GetCode()]
......@@ -54,7 +54,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.matfilter(c)
return cm.linkjoker(c)
return cm.linkjoker(c) or (Duel.IsPlayerAffectedByEffect(tp,40010218) and cm.Reverse(c))
end
function cm.filter(c)
return c:IsFacedown()
......
......@@ -5,7 +5,7 @@ cm.named_with_linkjoker=1
cm.named_with_Reverse=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......@@ -51,14 +51,14 @@ function cm.matfilter(c)
end
function cm.spfilter(c,e,tp)
return cm.Reverse(c) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
and ((c:IsLocation(LOCATION_HAND) or c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_GRAVE)) and Duel.GetMZoneCount(tp)>0
or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0) and not cm.linkjoker(c)
and not cm.linkjoker(c)
end
function cm.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......@@ -37,8 +37,8 @@ function cm.initial_effect(c)
end
function cm.matfilter(c)
return cm.linkjoker(c)
function cm.matfilter(c,tp)
return cm.linkjoker(c) or (Duel.IsPlayerAffectedByEffect(tp,40010218) and cm.Reverse(c))
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
......@@ -55,7 +55,7 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.cfilter(c,tp)
return c:IsControler(tp) and cm.linkjoker(c) and c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsLinkAbove(3)
return c:IsControler(tp) and (cm.linkjoker(c) or (Duel.IsPlayerAffectedByEffect(tp,40010218) and cm.Reverse(c))) and c:IsType(TYPE_LINK) and c:IsSummonType(SUMMON_TYPE_LINK) and c:IsLinkAbove(3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
......
......@@ -4,9 +4,12 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_Reverse
end
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,cm.matfilter,2)
......@@ -33,7 +36,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.matfilter(c)
return cm.linkjoker(c)
return cm.linkjoker(c) or (Duel.IsPlayerAffectedByEffect(tp,40010218) and cm.Reverse(c))
end
function cm.poscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.initial_effect(c)
--Negate
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.Reverse(c)
local m=_G["c"..c:GetCode()]
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.initial_effect(c)
c:EnableReviveLimit()
......
......@@ -4,7 +4,7 @@ local cm=_G["c"..m]
cm.named_with_linkjoker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.initial_effect(c)
c:EnableReviveLimit()
......
......@@ -5,7 +5,7 @@ cm.named_with_linkjoker=1
cm.named_with_BLASTER=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.initial_effect(c)
c:EnableReviveLimit()
......
This diff is collapsed.
......@@ -5,7 +5,7 @@ cm.named_with_linkjoker=1
cm.named_with_ChaosBreaker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.initial_effect(c)
--special summon
......
......@@ -5,7 +5,7 @@ cm.named_with_linkjoker=1
cm.named_with_ChaosBreaker=1
function cm.linkjoker(c)
local m=_G["c"..c:GetCode()]
return m and m.named_with_linkjoker
return m and (m.named_with_linkjoker or (Duel.IsPlayerAffectedByEffect(c:GetControler(),40010218) and m.named_with_Reverse and c:IsLocation(LOCATION_MZONE+LOCATION_HAND)))
end
function cm.ChaosBreaker(c)
local m=_G["c"..c:GetCode()]
......
......@@ -215,7 +215,7 @@ function cm.solving(e,tp,eg,ep,ev,re,r,rp)
local le={tc:IsHasEffect(EFFECT_IMMUNE_EFFECT)}
for _,v in pairs(le) do
local val=v:GetValue()
if not val or val(v,re) then
if not val or val(v,re,ev) then
tc:RegisterFlagEffect(m+50,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
break
end
......
......@@ -50,6 +50,7 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,g1)
g1:Merge(g2)
Duel.HintSelection(g1)
Duel.Destroy(g1,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:GetAttack()<2000 or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
......@@ -61,7 +62,4 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-2000)
c:RegisterEffect(e1)
if not c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
Duel.Destroy(g1,REASON_EFFECT)
end
end
\ No newline at end of file
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment