Commit 23262dba authored by CubeRuler's avatar CubeRuler

fix

parent d2d09510
Pipeline #19903 passed with stages
in 25 minutes and 57 seconds
......@@ -31,7 +31,7 @@ function c19500007.filter(c,e,tp)
and Duel.IsExistingMatchingCard(c19500007.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode())
end
function c19500007.spfilter(c,e,tp,code)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3990) and c:IsRace(RACE_MACHINE) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c19500007.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c19500007.filter(chkc,e,tp) end
......
......@@ -43,7 +43,7 @@ function c19500014.spfilter(c,e,tp)
end
function c19500014.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c19500014.desfilter,tp,LOCATION_MZONE,0,1,1,nil)
local sg=Duel.GetMatchingGroup(c19500014.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if #g>0 and Duel.Destroy(g,REASON_EFFECT)~=0 and #sg>0 then
Duel.BreakEffect()
......
......@@ -60,7 +60,8 @@ function c19500025.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(16037007,1))
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,LOCATION_ONFIELD)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local des=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local des=Duel.SelectMatchingCard(tp,c19500025.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
--local des=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if des:GetCount()>0 then
Duel.HintSelection(des)
Duel.Destroy(des,REASON_EFFECT)
......
......@@ -64,7 +64,7 @@ function c19500180.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c19500180.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and Duel.IsExistingTarget(c19500180.spfilter,tp,LOCATION_REMOVED,0,1,c,e,tp) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -10,6 +10,16 @@ function c19500220.initial_effect(c)
e1:SetTarget(c19500220.target)
e1:SetOperation(c19500220.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(1110)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c19500220.thtg)
e2:SetOperation(c19500220.thop)
c:RegisterEffect(e2)
end
function c19500220.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc~=e:GetHandler() end
......@@ -38,4 +48,20 @@ function c19500220.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c19500220.thfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3990) and c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c19500220.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c19500220.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19500220.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c19500220.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c19500220.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -4,6 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,30610000)
c:EnableCounterPermit(0x1)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -92,6 +99,9 @@ function cm.initial_effect(c)
e9:SetValue(1)
c:RegisterEffect(e9)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.efilter(e,te)
return te:GetHandler():GetSummonLocation()==LOCATION_EXTRA and te:GetOwner()~=e:GetOwner() and te:IsActiveType(TYPE_MONSTER)
end
......
......@@ -4,6 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,30610005)
c:EnableCounterPermit(0x1)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -86,6 +93,9 @@ function cm.initial_effect(c)
e16:SetOperation(cm.op0)
c:RegisterEffect(e16)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
......
......@@ -6,6 +6,13 @@ function cm.initial_effect(c)
c:EnableCounterPermit(0x1)
c:EnableCounterPermit(0xc12)
c:SetCounterLimit(0xc12,12)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -91,6 +98,9 @@ function cm.initial_effect(c)
e16:SetOperation(cm.op0)
c:RegisterEffect(e16)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
......
......@@ -4,6 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,30610025)
c:EnableCounterPermit(0x1)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -75,6 +82,9 @@ function cm.initial_effect(c)
e4:SetValue(cm.efilter)
c:RegisterEffect(e4)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
......
......@@ -4,6 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,30610030)
c:EnableCounterPermit(0x1)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -91,6 +98,9 @@ function cm.initial_effect(c)
e13:SetOperation(cm.rcop)
c:RegisterEffect(e13)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
......
......@@ -4,6 +4,13 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
c:SetUniqueOnField(1,0,30610035)
c:EnableCounterPermit(0x1)
--splimit
local e100=Effect.CreateEffect(c)
e100:SetType(EFFECT_TYPE_SINGLE)
e100:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e100:SetCode(EFFECT_SPSUMMON_CONDITION)
e100:SetValue(cm.splimit)
c:RegisterEffect(e100)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -95,6 +102,9 @@ function cm.initial_effect(c)
e16:SetOperation(cm.op0)
c:RegisterEffect(e16)
end
function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.counterfilter(c)
return not c:IsSummonLocation(LOCATION_EXTRA)
end
......
......@@ -8,14 +8,14 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atklimit
--cannot be battle target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(aux.TargetBoolFunction(Card.IsDefensePos))
c:RegisterEffect(e2)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e2:SetValue(cm.atlimit)
c:RegisterEffect(e2)
--remove counter
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
......@@ -34,6 +34,9 @@ function cm.initial_effect(c)
e6:SetOperation(cm.op)
c:RegisterEffect(e6)
end
function cm.atlimit(e,c)
return c:IsFaceup and c:IsDefensePos()
end
function cm.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
......
......@@ -52,7 +52,7 @@ function c33200952.refilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c33200952.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200952.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
......
......@@ -52,7 +52,7 @@ function c33200953.refilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c33200953.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200953.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
......
......@@ -52,7 +52,7 @@ function c33200954.refilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c33200954.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200954.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
......
......@@ -52,10 +52,10 @@ function c33200955.refilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c33200955.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200955.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33200955.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,7 +51,7 @@ function c33200956.refilter(c)
return not c:IsLocation(LOCATION_HAND)
end
function c33200956.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200951.refilter,nil)
local mg=Duel.GetRitualMaterial(tp):Filter(c33200956.refilter,nil)
local mg2=Duel.GetMatchingGroup(Card.IsReleasable,tp,LOCATION_PZONE,0,e:GetHandler())
mg:Merge(mg2)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>4 and mg:GetCount()>0 end
......
......@@ -35,7 +35,7 @@ function c33331811.accost1(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(x)
end
function c33331811.rlfil2(c)
return c:IsFaceup() and c:IsRace(RACE_WYRM) and c:IsReleasable()
return c:IsRace(RACE_WYRM) and c:IsReleasable() --and c:IsFaceup()
end
function c33331811.accost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33331811.rlfil2,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
......
......@@ -64,7 +64,7 @@ function cm.setcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter2,1,nil,tp)
end
function cm.setfilter(c)
return cm.BlueDeathster(c) and c:GetType()==0x20002 and c:IsSSetable()
return cm.BlueDeathster(c) and c:GetType()==0x20002 and c:IsSSetable() and not c:IsCode(m)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -47,7 +47,7 @@ local e2=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,66660007)
e5:SetCondition(c66660005.drcon)
e5:SetCost(c66660005.drcost)
e5:SetTarget(c66660005.drtg)
e5:SetOperation(c66660005.drop)
c:RegisterEffect(e5)
......@@ -115,9 +115,12 @@ end
function c66660005.drfilter(c,e,tp)
return c:IsSetCard(0x666) and c:IsAbleToRemoveAsCost() and not c:IsCode(66660005)
end
function c66660005.drcon(e,c)
if tc1==nil then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(c66660005.drfilter,tp,LOCATION_GRAVE,0,1,1,nil) end
local tp=tc1:GetControler()
function c66660005.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) and Duel.IsExistingMatchingCard(c66660005.drfilter,tp,LOCATION_GRAVE,0,1,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c66660005.drfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c66660005.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
......@@ -126,10 +129,6 @@ function c66660005.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c66660005.drop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c66660005.drfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
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