Commit e771cceb authored by mercury233's avatar mercury233 Committed by GitHub

minor formats (#2946)

parent 75c20320
...@@ -80,7 +80,7 @@ function c10852583.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,7 @@ function c10852583.mvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=eg:GetFirst() local tc=eg:GetFirst()
if not c:IsRelateToEffect(e) or c:IsControler(1-tp) if not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or not tc:IsRelateToEffect(e) or tc:IsControler(tp) then return end or not tc:IsRelateToEffect(e) or tc:IsControler(tp) then return end
local seq1=c:GetSequence() local seq1=c:GetSequence()
local seq2=tc:GetSequence() local seq2=tc:GetSequence()
if seq1>4 then return end if seq1>4 then return end
......
...@@ -22,7 +22,7 @@ function c11074235.cfilter(c,tp) ...@@ -22,7 +22,7 @@ function c11074235.cfilter(c,tp)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end end
function c11074235.spcon(e,tp,eg,ep,ev,re,r,rp) function c11074235.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11074235.cfilter,1,nil,tp) return eg:IsExists(c11074235.cfilter,1,nil,tp)
end end
function c11074235.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c11074235.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -28,7 +28,7 @@ function c17264592.initial_effect(c) ...@@ -28,7 +28,7 @@ function c17264592.initial_effect(c)
end end
function c17264592.thfilter(c,tp) function c17264592.thfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost()
and Duel.GetMZoneCount(tp,c)>0 and Duel.GetMZoneCount(tp,c)>0
end end
function c17264592.sprcon(e,c) function c17264592.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--get --get
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_RELEASE|CATEGORY_CONTROL) e1:SetCategory(CATEGORY_RELEASE|CATEGORY_CONTROL)
......
...@@ -45,7 +45,7 @@ end ...@@ -45,7 +45,7 @@ end
function c24382602.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c24382602.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24382602.tgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c24382602.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c24382602.tgfilter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c24382602.tgfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c24382602.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end and Duel.IsExistingMatchingCard(c24382602.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c24382602.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c24382602.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
......
...@@ -30,7 +30,7 @@ function c27346636.splimit(e,se,sp,st) ...@@ -30,7 +30,7 @@ function c27346636.splimit(e,se,sp,st)
end end
function c27346636.cfilter(c) function c27346636.cfilter(c)
return (c:IsFusionCode(78868776) or c:IsFusionSetCard(0x1019) and c:IsType(TYPE_MONSTER)) return (c:IsFusionCode(78868776) or c:IsFusionSetCard(0x1019) and c:IsType(TYPE_MONSTER))
and c:IsAbleToDeckOrExtraAsCost() and c:IsAbleToDeckOrExtraAsCost()
end end
function c27346636.discon(e,tp,eg,ep,ev,re,r,rp) function c27346636.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED)
......
...@@ -33,7 +33,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanRemove(tp) end if chk==0 then return Duel.IsPlayerCanRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0)
end end
......
--ARG☆S-GiantKilling --ARG☆S-GiantKilling
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH|CATEGORY_TOHAND|CATEGORY_SUMMON) e1:SetCategory(CATEGORY_SEARCH|CATEGORY_TOHAND|CATEGORY_SUMMON)
......
...@@ -30,7 +30,7 @@ function s.initial_effect(c) ...@@ -30,7 +30,7 @@ function s.initial_effect(c)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id) e2:SetCountLimit(1,id)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(TIMING_END_PHASE) e2:SetHintTiming(TIMING_END_PHASE)
e2:SetCondition(s.condition) e2:SetCondition(s.condition)
e2:SetTarget(s.target) e2:SetTarget(s.target)
e2:SetOperation(s.operation) e2:SetOperation(s.operation)
......
...@@ -159,7 +159,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -159,7 +159,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end and Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,ct,nil) local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function s.thopfilter(c,e) function s.thopfilter(c,e)
return c:IsRelateToEffect(e) and c:IsType(TYPE_MONSTER) return c:IsRelateToEffect(e) and c:IsType(TYPE_MONSTER)
......
...@@ -68,15 +68,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,15 +68,15 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end end
end end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.splimit(e,c,sump,sumtype,sumpos,targetp,se) function s.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsRace(RACE_DINOSAUR) return not c:IsRace(RACE_DINOSAUR)
end end
--方界縁起 --方界縁起
function c38606913.initial_effect(c) function c38606913.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(38606913,0)) e1:SetDescription(aux.Stringid(38606913,0))
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
......
...@@ -43,7 +43,7 @@ end ...@@ -43,7 +43,7 @@ end
function c4055337.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c4055337.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4055337.tgfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c4055337.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4055337.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) if chk==0 then return Duel.IsExistingTarget(c4055337.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c4055337.filter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(c4055337.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c4055337.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c4055337.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
......
...@@ -39,7 +39,7 @@ function c4064925.initial_effect(c) ...@@ -39,7 +39,7 @@ function c4064925.initial_effect(c)
local ge4=ge1:Clone() local ge4=ge1:Clone()
ge4:SetCode(EVENT_CHANGE_POS) ge4:SetCode(EVENT_CHANGE_POS)
ge4:SetCondition(c4064925.cpcon) ge4:SetCondition(c4064925.cpcon)
Duel.RegisterEffect(ge4,0) Duel.RegisterEffect(ge4,0)
end end
end end
function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp) function c4064925.checkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -116,7 +116,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +116,7 @@ function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup()
end end
function s.thfilter(c) function s.thfilter(c)
return c:IsAbleToHand() and c:IsFaceup() and c:IsSetCard(0xaf) return c:IsAbleToHand() and c:IsFaceup() and c:IsSetCard(0xaf)
and c:GetOriginalType()&TYPE_PENDULUM~=0 and c:GetOriginalType()&TYPE_PENDULUM~=0
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -81,4 +81,3 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,4 +81,3 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tg=g:Filter(s.desfilter,nil,e:GetLabel()) local tg=g:Filter(s.desfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
function c45651298.spcon(e,c) function c45651298.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45651298.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c45651298.filter,tp,LOCATION_MZONE,0,1,nil)
end end
...@@ -7,7 +7,7 @@ function c45877457.initial_effect(c) ...@@ -7,7 +7,7 @@ function c45877457.initial_effect(c)
e0:SetCode(EFFECT_MATERIAL_CHECK) e0:SetCode(EFFECT_MATERIAL_CHECK)
e0:SetValue(c45877457.valcheck) e0:SetValue(c45877457.valcheck)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -47,7 +47,7 @@ function s.actarget(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -47,7 +47,7 @@ function s.actarget(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b2=c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0 local b2=c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp, local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)}, {b1,aux.Stringid(id,2)},
......
...@@ -93,7 +93,7 @@ function c47710198.remop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,7 +93,7 @@ function c47710198.remop2(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() local tc=re:GetHandler()
if tc:IsRelateToEffect(re) then if tc:IsRelateToEffect(re) then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_REMOVED) then
Duel.Damage(1-tp,1200,REASON_EFFECT) Duel.Damage(1-tp,1200,REASON_EFFECT)
end end
end end
end end
...@@ -20,7 +20,7 @@ function s.initial_effect(c) ...@@ -20,7 +20,7 @@ function s.initial_effect(c)
e2:SetOperation(s.acop) e2:SetOperation(s.acop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local g=Group.CreateGroup() local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE,g) aux.RegisterMergedDelayedEvent(c,id,EVENT_REMOVE,g)
--tohand --tohand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND) e3:SetCategory(CATEGORY_TOHAND)
......
...@@ -7,7 +7,7 @@ function c58054262.initial_effect(c) ...@@ -7,7 +7,7 @@ function c58054262.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c58054262.splimit) e1:SetValue(c58054262.splimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--attack cost --attack cost
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -64,7 +64,7 @@ function s.cfilter(c,tp) ...@@ -64,7 +64,7 @@ function s.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_BATTLE) and c:IsControler(tp) return c:IsType(TYPE_MONSTER) and not c:IsReason(REASON_BATTLE) and c:IsControler(tp)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler()) return eg:IsExists(s.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsDiscardable,Card.IsAbleToGraveAsCost),tp,LOCATION_HAND,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(aux.AND(Card.IsDiscardable,Card.IsAbleToGraveAsCost),tp,LOCATION_HAND,0,1,nil)
......
...@@ -19,7 +19,6 @@ function s.fcheck1(ct) ...@@ -19,7 +19,6 @@ function s.fcheck1(ct)
end end
return true return true
end end
end end
function s.fcheck2(tp,sg,fc) function s.fcheck2(tp,sg,fc)
return sg:GetCount()>=3 return sg:GetCount()>=3
......
...@@ -92,7 +92,7 @@ function s.sxyzfilter(e,c) ...@@ -92,7 +92,7 @@ function s.sxyzfilter(e,c)
end end
function s.Drake_shark_f(function_f,int_lv,card_c) function s.Drake_shark_f(function_f,int_lv,card_c)
return function (c) return function (c)
return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c)) return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c))
end end
end end
function s.sxfilter(c,tp,xc) function s.sxfilter(c,tp,xc)
...@@ -114,27 +114,27 @@ function s.sxvalue(c,tp,xc) ...@@ -114,27 +114,27 @@ function s.sxvalue(c,tp,xc)
end end
function s.Drake_shark_gf(int_ct,int_tp,xc) function s.Drake_shark_gf(int_ct,int_tp,xc)
return function (g) return function (g)
local ct=g:GetCount() local ct=g:GetCount()
local eg=g:Filter(s.sxfilter,nil,int_tp,xc) local eg=g:Filter(s.sxfilter,nil,int_tp,xc)
if #eg>0 then if #eg>0 then
ct=ct+eg:GetClassCount(s.sxvalue,int_tp,xc) ct=ct+eg:GetClassCount(s.sxvalue,int_tp,xc)
end end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local te=tc:IsHasEffect(EFFECT_XYZ_LEVEL,int_tp) local te=tc:IsHasEffect(EFFECT_XYZ_LEVEL,int_tp)
if te then if te then
local evf=te:GetValue() local evf=te:GetValue()
if evf then if evf then
local ev=evf(te,tc,xc) local ev=evf(te,tc,xc)
local lmct=(ev>>12)&0xf local lmct=(ev>>12)&0xf
if lmct>0 and lmct>g:GetCount() then if lmct>0 and lmct>g:GetCount() then
return false return false
end end
end end
end end
tc=g:GetNext() tc=g:GetNext()
end end
return ct>=int_ct return ct>=int_ct
end end
end end
function s.xfilter(c,tp) function s.xfilter(c,tp)
......
...@@ -60,7 +60,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.tdcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsCanTurnSet() end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil) local g=Duel.SelectTarget(tp,Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,#g,0,0)
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function c68957925.target(e,tp,eg,ep,ev,re,r,rp,chk) function c68957925.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroup(c68957925.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute) local ct=Duel.GetMatchingGroup(c68957925.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute)
if chk==0 then return (ct==1 and Duel.IsExistingMatchingCard(c68957925.filter,tp,LOCATION_MZONE,0,1,nil)) if chk==0 then return (ct==1 and Duel.IsExistingMatchingCard(c68957925.filter,tp,LOCATION_MZONE,0,1,nil))
or (ct==2 and Duel.IsExistingMatchingCard(c68957925.filter,tp,0,LOCATION_MZONE,1,nil)) or (ct==2 and Duel.IsExistingMatchingCard(c68957925.filter,tp,0,LOCATION_MZONE,1,nil))
or ct==3 or ct==4 or ct==3 or ct==4
or (ct==5 and Duel.IsExistingMatchingCard(c68957925.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)) or (ct==5 and Duel.IsExistingMatchingCard(c68957925.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp))
or (ct==6 and Duel.IsExistingMatchingCard(c68957925.desfilter,tp,0,LOCATION_MZONE,1,nil)) end or (ct==6 and Duel.IsExistingMatchingCard(c68957925.desfilter,tp,0,LOCATION_MZONE,1,nil)) end
......
...@@ -112,4 +112,3 @@ end ...@@ -112,4 +112,3 @@ end
function c71143015.cfilter(c) function c71143015.cfilter(c)
return c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) return c:IsLocation(LOCATION_GRAVE) or (c:IsLocation(LOCATION_MZONE) and c:IsFaceup())
end end
...@@ -12,7 +12,7 @@ function s.initial_effect(c) ...@@ -12,7 +12,7 @@ function s.initial_effect(c)
e0:SetCondition(s.regcon) e0:SetCondition(s.regcon)
e0:SetOperation(s.regop) e0:SetOperation(s.regop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0)) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND|CATEGORY_TODECK|CATEGORY_CONTROL) e1:SetCategory(CATEGORY_TOHAND|CATEGORY_TODECK|CATEGORY_CONTROL)
......
...@@ -49,17 +49,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,17 +49,17 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc) if tc:IsRelateToChain() and aux.NecroValleyFilter()(tc)
and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then and Duel.SpecialSummonStep(tc,0,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_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
--おかしの家 --おかしの家
function c79922118.initial_effect(c) function c79922118.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
......
...@@ -48,7 +48,7 @@ function s.sxyzfilter(e,c) ...@@ -48,7 +48,7 @@ function s.sxyzfilter(e,c)
end end
function s.Drake_shark_f(function_f,int_lv,card_c) function s.Drake_shark_f(function_f,int_lv,card_c)
return function (c) return function (c)
return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c)) return c:IsXyzLevel(card_c,int_lv) and (not function_f or function_f(c))
end end
end end
function s.sxfilter(c,tp,xc) function s.sxfilter(c,tp,xc)
...@@ -70,27 +70,27 @@ function s.sxvalue(c,tp,xc) ...@@ -70,27 +70,27 @@ function s.sxvalue(c,tp,xc)
end end
function s.Drake_shark_gf(int_ct,int_tp,xc) function s.Drake_shark_gf(int_ct,int_tp,xc)
return function (g) return function (g)
local ct=g:GetCount() local ct=g:GetCount()
local eg=g:Filter(s.sxfilter,nil,int_tp,xc) local eg=g:Filter(s.sxfilter,nil,int_tp,xc)
if #eg>0 then if #eg>0 then
ct=ct+eg:GetClassCount(s.sxvalue,int_tp,xc) ct=ct+eg:GetClassCount(s.sxvalue,int_tp,xc)
end end
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local te=tc:IsHasEffect(EFFECT_XYZ_LEVEL,int_tp) local te=tc:IsHasEffect(EFFECT_XYZ_LEVEL,int_tp)
if te then if te then
local evf=te:GetValue() local evf=te:GetValue()
if evf then if evf then
local ev=evf(te,tc,xc) local ev=evf(te,tc,xc)
local lmct=(ev>>12)&0xf local lmct=(ev>>12)&0xf
if lmct>0 and lmct>g:GetCount() then if lmct>0 and lmct>g:GetCount() then
return false return false
end end
end end
end end
tc=g:GetNext() tc=g:GetNext()
end end
return ct>=int_ct return ct>=int_ct
end end
end end
function s.xfilter(c,tp) function s.xfilter(c,tp)
......
...@@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and a:IsAttackable() and not a:IsImmuneToEffect(e) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and a:IsAttackable() and not a:IsImmuneToEffect(e) then
Duel.CalculateDamage(a,c) Duel.CalculateDamage(a,c)
end end
end end
function s.atkfilter(c,ac) function s.atkfilter(c,ac)
......
...@@ -3,7 +3,7 @@ local s,id,o=GetID() ...@@ -3,7 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--material --material
aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,82044279),nil,nil,aux.Tuner(nil),1,99,s.syncheck) aux.AddSynchroMixProcedure(c,aux.FilterBoolFunction(Card.IsCode,82044279),nil,nil,aux.Tuner(nil),1,99,s.syncheck)
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......
...@@ -34,7 +34,7 @@ function c84687358.descon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,7 +34,7 @@ function c84687358.descon2(e,tp,eg,ep,ev,re,r,rp)
end end
function c84687358.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c84687358.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and not e:GetHandler():IsStatus(STATUS_CHAINING) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
......
...@@ -65,7 +65,7 @@ function c86852702.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,7 +65,7 @@ function c86852702.target(e,tp,eg,ep,ev,re,r,rp,chk)
op=Duel.SelectOption(tp,aux.Stringid(86852702,1))+1 op=Duel.SelectOption(tp,aux.Stringid(86852702,1))+1
end end
e:SetLabel(0,op) e:SetLabel(0,op)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c86852702.activate(e,tp,eg,ep,ev,re,r,rp) function c86852702.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -52,7 +52,7 @@ function s.chk(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,7 +52,7 @@ function s.chk(e,tp,eg,ep,ev,re,r,rp)
if s.chkfilter(tc,p) then if s.chkfilter(tc,p) then
Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(p,id,RESET_PHASE+PHASE_END,0,1)
end end
tc=eg:GetNext() tc=eg:GetNext()
end end
if Duel.GetFlagEffect(p,id)>1 then if Duel.GetFlagEffect(p,id)>1 then
Duel.RegisterFlagEffect(p,id+o,RESET_PHASE+PHASE_END,0,2) Duel.RegisterFlagEffect(p,id+o,RESET_PHASE+PHASE_END,0,2)
......
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.cfilter(c) function s.cfilter(c)
return c:IsFaceupEx() and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1bf) return c:IsFaceupEx() and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x1bf)
end end
function s.disfilter(c) function s.disfilter(c)
return c:IsType(TYPE_MONSTER) and aux.NegateMonsterFilter(c) return c:IsType(TYPE_MONSTER) and aux.NegateMonsterFilter(c)
...@@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -38,7 +38,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,s.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -26,7 +26,6 @@ function s.initial_effect(c) ...@@ -26,7 +26,6 @@ function s.initial_effect(c)
e2:SetOperation(s.setop) e2:SetOperation(s.setop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.costfilter(c,tp) function s.costfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and (c:IsControler(tp) or c:IsFaceup()) return c:IsType(TYPE_SYNCHRO) and (c:IsControler(tp) or c:IsFaceup())
and Duel.IsExistingTarget(s.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c) and Duel.IsExistingTarget(s.negfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
......
...@@ -79,9 +79,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,9 +79,9 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
tg:Sub(sg) tg:Sub(sg)
Duel.SendtoGrave(tg,REASON_RULE) Duel.SendtoGrave(tg,REASON_RULE)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
function s.costfilter(c,e,tp) function s.costfilter(c,e,tp)
......
...@@ -49,12 +49,12 @@ end ...@@ -49,12 +49,12 @@ end
function c98127546.exmatcheck(c,lc,tp) function c98127546.exmatcheck(c,lc,tp)
if not c:IsControler(1-tp) then return false end if not c:IsControler(1-tp) then return false end
local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)} local le={c:IsHasEffect(EFFECT_EXTRA_LINK_MATERIAL,tp)}
for _,te in pairs(le) do for _,te in pairs(le) do
local f=te:GetValue() local f=te:GetValue()
local related,valid=f(te,lc,nil,c,tp) local related,valid=f(te,lc,nil,c,tp)
if related and not te:GetHandler():IsCode(98127546) then return false end if related and not te:GetHandler():IsCode(98127546) then return false end
end end
return true return true
end end
function c98127546.matval(e,lc,mg,c,tp) function c98127546.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end if e:GetHandler()~=lc then return false,nil end
......
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