Commit 9005f384 authored by root's avatar root

Refresh on 2024-07-23 18:26:26

parent 87010841
--オッドアイズ・ソルブレイズ・ドラゴン
local s,id,o=GetID()
function s.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--special summon(self)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg1)
e2:SetOperation(s.spop1)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetAbsoluteRange(tp,1,0)
e1:SetCondition(s.splimitcon)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
end
end
end
function s.splimitcon(e)
return e:GetHandler():IsControler(e:GetOwnerPlayer())
end
function s.splimit(e,c)
return not c:IsType(TYPE_PENDULUM)
end
function s.rfilter(c)
return c:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_PENDULUM) and c:IsAbleToRemoveAsCost()
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.rfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,s.rfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--誇りと魂の究極竜
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
aux.AddFusionProcFunRep(c,s.ffilter,3,true)
c:EnableReviveLimit()
--cannot target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(s.indcon)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--indes
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCondition(s.atkcon)
e3:SetValue(4500)
c:RegisterEffect(e3)
--def up
local e4=e3:Clone()
e4:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e4)
--destroy
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.descon)
e5:SetTarget(s.destg)
e5:SetOperation(s.desop)
c:RegisterEffect(e5)
end
function s.ffilter(c)
return c:GetBaseAttack()==2500 and c:GetBaseDefense()==2500
end
function s.indcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
end
function s.atkcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_GRAVE,0)>=25
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_GRAVE)>=25
end
function s.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) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
\ No newline at end of file
...@@ -23,9 +23,9 @@ function s.initial_effect(c) ...@@ -23,9 +23,9 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(2) e2:SetCountLimit(2)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(s.descon) e2:SetCondition(s.descon)
......
--B・F-猛撃のレイピア
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,101206052)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetCost(s.spcost)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--lv change
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.lvtg)
e2:SetOperation(s.lvop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() or not c:IsRace(RACE_INSECT)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.costfilter(c)
return c:IsRace(RACE_INSECT) and 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,e:GetHandler())
end
function s.acfilter(c,tp)
return c:IsCode(101206052) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0
or not Duel.IsExistingMatchingCard(s.acfilter,tp,LOCATION_DECK,0,1,nil,tp) then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,s.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)~=0
and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_INSECT) and c:IsLocation(LOCATION_EXTRA)
end
function s.lvfilter(c)
return c:IsFaceup() and c:IsLevelAbove(2) and c:IsRace(RACE_INSECT)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,s.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(-1)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--Emボール・ライダー
local s,id,o=GetID()
function s.initial_effect(c)
aux.EnablePendulumAttribute(c)
--pendulum effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.ptg)
e1:SetOperation(s.pop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--effect
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCountLimit(1,id+o*2)
e3:SetTarget(s.tg)
e3:SetOperation(s.op)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4)
--spsummon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,3))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_ATTACK_ANNOUNCE)
e5:SetRange(LOCATION_GRAVE)
e5:SetCountLimit(1,id+o*3)
e5:SetCondition(s.spcon2)
e5:SetTarget(s.sptg2)
e5:SetOperation(s.spop2)
c:RegisterEffect(e5)
end
function s.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc6) and c:IsType(TYPE_PENDULUM) and c:IsAbleToGrave()
and c:GetLeftScale()>0
end
function s.ptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function s.pop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE)
and Duel.SelectYesNo(tp,aux.Stringid(id,8)) then
Duel.BreakEffect()
local ct=tc:GetLeftScale()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc6)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function s.schfilter(c)
return c:IsSetCard(0xc6) and c:IsType(TYPE_PENDULUM) and c:IsAbleToExtra()
end
function s.desfilter(c)
return c:IsSetCard(0xc6) and c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local sel=0
if Duel.IsExistingMatchingCard(s.schfilter,tp,LOCATION_DECK,0,1,nil) then sel=sel+1 end
if Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,0,1,nil) then sel=sel+2 end
e:SetLabel(sel)
return sel~=0
end
local sel=e:GetLabel()
if sel==3 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,4))
sel=Duel.SelectOption(tp,aux.Stringid(id,5),aux.Stringid(id,6))+1
elseif sel==1 then
Duel.SelectOption(tp,aux.Stringid(id,5))
elseif sel==2 then
Duel.SelectOption(tp,aux.Stringid(id,6))
end
e:SetLabel(sel)
if sel==1 then
e:SetCategory(CATEGORY_TOEXTRA)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
elseif sel==2 then
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil)
e:SetCategory(CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local sel=e:GetLabel()
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,7))
local g=Duel.SelectMatchingCard(tp,s.schfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoExtraP(g,nil,REASON_EFFECT)
end
elseif sel==2 then
local g=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_ONFIELD,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,1,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
and Duel.GetAttacker():IsSummonType(SUMMON_TYPE_SPECIAL)
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
...@@ -51,10 +51,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,10 +51,10 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function s.eqcon1(e,tp,eg,ep,ev,re,r,rp) function s.eqcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,95937545) return not aux.GoldenAllureQueenCondition(e:GetHandler(),tp)
end end
function s.eqcon2(e,tp,eg,ep,ev,re,r,rp) function s.eqcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,95937545) return aux.GoldenAllureQueenCondition(e:GetHandler(),tp)
end end
function s.eqfilter(c,tp) function s.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp) return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:CheckUniqueOnField(tp)
...@@ -79,6 +79,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,6 +79,7 @@ function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,tc,c,false) then if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,tc,c,false) then
tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
......
--紅涙の魔ラクリモーサ
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_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetTarget(s.tgtg)
e1:SetOperation(s.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.tgfilter(c)
return not c:IsCode(id) and c:IsSetCard(0x1b0) 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,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.spfilter(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsSetCard(0x1b0)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
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) end
if chk==0 then return Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsAbleToDeck() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and c:IsLocation(LOCATION_DECK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--メメント・カクタス
local s,id,o=GetID()
function s.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,id)
e1:SetCondition(s.dacon)
e1:SetTarget(s.datg)
e1:SetOperation(s.daop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon)
e3:SetTarget(s.thtg)
e3:SetOperation(s.thop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id+o*2)
e4:SetCondition(s.spcon)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.dacon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP()
end
function s.datg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
end
function s.daop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.dafilter)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.dafilter(e,c)
return c:IsSetCard(0x1a1) and c:IsLevelAbove(9)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function s.thfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x1a1) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.thfilter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.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
function s.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsType(TYPE_MONSTER) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and (c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousSetCard(0x1a1)
or c:IsPreviousLocation(LOCATION_HAND) and c:IsSetCard(0x1a1))
end
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())
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 e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--海皇精 アビスライン
local s,id,o=GetID()
function s.initial_effect(c)
--to hand or special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.drcon)
e2:SetCost(s.drcost)
e2:SetTarget(s.drtg)
e2:SetOperation(s.drop)
c:RegisterEffect(e2)
end
function s.cfilter(c,tp)
return c:IsSetCard(0x77,0x74) and Duel.GetMZoneCount(tp,c)>0
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
e:SetLabel(100)
if chk==0 then return c:IsReleasable() and Duel.CheckReleaseGroupEx(tp,s.cfilter,1,REASON_COST,true,c,tp) end
local g=Duel.SelectReleaseGroupEx(tp,s.cfilter,1,1,REASON_COST,true,c,tp)
g:AddCard(c)
Duel.Release(g,REASON_COST)
end
function s.thfilter(c,e,tp,el)
if not (c:IsLevel(7) and c:IsRace(RACE_AQUA+RACE_FISH+RACE_SEASERPENT)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or ((ft>0 or el==100) and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,0)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_EXTRA)
end
function s.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
end
function s.costfilter(c)
return c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function s.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk) and Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,nil) end
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,s.costfilter,1,1,REASON_DISCARD+REASON_COST)
end
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
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
--水精鱗の深影隊
local s,id,o=GetID()
function s.initial_effect(c)
--lv change
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetCost(s.lvcost)
e1:SetTarget(s.lvtg)
e1:SetOperation(s.lvop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
end
function s.lvfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsFaceup() and c:IsLevelAbove(1) and not c:IsLevel(7)
end
function s.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(s.lvfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(7)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated() and re:IsActiveType(TYPE_MONSTER)
and re:GetHandler():IsAttribute(ATTRIBUTE_WATER)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x74,0x77) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsLevelBelow(4) and not c:IsCode(id)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsAttribute(ATTRIBUTE_WATER) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--B・F-革命のグラン・パルチザン
local s,id,o=GetID()
function s.initial_effect(c)
--Synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.atktg)
e2:SetValue(s.atkval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,id)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.atktg(e,c)
return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_INSECT)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT)
end
function s.atkval(e,c)
return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_REMOVED,0,nil)*200
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ct=Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_REMOVED,0,nil)
local dg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if ct>0 and #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=dg:Select(tp,1,ct,nil)
Duel.HintSelection(sg)
local dam=Duel.Destroy(sg,REASON_EFFECT)
if dam>0 then
Duel.Damage(1-tp,dam*500,REASON_EFFECT)
end
end
end
end
\ No newline at end of file
--B・F-神事弓のサチ
local s,id,o=GetID()
function s.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_INSECT),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--Tuner
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(s.tncon)
e1:SetTarget(s.tntg)
e1:SetOperation(s.tnop)
c:RegisterEffect(e1)
--extra summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(s.excost)
e2:SetTarget(s.extg)
e2:SetOperation(s.exop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,id)
e3:SetCondition(s.damcon)
e3:SetTarget(s.damtg)
e3:SetOperation(s.damop)
c:RegisterEffect(e3)
end
function s.tncon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsType(TYPE_TUNER) end
end
function s.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and not c:IsType(TYPE_TUNER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetValue(TYPE_TUNER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function s.cfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost()
and bit.band(c:GetType(),TYPE_CONTINUOUS+TYPE_SPELL)==TYPE_CONTINUOUS+TYPE_SPELL
end
function s.excost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.extg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) end
end
function s.exop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,3))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(s.estg)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
end
function s.estg(e,c)
return c:IsSetCard(0x12f)
end
function s.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function s.damfilter(c)
return c:IsFaceup() and c:IsSetCard(0x12f) and c:IsType(TYPE_MONSTER)
end
function s.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local dam=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_REMOVED,0,nil)*100
if chk==0 then return dam>0 end
Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function s.damop(e,tp,eg,ep,ev,re,r,rp)
local dam=Duel.GetMatchingGroupCount(s.damfilter,tp,LOCATION_REMOVED,0,nil)*100
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
Duel.Damage(p,dam,REASON_EFFECT)
end
\ No newline at end of file
--海皇龍神 ポセイドラ・アビス
local s,id,o=GetID()
function s.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,7,3,s.ovfilter,aux.Stringid(id,0),3,s.xyzop)
c:EnableReviveLimit()
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(s.spcon)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.ovfilter(c)
return c:IsFaceup() and c:IsSetCard(0x77,0x74) and c:IsType(TYPE_XYZ)
end
function s.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function s.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost()
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST)
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,tp) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil):Select(tp,1,3,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function s.spfilter(c,e,tp)
return c:IsLevelBelow(3) and c:IsRace(RACE_AQUA+RACE_FISH+RACE_SEASERPENT) 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 not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,3,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
if ft<3 or Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetMatchingGroupCount(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,tp)<3 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,3,3,nil,e,tp)
if g:GetCount()>2 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--刻まれし魔の神聖棺
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,s.lcheck)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
end
function s.lcheck(g,lc)
return g:IsExists(s.lmfilter,1,nil)
end
function s.lmfilter(c)
return c:IsLinkAttribute(ATTRIBUTE_LIGHT) and c:IsLinkRace(RACE_FIEND)
end
function s.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and not c:IsType(TYPE_LINK)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not tc:IsLocation(LOCATION_MZONE) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(s.value)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_PIERCE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.value(e,c)
local tc=e:GetHandler():GetEquipTarget()
local g=tc:GetEquipGroup()
return g:GetSum(Card.GetLink)*600
end
\ No newline at end of file
--皇たる水精鱗-ネプトアビス
local s,id,o=GetID()
function s.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,3,s.lcheck)
c:EnableReviveLimit()
--cannot be effect target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(s.etlimit)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--to hand or equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_EQUIP+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id)
e2:SetCondition(s.thcon)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id+o)
e3:SetCondition(s.thcon2)
e3:SetTarget(s.thtg2)
e3:SetOperation(s.thop2)
c:RegisterEffect(e3)
end
function s.lcheck(g,lc)
return g:IsExists(Card.IsLinkRace,1,nil,RACE_AQUA+RACE_FISH+RACE_SEASERPENT)
end
function s.etlimit(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c) and c:IsAttribute(ATTRIBUTE_WATER)
and c:IsFaceup()
end
function s.cfilter(c,tp,re)
return c:IsReason(REASON_COST) and re:IsActivated() and c:GetOriginalAttribute()==ATTRIBUTE_WATER
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(s.cfilter,1,c,tp,re)
end
function s.eqfilter(c,tp,ec)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x75)
and (c:IsAbleToHand() or c:CheckUniqueOnField(tp) and not c:IsForbidden()
and c:CheckEquipTarget(ec)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,tp,e:GetHandler())
end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,tp,c)
local tc=g:GetFirst()
if g:GetCount()>0 then
if tc:CheckEquipTarget(c) and tc:CheckUniqueOnField(tp) and not tc:IsForbidden()
and (not tc:IsAbleToHand() or Duel.SelectOption(tp,1190,aux.Stringid(id,3))==1) then
Duel.Equip(tp,tc,c)
else
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function s.thcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp)
end
function s.thfilter2(c)
return c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
and c:IsSetCard(0x74,0x77)
end
function s.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function s.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
...@@ -41,7 +41,7 @@ function s.cfilter(c) ...@@ -41,7 +41,7 @@ function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x2bb) and c:IsType(TYPE_TRAP) return c:IsFaceup() and c:IsSetCard(0x2bb) and c:IsType(TYPE_TRAP)
end end
function s.poscon(e,tp,eg,ep,ev,re,r,rp) function s.poscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingTarget(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function s.posfilter(c) function s.posfilter(c)
return c:IsPosition(POS_DEFENSE) and c:IsCanChangePosition() return c:IsPosition(POS_DEFENSE) and c:IsCanChangePosition()
......
--武装蜂起
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,52838896)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to hand
local e0=aux.AddThisCardInGraveAlreadyCheck(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE)
e2:SetLabelObject(e0)
e2:SetCondition(s.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
end
function s.spfilter(c,e,tp)
return c:IsRace(RACE_INSECT) and c:IsAttackBelow(1000) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(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_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and tc:IsSummonLocation(LOCATION_DECK) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,0,1,1,nil)
local gc=g:GetFirst()
if gc then
Duel.HintSelection(g)
Duel.SendtoGrave(gc,REASON_EFFECT)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.splimit(e,c)
return not c:IsRace(RACE_INSECT)
end
function s.cfilter(c,se)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsType(TYPE_SYNCHRO)
and bit.band(c:GetPreviousRaceOnField(),RACE_INSECT)~=0 and c:IsPreviousPosition(POS_FACEUP)
and c:IsPreviousLocation(LOCATION_MZONE) and (se==nil or c:GetReasonEffect()~=se)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local se=e:GetLabelObject():GetLabelObject()
return eg:IsExists(s.cfilter,1,e:GetHandler(),se)
end
function s.thfilter(c)
return c:IsCode(52838896) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--B·F·W
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CUSTOM+id)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(2)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--tuner
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetTarget(s.tntg)
e3:SetOperation(s.tnop)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
aux.RegisterMergedDelayedEvent(c,id,EVENT_SUMMON_SUCCESS,g)
aux.RegisterMergedDelayedEvent(c,id,EVENT_SPSUMMON_SUCCESS,g)
end
function s.tgfilter(c,e,tp,chk)
return c:IsSetCard(0x12f) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp) and c:IsCanBeEffectTarget(e) and c:IsAttackAbove(1)
and (chk or Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttack(),tp))
end
function s.thfilter(c,atk,tp)
return c:IsSetCard(0x12f) and c:IsAttackBelow(atk-1) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and s.tgfilter(chkc,e,tp,true) end
local g=eg:Filter(s.tgfilter,nil,e,tp,false)
if chk==0 then return g:GetCount()>0 end
if g:GetCount()==1 then
Duel.SetTargetCard(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tc)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetAttack(),tp)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
end
function s.tfilter(c)
return c:IsFaceup() and c:IsRace(RACE_INSECT) and not c:IsType(TYPE_TUNER)
and c:IsLevelAbove(1)
end
function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.tfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function s.tnop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TUNER)
e1:SetValue(s.tunerval)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function s.tunerval(e,sc)
return sc:IsControler(e:GetHandlerPlayer())
end
\ No newline at end of file
--深渊尖枪-三叉
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--desrep
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetTarget(s.destg)
e2:SetOperation(s.desop)
c:RegisterEffect(e2)
--to deck
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id+o)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.tdtg)
e3:SetOperation(s.tdop)
c:RegisterEffect(e3)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x74,0x77) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(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_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.Equip(tp,c,tc) then
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
c:RegisterEffect(e1)
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local tg=c:GetEquipTarget()
if chk==0 then return c:IsAbleToGrave() and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and tg and tg:IsReason(REASON_BATTLE+REASON_EFFECT) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
function s.tdfilter(c)
return c:IsFaceupEx() and c:IsRace(RACE_AQUA+RACE_FISH+RACE_SEASERPENT) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and s.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,s.tdfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain()
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
\ No newline at end of file
--渦巻く海炎
local s,id,o=GetID()
function s.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id)
e1:SetCost(s.cost)
e1:SetTarget(s.destg)
e1:SetOperation(s.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return true end
end
function s.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGraveAsCost()
end
function s.desfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
local nocost=e:GetLabel()~=100
local b1=(Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_HAND,0,1,c) or nocost) and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
local b2=Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_HAND,0,1,nil)
if chk==0 then return b1 or b2 end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,2)},
{b2,aux.Stringid(id,3)})
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_DESTROY)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
if not nocost then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
e:SetCategory(CATEGORY_DRAW+CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_HAND)
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
Duel.Destroy(tc,REASON_EFFECT)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,s.desfilter,tp,LOCATION_HAND,0,1,1,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and Duel.IsPlayerCanDraw(tp,1)
and Duel.SelectYesNo(tp,aux.Stringid(id,4)) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function s.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_WATER+ATTRIBUTE_FIRE) and c:IsLevel(7,8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and s.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--傀儡流儀-パペット・シャーク
local s,id,o=GetID()
function s.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,1,1,REASON_EFFECT) and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=4 end
end
function s.thfilter(c,tp)
return c:IsType(TYPE_TRAP) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
or c:IsType(TYPE_MONSTER+TYPE_SPELL) and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.RemoveOverlayCard(tp,1,1,1,1,REASON_EFFECT)~=0 then
Duel.ConfirmDecktop(tp,4)
local g=Duel.GetDecktopGroup(tp,4):Filter(s.thfilter,nil,tp)
if #g>0 then
Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sc=g:Select(tp,1,1,nil):GetFirst()
if sc:IsType(TYPE_TRAP) then
if Duel.SSet(tp,sc)>0 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
else
Duel.SendtoHand(sc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sc)
Duel.ShuffleHand(tp)
end
end
end
end
\ No newline at end of file
--ヴァルモニカ・エレディターレ
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1a3) and c:IsType(TYPE_LINK)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
if not Duel.IsChainNegatable(ev) then return false end
return re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function s.tdfilter(c)
return c:IsFaceupEx() and not c:IsCode(id) and c:IsSetCard(0x1a3) and c:IsAbleToDeck()
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0):GetSum(Card.GetCounter,0x6a)
local tg=Duel.GetMatchingGroup(s.tdfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,nil)
if chk==0 then return ct>0 and tg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,1,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0):GetSum(Card.GetCounter,0x6a)
if ct==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.tdfilter),tp,LOCATION_GRAVE+LOCATION_EXTRA+LOCATION_REMOVED,0,1,ct,nil)
if tg:GetCount()>0 and Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup()
local dr=og:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
local drc=math.floor(dr/3)
if drc>0 and Duel.IsPlayerCanDraw(tp,drc) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Draw(tp,drc,REASON_EFFECT)
end
end
end
\ No newline at end of file
...@@ -53,11 +53,11 @@ function s.thfilter2(c) ...@@ -53,11 +53,11 @@ function s.thfilter2(c)
and c:IsAbleToHand() and c:IsAbleToHand()
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.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.thfilter2,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_COST) or not Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_COST) then return end if not Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) or not Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
--神碑の翼フギン
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x17f),2,true)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(s.thcon)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(s.desreptg)
e2:SetValue(s.desrepval)
e2:SetOperation(s.desrepop)
c:RegisterEffect(e2)
--to extra
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(s.tecon)
e3:SetCost(s.cost)
e3:SetTarget(s.tetg)
e3:SetOperation(s.teop)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonLocation(LOCATION_EXTRA)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(s.disable)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetOperation(s.atkop)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,0)
end
function s.disable(e,c)
return (not c:IsType(TYPE_MONSTER) or (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT))
end
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
local dise=e:GetLabelObject()
local tdd=Duel.GetAttacker()
if tdd then
dise:Reset()
e:Reset()
end
end
function s.thfilter(c)
return c:IsSetCard(0x17f) and c:IsType(TYPE_FIELD) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.repfilter(c,tp)
return c:IsControler(tp) and c:IsOnField()
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function s.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(s.repfilter,1,nil,tp)
and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED+STATUS_BATTLE_DESTROYED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function s.desrepval(e,c)
return s.repfilter(c,e:GetHandlerPlayer())
end
function s.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,55990317)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(s.disable)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetOperation(s.atkop)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,0)
end
function s.tecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_EFFECT+REASON_BATTLE) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,e:GetHandler(),1,0,0)
end
function s.teop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(s.disable)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetOperation(s.atkop)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,0)
end
\ No newline at end of file
--ソウル・チャージ
local s,id,o=GetID()
function s.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCost(s.spcost)
e1:SetCondition(s.spcon)
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.GetCurrentPhase()~=PHASE_MAIN2 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.cfilter(c)
return not c:IsSummonLocation(LOCATION_GRAVE)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
end
function s.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local n=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>=n
and Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,n,nil,e,tp) end
if Duel.IsPlayerAffectedByEffect(tp,59822133) and n>1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,n,n,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
Duel.SetLP(tp,Duel.GetLP(tp)-ct*1000)
end
...@@ -45,7 +45,7 @@ function c114514021.cfilter(c) ...@@ -45,7 +45,7 @@ function c114514021.cfilter(c)
return c:IsFaceup() and not c:IsSummonLocation(LOCATION_DECK) and not c:IsSummonLocation(LOCATION_EXTRA) return c:IsFaceup() and not c:IsSummonLocation(LOCATION_DECK) and not c:IsSummonLocation(LOCATION_EXTRA)
end end
function c114514021.condition(e,tp,eg,ep,ev,re,r,rp) function c114514021.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c114514021.cfilter,tp,LOCATION_MZONE,0,1,1,nil) return Duel.IsExistingMatchingCard(c114514021.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c114514021.distarget(e,c) function c114514021.distarget(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_SPELL) return c~=e:GetHandler() and c:IsType(TYPE_SPELL)
......
...@@ -71,7 +71,7 @@ function cm.SE(tp,id,...) ...@@ -71,7 +71,7 @@ function cm.SE(tp,id,...)
end end
function cm.repop(e,tp,eg,ep,ev,re,r,rp) function cm.repop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local p=c:GetController() local p=c:GetControler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)~=0 then
Duel.Draw(p,1,REASON_EFFECT) Duel.Draw(p,1,REASON_EFFECT)
end end
......
...@@ -49,7 +49,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end end
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT,OPCODE_AND} getmetatable(e:GetHandler()).announce_filter={TYPE_MONSTER,OPCODE_ISTYPE}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter)) local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
if Duel.IsExistingMatchingCard(function(c,cod,e,tp) return c:IsCode(cod) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end,tp,0,LOCATION_DECK,1,nil,ac,e,1-tp) then if Duel.IsExistingMatchingCard(function(c,cod,e,tp) return c:IsCode(cod) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end,tp,0,LOCATION_DECK,1,nil,ac,e,1-tp) then
for tc in aux.Next(eg) do for tc in aux.Next(eg) do
...@@ -64,14 +64,14 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,14 +64,14 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,function(c,cod,e,tp) return c:IsCode(cod) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end,tp,0,LOCATION_DECK,1,1,nil,ac,e,1-tp) local g=Duel.SelectMatchingCard(tp,function(c,cod,e,tp) return c:IsCode(cod) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end,tp,0,LOCATION_DECK,1,1,nil,ac,e,1-tp):GetFirst()
if g:GetCount()>0 and Duel.SpecialSummonStep(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g and Duel.SpecialSummonStep(g,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c) 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)
g:GetFirst():RegisterEffect(e1,true) g:RegisterEffect(e1,true)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
......
...@@ -55,8 +55,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,8 +55,13 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,function(c,cod) return c:IsCode(cod) and c:GetActivateEffect():IsActivatable(1-tp,true) end,tp,0,LOCATION_DECK,1,1,nil,ac) local g=Duel.SelectMatchingCard(tp,function(c,cod) return c:IsCode(cod) and c:GetActivateEffect():IsActivatable(1-tp,true) end,tp,0,LOCATION_DECK,1,1,nil,ac)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
local ee=g:GetFirst():GetActivateEffect() local ee=g:GetFirst():GetActivateEffect()
Duel.ChangeChainOperation(ev,ee:GetOperation()) local tg,op = ee:GetTarget(),ee:GetOperation()
oop = function(e,tp,eg,ep,ev,re,r,rp)
tg(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
end
Duel.ChangeChainOperation(ev,oop)
end end
end end
end end
......
...@@ -56,7 +56,12 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,12 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
local ee=g:GetFirst():GetActivateEffect() local ee=g:GetFirst():GetActivateEffect()
Duel.ChangeChainOperation(ev,ee:GetOperation()) local tg,op = ee:GetTarget(),ee:GetOperation()
oop = function(e,tp,eg,ep,ev,re,r,rp)
tg(e,tp,eg,ep,ev,re,r,rp)
op(e,tp,eg,ep,ev,re,r,rp)
end
Duel.ChangeChainOperation(ev,oop)
end end
end end
end end
......
...@@ -25,7 +25,7 @@ function cm.cfilter(c) ...@@ -25,7 +25,7 @@ function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD) return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD)
end end
function cm.dfilter(c) function cm.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
end end
function cm.con(e,tp,eg,ep,ev,re,r,rp,chk) function cm.con(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_ONFIELD,1,nil) return Duel.IsExistingMatchingCard(cm.cfilter,tp,0,LOCATION_ONFIELD,1,nil)
...@@ -60,16 +60,17 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -60,16 +60,17 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,cm.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local tc=Duel.SelectMatchingCard(tp,cm.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then if Duel.Destroy(tc,REASON_EFFECT)~=0 then
local g=Duel.GetMatchingGroup(function(c,cod,tp) return c:IsCode(cod) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end,tp,0,LOCATION_DECK,1,nil,ac,1-tp):GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
if g:IsType(TYPE_FIELD) then local g=Duel.SelectMatchingCard(tp,function(c,cod,tp) return c:IsCode(cod) and not c:IsForbidden() and c:CheckUniqueOnField(tp) end,tp,0,LOCATION_DECK,1,1,nil,ac,1-tp):GetFirst()
if g and g:IsType(TYPE_FIELD) then
local fc=Duel.GetFieldCard(tp,0,LOCATION_FZONE) local fc=Duel.GetFieldCard(tp,0,LOCATION_FZONE)
if fc then if fc then
Duel.SendtoGrave(fc,REASON_RULE) Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect() Duel.BreakEffect()
end end
Duel.MoveToField(tc,tp,1-tp,LOCATION_FZONE,POS_FACEUP,true) Duel.MoveToField(g,tp,1-tp,LOCATION_FZONE,POS_FACEUP,true)
else else
Duel.MoveToField(tc,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(g,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
end end
......
...@@ -20,7 +20,7 @@ function c114514295.initial_effect(c) ...@@ -20,7 +20,7 @@ function c114514295.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCountLimit(1,114514295*2) e2:SetCountLimit(1,114514295*2)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetLabelObject(e0) e2:SetLabelObject(e0)
...@@ -29,8 +29,11 @@ function c114514295.initial_effect(c) ...@@ -29,8 +29,11 @@ function c114514295.initial_effect(c)
e2:SetOperation(c114514295.spop) e2:SetOperation(c114514295.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE) e3:SetDescription(aux.Stringid(114514295,2))
e3:SetCode(EVENT_CUSTOM+114514295)
e3:SetCondition(c114514295.con2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
aux.RegisterMergedDelayedEvent(c,114514295,EVENT_REMOVE)
end end
function c114514295.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp) function c114514295.MergedDelayEventCheck1(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
...@@ -76,27 +79,35 @@ function c114514295.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -76,27 +79,35 @@ function c114514295.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c114514295.cfilter(c,tp) function c114514295.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetPreviousRaceOnField()&RACE_FIEND~=0 and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsFaceupEx() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetPreviousRaceOnField()&RACE_FIEND~=0 and c:IsReason(REASON_BATTLE+REASON_EFFECT) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceupEx())
end end
function c114514295.condition(e,tp,eg,ep,ev,re,r,rp) function c114514295.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return eg:IsExists(c114514295.cfilter,1,nil,tp) return eg:IsExists(c114514295.cfilter,1,nil,tp)
end end
function c114514295.cfilter2(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:GetPreviousRaceOnField()&RACE_FIEND~=0 and c:IsFaceupEx() or c:IsPreviousLocation(LOCATION_GRAVE) and c:IsFaceupEx()
end
function c114514295.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return eg:IsExists(c114514295.cfilter2,1,nil,tp)
end
function c114514295.spfilter(c,e,tp) function c114514295.spfilter(c,e,tp)
return c:IsRace(RACE_FIEND) and c:IsFaceupEx() return c:IsRace(RACE_FIEND) and c:IsFaceupEx()
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousControler(tp) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsPreviousControler(tp)
end end
function c114514295.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c114514295.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end local g=eg:Filter(c114514295.spfilter,nil,e,tp)
if chkc then return g:IsContains(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c114514295.spfilter,1,nil,e,tp) end and g:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg local tg
if #eg==1 then if #g==1 then
tg=eg:Clone() tg=g:Clone()
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg=eg:FilterSelect(tp,c114514295.spfilter,1,1,nil,e,tp) tg=g:Select(tp,1,1,nil):GetFirst()
end end
Duel.SetTargetCard(tg) Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
......
local cm,m = GetID()
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddCodeList(c,56433456)
aux.AddLinkProcedure(c,function(c) return c:IsSummonType(SUMMON_TYPE_NORMAL) and c:IsRace(RACE_FAIRY) end,1,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.con)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_NEGATED)
ge1:SetLabelObject(c)
ge1:SetOperation(cm.opp)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
ge2:SetOperation(cm.oop)
Duel.RegisterEffect(ge2,0)
end
function cm.opp(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetLabelObject()
if eg:IsContains(c) then
Duel.Win(1-c:GetOwner(),WIN_REAOSN_X)
end
end
function cm.oop(e,tp,eg,ep,ev,re,r,rp)
if not eg:IsContains(e:GetLabelObject()) then return end
local e1 = e:Clone()
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g,c = Duel.GetFieldGroup(tp,LOCATION_ONFIELD,LOCATION_ONFIELD),e:GetLabelObject()
if not g:IsContains(c) then
Duel.Win(1-c:GetOwner(),WIN_REAOSN_X)
end
end)
Duel.RegisterEffect(e1,tp)
e:Reset()
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.f(c)
return c:IsAbleToRemove() and c:IsCode(56433456)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.f,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE+LOCATION_ONFIELD,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g = g:Select(tp,1,99,nil)
local x = Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if x==0 then return end
local co = coroutine:create(cm.ef)
for i=1,x do
co:resume(e:GetHandler())
end
end
function cm.ef(co,c)
if not co[3] then
aux.EnableChangeCode(c,56433456,LOCATION_ONFIELD)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_ONFIELD)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnPlayer()==tp then
Duel.Recover(tp,777,REASON_EFFECT)
else
Duel.Recover(tp,613,REASON_EFFECT)
end
end)
c:RegisterEffect(e1)
co:yield()
elseif co[3]==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e2:SetValue(aux.imval1)
c:RegisterEffect(e2)
co:yield()
elseif co[3]==2 then
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCountLimit(1)
e1:SetTarget(cm.tg2)
e1:SetOperation(cm.op2)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(cm.con2)
e2:SetTarget(cm.tg3)
e2:SetOperation(cm.op3)
c:RegisterEffect(e2)
end
end
function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_ONFIELD,0,e:GetHandler(),56433456):FilterCount(Card.IsFaceup,nil)>0
end
function cm.f2(c)
return c:IsSSetable() and c:IsType(TYPE_COUNTER)
end
function cm.tg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.f2,tp,LOCATION_DECK,0,1,nil) end
end
function cm.op3(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
local g=Duel.GetMatchingGroup(cm.f2,tp,LOCATION_DECK,0,nil)
local ct = #g>=ft and ft or #g<ft and #g
if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,ct,ct,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
function cm.f1(c,e,tp)
return c:IsRace(RACE_FAIRY) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sg=Duel.GetMatchingGroup(cm.f1,tp,LOCATION_HAND,0,nil,e,tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cm.ff(chkc) end
if chk==0 then return Duel.IsExistingTarget(cm.ff,tp,LOCATION_GRAVE,0,1,nil) and #sg>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.ff,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(cm.f1,tp,LOCATION_DECK,0,nil,e,tp)
if tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
g = g:Select(tp,1,1,nil)
if not g then return end
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_DECK)
c:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
Duel.SSet(tp,tc)
end
end
function cm.ff(c)
return c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
if not coroutine then
coroutine = { }
coroutine.__index = coroutine
coroutine.c_table = { }
__cotype = type
function type(x)
if getmetatable(x) == coroutine then return "thread"
else return __cotype(x) end
end
function coroutine:create(co)
co = {co}
setmetatable(co,coroutine)
table.insert(coroutine.c_table,co)
return co
end
function coroutine.get(...)
for _,v in ipairs(coroutine.c_table) do
if v.running then return v end
end
return
end
function coroutine:resume(...)
local co = self
local t = {...}
if type(co) =="thread" and type(co[2]) == "table" then
for _,v in ipairs(co[2]) do
table.insert(t,v)
end
end
co.running = true
co.supended = false
if co.status() == "dead" then return false
else return co[1](self,table.unpack(t)) end
end
function coroutine:yield(...)
local co=self
if not co[2] then co[2]= { } end
local t = {...}
for _,v in ipairs(t) do
table.insert(co[2],v)
end
co.supended = true
co.running = false
co[3] = co[3] and co[3] + 1 or 1
return true
end
function coroutine_ck(co)
for _,v in ipairs(coroutine.c_table) do
if v.running and not co.running and not co.dead then return true end
end
return false
end
function coroutine:status()
local co = self
if type(co) ~= "thread" then return false end
if co.supended or not (co.running and co.dead and not coroutine_ck(co)) then return "suspended"
elseif co.running then return "running"
elseif co.dead then return "dead"
else return "normal" end
end
end
\ No newline at end of file
...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,11 +48,11 @@ function c23756165.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.GoldenAllureQueenCondition(c,tp)
end end
function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c23756165.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.GoldenAllureQueenCondition(c,tp)
end end
function c23756165.filter(c) function c23756165.filter(c)
return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(5) and c:IsFaceup() and c:IsAbleToChangeControler()
...@@ -78,7 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -78,7 +78,7 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -99,7 +99,7 @@ function c23756165.repval(e,re,r,rp) ...@@ -99,7 +99,7 @@ function c23756165.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp) function c23756165.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id) return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN)
end end
function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c23756165.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
--魅惑の宮殿
local s,id,o=GetID()
function s.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--update atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_SPELLCASTER))
e2:SetValue(500)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.spcost)
e4:SetTarget(s.sptg)
e4:SetOperation(s.spop)
--grant effect
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(s.eftg)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
--search or spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_SZONE)
e6:SetCountLimit(3,id)
e6:SetCost(s.thcost)
e6:SetTarget(s.thtg)
e6:SetOperation(s.thop)
c:RegisterEffect(e6)
end
function s.costfilter(c,code)
return c:GetFlagEffect(code)~=0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) end
Duel.SendtoGrave(c,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsAttackBelow(1500) and c:IsRace(RACE_SPELLCASTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp,e:GetHandler():GetCode()) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.eftg(e,c)
return c:IsType(TYPE_EFFECT) and c:IsSetCard(0x3)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function s.thfilter(c,e,tp)
if not (c:IsSetCard(0x3) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,11 +36,11 @@ function c50140163.regop(e,tp,eg,ep,ev,re,r,rp)
end end
function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and not aux.GoldenAllureQueenCondition(c,tp)
end end
function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c50140163.eqcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,id) and Duel.IsPlayerAffectedByEffect(tp,95937545) return c:GetFlagEffect(id+1)>0 and not aux.IsSelfEquip(c,FLAG_ID_ALLURE_QUEEN) and aux.GoldenAllureQueenCondition(c,tp)
end end
function c50140163.filter(c) function c50140163.filter(c)
return c:IsAbleToChangeControler() return c:IsAbleToChangeControler()
...@@ -66,7 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
if def<0 then def=0 end if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
......
--魅惑の舞
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,31322640)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
--update atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(s.atktg)
e2:SetValue(s.val)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,id+o)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
end
function s.filter(c)
return (c:IsSetCard(0x3) and c:IsType(TYPE_MONSTER) or c:IsCode(31322640)) and c:IsAbleToHand()
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function s.atkfilter(c,code)
return c:IsFaceup() and bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_MONSTER
and c:GetFlagEffect(code)~=0
end
function s.atktg(e,c)
return c:IsSetCard(0x3)
end
function s.val(e,c)
local g=c:GetEquipGroup():Filter(s.atkfilter,nil,FLAG_ID_ALLURE_QUEEN)
if g:GetCount()>0 then
return g:GetSum(Card.GetBaseAttack)
else
return 0
end
end
function s.spcfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(s.spcfilter,tp,LOCATION_ONFIELD,0,1,c,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.spcfilter,tp,LOCATION_ONFIELD,0,1,1,c,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function s.sfilter(c,e,tp)
return c:IsSetCard(0x3) 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.IsExistingMatchingCard(s.sfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.sfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
local ft=math.min(Duel.GetLocationCount(tp,LOCATION_MZONE),g:GetClassCount(Card.GetCode))
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,ft,ft)
if sg then Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) end
end
\ No newline at end of file
...@@ -34,10 +34,10 @@ function c87257460.initial_effect(c) ...@@ -34,10 +34,10 @@ function c87257460.initial_effect(c)
end end
c87257460.lvup={23756165} c87257460.lvup={23756165}
function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon1(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsSelfEquip(e:GetHandler(),id) and not Duel.IsPlayerAffectedByEffect(tp,95937545) return not aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN) and not aux.GoldenAllureQueenCondition(e:GetHandler(),tp)
end end
function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp) function c87257460.eqcon2(e,tp,eg,ep,ev,re,r,rp)
return not aux.IsSelfEquip(e:GetHandler(),id) and Duel.IsPlayerAffectedByEffect(tp,95937545) return not aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN) and aux.GoldenAllureQueenCondition(e:GetHandler(),tp)
end end
function c87257460.filter(c) function c87257460.filter(c)
return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler() return c:IsLevelBelow(3) and c:IsFaceup() and c:IsAbleToChangeControler()
...@@ -59,7 +59,7 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
...@@ -80,7 +80,7 @@ function c87257460.repval(e,re,r,rp) ...@@ -80,7 +80,7 @@ function c87257460.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0 return bit.band(r,REASON_BATTLE)~=0
end end
function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp) function c87257460.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),id) return Duel.GetTurnPlayer()==tp and aux.IsSelfEquip(e:GetHandler(),FLAG_ID_ALLURE_QUEEN)
end end
function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c87257460.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
--min/max value
MIN_ID =128 --0x80, by DataManager::GetDesc()
MAX_ID =268435455 --28 bits, by DataManager::GetDesc()
MAX_COUNTER =65535 --max number for adding/removing counters, by card::add_counter(), field::remove_counter()
MAX_PARAMETER =0xffff
--Locations 区域
LOCATION_DECK =0x01 --卡组
LOCATION_HAND =0x02 --手牌
LOCATION_MZONE =0x04 --主要怪兽区(0-4)+额外怪兽区(5-6)
LOCATION_SZONE =0x08 --魔陷区(0-4)+场地区(5)
LOCATION_GRAVE =0x10 --墓地
LOCATION_REMOVED =0x20 --除外区
LOCATION_EXTRA =0x40 --额外
LOCATION_OVERLAY =0x80 --超量素材
LOCATION_ONFIELD =0x0c --场上(LOCATION_MZONE+LOCATION_SZONE)
--Locations (for redirect) 若在重定向类效果中仅指定LOCATION_DECK则为弹回卡组顶部
LOCATION_DECKBOT =0x10001 --弹回卡组底部
LOCATION_DECKSHF =0x20001 --弹回卡组并洗牌
--Sequences (for Duel.SendtoDeck)
SEQ_DECKTOP =0 --弹回卡组顶端
SEQ_DECKBOTTOM =1 --弹回卡组底端
SEQ_DECKSHUFFLE =2 --弹回卡组并洗牌(洗牌前暂时放在底端)
--Locations of spell cards
LOCATION_FZONE =0x100 --场地区
LOCATION_PZONE =0x200 --灵摆区
--Positions 表示形式
POS_FACEUP_ATTACK =0x1 --表侧攻击
POS_FACEDOWN_ATTACK =0x2 --(reserved)
POS_FACEUP_DEFENSE =0x4 --表侧守备
POS_FACEDOWN_DEFENSE =0x8 --里侧守备
POS_FACEUP =0x5 --正面表示
POS_FACEDOWN =0xa --背面表示
POS_ATTACK =0x3 --攻击表示
POS_DEFENSE =0xc --守备表示
NO_FLIP_EFFECT =0x10000--不发动反转效果
--Types 卡片类型
TYPE_MONSTER =0x1 --怪兽卡
TYPE_SPELL =0x2 --魔法卡
TYPE_TRAP =0x4 --陷阱卡
TYPE_NORMAL =0x10 --通常怪兽
TYPE_EFFECT =0x20 --效果
TYPE_FUSION =0x40 --融合
TYPE_RITUAL =0x80 --仪式
TYPE_TRAPMONSTER =0x100 --陷阱怪兽
TYPE_SPIRIT =0x200 --灵魂
TYPE_UNION =0x400 --同盟
TYPE_DUAL =0x800 --二重
TYPE_TUNER =0x1000 --调整
TYPE_SYNCHRO =0x2000 --同调
TYPE_TOKEN =0x4000 --衍生物
TYPE_QUICKPLAY =0x10000 --速攻
TYPE_CONTINUOUS =0x20000 --永续
TYPE_EQUIP =0x40000 --装备
TYPE_FIELD =0x80000 --场地
TYPE_COUNTER =0x100000 --反击
TYPE_FLIP =0x200000 --翻转
TYPE_TOON =0x400000 --卡通
TYPE_XYZ =0x800000 --超量
TYPE_PENDULUM =0x1000000 --灵摆
TYPE_SPSUMMON =0x2000000 --特殊召唤
TYPE_LINK =0x4000000 --连接
--组合类型
TYPES_TOKEN_MONSTER =0x4011
TYPES_NORMAL_TRAP_MONSTER =0x111
TYPES_EFFECT_TRAP_MONSTER =0x121
--Attributes 属性
ATTRIBUTE_ALL =0x7f --All
ATTRIBUTE_EARTH =0x01 --地
ATTRIBUTE_WATER =0x02 --水
ATTRIBUTE_FIRE =0x04 --炎
ATTRIBUTE_WIND =0x08 --风
ATTRIBUTE_LIGHT =0x10 --光
ATTRIBUTE_DARK =0x20 --暗
ATTRIBUTE_DIVINE =0x40 --神
--Races 种族
RACE_ALL =0x3ffffff --全种族
RACE_WARRIOR =0x1 --战士
RACE_SPELLCASTER =0x2 --魔法师
RACE_FAIRY =0x4 --天使
RACE_FIEND =0x8 --恶魔
RACE_ZOMBIE =0x10 --不死
RACE_MACHINE =0x20 --机械
RACE_AQUA =0x40 --水
RACE_PYRO =0x80 --炎
RACE_ROCK =0x100 --岩石
RACE_WINDBEAST =0x200 --鸟兽
RACE_PLANT =0x400 --植物
RACE_INSECT =0x800 --昆虫
RACE_THUNDER =0x1000 --雷
RACE_DRAGON =0x2000 --龙
RACE_BEAST =0x4000 --兽
RACE_BEASTWARRIOR =0x8000 --兽战士
RACE_DINOSAUR =0x10000 --恐龙
RACE_FISH =0x20000 --鱼
RACE_SEASERPENT =0x40000 --海龙
RACE_REPTILE =0x80000 --爬虫类
RACE_PSYCHO =0x100000 --念动力
RACE_DIVINE =0x200000 --幻神兽
RACE_CREATORGOD =0x400000 --创造神
RACE_WYRM =0x800000 --幻龙
RACE_CYBERSE =0x1000000 --电子界
RACE_ILLUSION =0x2000000 --幻想魔
--Reason 卡片到当前位置的原因
REASON_DESTROY =0x1 --破坏
REASON_RELEASE =0x2 --解放
REASON_TEMPORARY =0x4 --暂时
REASON_MATERIAL =0x8 --作为融合/同调/超量素材或用於儀式/升級召喚
REASON_SUMMON =0x10 --召唤
REASON_BATTLE =0x20 --战斗破坏
REASON_EFFECT =0x40 --效果
REASON_COST =0x80 --用於代價或無法支付代價而破壞
REASON_ADJUST =0x100 --调整(御前试合)
REASON_LOST_TARGET =0x200 --失去装备对象
REASON_RULE =0x400 --规则
REASON_SPSUMMON =0x800 --特殊召唤
REASON_DISSUMMON =0x1000 --召唤失败
REASON_FLIP =0x2000 --翻转
REASON_DISCARD =0x4000 --丢弃
REASON_RDAMAGE =0x8000 --回復轉換後的傷害
REASON_RRECOVER =0x10000 --傷害轉換後的回復
REASON_RETURN =0x20000 --回到墓地
REASON_FUSION =0x40000 --用於融合召喚
REASON_SYNCHRO =0x80000 --用於同调召喚
REASON_RITUAL =0x100000 --用於仪式召喚
REASON_XYZ =0x200000 --用於超量召喚
REASON_REPLACE =0x1000000 --代替
REASON_DRAW =0x2000000 --抽卡
REASON_REDIRECT =0x4000000 --改变去向(大宇宙,带菌等)
REASON_REVEAL =0x8000000 --翻开卡组(森罗)
REASON_LINK =0x10000000 --用于连接召唤
REASON_LOST_OVERLAY =0x20000000 --超量素材随着超量怪兽离场
REASON_MAINTENANCE =0x40000000 --维持代价
REASON_ACTION =0x80000000 --攻击宣言之际等
--Location Reason
LOCATION_REASON_TOFIELD =0x1 --Duel.GetLocationCount()預設值,凱薩競技場
LOCATION_REASON_CONTROL =0x2 --Card.IsControlerCanBeChanged()使用
--Summon Type --召唤类型
SUMMON_TYPE_NORMAL =0x10000000 --通常召唤(EFFECT_SUMMON_PROC,EFFECT_SET_PROC 可用Value修改數值)
SUMMON_TYPE_ADVANCE =0x11000000 --上级召唤
SUMMON_TYPE_DUAL =0x12000000 --再度召唤(二重)
SUMMON_TYPE_FLIP =0x20000000 --翻转召唤
SUMMON_TYPE_SPECIAL =0x40000000 --特殊召唤(EFFECT_SPSUMMON_PROC,EFFECT_SPSUMMON_PROC_G 可用Value修改數值)
SUMMON_TYPE_FUSION =0x43000000 --融合召唤
SUMMON_TYPE_RITUAL =0x45000000 --仪式召唤
SUMMON_TYPE_SYNCHRO =0x46000000 --同调召唤
SUMMON_TYPE_XYZ =0x49000000 --超量召唤
SUMMON_TYPE_PENDULUM =0x4a000000 --灵摆召唤
SUMMON_TYPE_LINK =0x4c000000 --连接召唤
--Summon Value --特定的召唤方式
SUMMON_VALUE_SELF =0x1 --自身效果或条件
SUMMON_VALUE_SYNCHRO_MATERIAL =0x11 --特殊召唤并作为同调素材(黑羽-东云之东风检查)
SUMMON_VALUE_DARK_SANCTUARY =0x12 --暗黑圣域
SUMMON_VALUE_MONSTER_REBORN =0x13 --死者苏生(千年的启示)
SUMMON_VALUE_MASK_CHANGE =0x14 --
SUMMON_VALUE_ASSAULT_MODE =0x15 --
SUMMON_VALUE_LV =0x1000 --对应LV怪兽的效果
SUMMON_VALUE_GLADIATOR =0x2000 --剑斗兽
SUMMON_VALUE_EVOLTILE =0x4000 --进化虫
SUMMON_VALUE_DARK_FUSION =SUMMON_TYPE_FUSION|0x16 --
SUMMON_VALUE_FOSSIL_FUSION =SUMMON_TYPE_FUSION|0x17 --
SUMMON_VALUE_FUTURE_FUSION =SUMMON_TYPE_FUSION|0x18 --
--Status --卡片当前状态
STATUS_DISABLED =0x0001 --效果被无效
STATUS_TO_ENABLE =0x0002 --将变成有效
STATUS_TO_DISABLE =0x0004 --将变成无效
STATUS_PROC_COMPLETE =0x0008 --完成正规召唤(解除苏生限制)
STATUS_SET_TURN =0x0010 --在本回合覆盖
STATUS_NO_LEVEL =0x0020 --无等级
STATUS_BATTLE_RESULT =0x0040 --傷害計算結果預計要破壞的怪獸
STATUS_SPSUMMON_STEP =0x0080 --效果特召處理中
STATUS_FORM_CHANGED =0x0100 --改变过表示形式
STATUS_SUMMONING =0x0200 --召唤中
STATUS_EFFECT_ENABLED =0x0400 --卡片準備就緒(不在移動、召喚、魔法陷阱發動中)
STATUS_SUMMON_TURN =0x0800 --在本回合召喚/SET
STATUS_DESTROY_CONFIRMED =0x1000 --预定被破坏
STATUS_LEAVE_CONFIRMED =0x2000 --連鎖處理完後送去墓地的魔法陷阱
STATUS_BATTLE_DESTROYED =0x4000 --战斗破坏确定後尚未移動
STATUS_COPYING_EFFECT =0x8000 --正在复制效果
STATUS_CHAINING =0x10000 --正在連鎖串中
STATUS_SUMMON_DISABLED =0x20000 --召唤无效後尚未移動
STATUS_ACTIVATE_DISABLED =0x40000 --发动无效後尚未移動
STATUS_EFFECT_REPLACED =0x80000 --效果被替代(红莲霸权)
STATUS_FUTURE_FUSION =0x100000 --未来融合特殊召唤(不触发融合素材效果)
STATUS_ATTACK_CANCELED =0x200000 --若其為攻擊者,則攻擊中止
STATUS_INITIALIZING =0x400000 --正在初始化
STATUS_TO_HAND_WITHOUT_CONFIRM =0x800000 --非公开的卡被效果加入手卡但未给对方确认
STATUS_JUST_POS =0x1000000 --已改變表示形式(用於STATUS_CONTINUOUS_POS判定)
STATUS_CONTINUOUS_POS =0x2000000 --改變後再次設定成其他表示形式
STATUS_FORBIDDEN =0x4000000 --不能play
STATUS_ACT_FROM_HAND =0x8000000 --從手牌发动
STATUS_OPPO_BATTLE =0x10000000 --和對手的怪兽戰鬥
STATUS_FLIP_SUMMON_TURN =0x20000000 --在本回合反转召唤
STATUS_SPSUMMON_TURN =0x40000000 --在本回合特殊召唤
--Assume
ASSUME_CODE =1
ASSUME_TYPE =2
ASSUME_LEVEL =3
ASSUME_RANK =4
ASSUME_ATTRIBUTE =5
ASSUME_RACE =6
ASSUME_ATTACK =7
ASSUME_DEFENSE =8
--Link Marker
LINK_MARKER_BOTTOM_LEFT =0x001 -- ↙
LINK_MARKER_BOTTOM =0x002 -- ↓
LINK_MARKER_BOTTOM_RIGHT =0x004 -- ↘
LINK_MARKER_LEFT =0x008 -- ←
LINK_MARKER_RIGHT =0x020 -- →
LINK_MARKER_TOP_LEFT =0x040 -- ↖
LINK_MARKER_TOP =0x080 -- ↑
LINK_MARKER_TOP_RIGHT =0x100 -- ↗
--Counter --指示物
COUNTER_WITHOUT_PERMIT =0x1000 --可以放置在非特定對象的指示物
COUNTER_NEED_ENABLE =0x2000 --N/A
--Phase --阶段
PHASE_DRAW =0x01 --抽卡阶段
PHASE_STANDBY =0x02 --准备阶段
PHASE_MAIN1 =0x04 --主要阶段1
PHASE_BATTLE_START =0x08 --战斗阶段开始
PHASE_BATTLE_STEP =0x10 --战斗步驟
PHASE_DAMAGE =0x20 --伤害步驟
PHASE_DAMAGE_CAL =0x40 --伤害计算时
PHASE_BATTLE =0x80 --战斗阶段結束
PHASE_MAIN2 =0x100 --主要阶段2
PHASE_END =0x200 --结束阶段
--Player --玩家
PLAYER_NONE =2 --2个玩家都不是
PLAYER_ALL =3 --2个玩家都是
--Chain info --连锁信息
CHAININFO_CHAIN_COUNT =0x01 --连锁数
CHAININFO_TRIGGERING_EFFECT =0x02 --连锁的效果
CHAININFO_TRIGGERING_PLAYER =0x04 --连锁的玩家
CHAININFO_TRIGGERING_CONTROLER =0x08 --连锁的卡的控制者
CHAININFO_TRIGGERING_LOCATION =0x10 --连锁的位置
CHAININFO_TRIGGERING_SEQUENCE =0x20 --连锁的位置的编号(指怪兽和魔陷区的格子)
CHAININFO_TARGET_CARDS =0x40 --连锁的效果的对象(以下3个需要在target函数里设置)
CHAININFO_TARGET_PLAYER =0x80 --连锁的效果的对象(玩家)
CHAININFO_TARGET_PARAM =0x100 --连锁的效果的参数值
CHAININFO_DISABLE_REASON =0x200 --无效的原因效果
CHAININFO_DISABLE_PLAYER =0x400 --无效的玩家
CHAININFO_CHAIN_ID =0x800 --连锁ID
CHAININFO_TYPE =0x1000 --连锁类型
CHAININFO_EXTTYPE =0x2000 --连锁额外类型
CHAININFO_TRIGGERING_POSITION =0x4000 --连锁发生时的表示形式
CHAININFO_TRIGGERING_CODE =0x8000 --连锁发生时的密码
CHAININFO_TRIGGERING_CODE2 =0x10000 --连锁发生时的其他密码
CHAININFO_TRIGGERING_LEVEL =0x40000 --连锁发生时的等级
CHAININFO_TRIGGERING_RANK =0x80000 --连锁发生时的阶级
CHAININFO_TRIGGERING_ATTRIBUTE =0x100000 --连锁发生时的属性
CHAININFO_TRIGGERING_RACE =0x200000 --连锁发生时的种族
CHAININFO_TRIGGERING_ATTACK =0x400000 --连锁发生时的攻击力
CHAININFO_TRIGGERING_DEFENSE =0x800000 --连锁发生时的守备力
--Summon info
SUMMON_INFO_CODE =0x01
SUMMON_INFO_CODE2 =0x02
SUMMON_INFO_TYPE =0x04
SUMMON_INFO_LEVEL =0x08
SUMMON_INFO_RANK =0x10
SUMMON_INFO_ATTRIBUTE =0x20
SUMMON_INFO_RACE =0x40
SUMMON_INFO_ATTACK =0x80
SUMMON_INFO_DEFENSE =0x100
SUMMON_INFO_REASON_EFFECT =0x200
SUMMON_INFO_REASON_PLAYER =0x400
--========== Reset ========== --重置条件(注意:重置条件可以多个相加)
RESET_SELF_TURN =0x10000000 --自己回合的階段重置
RESET_OPPO_TURN =0x20000000 --对方回合的階段重置
RESET_PHASE =0x40000000 --阶段结束重置(一般和上面那些阶段配合使用)
RESET_CHAIN =0x80000000 --连锁结束重置
RESET_EVENT =0x1000 --指定的條件下重置(一般和下面这些事件配合使用)
RESET_CARD =0x2000 --重置Owner為指定卡片的效果
RESET_CODE =0x4000 --重置指定Code的single效果(不含EFFECT_FLAG_SINGLE_RANGE)
RESET_COPY =0x8000 --重置以复制取得的效果
RESET_DISABLE =0x00010000 --效果无效重置(只適用於owner==handler的效果)
RESET_TURN_SET =0x00020000 --变里侧重置(皆為事件觸發前重置)
RESET_TOGRAVE =0x00040000 --去墓地重置
RESET_REMOVE =0x00080000 --除外重置
RESET_TEMP_REMOVE =0x00100000 --暂时除外重置
RESET_TOHAND =0x00200000 --回手牌或加入手牌重置
RESET_TODECK =0x00400000 --回卡组重置
RESET_LEAVE =0x00800000 --从怪兽区或魔法区到不同区域
RESET_TOFIELD =0x01000000 --除了返回场上以外,从不同区域移动到怪兽区或魔法区
RESET_CONTROL =0x02000000 --控制者变更重置
RESET_OVERLAY =0x04000000 --超量叠放重置
RESET_MSCHANGE =0x08000000 --从怪兽区到魔法区,或者从魔法区到怪兽区(move_to_field()、寶玉獸)
----组合时点
RESETS_STANDARD =0x1fe0000 --RESET_TOFIELD+RESET_LEAVE+RESET_TODECK+RESET_TOHAND+RESET_TEMP_REMOVE+RESET_REMOVE+RESET_TOGRAVE+RESET_TURN_SET
RESETS_REDIRECT =0xc7e0000 --RESETS_STANDARD+RESET_OVERLAY+RESET_MSCHANGE-RESET_TOFIELD-RESET_LEAVE (EFFECT_LEAVE_FIELD_REDIRECT)
RESETS_WITHOUT_TEMP_REMOVE =0x56e0000 --RESETS_STANDARD-RESET_TEMP_REMOVE-RESET_LEAVE+RESET_OVERLAY
--========== Types ========== --效果类型(定义效果触发类型,和codes一起使用)
EFFECT_TYPE_SINGLE =0x0001 --自己状态变化时触发
EFFECT_TYPE_FIELD =0x0002 --场上所有卡状态变化时触发
EFFECT_TYPE_EQUIP =0x0004 --装备效果
EFFECT_TYPE_ACTIONS =0x0008 --触发型,以下類型會自動添加此屬性(对峙的G)
EFFECT_TYPE_ACTIVATE =0x0010 --魔陷发动
EFFECT_TYPE_FLIP =0x0020 --翻转效果
EFFECT_TYPE_IGNITION =0x0040 --起动效果
EFFECT_TYPE_TRIGGER_O =0x0080 --诱发选发效果
EFFECT_TYPE_QUICK_O =0x0100 --诱发即时效果
EFFECT_TYPE_TRIGGER_F =0x0200 --诱发必发效果
EFFECT_TYPE_QUICK_F =0x0400 --诱发即时必发效果(熊猫龙等)
EFFECT_TYPE_CONTINUOUS =0x0800 --由事件觸發的輔助用效果/永續效果
EFFECT_TYPE_XMATERIAL =0x1000 --作为超量素材时超量怪兽获得的效果(十二兽)
EFFECT_TYPE_GRANT =0x2000 --使其他卡片获得效果(天气模样)
EFFECT_TYPE_TARGET =0x4000 --影响持续取的对象的效果(基本只用于魔陷)
--========== Flags ========== --效果的特殊性质
EFFECT_FLAG_INITIAL =0x0001 --可以发动的
EFFECT_FLAG_FUNC_VALUE =0x0002 --此效果的Value属性是函数
EFFECT_FLAG_COUNT_LIMIT =0x0004 --发动次数限制
EFFECT_FLAG_FIELD_ONLY =0x0008 --此效果是注册给全局环境的
EFFECT_FLAG_CARD_TARGET =0x0010 --取对象效果
EFFECT_FLAG_IGNORE_RANGE =0x0020 --影响所有区域的卡(大宇宙)
EFFECT_FLAG_ABSOLUTE_TARGET =0x0040 --Target Range固定為某個玩家的視角所見的自己/對方(SetAbsoluteRange()專用)
EFFECT_FLAG_IGNORE_IMMUNE =0x0080 --无视效果免疫
EFFECT_FLAG_SET_AVAILABLE =0x0100 --裡側狀態可發動的效果、影响场上里侧的卡的永續型效果
EFFECT_FLAG_CAN_FORBIDDEN =0x0200 --可被禁止令停止適用的效果(與EFFECT_FLAG_CANNOT_DISABLE並用)
EFFECT_FLAG_CANNOT_DISABLE =0x0400 --效果不会被无效
EFFECT_FLAG_PLAYER_TARGET =0x0800 --含有"以玩家为对象"的特性(精靈之鏡)、影響玩家的永續型效果(SetTargetRange()改成指定玩家)
EFFECT_FLAG_BOTH_SIDE =0x1000 --双方都能使用(部分场地,弹压)
EFFECT_FLAG_COPY_INHERIT =0x2000 --若由复制的效果產生則继承其Reset属性
EFFECT_FLAG_DAMAGE_STEP =0x4000 --可以在伤害步骤发动
EFFECT_FLAG_DAMAGE_CAL =0x8000 --可以在伤害计算时发动
EFFECT_FLAG_DELAY =0x10000 --場合型誘發效果、用於永續效果的EFFECT_TYPE_CONTINUOUS
EFFECT_FLAG_SINGLE_RANGE =0x20000 --只对自己有效
EFFECT_FLAG_UNCOPYABLE =0x40000 --不能复制的原始效果(效果外文本)
EFFECT_FLAG_OATH =0x80000 --誓约效果
EFFECT_FLAG_SPSUM_PARAM =0x100000 --指定召喚/规则特殊召唤的位置和表示形式(熔岩魔神)
EFFECT_FLAG_REPEAT =0x200000 --N/A
EFFECT_FLAG_NO_TURN_RESET =0x400000 --发条等“这张卡在场上只能发动一次”的效果
EFFECT_FLAG_EVENT_PLAYER =0x800000 --发动/处理效果的玩家为触发事件的玩家而不是卡片的持有者,如仪式魔人,万魔殿
EFFECT_FLAG_OWNER_RELATE =0x1000000 --与效果owner关联的效果
EFFECT_FLAG_CANNOT_INACTIVATE =0x2000000 --發動不會被無效
EFFECT_FLAG_CLIENT_HINT =0x4000000 --客户端提示
EFFECT_FLAG_CONTINUOUS_TARGET =0x8000000 --建立持續對象的永續魔法/永續陷阱/早埋系以外的裝備魔法卡
EFFECT_FLAG_LIMIT_ZONE =0x10000000 --限制魔法·陷阱卡发动时可以放置的区域
EFFECT_FLAG_ACTIVATE_CONDITION =0x20000000 --诱发效果即将发动时检查条件(手卡诱发之外的无此标记的诱发效果为触发事件时检查)
EFFECT_FLAG_CVAL_CHECK =0x40000000 --N/A
EFFECT_FLAG_IMMEDIATELY_APPLY =0x80000000 --卡在发动时效果就立即适用
EFFECT_FLAG2_REPEAT_UPDATE =0x0001 --最后计算的攻击力上升
EFFECT_FLAG2_COF =0x0002 --通常魔法卡在MP1以外发动(邪恶的仪式的特殊处理)
EFFECT_FLAG2_WICKED =0x0004 --神之化身/恐惧之源的攻击力变化最后计算
EFFECT_FLAG2_OPTION =0x0008 --子機
--========== Codes ========== --对永续性效果表示效果类型(EFFECT开头),对诱发型效果表示触发效果的事件/时点(EVENT开头)
EFFECT_IMMUNE_EFFECT =1 --效果免疫
EFFECT_DISABLE =2 --效果无效(技能抽取)
EFFECT_CANNOT_DISABLE =3 --卡的效果不能被无效
EFFECT_SET_CONTROL =4 --设置控制权
EFFECT_CANNOT_CHANGE_CONTROL =5 --不能改变控制权
EFFECT_CANNOT_ACTIVATE =6 --玩家不能发动效果
EFFECT_CANNOT_TRIGGER =7 --卡不能发动效果
EFFECT_DISABLE_EFFECT =8 --效果无效(聖杯)
EFFECT_DISABLE_CHAIN =9 --在連鎖串中無效(processor.cpp)
EFFECT_DISABLE_TRAPMONSTER =10 --陷阱怪兽无效
EFFECT_CANNOT_INACTIVATE =12 --发动不能被无效
EFFECT_CANNOT_DISEFFECT =13 --发动的效果不能被无效
EFFECT_CANNOT_CHANGE_POSITION =14 --不能改变表示形式
EFFECT_TRAP_ACT_IN_HAND =15 --陷阱可以从手牌发动
EFFECT_TRAP_ACT_IN_SET_TURN =16 --陷阱可以在盖放的回合发动
EFFECT_REMAIN_FIELD =17 --X回合内留在场上(光之护封剑等)
EFFECT_MONSTER_SSET =18 --怪兽可以在魔陷区放置
EFFECT_CANNOT_SUMMON =20 --不能召唤怪兽
EFFECT_CANNOT_FLIP_SUMMON =21 --不能翻转召唤怪兽
EFFECT_CANNOT_SPECIAL_SUMMON =22 --不能特殊召唤怪兽
EFFECT_CANNOT_MSET =23 --不能覆盖怪兽
EFFECT_CANNOT_SSET =24 --不能覆盖魔陷
EFFECT_CANNOT_DRAW =25 --不能抽卡
EFFECT_CANNOT_DISABLE_SUMMON =26 --召唤不会无效
EFFECT_CANNOT_DISABLE_SPSUMMON =27 --特殊召唤不会无效
EFFECT_SET_SUMMON_COUNT_LIMIT =28 --设置每回合召唤次数
EFFECT_EXTRA_SUMMON_COUNT =29 --增加召唤(通常召唤)次数
EFFECT_SPSUMMON_CONDITION =30 --特殊召唤条件
EFFECT_REVIVE_LIMIT =31 --有苏生限制的怪獸(Card.EnableReviveLimit())
EFFECT_SUMMON_PROC =32 --召唤规则效果
EFFECT_LIMIT_SUMMON_PROC =33 --召唤规则限制
EFFECT_SPSUMMON_PROC =34 --特殊召唤规则
EFFECT_EXTRA_SET_COUNT =35 --增加盖放(通常召唤)次数
EFFECT_SET_PROC =36 --放置(通常召唤)规则
EFFECT_LIMIT_SET_PROC =37 --放置(通常召唤)规则限制
EFFECT_DIVINE_LIGHT =38 --神圣光辉
EFFECT_CANNOT_DISABLE_FLIP_SUMMON =39 --翻转召唤不会无效
EFFECT_INDESTRUCTABLE =40 --不会被破坏
EFFECT_INDESTRUCTABLE_EFFECT =41 --不会被效果破坏
EFFECT_INDESTRUCTABLE_BATTLE =42 --不会被战斗破坏
EFFECT_UNRELEASABLE_SUM =43 --不能做上级召唤的祭品
EFFECT_UNRELEASABLE_NONSUM =44 --不能做上级召唤以外的祭品
EFFECT_DESTROY_SUBSTITUTE =45 --必選的代替破壞(此卡被破壞時用其他卡代替)
EFFECT_CANNOT_RELEASE =46 --不能进行解放行为
EFFECT_INDESTRUCTABLE_COUNT =47 --一回合几次不会被破坏
EFFECT_UNRELEASABLE_EFFECT =48 --不能被解放
EFFECT_DESTROY_REPLACE =50 --可選的代替破壞(將破壞改成其他動作)
EFFECT_RELEASE_REPLACE =51 --代替解放
EFFECT_SEND_REPLACE =52 --可以不送去XX而送去OO(甜点城堡等)
EFFECT_CANNOT_DISCARD_HAND =55 --不能丢弃手牌
EFFECT_CANNOT_DISCARD_DECK =56 --不能把卡组的卡送去墓地
EFFECT_CANNOT_USE_AS_COST =57 --不能作为COST使用
EFFECT_CANNOT_PLACE_COUNTER =58 --不能放置counter
EFFECT_CANNOT_TO_GRAVE_AS_COST =59 --不能作为COST送去墓地
EFFECT_LEAVE_FIELD_REDIRECT =60 --离场时重新指定去向
EFFECT_TO_HAND_REDIRECT =61 --回手牌时重新指定去向
EFFECT_TO_DECK_REDIRECT =62 --回卡组时重新指定去向
EFFECT_TO_GRAVE_REDIRECT =63 --去墓地时重新指定去向
EFFECT_REMOVE_REDIRECT =64 --除外时重新指定去向
EFFECT_CANNOT_TO_HAND =65 --不能加入手牌
EFFECT_CANNOT_TO_DECK =66 --不能回卡组
EFFECT_CANNOT_REMOVE =67 --不能除外
EFFECT_CANNOT_TO_GRAVE =68 --不能去墓地
EFFECT_CANNOT_TURN_SET =69 --不能变里侧
EFFECT_CANNOT_BE_BATTLE_TARGET =70 --不能成为攻击对象
EFFECT_CANNOT_BE_EFFECT_TARGET =71 --不能成为效果对象
EFFECT_IGNORE_BATTLE_TARGET =72 --不能成为攻击对象-鶸型(传说的渔人)
EFFECT_CANNOT_DIRECT_ATTACK =73 --不能直接攻击
EFFECT_DIRECT_ATTACK =74 --可以直接攻击
EFFECT_DUAL_STATUS =75 --二重状态
EFFECT_EQUIP_LIMIT =76 --装备对象限制
EFFECT_DUAL_SUMMONABLE =77 --可以再度召唤
EFFECT_UNION_LIMIT =78 --
EFFECT_REVERSE_DAMAGE =80 --伤害变回复
EFFECT_REVERSE_RECOVER =81 --回复变伤害
EFFECT_CHANGE_DAMAGE =82 --改变伤害数值
EFFECT_REFLECT_DAMAGE =83 --反射伤害
EFFECT_CANNOT_ATTACK =85 --不能攻击
EFFECT_CANNOT_ATTACK_ANNOUNCE =86 --不能攻击宣言
EFFECT_CANNOT_CHANGE_POS_E =87 --不会被卡的效果变成守备表示(攻击性云魔物)
EFFECT_ACTIVATE_COST =90 --发动代价(魔力之枷)
EFFECT_SUMMON_COST =91 --召唤代价
EFFECT_SPSUMMON_COST =92 --特殊召唤代价(暴君龙)
EFFECT_FLIPSUMMON_COST =93 --翻转召唤代价
EFFECT_MSET_COST =94 --怪兽放置代价
EFFECT_SSET_COST =95 --魔陷放置代价
EFFECT_ATTACK_COST =96 --攻击代价(霞之谷猎鹰)
EFFECT_UPDATE_ATTACK =100 --增减攻击力
EFFECT_SET_ATTACK =101 --设置自身攻击力、攻击力变成X特殊召唤、持续改变攻击力
EFFECT_SET_ATTACK_FINAL =102 --暂时改变攻击力(所有置入连锁的效果)
EFFECT_SET_BASE_ATTACK =103 --设置自身原本攻击力、持续改变原本攻击力
EFFECT_UPDATE_DEFENSE =104 --增减守备力
EFFECT_SET_DEFENSE =105 --设置自身守备力、守备力变成X特殊召唤、持续改变守备力
EFFECT_SET_DEFENSE_FINAL =106 --暂时改变守备力(所有置入连锁的效果)
EFFECT_SET_BASE_DEFENSE =107 --设置自身原本守备力、持续改变原本守备力
EFFECT_REVERSE_UPDATE =108 --倒置增减攻击力、防御力(天邪鬼)
EFFECT_SWAP_AD =109 --交换攻守(超級漏洞人)
EFFECT_SWAP_BASE_AD =110 --交换原本攻守
EFFECT_SET_BASE_ATTACK_FINAL =111 --暂时改变原本攻击力
EFFECT_SET_BASE_DEFENSE_FINAL =112 --暂时改变原本防御力
EFFECT_ADD_CODE =113 --增加卡名
EFFECT_CHANGE_CODE =114 --改变卡名
EFFECT_ADD_TYPE =115 --增加卡片种类(types)
EFFECT_REMOVE_TYPE =116 --删除卡片种类
EFFECT_CHANGE_TYPE =117 --改变卡片种类
EFFECT_ADD_RACE =120 --增加种族
EFFECT_REMOVE_RACE =121 --删除种族
EFFECT_CHANGE_RACE =122 --改变种族
EFFECT_ADD_ATTRIBUTE =125 --增加属性
EFFECT_REMOVE_ATTRIBUTE =126 --删除属性
EFFECT_CHANGE_ATTRIBUTE =127 --改变属性
EFFECT_UPDATE_LEVEL =130 --改变等级
EFFECT_CHANGE_LEVEL =131 --设置等级
EFFECT_UPDATE_RANK =132 --改变阶级
EFFECT_CHANGE_RANK =133 --设置阶级
EFFECT_UPDATE_LSCALE =134 --改变左刻度
EFFECT_CHANGE_LSCALE =135 --设置左刻度
EFFECT_UPDATE_RSCALE =136 --改变右刻度
EFFECT_CHANGE_RSCALE =137 --设置右刻度
EFFECT_SET_POSITION =140 --設定表示形式
EFFECT_SELF_DESTROY =141 --不入連鎖的破壞(罪系列等)
EFFECT_SELF_TOGRAVE =142 --不入連鎖的送墓
EFFECT_DOUBLE_TRIBUTE =150 --可以作为2个祭品
EFFECT_DECREASE_TRIBUTE =151 --减少祭品
EFFECT_DECREASE_TRIBUTE_SET =152 --减少放置怪兽的祭品
EFFECT_EXTRA_RELEASE =153 --必須使用的代替解放(灵魂交错)
EFFECT_TRIBUTE_LIMIT =154 --祭品限制
EFFECT_EXTRA_RELEASE_SUM =155 --代替召唤解放(帝王的烈旋)
EFFECT_TRIPLE_TRIBUTE =156 --N/A
EFFECT_ADD_EXTRA_TRIBUTE =157 --增加可使用的祭品(真龙)
EFFECT_EXTRA_RELEASE_NONSUM =158 --代替效果COST的解放(闇黒世界)
EFFECT_PUBLIC =160 --公开手牌
EFFECT_COUNTER_PERMIT =0x10000--允许放置指示物类型
EFFECT_COUNTER_LIMIT =0x20000--允许放置指示物数量
EFFECT_RCOUNTER_REPLACE =0x30000--代替取除指示物
EFFECT_LPCOST_CHANGE =170 --改变生命值代价數值
EFFECT_LPCOST_REPLACE =171 --以其他動作代替生命值代价
EFFECT_SKIP_DP =180 --跳过抽卡阶段
EFFECT_SKIP_SP =181 --跳过准备阶段
EFFECT_SKIP_M1 =182 --跳过主要阶段1
EFFECT_SKIP_BP =183 --跳过战斗阶段
EFFECT_SKIP_M2 =184 --跳过主要阶段2
EFFECT_CANNOT_BP =185 --不能进入战斗阶段
EFFECT_CANNOT_M2 =186 --不能进入主要阶段2
EFFECT_CANNOT_EP =187 --不能进入结束阶段
EFFECT_SKIP_TURN =188 --跳过整个回合
EFFECT_DEFENSE_ATTACK =190 --可以守备表示攻击
EFFECT_MUST_ATTACK =191 --必须攻击
EFFECT_FIRST_ATTACK =192 --必须第一个攻击
EFFECT_ATTACK_ALL =193 --可以攻击所有怪兽
EFFECT_EXTRA_ATTACK =194 --增加攻击次数
EFFECT_MUST_BE_ATTACKED =195 --N/A
EFFECT_ONLY_BE_ATTACKED =196 --只能攻击此卡
EFFECT_ATTACK_DISABLED =197 --攻击已被無效(Duel.NegateAttack()成功的標記)
EFFECT_NO_BATTLE_DAMAGE =200 --不会给对方造成战斗伤害
EFFECT_AVOID_BATTLE_DAMAGE =201 --不会对自己造成战斗伤害
EFFECT_REFLECT_BATTLE_DAMAGE =202 --战斗伤害由对方代为承受
EFFECT_PIERCE =203 --贯穿伤害
EFFECT_BATTLE_DESTROY_REDIRECT =204 --战斗破坏时重新指定去向
EFFECT_BATTLE_DAMAGE_TO_EFFECT =205 --战斗伤害视为效果伤害
EFFECT_BOTH_BATTLE_DAMAGE =206 --战斗伤害由双方承受
EFFECT_ALSO_BATTLE_DAMAGE =207 --对自己的战斗伤害让对方也承受
EFFECT_CHANGE_BATTLE_DAMAGE =208 --改变此卡给予的战斗伤害、改变玩家受到的战斗伤害
EFFECT_TOSS_COIN_REPLACE =220 --重新抛硬币
EFFECT_TOSS_DICE_REPLACE =221 --重新掷骰子
EFFECT_FUSION_MATERIAL =230 --指定融合素材的條件
EFFECT_CHAIN_MATERIAL =231 --改变融合素材选取方法(连锁素材、电子融合支援)
EFFECT_EXTRA_SYNCHRO_MATERIAL =232 --在手卡或对方场上也可以当作自己的同调素材
EFFECT_XYZ_MATERIAL =233 --在对方场上也可以当作自己的超量素材
EFFECT_FUSION_SUBSTITUTE =234 --代替融合素材
EFFECT_CANNOT_BE_FUSION_MATERIAL =235--不能做融合素材
EFFECT_CANNOT_BE_SYNCHRO_MATERIAL =236--不能做同调素材
EFFECT_SYNCHRO_MATERIAL_CUSTOM =237--自定义Tuner的同调过程
EFFECT_CANNOT_BE_XYZ_MATERIAL =238--不能做超量素材
EFFECT_CANNOT_BE_LINK_MATERIAL =239--不能做连接素材
EFFECT_SYNCHRO_LEVEL =240--做同调素材时的等级
EFFECT_RITUAL_LEVEL =241--做仪式祭品时的等级
EFFECT_XYZ_LEVEL =242--做超量素材时的等级
EFFECT_EXTRA_RITUAL_MATERIAL =243--在墓地当做仪式祭品
EFFECT_NONTUNER =244--同调召唤时可以当作调整以外的怪兽(幻影王 幽骑)
EFFECT_OVERLAY_REMOVE_REPLACE =245--代替去除超量素材
EFFECT_SCRAP_CHIMERA =246--废铁奇美拉
EFFECT_TUNE_MAGICIAN_X =247--调弦之魔术师超量素材限制
EFFECT_TUNE_MAGICIAN_F =248--调弦之魔术师融合素材限制
EFFECT_PRE_MONSTER =250 --可存取怪獸的各項數值(Card.AddMonsterAttribute()專用)
EFFECT_MATERIAL_CHECK =251 --检查素材
EFFECT_DISABLE_FIELD =260 --无效区域(扰乱王等)
EFFECT_USE_EXTRA_MZONE =261 --怪兽区域封锁
EFFECT_USE_EXTRA_SZONE =262 --魔法区域封锁
EFFECT_MAX_MZONE =263 --怪獸区格數上限
EFFECT_MAX_SZONE =264 --魔陷区格數上限
EFFECT_MUST_USE_MZONE =265 --必须使用怪兽区的格子
EFFECT_HAND_LIMIT =270 --手牌数量限制
EFFECT_DRAW_COUNT =271 --抽卡阶段的抽卡数
EFFECT_SPIRIT_DONOT_RETURN =280 --灵魂怪兽不返回手牌
EFFECT_SPIRIT_MAYNOT_RETURN =281 --灵魂怪兽可以不返回手牌
EFFECT_CHANGE_ENVIRONMENT =290 --改变场地
EFFECT_NECRO_VALLEY =291 --王家长眠之谷
EFFECT_FORBIDDEN =292 --不能Play(禁止令)
EFFECT_NECRO_VALLEY_IM =293 --不受「王家长眠之谷」的影响
EFFECT_REVERSE_DECK =294 --翻转卡组
EFFECT_REMOVE_BRAINWASHING =295 --洗脑解除
EFFECT_BP_TWICE =296 --2次战斗阶段
EFFECT_UNIQUE_CHECK =297 --場上只能存在1張(Card.SetUniqueOnField()專用)
EFFECT_MATCH_KILL =300 --Match胜利(胜利龙)
EFFECT_SYNCHRO_CHECK =310 --基因组斗士
EFFECT_QP_ACT_IN_NTPHAND =311 --对方回合从自己手卡发动(失乐的圣女)
EFFECT_MUST_BE_SMATERIAL =312 --必须作为同调素材(波动龙 声子龙)
EFFECT_TO_GRAVE_REDIRECT_CB =313 --重新指定去向(寶玉獸)
EFFECT_CHANGE_INVOLVING_BATTLE_DAMAGE =314 --改变此卡的战斗产生的战斗伤害
EFFECT_CHANGE_RANK_FINAL =315 --N/A
EFFECT_MUST_BE_FMATERIAL =316 --必须作为融合素材
EFFECT_MUST_BE_XMATERIAL =317 --必须作为超量素材
EFFECT_MUST_BE_LMATERIAL =318 --必须作为连接素材
EFFECT_SPSUMMON_PROC_G =320 --P召唤规则
EFFECT_SPSUMMON_COUNT_LIMIT =330 --特殊召唤次数限制
EFFECT_LEFT_SPSUMMON_COUNT =331 --剩餘召喚次數(召喚限制網)
EFFECT_CANNOT_SELECT_BATTLE_TARGET =332 --對手不能選擇為攻擊對象
EFFECT_CANNOT_SELECT_EFFECT_TARGET =333 --對手不能選擇為效果對象
EFFECT_ADD_SETCODE =334 --视为「XX」字段的效果
EFFECT_NO_EFFECT_DAMAGE =335 --玩家已受到"效果傷害變成0"的效果影響(只用于检查,实际免伤仍需要EFFECT_CHANGE_DAMAGE等)
EFFECT_UNSUMMONABLE_CARD =336 --N/A
EFFECT_DISABLE_CHAIN_FIELD =337 --N/A
EFFECT_DISCARD_COST_CHANGE =338 --反制陷阱捨棄手牌的代價改變(解放之阿里阿德涅)
EFFECT_HAND_SYNCHRO =339 --用手牌的怪獸當作同步素材
EFFECT_ADD_FUSION_CODE =340 --作为融合素材时可以当作某一卡名(融合识别)
EFFECT_ADD_FUSION_SETCODE =341 --作为融合素材时可以当作某一字段(魔玩具改造)
EFFECT_RISE_TO_FULL_HEIGHT =342 --N/A
EFFECT_ONLY_ATTACK_MONSTER =343 --只能攻擊X
EFFECT_MUST_ATTACK_MONSTER =344 --若攻擊則必須攻擊X
EFFECT_PATRICIAN_OF_DARKNESS =345 --由對手選擇攻擊對象(黑暗貴族)
EFFECT_EXTRA_ATTACK_MONSTER =346 --對怪獸攻擊X次
EFFECT_UNION_STATUS =347 --同盟状态
EFFECT_OLDUNION_STATUS =348 --旧同盟状态
EFFECT_ADD_FUSION_ATTRIBUTE =349 --reserve
EFFECT_REMOVE_FUSION_ATTRIBUTE =350 --reserve
EFFECT_CHANGE_FUSION_ATTRIBUTE =351 --用作融合素材时的属性
EFFECT_EXTRA_FUSION_MATERIAL =352 --增加融合素材(万溶炼金师)
EFFECT_TUNER_MATERIAL_LIMIT =353 --同调素材限制
EFFECT_ADD_LINK_CODE =354 --用作连接素材时的卡名
EFFECT_ADD_LINK_SETCODE =355 --reserve
EFFECT_ADD_LINK_ATTRIBUTE =356 --用作连接素材时的属性
EFFECT_ADD_LINK_RACE =357 --用作连接素材时的种族
EFFECT_EXTRA_LINK_MATERIAL =358 --手卡的连接素材
EFFECT_QP_ACT_IN_SET_TURN =359 --速攻魔法可以在盖放的回合发动
EFFECT_EXTRA_PENDULUM_SUMMON =360 --extra pendulum summon
EFFECT_MATERIAL_LIMIT =361 --
EFFECT_SET_BATTLE_ATTACK =362 --战斗的伤害计算用设置的攻击力进行
EFFECT_SET_BATTLE_DEFENSE =363 --战斗的伤害计算用设置的守备力进行
EFFECT_OVERLAY_RITUAL_MATERIAL =364 --此卡的超量素材也能用于仪式召唤
EFFECT_CHANGE_GRAVE_ATTRIBUTE =365 --墓地的卡将会改变属性(升级转变)
EFFECT_CHANGE_GRAVE_RACE =366 --墓地的卡将会改变种族(升级转变)
EFFECT_ACTIVATION_COUNT_LIMIT =367 --reserve
EFFECT_LIMIT_SPECIAL_SUMMON_POSITION =368 --不能以特定表示形式特殊召唤
EFFECT_TUNER =369 --同调召唤时可以当作调整(百檎龙-苹果鳞虫)
EFFECT_KAISER_COLOSSEUM =370 --皇帝斗技场
EFFECT_REPLACE_DAMAGE =371 --伤害由特定行动代替
EFFECT_FLAG_EFFECT =0x20000000 --标记类效果,即RegisterFlagEffect()创建的效果
--下面是诱发效果的诱发事件、时点 (如果是TYPE_SINGLE则自己发生以下事件后触发,如果TYPE_FIELD则场上任何卡发生以下事件都触发)
EVENT_STARTUP =1000 --N/A
EVENT_FLIP =1001 --翻转时
EVENT_FREE_CHAIN =1002 --自由时点(强脱等,还有昴星团等诱发即时效果)
EVENT_DESTROY =1010 --確定被破壞的卡片移動前
EVENT_REMOVE =1011 --除外时
EVENT_TO_HAND =1012 --加入手牌时
EVENT_TO_DECK =1013 --回卡组时
EVENT_TO_GRAVE =1014 --送去墓地时(不含REASON_RETURN)
EVENT_LEAVE_FIELD =1015 --离场时
EVENT_CHANGE_POS =1016 --表示形式变更时
EVENT_RELEASE =1017 --解放时
EVENT_DISCARD =1018 --丢弃手牌时
EVENT_LEAVE_FIELD_P =1019 --離場的卡片移動前
EVENT_CHAIN_SOLVING =1020 --连锁处理开始时(EVENT_CHAIN_ACTIVATING之後)
EVENT_CHAIN_ACTIVATING =1021 --连锁处理准备中
EVENT_CHAIN_SOLVED =1022 --连锁处理结束时
EVENT_CHAIN_ACTIVATED =1023 --N/A
EVENT_CHAIN_NEGATED =1024 --连锁发动无效时(EVENT_CHAIN_ACTIVATING之後)
EVENT_CHAIN_DISABLED =1025 --连锁效果无效时
EVENT_CHAIN_END =1026 --连锁串结束时
EVENT_CHAINING =1027 --效果发动时
EVENT_BECOME_TARGET =1028 --成为效果对象时
EVENT_DESTROYED =1029 --被破坏时
EVENT_MOVE =1030 --移動卡片(急兔馬)
EVENT_LEAVE_GRAVE =1031 --离开墓地时
EVENT_LEAVE_DECK =1032 --离开卡组或额外卡组时
EVENT_ADJUST =1040 --adjust_all()调整後(御前试合)
EVENT_BREAK_EFFECT =1050 --Duel.BreakEffect()被调用时
EVENT_SUMMON_SUCCESS =1100 --通常召唤成功时
EVENT_FLIP_SUMMON_SUCCESS =1101 --翻转召唤成功时
EVENT_SPSUMMON_SUCCESS =1102 --特殊召唤成功时
EVENT_SUMMON =1103 --召唤之际(怪兽还没上场、神宣等时点)
EVENT_FLIP_SUMMON =1104 --翻转召唤之际
EVENT_SPSUMMON =1105 --特殊召唤之际
EVENT_MSET =1106 --放置怪兽时
EVENT_SSET =1107 --放置魔陷时
EVENT_BE_MATERIAL =1108 --作为同调/超量/连结素材、用于升级召唤的解放、作为仪式/融合召唤的素材
EVENT_BE_PRE_MATERIAL =1109 --将要作为同调/超量/连结素材、用于升级召唤的解放
EVENT_DRAW =1110 --抽卡时
EVENT_DAMAGE =1111 --造成战斗/效果伤害时
EVENT_RECOVER =1112 --回复生命值时
EVENT_PREDRAW =1113 --抽卡阶段通常抽卡前
EVENT_SUMMON_NEGATED =1114 --召唤被无效时
EVENT_FLIP_SUMMON_NEGATED =1115 --反转召唤被无效时
EVENT_SPSUMMON_NEGATED =1116 --特殊召唤被无效时
EVENT_SPSUMMON_SUCCESS_G_P =1117 --EFFECT_SPSUMMON_PROC_G特殊召唤成功前(只能使用EFFECT_TYPE_CONTINUOUS)
EVENT_CONTROL_CHANGED =1120 --控制权变更
EVENT_EQUIP =1121 --装备卡装备时
EVENT_ATTACK_ANNOUNCE =1130 --攻击宣言时
EVENT_BE_BATTLE_TARGET =1131 --被选为攻击对象时
EVENT_BATTLE_START =1132 --伤害步骤开始时(反转前)
EVENT_BATTLE_CONFIRM =1133 --伤害计算前(反转後)
EVENT_PRE_DAMAGE_CALCULATE =1134 --伤害计算时(羽斬)
EVENT_DAMAGE_CALCULATING =1135 --N/A
EVENT_PRE_BATTLE_DAMAGE =1136 --即将产生战斗伤害(只能使用EFFECT_TYPE_CONTINUOUS)
EVENT_BATTLE_END =1137 --N/A
EVENT_BATTLED =1138 --伤害计算后(异女、同反转效果时点)
EVENT_BATTLE_DESTROYING =1139 --以战斗破坏怪兽送去墓地时(BF-苍炎之修罗)
EVENT_BATTLE_DESTROYED =1140 --被战斗破坏送去墓地时(杀人番茄等)
EVENT_DAMAGE_STEP_END =1141 --伤害步骤结束时
EVENT_ATTACK_DISABLED =1142 --攻击无效时(翻倍机会)
EVENT_BATTLE_DAMAGE =1143 --造成战斗伤害时
EVENT_TOSS_DICE =1150 --掷骰子的结果产生后
EVENT_TOSS_COIN =1151 --抛硬币的结果产生后
EVENT_TOSS_COIN_NEGATE =1152 --重新抛硬币
EVENT_TOSS_DICE_NEGATE =1153 --重新掷骰子
EVENT_LEVEL_UP =1200 --等级上升时
EVENT_PAY_LPCOST =1201 --支付生命值时
EVENT_DETACH_MATERIAL =1202 --去除超量素材时
EVENT_RETURN_TO_GRAVE =1203 --回到墓地时
EVENT_TURN_END =1210 --回合结束时
EVENT_PHASE =0x1000 --阶段结束时
EVENT_PHASE_START =0x2000 --阶段开始时
EVENT_ADD_COUNTER =0x10000 --增加指示物时
EVENT_REMOVE_COUNTER =0x20000 --去除指示物时(A指示物),Card.RemoveCounter()必須手動觸發此事件
EVENT_CUSTOM =0x10000000 --自訂事件
--Category 效果分类(表示这个效果将要发生什么事,OperationInfo设置了效果分类才能触发针对这一类型发动的卡,如破坏->星尘龙
CATEGORY_DESTROY =0x1 --破坏效果
CATEGORY_RELEASE =0x2 --解放效果
CATEGORY_REMOVE =0x4 --除外效果
CATEGORY_TOHAND =0x8 --回手牌效果
CATEGORY_TODECK =0x10 --回卡组效果
CATEGORY_TOGRAVE =0x20 --送去墓地效果
CATEGORY_DECKDES =0x40 --包含從卡组送去墓地或特殊召唤效果
CATEGORY_HANDES =0x80 --捨棄手牌效果
CATEGORY_SUMMON =0x100 --含召唤的效果
CATEGORY_SPECIAL_SUMMON =0x200 --含特殊召唤的效果
CATEGORY_TOKEN =0x400 --含衍生物效果
CATEGORY_GRAVE_ACTION =0x800 --包含特殊召喚以外移動墓地的卡的效果(屋敷わらし)
CATEGORY_POSITION =0x1000 --改变表示形式效果
CATEGORY_CONTROL =0x2000 --改变控制权效果
CATEGORY_DISABLE =0x4000 --使效果无效效果
CATEGORY_DISABLE_SUMMON =0x8000 --无效召唤效果
CATEGORY_DRAW =0x10000 --抽卡效果
CATEGORY_SEARCH =0x20000 --检索卡组效果
CATEGORY_EQUIP =0x40000 --装备效果
CATEGORY_DAMAGE =0x80000 --伤害效果
CATEGORY_RECOVER =0x100000 --回复效果
CATEGORY_ATKCHANGE =0x200000 --改变攻击效果
CATEGORY_DEFCHANGE =0x400000 --改变防御效果
CATEGORY_COUNTER =0x800000 --指示物效果
CATEGORY_COIN =0x1000000 --硬币效果
CATEGORY_DICE =0x2000000 --骰子效果
CATEGORY_LEAVE_GRAVE =0x4000000 --涉及墓地的效果(王家長眠之谷)
CATEGORY_GRAVE_SPSUMMON =0x8000000 --包含從墓地特殊召喚的效果(屋敷わらし、冥神)
CATEGORY_NEGATE =0x10000000 --使发动无效效果
CATEGORY_ANNOUNCE =0x20000000 --發動時宣言卡名的效果
CATEGORY_FUSION_SUMMON =0x40000000 --融合召唤效果(暴走魔法阵)
CATEGORY_TOEXTRA =0x80000000 --回额外卡组效果
--Hint
HINT_EVENT =1
HINT_MESSAGE =2
HINT_SELECTMSG =3
HINT_OPSELECTED =4
HINT_EFFECT =5
HINT_RACE =6
HINT_ATTRIB =7
HINT_CODE =8
HINT_NUMBER =9
HINT_CARD =10
HINT_ZONE =11
--Card Hint
CHINT_TURN =1
CHINT_CARD =2
CHINT_RACE =3
CHINT_ATTRIBUTE =4
CHINT_NUMBER =5
CHINT_DESC =6
--Opcode
OPCODE_ADD =0x40000000
OPCODE_SUB =0x40000001
OPCODE_MUL =0x40000002
OPCODE_DIV =0x40000003
OPCODE_AND =0x40000004
OPCODE_OR =0x40000005
OPCODE_NEG =0x40000006
OPCODE_NOT =0x40000007
OPCODE_ISCODE =0x40000100
OPCODE_ISSETCARD =0x40000101
OPCODE_ISTYPE =0x40000102
OPCODE_ISRACE =0x40000103
OPCODE_ISATTRIBUTE =0x40000104
--
DOUBLE_DAMAGE =-2147483648
HALF_DAMAGE =-2147483647
--Hint Message --提示消息,显示在窗口的上面
HINTMSG_RELEASE =500 --请选择要解放的卡
HINTMSG_DISCARD =501 --请选择要丢弃的手牌
HINTMSG_DESTROY =502 --请选择要破坏的卡
HINTMSG_REMOVE =503 --请选择要除外的卡
HINTMSG_TOGRAVE =504 --请选择要送去墓地的卡
HINTMSG_RTOHAND =505 --请选择要返回手牌的卡
HINTMSG_ATOHAND =506 --请选择要加入手牌的卡
HINTMSG_TODECK =507 --请选择要返回卡组的卡
HINTMSG_SUMMON =508 --请选择要召唤的卡
HINTMSG_SPSUMMON =509 --请选择要特殊召唤的卡
HINTMSG_SET =510 --请选择要盖放的卡
HINTMSG_FMATERIAL =511 --请选择要作为融合素材的卡
HINTMSG_SMATERIAL =512 --请选择要作为同调素材的卡
HINTMSG_XMATERIAL =513 --请选择要作为超量素材的卡
HINTMSG_FACEUP =514 --请选择表侧表示的卡
HINTMSG_FACEDOWN =515 --请选择里侧表示的卡
HINTMSG_ATTACK =516 --请选择攻击表示的怪兽
HINTMSG_DEFENSE =517 --请选择守备表示的怪兽
HINTMSG_EQUIP =518 --请选择要装备的卡
HINTMSG_REMOVEXYZ =519 --请选择要取除的超量素材
HINTMSG_CONTROL =520 --请选择要改变控制权的怪兽
HINTMSG_DESREPLACE =521 --请选择要代替破坏的卡
HINTMSG_FACEUPATTACK =522 --请选择表侧攻击表示的怪兽
HINTMSG_FACEUPDEFENSE =523 --请选择表侧守备表示的怪兽
HINTMSG_FACEDOWNATTACK =524 --请选择里侧攻击表示的怪兽
HINTMSG_FACEDOWNDEFENSE =525 --请选择里侧守备表示的怪兽
HINTMSG_CONFIRM =526 --请选择给对方确认的卡
HINTMSG_TOFIELD =527 --请选择要放置到场上的卡
HINTMSG_POSCHANGE =528 --请选择要改变表示形式的怪兽
HINTMSG_SELF =529 --请选择自己的卡
HINTMSG_OPPO =530 --请选择对方的卡
HINTMSG_TRIBUTE =531 --请选择上级召唤用需要解放的怪兽
HINTMSG_DEATTACHFROM =532 --请选择要取除超量素材的怪兽
HINTMSG_LMATERIAL =533 --请选择要作为连接素材的卡
HINTMSG_ATTACKTARGET =549 --请选择攻击的对象
HINTMSG_EFFECT =550 --请选择要发动的效果
HINTMSG_TARGET =551 --请选择效果的对象
HINTMSG_COIN =552 --请选择硬币的正反面
HINTMSG_DICE =553 --请选择骰子的结果
HINTMSG_CARDTYPE =554 --请选择一个种类
HINTMSG_OPTION =555 --请选择一个选项
HINTMSG_RESOLVEEFFECT =556 --请选择要发动/处理的效果
HINTMSG_SELECT =560 --请选择
HINTMSG_POSITION =561 --请选择表示形式
HINTMSG_ATTRIBUTE =562 --请选择要宣言的属性
HINTMSG_RACE =563 --请选择要宣言的种族
HINTMSG_CODE =564 --请宣言一个卡名
HINGMSG_NUMBER =565 --请选择一个数字
HINGMSG_LVRANK =567 --请宣言一个等级
HINTMSG_RESOLVECARD =568 --请选择要处理效果的卡
HINTMSG_ZONE =569 --请选择[%ls]的位置
HINTMSG_DISABLEZONE =570 --请选择要变成不能使用的卡片区域
HINTMSG_TOZONE =571 --请选择要移动到的位置
HINTMSG_COUNTER =572 --请选择要放置指示物的卡
HINTMSG_DISABLE =573 --请选择要无效的卡
HINTMSG_OPERATECARD =574 --请选择要操作的卡
HINTMSG_FIELD_FIRST =575 --请选择场上的卡(按取消可选择其他区域的卡)
--Select --请选择
SELECT_HEADS =60 --正面
SELECT_TAILS =61 --反面
--Timing --提示时点,可以给freechain卡片增加自动提示时点
TIMING_DRAW_PHASE =0x1 --抽卡阶段时点
TIMING_STANDBY_PHASE =0x2 --准备阶段时点
TIMING_MAIN_END =0x4 --主要阶段结束时点
TIMING_BATTLE_START =0x8 --战斗阶段开始时点
TIMING_BATTLE_END =0x10 --战斗阶段结束时点
TIMING_END_PHASE =0x20 --结束阶段时点
TIMING_SUMMON =0x40 --召唤时点
TIMING_SPSUMMON =0x80 --特殊召唤时点
TIMING_FLIPSUMMON =0x100 --翻转召唤时点
TIMING_MSET =0x200 --放置怪兽时点
TIMING_SSET =0x400 --放置魔陷时点
TIMING_POS_CHANGE =0x800 --表示形式变更时点
TIMING_ATTACK =0x1000 --攻击宣言时点
TIMING_DAMAGE_STEP =0x2000 --伤害步骤时点
TIMING_DAMAGE_CAL =0x4000 --伤害计算时点
TIMING_CHAIN_END =0x8000 --连锁结束时点
TIMING_DRAW =0x10000 --抽卡时点(不是抽卡阶段
TIMING_DAMAGE =0x20000 --造成伤害时点
TIMING_RECOVER =0x40000 --回复时点
TIMING_DESTROY =0x80000 --破坏时点
TIMING_REMOVE =0x100000 --除外时点
TIMING_TOHAND =0x200000 --加入手牌时点(检索、回收等)
TIMING_TODECK =0x400000 --回卡组时点
TIMING_TOGRAVE =0x800000 --进墓地时点
TIMING_BATTLE_PHASE =0x1000000 --战斗阶段时点
TIMING_EQUIP =0x2000000 --装备时点
TIMING_BATTLE_STEP_END =0x4000000 --戰鬥步驟結束時
TIMING_BATTLED =0x8000000 --伤害计算后时点
----组合时点
TIMINGS_CHECK_MONSTER =0x1c0 -- 怪兽正面上场
--Global flag --特殊标记
GLOBALFLAG_DECK_REVERSE_CHECK =0x1 --卡组翻转标记
GLOBALFLAG_BRAINWASHING_CHECK =0x2 --洗脑解除标记
GLOBALFLAG_SCRAP_CHIMERA =0x4 --废铁奇美拉标记
GLOBALFLAG_DELAYED_QUICKEFFECT =0x8 --N/A
GLOBALFLAG_DETACH_EVENT =0x10 --EVENT_DETACH_MATERIAL
GLOBALFLAG_MUST_BE_SMATERIAL =0x20 --N/A
GLOBALFLAG_SPSUMMON_COUNT =0x40 --玩家的特殊召唤次数限制
GLOBALFLAG_XMAT_COUNT_LIMIT =0x80 --超量素材数量限制标记(光天使 天座)
GLOBALFLAG_SELF_TOGRAVE =0x100 --不入連鎖的送墓檢查(EFFECT_SELF_TOGRAVE)
GLOBALFLAG_SPSUMMON_ONCE =0x200 --1回合只能特殊召喚1次(Card.SetSPSummonOnce())
GLOBALFLAG_TUNE_MAGICIAN =0x400 --超量素材检查标记(调弦之魔术师)
--count_code
EFFECT_COUNT_CODE_OATH =0x10000000 --发动次数限制(誓约次数, 发动被无效不计数)
EFFECT_COUNT_CODE_DUEL =0x20000000 --决斗中使用次数
EFFECT_COUNT_CODE_CHAIN =0x40000000 --同一连锁中使用次数
EFFECT_COUNT_CODE_SINGLE =0x1 --同一张卡的多个效果公共使用次数
--特殊选项
DUEL_TEST_MODE =0x01 --测试模式(目前暫無)
DUEL_ATTACK_FIRST_TURN =0x02 --第一回合可以攻击(用于残局)
DUEL_OLD_REPLAY =0x04 --旧录像
DUEL_OBSOLETE_RULING =0x08 --使用舊規則
DUEL_PSEUDO_SHUFFLE =0x10 --不洗牌
DUEL_TAG_MODE =0x20 --双打PP
DUEL_SIMPLE_AI =0x40 --AI(用于残局)
DUEL_RETURN_DECK_TOP =0x80 --回卡组洗切的卡放到卡组最上方(不洗牌模式下曾经的默认行为)
--Activity counter
--global: 1-6 (binary: 5,6)
--custom: 1-5,7 (binary: 1-5)
ACTIVITY_SUMMON =1 --
ACTIVITY_NORMALSUMMON =2 --
ACTIVITY_SPSUMMON =3 --
ACTIVITY_FLIPSUMMON =4 --
ACTIVITY_ATTACK =5 --
ACTIVITY_BATTLE_PHASE =6 -- not available in custom counter
ACTIVITY_CHAIN =7 -- only available in custom counter
--Special cards
CARD_MARINE_DOLPHIN =78734254 --海洋海豚(double name)
CARD_TWINKLE_MOSS =13857930 --光輝苔蘚(double name)
CARD_QUESTION =38723936 --谜题
--Special flag effect id
FLAG_ID_CHAINING =1
FLAG_ID_UNION =2
FLAG_ID_NO_NORMAL_DRAW =3
FLAG_ID_ALLURE_QUEEN =4
\ No newline at end of file
...@@ -1646,3 +1646,10 @@ end ...@@ -1646,3 +1646,10 @@ end
function Auxiliary.IsSelfEquip(c,id) function Auxiliary.IsSelfEquip(c,id)
return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id) return c:GetEquipGroup():IsExists(Card.GetFlagEffect,1,nil,id)
end end
---Check if the equip effect of c becomes a Quick Effect.
---@param c Card
---@param tp integer
---@return boolean
function Auxiliary.GoldenAllureQueenCondition(c,tp)
return Duel.IsPlayerAffectedByEffect(tp,95937545) and c:IsOriginalSetCard(0x3)
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