Commit 451dafec authored by root's avatar root

Refresh on 2025-05-22 19:20:23

parent 14337bf9
--契約を結びし竜の戦士
local s,id,o=GetID()
function s.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.costfilter(c)
return c:IsDiscardable()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,s.costfilter,1,1,REASON_COST+REASON_DISCARD)
end
function s.spfilter(c,e,tp)
return not c:IsCode(id) and c:IsLevelBelow(4) and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--アイン・ロイド
local s,id,o=GetID()
function s.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_DESTROYED)
e1:SetCountLimit(1,id)
e1:SetCondition(s.tgcon)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function s.tgfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_MACHINE) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,2,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,2,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--妖魔ヌリカベ
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,id)
e1:SetCondition(aux.exccon)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) and chkc~=c end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,c,e,tp)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToChain() and tc:IsRelateToChain()
and aux.NecroValleyFilter()(c) and aux.NecroValleyFilter()(tc)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 then
local g=Group.FromCards(c,tc)
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
for sc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2,true)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_REDIRECT)
e3:SetValue(LOCATION_REMOVED)
sc:RegisterEffect(e3,true)
end
end
end
end
...@@ -46,7 +46,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +46,8 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1) local fid=sc:GetFieldID()
sc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
sc:CompleteProcedure() sc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -54,17 +55,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,17 +55,24 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabelObject(sc) e1:SetLabelObject(sc)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount()+1)
e1:SetCondition(s.rmcon) e1:SetCondition(s.rmcon(fid))
e1:SetOperation(s.rmop) e1:SetOperation(s.rmop)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
end end
end end
function s.rmcon(e,tp,eg,ep,ev,re,r,rp) function s.rmcon(fid)
return function(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
return tc and tc:GetFlagEffect(id)~=0 and e:GetLabel()~=Duel.GetTurnCount() if tc:GetFlagEffect(id)~=0 and tc:GetFlagEffectLabel(id)==fid then
return Duel.GetTurnCount()==e:GetLabel()
else
e:Reset()
return false
end
end
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=e:GetLabelObject()
......
...@@ -33,7 +33,7 @@ function s.filter(c,e,tp,m,f,chkf) ...@@ -33,7 +33,7 @@ function s.filter(c,e,tp,m,f,chkf)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function s.check(tp,g,fc) function s.check(tp,g,fc)
return g:IsExists(Card.IsSetCard,1,nil,0x2cd) return g:IsExists(Card.IsFusionSetCard,1,nil,0x2cd)
end end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk) function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -40,7 +40,7 @@ function s.pfilter(c,tp) ...@@ -40,7 +40,7 @@ function s.pfilter(c,tp)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp) return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp)
and Duel.GetLP(1-tp)>=c:GetBaseAttack() and Duel.GetLP(1-tp)>=c:GetBaseAttack() and c:GetTextAttack()>=0
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=0 local ft=0
......
...@@ -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()
aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter2,s.fusfilter3,s.fusfilter4) aux.AddFusionProcMix(c,false,true,s.fusfilter1,s.fusfilter2,s.fusfilter3,s.fusfilter4)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_SPSUMMON) aux.AddContactFusionProcedure(c,s.fsmfiler(c),LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_SPSUMMON)
aux.EnablePendulumAttribute(c,false) aux.EnablePendulumAttribute(c,false)
--splimit --splimit
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -59,6 +59,11 @@ function s.initial_effect(c) ...@@ -59,6 +59,11 @@ function s.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
s.material_type=TYPE_SYNCHRO s.material_type=TYPE_SYNCHRO
function s.fsmfiler(ec)
return function(c)
return c:IsAbleToRemoveAsCost() and Duel.GetFlagEffect(ec:GetControler(),id)==0
end
end
function s.fusfilter1(c) function s.fusfilter1(c)
return c:IsRace(RACE_FIEND) and c:IsFusionType(TYPE_FUSION) return c:IsRace(RACE_FIEND) and c:IsFusionType(TYPE_FUSION)
end end
......
...@@ -69,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetOperation(s.damop) e1:SetOperation(s.damop)
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)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3)) tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(id,3))
end end
end end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -49,7 +49,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON) e1:SetCode(EFFECT_EXTRA_PENDULUM_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id+o)
e1:SetValue(s.pendvalue) e1:SetValue(s.pendvalue)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
...@@ -60,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,7 +60,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.spfilter(c,e,tp,name,flag) function s.spfilter(c,e,tp,name,flag)
return c:IsSetCard(0x195) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(name) and (tf or not c:IsLocation(LOCATION_DECK)) return c:IsSetCard(0x195) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(name) and (flag or not c:IsLocation(LOCATION_DECK))
end end
function s.handcon(e) function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)
......
...@@ -7,7 +7,6 @@ function s.initial_effect(c) ...@@ -7,7 +7,6 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost) e1:SetCost(s.spcost)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
e1:SetOperation(s.spop) e1:SetOperation(s.spop)
...@@ -35,7 +34,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +34,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return not c:IsCode(id) and (c:IsSetCard(0xe9,0x2066) or aux.IsCodeListed(c,79791878)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return not c:IsCode(id) and (c:IsSetCard(0xe9,0x2066) or aux.IsCodeListed(c,79791878) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
...@@ -51,7 +50,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +50,8 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(s.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) and aux.IsCodeListed(g:GetFirst(),79791878) then
local tc=g:GetFirst() local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -36,11 +36,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,11 +36,11 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local loc=LOCATION_ONFIELD local loc=LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end if ft==0 then loc=LOCATION_MZONE end
e:SetLabel(loc) e:SetLabel(loc)
return Duel.IsExistingTarget(s.filter,tp,loc,0,1,nil) return Duel.IsExistingTarget(s.filter,tp,loc,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,e:GetLabel(),0,1,1,nil) local g=Duel.SelectTarget(tp,s.filter,tp,e:GetLabel(),0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -6,7 +6,8 @@ function s.initial_effect(c) ...@@ -6,7 +6,8 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1)
e1:SetTarget(s.eqtg) e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop) e1:SetOperation(s.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -36,20 +37,21 @@ function s.initial_effect(c) ...@@ -36,20 +37,21 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON+RACE_MACHINE) and c:IsSetCard(0x93) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsSetCard(0x93)
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp) and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler()) Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsControler(1-tp) or tc:IsFacedown() or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
......
...@@ -35,7 +35,6 @@ function s.initial_effect(c) ...@@ -35,7 +35,6 @@ function s.initial_effect(c)
e5:SetCode(EFFECT_IMMUNE_EFFECT) e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_FZONE) e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetCondition(s.con)
e5:SetTarget(s.indtg) e5:SetTarget(s.indtg)
e5:SetValue(s.efilter) e5:SetValue(s.efilter)
c:RegisterEffect(e5) c:RegisterEffect(e5)
...@@ -80,11 +79,11 @@ end ...@@ -80,11 +79,11 @@ end
function s.splimit(e,c) function s.splimit(e,c)
return not (c:IsSetCard(0x18) or c:IsRace(RACE_SPELLCASTER+RACE_AQUA)) return not (c:IsSetCard(0x18) or c:IsRace(RACE_SPELLCASTER+RACE_AQUA))
end end
function s.indtg(e,c) function s.nifilter(c,lv)
return c:IsSetCard(0x18) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsSummonType(SUMMON_TYPE_NORMAL) return c:IsSetCard(0x18) and c:IsLevelAbove(lv+1)
end end
function s.con(e) function s.indtg(e,c)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer() return c:IsSetCard(0x18) and Duel.IsExistingMatchingCard(s.nifilter,c:GetOwner(),LOCATION_MZONE,0,1,nil,c:GetLevel())
end end
function s.efilter(e,re) function s.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated() return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
......
...@@ -27,16 +27,19 @@ function s.cfilter(c,tp) ...@@ -27,16 +27,19 @@ function s.cfilter(c,tp)
and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0 and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_MZONE,0,1,e:GetHandler(),tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp) local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function s.tfilter(c)
return c:IsControlerCanBeChanged(true)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil,true) end if chk==0 then return Duel.IsExistingTarget(s.tfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil,true) local g=Duel.SelectTarget(tp,s.tfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,7 +28,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,9 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct) Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
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 atk=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil):GetSum(Card.GetAttack) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local atk=0
if g~=0 then atk=g:GetSum(Card.GetAttack) end
local ct=(math.floor(atk/2000)+Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP))*3 local ct=(math.floor(atk/2000)+Duel.GetMatchingGroupCount(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP))*3
if ct>0 then if ct>0 then
Duel.DiscardDeck(tp,ct,REASON_EFFECT) Duel.DiscardDeck(tp,ct,REASON_EFFECT)
......
...@@ -61,7 +61,7 @@ function s.thfilter1(c) ...@@ -61,7 +61,7 @@ function s.thfilter1(c)
return c:IsSetCard(0x4093) and c:IsAbleToHand() return c:IsSetCard(0x4093) and c:IsAbleToHand()
end end
function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfiter1,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop1(e,tp,eg,ep,ev,re,r,rp) function s.thop1(e,tp,eg,ep,ev,re,r,rp)
...@@ -95,7 +95,7 @@ function s.thfilter2(c) ...@@ -95,7 +95,7 @@ function s.thfilter2(c)
return c:IsSetCard(0x1093) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x1093) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfiter2,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -8,7 +8,7 @@ function s.initial_effect(c) ...@@ -8,7 +8,7 @@ function s.initial_effect(c)
e0:SetType(EFFECT_TYPE_SINGLE) e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION) e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit) e0:SetValue(s.splimit)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--battle indestructable --battle indestructable
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -71,6 +71,9 @@ function s.initial_effect(c) ...@@ -71,6 +71,9 @@ function s.initial_effect(c)
e8:SetTarget(s.rellimit) e8:SetTarget(s.rellimit)
c:RegisterEffect(e8) c:RegisterEffect(e8)
end end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.atktg(e,c) function s.atktg(e,c)
return c:IsFaceup() return c:IsFaceup()
end end
......
...@@ -64,9 +64,10 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,9 +64,10 @@ function s.chop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.repop) Duel.ChangeChainOperation(ev,s.repop)
end end
function s.repop(e,tp,eg,ep,ev,re,r,rp) function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(1-tp,s.filter,tp,0,LOCATION_DECK,1,1,nil) local g=Duel.SelectMatchingCard(1-tp,s.filter,tp,0,LOCATION_DECK,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.SendtoHand(g,1-tp,REASON_EFFECT)
Duel.ConfirmCards(tp,g)
end end
end end
\ No newline at end of file
...@@ -20,8 +20,9 @@ function s.initial_effect(c) ...@@ -20,8 +20,9 @@ function s.initial_effect(c)
--disable --disable
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE) e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(s.negcon) e3:SetCondition(s.negcon)
e3:SetOperation(s.negop) e3:SetOperation(s.negop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -70,10 +71,10 @@ function s.eqlimit(e,c) ...@@ -70,10 +71,10 @@ function s.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
end end
function s.negcon(e,tp,eg,ep,ev,re,r,rp) function s.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) local tc=e:GetHandler():GetEquipTarget()
and g and g:IsExists(e:GetHandler():GetEquipTarget(),1,nil) return tc and rp==1-tp and g and g:IsContains(tc)
and Duel.IsChainDisablable(ev) and not Duel.IsChainDisabled(ev)
end end
function s.negop(e,tp,eg,ep,ev,re,r,rp) function s.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
......
...@@ -71,14 +71,16 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,14 +71,16 @@ function s.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
-- 改变场上所有怪兽种族为炎族 local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ts=g:GetFirst()
for ts in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_RACE) e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(RACE_PYRO) e1:SetValue(RACE_PYRO)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END+RESETS_STANDARD)
Duel.RegisterEffect(e1,tp) ts:RegisterEffect(e1,tp)
end
end end
end end
end end
......
...@@ -9,6 +9,7 @@ function s.initial_effect(c) ...@@ -9,6 +9,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
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(aux.fuslimit)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
......
...@@ -1631,7 +1631,7 @@ function Auxiliary.MergedDelayEventCheck2(e,tp,eg,ep,ev,re,r,rp) ...@@ -1631,7 +1631,7 @@ function Auxiliary.MergedDelayEventCheck2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--Once the card has been moved to the public area, it should be listened to again --Once the card has been moved to the public area, it should be listened to again
Auxiliary.merge_single_effects={} Auxiliary.merge_single_effect_codes={}
function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events) function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
local g=Group.CreateGroup() local g=Group.CreateGroup()
g:KeepAlive() g:KeepAlive()
...@@ -1665,7 +1665,7 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events) ...@@ -1665,7 +1665,7 @@ function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard(c,code,events)
e3:SetLabelObject(g) e3:SetLabelObject(g)
e3:SetOperation(Auxiliary.ThisCardMovedToPublicResetCheck_ToSingleCard) e3:SetOperation(Auxiliary.ThisCardMovedToPublicResetCheck_ToSingleCard)
c:RegisterEffect(e3) c:RegisterEffect(e3)
table.insert(Auxiliary.merge_single_effects,e3) Auxiliary.merge_single_effect_codes[event_code_single]=g
--use global effect to raise event for face-down cards --use global effect to raise event for face-down cards
if not Auxiliary.merge_single_global_check then if not Auxiliary.merge_single_global_check then
Auxiliary.merge_single_global_check=true Auxiliary.merge_single_global_check=true
...@@ -1730,9 +1730,7 @@ function Auxiliary.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp) ...@@ -1730,9 +1730,7 @@ function Auxiliary.MergedDelayEventCheck2_ToSingleCard(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard_RaiseEvent(e,tp,eg,ep,ev,re,r,rp) function Auxiliary.RegisterMergedDelayedEvent_ToSingleCard_RaiseEvent(e,tp,eg,ep,ev,re,r,rp)
for _,mse in ipairs(Auxiliary.merge_single_effects) do for code,g in pairs(Auxiliary.merge_single_effect_codes) do
local code=mse:GetLabel()
local g=mse:GetLabelObject()
if #g>0 then if #g>0 then
local _eg=g:Clone() local _eg=g:Clone()
Duel.RaiseEvent(_eg,code,re,r,rp,ep,ev) Duel.RaiseEvent(_eg,code,re,r,rp,ep,ev)
...@@ -1904,7 +1902,10 @@ end ...@@ -1904,7 +1902,10 @@ end
---@param id integer ---@param id integer
---@return boolean ---@return boolean
function Auxiliary.IsSelfEquip(c,id) function Auxiliary.IsSelfEquip(c,id)
return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id) return c:GetEquipGroup():IsExists(Auxiliary.SelfEquipFilter,1,nil,id)
end
function Auxiliary.SelfEquipFilter(c,id)
return c:GetFlagEffect(id)>0
end end
---Orcustrated Babel ---Orcustrated Babel
---@param c Card ---@param c Card
......
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