Commit 48518616 authored by Huangnan's avatar Huangnan

fix

parent cbff0c77
Pipeline #34947 passed with stages
in 70 minutes and 59 seconds
No preview for this file type
--画地为牢
--21.06.25
local m=11451584
local cm=_G["c"..m]
local cm,m=GetID()
function cm.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
......@@ -29,5 +28,5 @@ function cm.getzone(c,tp)
end
function cm.disval(e)
local g=Duel.GetFieldGroup(0,LOCATION_ONFIELD,LOCATION_ONFIELD)
return g:GetSum(cm.getzone,e:GetHandlerPlayer())
return g:GetSum(cm.getzone,0)
end
\ No newline at end of file
......@@ -27,26 +27,26 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SPSUMMON_SUCCESS)
e0:SetLabel(ct)
e0:SetCondition(s.con1)
e0:SetOperation(s.op1)
e0:SetCondition(s.regcon)
e0:SetOperation(s.regop)
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PREDRAW)
e1:SetCountLimit(1)
e1:SetCondition(s.con2)
e1:SetOperation(s.op2)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
function s.filter(c,sp,tpe)
return c:IsSummonPlayer(sp) and c:IsType(tpe)
end
function s.con1(e,tp,eg,ep,ev,re,r,rp)
function s.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.filter,1,nil,1-tp,e:GetLabel())
end
function s.op1(e,tp,eg,ep,ev,re,r,rp)
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_EXTRA,nil,e:GetLabel())
if g1:GetCount()>0 then
local g2=g1:RandomSelect(1-tp,2)
......@@ -71,11 +71,11 @@ end
function s.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:GetFlagEffect(id)>0
end
function s.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter1,tp,0,LOCATION_EXTRA,1,nil,e,tp)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCountFromEx(tp,tp,nil)>0
and Duel.IsExistingMatchingCard(s.spfilter1,tp,0,LOCATION_EXTRA,1,nil)
end
function s.op2(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.Hint(HINT_CARD,0,id)
local g1=Duel.GetMatchingGroup(s.spfilter1,tp,0,LOCATION_EXTRA,nil)
......
......@@ -118,7 +118,7 @@ function c16349300.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c16349300.matfilter(c)
return c:IsLinkRace(RACE_WARRIOR) or c:IsSetCard(0x3dc2) and c:IsType(TYPE_CONTINUOUS)
return c:IsLinkRace(RACE_WARRIOR) or (c:IsSetCard(0x3dc2) and c:IsType(TYPE_CONTINUOUS))
end
function c16349300.LConditionFilter(c,f,lc)
return (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and (c:IsCanBeLinkMaterial(lc) or c:IsSetCard(0x3dc2) and c:IsType(TYPE_CONTINUOUS)) and (not f or f(c))
......
......@@ -22,18 +22,25 @@ function cm.initial_effect(c)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.atkcon2)
e3:SetTarget(cm.eqtg2)
e3:SetOperation(cm.eqop2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(18700927,4))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCondition(cm.atkcon3)
c:RegisterEffect(e3)
end
function cm.obcon(e,tp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.atkcon2)
e4:SetTarget(cm.eqtg2)
e4:SetOperation(cm.eqop2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(18700927,5))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCondition(cm.atkcon4)
c:RegisterEffect(e5)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(18700781)
......@@ -44,9 +51,12 @@ function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......@@ -66,6 +76,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:SetEntityCode(m+2)
tc:ReplaceEffect(m+2,0,0)
Duel.Hint(10,1,m+2)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+18700924,nil,0,e:GetHandlerPlayer(),e:GetHandlerPlayer(),0)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
......@@ -83,9 +94,12 @@ function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,18700821) and Duel.CheckLPCost(tp,200) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.PayLPCost(tp,200)
......@@ -95,9 +109,17 @@ function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.obcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable()
......
......@@ -18,15 +18,25 @@ function cm.initial_effect(c)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.atkcon2)
e3:SetTarget(cm.eqtg2)
e3:SetOperation(cm.eqop2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(18700927,4))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCondition(cm.atkcon3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.atkcon2)
e4:SetTarget(cm.eqtg2)
e4:SetOperation(cm.eqop2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(18700927,5))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCondition(cm.atkcon4)
c:RegisterEffect(e5)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(18700781)
......@@ -37,9 +47,12 @@ function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......@@ -59,6 +72,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:SetEntityCode(m+2)
tc:ReplaceEffect(m+2,0,0)
Duel.Hint(10,1,m+2)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+18700924,nil,0,e:GetHandlerPlayer(),e:GetHandlerPlayer(),0)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
......@@ -76,9 +90,12 @@ function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,18700821) and Duel.CheckLPCost(tp,200) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.PayLPCost(tp,200)
......@@ -88,6 +105,12 @@ function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.repfilter(c,tp)
......
......@@ -20,15 +20,25 @@ function cm.initial_effect(c)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.atkcon2)
e3:SetTarget(cm.eqtg2)
e3:SetOperation(cm.eqop2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(18700927,4))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCondition(cm.atkcon3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(cm.atkcon2)
e4:SetTarget(cm.eqtg2)
e4:SetOperation(cm.eqop2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(18700927,5))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCondition(cm.atkcon4)
c:RegisterEffect(e5)
end
function cm.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsCode(18700781)
......@@ -39,9 +49,12 @@ function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......@@ -61,6 +74,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:SetEntityCode(m+2)
tc:ReplaceEffect(m+2,0,0)
Duel.Hint(10,1,m+2)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+18700924,nil,0,e:GetHandlerPlayer(),e:GetHandlerPlayer(),0)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
......@@ -78,9 +92,12 @@ function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,18700821) and Duel.CheckLPCost(tp,200) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
Duel.PayLPCost(tp,200)
......@@ -90,6 +107,12 @@ function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -22,25 +22,35 @@ function cm.initial_effect(c)
e2:SetTarget(cm.eqtg)
e2:SetOperation(cm.eqop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cm.atkcon2)
e3:SetTarget(cm.eqtg2)
e3:SetOperation(cm.eqop2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(18700927,4))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCondition(cm.atkcon3)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,4))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetDescription(aux.Stringid(m,3))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,m+1)
e4:SetCondition(cm.atkcon3)
e4:SetTarget(cm.sptg2)
e4:SetOperation(cm.spop2)
e4:SetCondition(cm.atkcon2)
e4:SetTarget(cm.eqtg2)
e4:SetOperation(cm.eqop2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(18700927,5))
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCondition(cm.atkcon4)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,4))
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_CHAINING)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(1,m+1)
e6:SetCondition(cm.atkcon5)
e6:SetTarget(cm.sptg2)
e6:SetOperation(cm.spop2)
c:RegisterEffect(e6)
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
......@@ -63,9 +73,12 @@ function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
......@@ -79,12 +92,16 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,18700780,0,0,1)
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if c:IsLocation(LOCATION_SZONE) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.Hint(24,0,aux.Stringid(m,7))
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Hint(24,0,aux.Stringid(m,8))
tc:SetEntityCode(m+2)
tc:ReplaceEffect(m+2,0,0)
Duel.Hint(24,0,aux.Stringid(m,9))
Duel.Hint(10,1,m+2)
Duel.Hint(24,0,aux.Stringid(m,10))
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_SETCODE)
......@@ -102,13 +119,23 @@ function cm.atkcon2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGrave() end
if e:IsHasType(EFFECT_TYPE_IGNITION) then
e:SetLabel(1)
end
end
function cm.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
if e:GetLabel()==1 or Duel.SelectYesNo(tp,aux.Stringid(m,3)) then
local c=e:GetHandler()
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)<1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsPlayerAffectedByEffect(tp,18700924)
and (Duel.GetFlagEffect(tp,18700781)>=5 or Duel.GetFlagEffect(tp,18700780)>=3)
end
function cm.atkcon4(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,18700924)
end
function cm.rmfilter(c)
......@@ -146,9 +173,8 @@ end
function cm.val2_1(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end
function cm.atkcon3(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return Duel.GetFlagEffect(tp,18700806)>=1 or (rc:IsCode(m+2) and re:GetActivateLocation()==LOCATION_MZONE)
function cm.atkcon5(e,tp,eg,ep,ev,re,r,rp)
return (re:GetHandler():GetOriginalCode()==m+2 or re:GetHandler():IsCode(m+2)) and re:GetHandler():IsControler(tp)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,18700807,0,TYPES_TOKEN_MONSTER,2800,2800,8,RACE_WARRIOR,ATTRIBUTE_LIGHT) end
......
......@@ -17,7 +17,6 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--Immune
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
......@@ -56,11 +55,12 @@ function s.immop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
rc:RegisterEffect(e1)
end
function s.efilter(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:GetOwner()~=e:GetOwner()
function s.efilter(e,re)
return e:GetHandler()~=re:GetOwner() and re:IsActiveType(TYPE_MONSTER)
end
\ No newline at end of file
......@@ -68,7 +68,7 @@ function s.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(p,d,REASON_EFFECT)
end
function s.tdfilter(c)
return (c:IsFaceup()or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeckAsCost() and c.MoJin
return (c:IsFaceup()or c:IsLocation(LOCATION_HAND)) and c:IsAbleToDeckAsCost() --and c.MoJin
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -16,7 +16,7 @@ function s.initial_effect(c)
end
function s.tgfilter(c)
local b1=c:IsLocation(LOCATION_REMOVED)
local b2=c.MoJin==true and c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER)
local b2=c.MoJin==true and c:IsLocation(LOCATION_DECK) and c:IsType(TYPE_MONSTER)
local b3=c:IsFaceupEx() and c:IsCode(5012625) and c:IsLocation(LOCATION_MZONE)
return (b1 or b2 or b3) and c:IsAbleToGrave()
end
......@@ -32,7 +32,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_MZONE,0,1,nil)
local b4=rg1:CheckSubGroup(s.fselect,11,11,tp)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp)
if chk==0 then return b1 or b2 or b3 or b4 end
local off=1
local ops={}
......@@ -97,7 +97,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_RETURN)
end
elseif sel==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_DECK)
if #sg>0 then
Duel.SendtoGrave(sg,REASON_EFFECT)
......@@ -122,7 +122,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local rs=rg1:SelectSubGroup(tp,s.fselect,false,11,11,tp)
if Duel.Release(rs,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
local rg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter),tp,LOCATION_GRAVE+LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=rg:GetFirst()
if tc then
tc:SetMaterial(rs)
......
......@@ -144,7 +144,8 @@ function s.chk(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.mfilter1(c,e,tp)
return c:IsLevel(10) and c:IsType(TYPE_SYNCHRO) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
--return c:IsLevel(10) and c:IsType(TYPE_SYNCHRO) and e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
return c:IsType(TYPE_SYNCHRO)
end
function s.mfilter2(c)
return not c:IsForbidden() and c:IsCode(5012730) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
......
......@@ -12,14 +12,14 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(cm.target2)
e2:SetOperation(cm.activate2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetDescription(aux.Stringid(m,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetTarget(cm.target3)
e3:SetOperation(cm.activate3)
c:RegisterEffect(e3)
......
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