Commit 0535d189 authored by Nemo Ma's avatar Nemo Ma

fix

parent 89ef391f
......@@ -12,7 +12,7 @@ function cm.spfilter(c,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function cm.spop(e,tp)
rsof.SelectHint(tp,"sp")
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -305,7 +305,7 @@ function XY.maganechcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,XY.maganecostfilter1,tp,LOCATION_HAND,0,1,1,e:GetHandler())
local tc=g1:GetFirst()
Duel.ConfirmCards(1-tp,tc)
Duel.ConfirmCards(1-tp,tc)
end
function XY.maganetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......@@ -705,7 +705,7 @@ function XY.maganeop5(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,at2,REASON_EFFECT)
end
else
Duel.Damage(tp,2000,REASON_EFFECT)
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
end
......@@ -1264,13 +1264,13 @@ function XY.maganere9(e,tp,eg,ep,ev,re,r,rp)
local cm2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if cm1>=4 then
local g=Duel.GetDecktopGroup(tp,4)
Duel.ConfirmCards(1-tp,g)
Duel.SortDecktop(1-tp,tp,4)
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(tp,tp,4)
end
if cm2>=4 then
local g=Duel.GetDecktopGroup(1-tp,4)
Duel.ConfirmCards(1-tp,g)
Duel.SortDecktop(1-tp,1-tp,4)
Duel.ConfirmCards(tp,g)
Duel.SortDecktop(tp,1-tp,4)
end
local tg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_HAND,nil)
local tg2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
......
......@@ -81,36 +81,37 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33403530,1))
local g=Duel.SelectMatchingCard(tp,XY.maganeckfilter10,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
if c:IsCode(33403521) then
local tc=g:GetFirst()
if tc:IsCode(33403521) then
XY.maganere1(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403522) then
if tc:IsCode(33403522) then
XY.maganere2(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403523) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) then
if tc:IsCode(33403523) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) then
XY.maganere3(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403524) and Duel.IsPlayerCanDraw(tp,3) then
if tc:IsCode(33403524) and Duel.IsPlayerCanDraw(tp,3) then
XY.maganere4(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403525) and (Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0) then
if tc:IsCode(33403525) and (Duel.IsExistingMatchingCard(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil) or Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0) then
XY.maganere5(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403526) and Duel.IsPlayerCanDraw(tp,1) then
if tc:IsCode(33403526) and Duel.IsPlayerCanDraw(tp,1) then
XY.maganere6(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403527) and Duel.IsExistingMatchingCard(XY.maganethfilter4,tp,LOCATION_GRAVE,0,1,nil) then
if tc:IsCode(33403527) and Duel.IsExistingMatchingCard(XY.maganethfilter4,tp,LOCATION_GRAVE,0,1,nil) then
XY.maganere7(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403528) then
if tc:IsCode(33403528) then
XY.maganere8(e,tp,eg,ep,ev,re,r,rp)
end
cm1=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
cm2=Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)
if c:IsCode(33403529) and cm1>=4 and cm2>=4 and Duel.IsPlayerCanDraw(tp,1) then
if tc:IsCode(33403529) and cm1>=4 and cm2>=4 and Duel.IsPlayerCanDraw(tp,1) then
XY.maganere9(e,tp,eg,ep,ev,re,r,rp)
end
if c:IsCode(33403530) then
if tc:IsCode(33403530) then
XY.maganere10(e,tp,eg,ep,ev,re,r,rp)
end
end
......@@ -118,13 +119,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(XY.maganeckfilter0,tp,LOCATION_GRAVE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(XY.maganethfilter0,tp,LOCATION_GRAVE,0,1,nil,tp) end
end
function cm.spop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(XY.maganeckfilter0,tp,LOCATION_GRAVE,0,1,nil,tp) then return end
if not Duel.IsExistingMatchingCard(XY.maganethfilter0,tp,LOCATION_GRAVE,0,1,nil,tp) then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33403530,1))
local g=Duel.SelectMatchingCard(tp,XY.maganeckfilter0,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local g=Duel.SelectMatchingCard(tp,XY.maganethfilter0,tp,LOCATION_GRAVE,0,1,1,nil,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
if tc:IsCode(33403521) then
......
......@@ -41,7 +41,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTargetRange(1,0)
e2:SetValue(cm.val)
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
......
--红皇后的美少年 蛙男孩
function c45746801.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746801,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,45746801)
e1:SetTarget(c45746801.target)
e1:SetOperation(c45746801.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746801,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746899)
e3:SetCondition(c45746801.tdcon)
e3:SetTarget(c45746801.tg)
e3:SetOperation(c45746801.act)
c:RegisterEffect(e3)
--remove
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746801,1))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746898)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746801.rmtg)
e4:SetOperation(c45746801.rmop)
c:RegisterEffect(e4)
--spsm
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746898)
e5:SetCost(c45746801.cost)
e5:SetTarget(c45746801.smtg)
e5:SetOperation(c45746801.smop)
c:RegisterEffect(e5)
end
--e1
function c45746801.filter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(45746801)
end
function c45746801.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746801.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c45746801.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746801.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetTargetRange(1,0)
e0:SetTarget(c45746801.splimit)
Duel.RegisterEffect(e0,tp)
end
function c45746801.splimit(e,c)
return not c:IsSetCard(0x88f,0x88e)
end
--e3
function c45746801.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746801.filter1(c,e,tp)
return c:IsCode(45746807) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746801.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746801.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746801.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746801.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746801.filter2(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToRemove()
end
function c45746801.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c45746801.filter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c45746801.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c45746801.filter2,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil)
if g1:GetCount()>0 then
Duel.HintSelection(g1)
if Duel.Remove(g1,POS_FACEUP,REASON_EFFECT)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(45746801,2)) then
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g2:GetCount()>0 then
Duel.HintSelection(g2)
Duel.Destroy(g2,REASON_EFFECT)
end
end
end
end
end
--e5
function c45746801.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746801.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746801.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746801.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746801.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746801.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c45746801.smop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746801.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
end
end
\ No newline at end of file
--红皇后的美少年 铃铛响
function c45746802.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746802,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,45746802)
e1:SetTarget(c45746802.tgtg)
e1:SetOperation(c45746802.tgop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746802,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746897)
e3:SetCondition(c45746802.tdcon)
e3:SetTarget(c45746802.tg)
e3:SetOperation(c45746802.act)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746802,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746896)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746802.sptg)
e4:SetOperation(c45746802.spop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746896)
e5:SetCost(c45746802.cost)
e5:SetTarget(c45746802.tgtg1)
e5:SetOperation(c45746802.tgop1)
c:RegisterEffect(e5)
end
--e1e2
function c45746802.tgfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c45746802.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746802.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c45746802.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746802.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetTargetRange(1,0)
e0:SetTarget(c45746801.splimit)
Duel.RegisterEffect(e0,tp)
end
--e3
function c45746802.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746802.filter1(c,e,tp)
return c:IsCode(45746808) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746802.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746802.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746802.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746802.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746802.spfilter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746802.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746802.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c45746802.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746802.spfilter,tp,LOCATION_REMOVED,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--e5
function c45746802.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746802.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746802.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746802.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746802.tgfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToGrave() and c:IsType(TYPE_MONSTER)
end
function c45746802.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746802.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c45746802.tgop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746802.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--红皇后的美少年 火把头
function c45746803.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746803,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,45746803)
e1:SetTarget(c45746803.shtg)
e1:SetOperation(c45746803.shop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746803,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746895)
e3:SetCondition(c45746803.tdcon)
e3:SetTarget(c45746803.tg)
e3:SetOperation(c45746803.act)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746803,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746894)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746803.sptg)
e4:SetOperation(c45746803.spop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746894)
e5:SetCost(c45746803.cost)
e5:SetTarget(c45746803.shtg1)
e5:SetOperation(c45746803.shop1)
c:RegisterEffect(e5)
end
--e1e2
function c45746803.filter(c)
return c:IsSetCard(0x88e) and c:IsAbleToHand()
end
function c45746803.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746803.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746803.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746803.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e0:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e0:SetReset(RESET_PHASE+PHASE_END)
e0:SetTargetRange(1,0)
e0:SetTarget(c45746801.splimit)
Duel.RegisterEffect(e0,tp)
end
--e3
function c45746803.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746803.filter1(c,e,tp)
return c:IsCode(45746809) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746803.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746803.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746803.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746803.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746803.spfilter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(45746803)
end
function c45746803.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746803.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c45746803.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746803.spfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--e5
function c45746803.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746803.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746803.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746803.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746803.filter(c)
return c:IsSetCard(0x88e) and c:IsAbleToHand()
end
function c45746803.shtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746803.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746803.shop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746803.filter,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 c45746804.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,45746804)
e1:SetTarget(c45746804.target)
e1:SetOperation(c45746804.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746804,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746893)
e3:SetCondition(c45746804.tdcon)
e3:SetTarget(c45746804.tg)
e3:SetOperation(c45746804.act)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746892)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746804.destg)
e4:SetOperation(c45746804.desop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_DRAW+CATEGORY_REMOVE+CATEGORY_HANDES)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746892)
e5:SetCost(c45746804.cost)
e5:SetTarget(c45746804.tgtg1)
e5:SetOperation(c45746804.tgop1)
c:RegisterEffect(e5)
end
--e1e2
function c45746804.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c45746804.activate(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)
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsSetCard,p,LOCATION_HAND,0,1,1,nil,(0x88e))
local tg=g:GetFirst()
if tg then
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
--e3
function c45746804.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746804.filter1(c,e,tp)
return c:IsCode(45746810) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746804.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746804.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746804.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746804.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746804.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c45746804.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(45746804,0))
local tc=g:Select(tp,1,1,nil)
local sg=tc:GetFirst()
Duel.HintSelection(tc)
if ((sg:IsFaceup() and not sg:IsDisabled()) or sg:IsType(TYPE_TRAPMONSTER)) then
Duel.NegateRelatedChain(sg,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:RegisterEffect(e2)
if sg:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sg:RegisterEffect(e3)
end
end
end
end
--e5
function c45746804.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746804.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746804.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746804.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746804.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanRemove(tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c45746804.tgop1(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)
Duel.ShuffleHand(p)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsSetCard,p,LOCATION_HAND,0,1,1,nil,(0x88e))
local tg=g:GetFirst()
if tg then
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
\ No newline at end of file
--红皇后的美少年 完美先生
function c45746805.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746805,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,45746805)
e1:SetTarget(c45746805.destg)
e1:SetOperation(c45746805.desop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746805,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746891)
e3:SetCondition(c45746805.tdcon)
e3:SetTarget(c45746805.tg)
e3:SetOperation(c45746805.act)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746805,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746890)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746805.thtg)
e4:SetOperation(c45746805.thop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_DESTROY)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746890)
e5:SetCost(c45746805.cost)
e5:SetTarget(c45746805.tgtg1)
e5:SetOperation(c45746805.tgop1)
c:RegisterEffect(e5)
end
--e1
function c45746805.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746805.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
end
function c45746805.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746805.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c45746805.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c45746805.cfilter,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
local g=Duel.GetMatchingGroup(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
--e3
function c45746805.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746805.filter1(c,e,tp)
return c:IsCode(45746811) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746805.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746805.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746805.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746805.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746805.thfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToHand()
end
function c45746805.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746805.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c45746805.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c45746805.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e5
function c45746805.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746805.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746805.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746805.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746805.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746805.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP+TYPE_MONSTER)
end
function c45746805.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746805.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
and Duel.IsExistingMatchingCard(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c45746805.tgop1(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c45746805.cfilter,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
local g=Duel.GetMatchingGroup(c45746805.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,1,ct,nil)
Duel.HintSelection(dg)
Duel.Destroy(dg,REASON_EFFECT)
end
end
\ No newline at end of file
--红皇后的美少年 炸药包
function c45746806.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746806,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,45746806)
e1:SetTarget(c45746806.target)
e1:SetOperation(c45746806.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746806,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,45746889)
e3:SetCondition(c45746806.tdcon)
e3:SetTarget(c45746806.tg)
e3:SetOperation(c45746806.act)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746806,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746888)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746806.sptg)
e4:SetOperation(c45746806.spop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetRange(LOCATION_REMOVED)
e5:SetCountLimit(1,45746888)
e5:SetCost(c45746806.cost)
e5:SetTarget(c45746806.tgtg1)
e5:SetOperation(c45746806.tgop1)
c:RegisterEffect(e5)
end
--e1
function c45746806.tgfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToRemove()
end
function c45746806.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746806.tgfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK)
end
function c45746806.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746806.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
--e3
function c45746806.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746806.filter1(c,e,tp)
return c:IsCode(45746812) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746806.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746806.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c45746806.act(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746806.filter1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
--e4
function c45746806.spfilter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(45746806)
end
function c45746806.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746806.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c45746806.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746806.spfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler(),e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--e5
function c45746806.filter3(c,e,tp)
return c:IsSetCard(0x88f) and c:IsAbleToGraveAsCost()
end
function c45746806.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c45746806.filter3,tp,LOCATION_REMOVED,0,1,1,nil) end
local g=Duel.SelectMatchingCard(tp,c45746806.filter3,tp,LOCATION_REMOVED,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
end
function c45746806.tgfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToRemove()
end
function c45746806.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746806.tgfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_DECK)
end
function c45746806.tgop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746806.tgfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,2,2,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--疯狂女教师 红
function c45746818.initial_effect(c)
c:SetSPSummonOnce(45746818)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c45746818.spcon)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746818,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1,45746818)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c45746818.sptg)
e3:SetOperation(c45746818.spop)
c:RegisterEffect(e3)
end--e1
function c45746818.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:GetCode()~=45746818
end
function c45746818.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c45746818.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--e3
function c45746818.spfilter(c,e,tp)
return c:IsLevelBelow(6) and c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746818.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746818.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
end
function c45746818.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746818.spfilter,tp,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
--红皇后的仆从 断背警长 徽章设计师
function c45746819.initial_effect(c)
c:SetSPSummonOnce(45746819)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c45746819.spcon)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c45746819.target2)
e2:SetOperation(c45746819.Operation2)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746819,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,45746819)
e3:SetTarget(c45746819.tgtg)
e3:SetOperation(c45746819.tgop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746819,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,45746819)
e4:SetCondition(aux.exccon)
e4:SetCost(aux.bfgcost)
e4:SetTarget(c45746819.tg)
e4:SetOperation(c45746819.op)
c:RegisterEffect(e4)
end
--e1
function c45746819.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88f) and c:GetCode()~=45746819
end
function c45746819.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c45746819.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
--e2
function c45746819.filter2(c)
return c:IsSetCard(0x88f) and c:IsType(TYPE_NORMAL) and c:IsAbleToRemove()
end
function c45746819.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746819.filter2,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c45746819.Operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c45746819.filter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
--e3
function c45746819.tgfilter(c)
return c:IsSetCard(0x88f) and c:IsType(TYPE_NORMAL) and c:IsAbleToGrave()
end
function c45746819.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c45746819.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c45746819.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746819.tgfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--e4
function c45746819.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x88f) and c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746819.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746819.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c45746819.op(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746819.filter1,tp,LOCATION_REMOVED,0,ft,ft,nil,e,tp)
if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(45746819,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c45746819.rmcon)
e1:SetOperation(c45746819.rmop)
Duel.RegisterEffect(e1,tp)
end
end
function c45746819.rmfilter(c,fid)
return c:GetFlagEffectLabel(45746819)==fid
end
function c45746819.rmcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c45746819.rmfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c45746819.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c45746819.rmfilter,nil,e:GetLabel())
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
--营地的厨师 图坦卡蒙
function c45746831.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,c45746831.mfilter,1,1)
c:EnableReviveLimit()
end
function c45746831.mfilter(c)
return c:IsLinkSetCard(0x88e)
end
\ No newline at end of file
--红皇后的美少年 意面头
function c45746832.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c45746832.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746832,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,45746832)
e1:SetCondition(c45746832.thcon)
e1:SetTarget(c45746832.thtg)
e1:SetOperation(c45746832.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746832,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,45746887)
e2:SetCondition(c45746832.tdcon)
e2:SetTarget(c45746832.tdtg)
e2:SetOperation(c45746832.tdop)
c:RegisterEffect(e2)
end
--link summon
function c45746832.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746832.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746832.thfilter(c)
return (c:IsSetCard(0x88e) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()) or (c:IsCode(45746868) and c:IsAbleToHand())
end
function c45746832.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746832.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746832.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746832.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
--e2
function c45746832.tdcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
e:SetLabel(0)
if c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_ONFIELD) and r==REASON_LINK and c:GetReasonCard():IsSetCard(0x88e) then
return true
else
return false
end
end
function c45746832.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c45746832.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
--红皇后的美少年 四眼仔
function c45746833.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,c45746833.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,45746833)
e1:SetCondition(c45746833.thcon)
e1:SetTarget(c45746833.destg)
e1:SetOperation(c45746833.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746833,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,45746886)
e2:SetCondition(c45746833.spcon)
e2:SetCost(c45746833.spcost)
e2:SetTarget(c45746833.sptg)
e2:SetOperation(c45746833.spop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,45746885)
e3:SetCondition(c45746833.spcon1)
e3:SetTarget(c45746833.st1)
e3:SetOperation(c45746833.sp1)
c:RegisterEffect(e3)
end
--link summon
function c45746833.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746833.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746833.desfilter(c)
return c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsDestructable() and c:IsFaceup()
end
function c45746833.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746833.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c45746833.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c45746833.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c45746833.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
--e2
function c45746833.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c45746833.spcfilter(c,tp,zone)
return c:IsSetCard(0x88e) and c:IsType(TYPE_LINK) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_TOFIELD,zone)>0
end
function c45746833.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=c:GetLinkedZone(tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c45746833.spcfilter,1,c,tp,zone) end
local g=Duel.SelectReleaseGroup(tp,c45746833.spcfilter,1,1,c,tp,zone)
Duel.Release(g,REASON_COST)
end
function c45746833.spfilter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746833.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746833.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c45746833.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746833.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,zone)
end
end
--e3
function c45746833.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and r==REASON_LINK
end
function c45746833.filter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c45746833.st1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746833.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c45746833.sp1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746833.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
\ No newline at end of file
--红皇后的美少年 电子怪胎
function c45746834.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x88e),2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,45746834)
e1:SetCondition(c45746834.descon)
e1:SetTarget(c45746834.sptg)
e1:SetOperation(c45746834.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0xfe,0xff)
e2:SetValue(LOCATION_REMOVED)
e2:SetTarget(c45746834.rmtg)
c:RegisterEffect(e2)
end
--e1
function c45746834.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746834.filter(c)
return c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER) and c:IsLevelAbove(1)
end
function c45746834.fselect(g,e,tp)
return aux.dlvcheck(g) and g:IsExists(c45746834.fcheck,1,nil,g,e,tp)
end
function c45746834.fcheck(c,g,e,tp)
return c:IsLocation(LOCATION_HAND+LOCATION_DECK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp)
and g:IsExists(c45746834.fcheck2,1,c)
end
function c45746834.fcheck2(c)
return c:IsLocation(LOCATION_DECK) and c:IsAbleToHand()
end
function c45746834.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c45746834.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and g:CheckSubGroup(c45746834.fselect,2,2,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746834.cfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp)
and (c:IsLocation(LOCATION_HAND) or not c:IsAbleToHand())
end
function c45746834.cfilter2(c,e,tp)
return not c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,1-tp)
and c:IsLocation(LOCATION_DECK) and c:IsAbleToHand()
end
function c45746834.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0 then
local g=Duel.GetMatchingGroup(c45746834.filter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
local sc=nil
local hc=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local sg=g:SelectSubGroup(tp,c45746834.fselect,false,2,2,e,tp)
if sg and sg:GetCount()==2 then
if sg:IsExists(c45746834.cfilter,1,nil,e,tp) then
sc=sg:Filter(c45746834.cfilter,nil,e,tp):GetFirst()
hc=sg:GetFirst()
if hc==sc then hc=sg:GetNext() end
elseif sg:IsExists(c45746834.cfilter2,1,nil,e,tp) then
hc=sg:Filter(c45746834.cfilter2,nil,e,tp):GetFirst()
sc=sg:GetFirst()
if sc==hc then sc=sg:GetNext() end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sc=sg:FilterSelect(tp,c45746834.fcheck,1,1,nil,sg,e,tp):GetFirst()
hc=sg:GetFirst()
if hc==sc then hc=sg:GetNext() end
end
if sc and Duel.SpecialSummon(sc,0,tp,1-tp,false,false,POS_FACEUP_DEFENSE)~=0 and hc then
Duel.SendtoHand(hc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,hc)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c45746834.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c45746834.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and not re:GetHandler():IsRace(RACE_PSYCHO)
end
--e2
function c45746834.rmtg(e,c)
return c:GetOwner()~=e:GetHandlerPlayer() and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
\ No newline at end of file
--红皇后的美少年 雪球
function c45746835.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c45746835.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746835,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,45746835)
e1:SetCondition(c45746835.thcon)
e1:SetOperation(c45746835.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746835,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,45746884)
e2:SetCondition(c45746835.lkcon)
e2:SetTarget(c45746835.lktg)
e2:SetOperation(c45746835.lkop)
c:RegisterEffect(e2)
end
--link
function c45746835.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746835.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746835.xfilter(c)
return c:IsSetCard(0x88e) and c:IsFaceup()
end
function c45746835.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetMatchingGroup(c45746835.xfilter,tp,LOCATION_MZONE,0,nil)
local tc=tg:GetFirst()
while tc do
local atk=tc:GetAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.ceil(atk*2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=tg:GetNext()
end
end
--e2
function c45746835.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c45746835.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c45746835.lkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsLinkSummonable,tp,LOCATION_EXTRA,0,nil,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end
end
\ No newline at end of file
function c45746836.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,99,c45746836.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c45746836.atkval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c45746836.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_POSITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,45746836)
e3:SetTarget(c45746836.postg)
e3:SetOperation(c45746836.posop)
c:RegisterEffect(e3)
-- local e4=Effect.CreateEffect(c)
-- e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
-- e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
-- e4:SetCode(EVENT_LEAVE_FIELD)
-- e4:SetCountLimit(1,45746884)
-- e4:SetCondition(c45746836.spcon)
-- e4:SetTarget(c45746836.sptg)
-- e4:SetOperation(c45746836.spop)
-- c:RegisterEffect(e4)
end
function c45746836.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746836.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:GetLevel()>=0
end
function c45746836.atkval(e,c)
local lg=c:GetLinkedGroup():Filter(c45746836.atkfilter,nil)
return lg:GetSum(Card.GetLevel)*200
end
--e2
function c45746836.disable(e,c)
return (bit.band(c:GetOriginalType(),TYPE_MONSTER)==TYPE_EFFECT or c:IsType(TYPE_EFFECT)) and c:IsPosition(POS_FACEUP_DEFENSE)
end
--e3
function c45746836.filter(c)
return c:IsCanChangePosition()
end
function c45746836.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746836.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746836.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,c45746836.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function c45746836.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
--e4
--function c45746836.spcon(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- return c:IsPreviousPosition(POS_FACEUP)
-- and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
--end
--function c45746836.spfilter(c,e,tp)
-- return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
--end
--function c45746836.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then return Duel.IsExistingMatchingCard(c45746836.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
-- Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
--end
--function c45746836.spop(e,tp,eg,ep,ev,re,r,rp)
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
-- local g=Duel.SelectMatchingCard(tp,c45746836.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
-- if g:GetCount()>0 then
-- Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
-- end
--end
\ No newline at end of file
--念动力始祖 红
function c45746837.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_PSYCHO),3)
local e0=Effect.CreateEffect(c)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(c45746837.limit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSummonType,SUMMON_TYPE_LINK))
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746837,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c45746837.cost1)
e2:SetTarget(c45746837.tdtg1)
e2:SetOperation(c45746837.tdop1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746837,1))
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c45746837.cost2)
e3:SetTarget(c45746837.tdtg2)
e3:SetOperation(c45746837.tdop2)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746837,2))
e4:SetCategory(CATEGORY_DISABLE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCost(c45746837.cost3)
e4:SetTarget(c45746837.tdtg3)
e4:SetOperation(c45746837.tdop3)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_CANNOT_RELEASE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(0,1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_MZONE)
e6:SetCost(c45746837.cost)
e6:SetTarget(c45746837.target)
e6:SetOperation(c45746837.activate)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_PIERCE)
e7:SetRange(LOCATION_MZONE)
e7:SetTargetRange(LOCATION_MZONE,0)
e7:SetTarget(c45746837.target2)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetCountLimit(1,45746837)
e8:SetCondition(c45746837.spcon)
e8:SetTarget(c45746837.target3)
e8:SetOperation(c45746837.activate3)
c:RegisterEffect(e8)
end
function c45746837.chainlm(e,ep,tp)
return tp==ep
end
function c45746837.limit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_LINK)==SUMMON_TYPE_LINK or se:GetHandler()==e:GetHandler()
end
--e2
function c45746837.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c45746837.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c45746837.tdtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746837.filter1,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c45746837.filter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.tdop1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746837.filter1,tp,0,LOCATION_ONFIELD,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--e3
function c45746837.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c45746837.filter2(c)
return (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP)) and c:IsAbleToDeck()
end
function c45746837.tdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746837.filter2,tp,0,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(c45746837.filter2,tp,0,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.tdop2(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c45746837.filter2,tp,0,LOCATION_GRAVE,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
--e4
function c45746837.cost3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c45746837.tdtg3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.tdop3(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(RESET_TURN_SET)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
end
--e6
function c45746837.filter3(c)
return c:GetLevel()>0 and c:IsRace(RACE_PSYCHO)
end
function c45746837.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.CheckReleaseGroup(tp,c45746837.filter3,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c45746837.filter3,1,1,nil)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
function c45746837.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
--e7
function c45746837.target2(e,c)
return c:IsRace(RACE_PSYCHO)
end
--e8
function c45746837.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c45746837.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x88e) and not c:IsCode(45746837)
end
function c45746837.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and c45746837.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c45746837.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetChainLimit(c45746837.chainlm)
end
function c45746837.activate3(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or not Duel.IsExistingMatchingCard(c45746837.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746837.filter,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,1,nil)
local c=e:GetHandler()
if g:GetCount()>0 and c:IsRelateToEffect(e) then
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--念动力始祖 红
function c45746838.initial_effect(c)
--link summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_EARTH),aux.NonTuner(nil),2,2)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_RACE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(RACE_PSYCHO)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,45746838)
e2:SetCondition(c45746838.thcon)
e2:SetTarget(c45746838.thtg)
e2:SetOperation(c45746838.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746838,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,45746883)
e3:SetTarget(c45746838.distg)
e3:SetOperation(c45746838.disop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_GRAVE)
e4:SetTarget(c45746838.reptg)
e4:SetValue(c45746838.repval)
e4:SetOperation(c45746838.repop)
c:RegisterEffect(e4)
end
--e2
function c45746838.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c45746838.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c45746838.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
--e3
function c45746838.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c45746838.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and c45746838.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746838.filter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c45746838.filter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
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 c45746838.disop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.SendtoHand(tc,nil,REASON_EFFECT)
if not tc:IsLocation(LOCATION_HAND) then return end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
--e4
function c45746838.repfilter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_SPELL+TYPE_TRAP)
and c:IsOnField() and c:IsControler(tp) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746838.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746838.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746838.repval(e,c)
return c45746838.repfilter(c,e:GetHandlerPlayer())
end
function c45746838.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--营地的监督者 艾美利亚
function c45746839.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c45746839.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_EXTRA)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetValue(c45746839.matval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746839,0))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c45746839.tdtg)
e2:SetOperation(c45746839.tdop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetCondition(c45746839.immcon)
e3:SetValue(c45746839.efilter)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(c45746839.etlimit)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(45746839,1))
e5:SetCategory(CATEGORY_NEGATE)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_CHAINING)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCondition(c45746839.negcon)
e5:SetTarget(c45746839.negtg)
e5:SetOperation(c45746839.negop)
c:RegisterEffect(e5)
end
function c45746839.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746839.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return true,not mg or not mg:IsExists(Card.IsControler,1,nil,1-tp)
end
--e2
function c45746839.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c45746839.tdop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--e3
function c45746839.immcon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c45746839.efilter(e,te)
if te:GetHandlerPlayer()==e:GetHandlerPlayer() or not te:IsActivated() then return false end
if not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return true end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return not g or not g:IsContains(e:GetHandler())
end
--e4
function c45746839.etlimit(e,c)
return (c:IsFaceup() and e:GetHandler():GetLinkedGroup():IsContains(c))
end
--e5
function c45746839.negcon(e,tp,eg,ep,ev,re,r,rp)
local ex,g,gc,dp,dv=Duel.GetOperationInfo(ev,CATEGORY_SPECIAL_SUMMON)
return Duel.IsChainNegatable(ev) and rp==1-tp
and (ex and (dv&LOCATION_HAND==LOCATION_HAND or g and g:IsExists(c45746839.cfilter,1,nil)) or re:IsHasCategory(CATEGORY_HAND_SPSUMMON))
end
function c45746839.negtg(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)
end
function c45746839.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
\ No newline at end of file
--营地
function c45746851.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746851+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746851,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c45746851.spcon1)
e2:SetTarget(c45746851.thtg)
e2:SetOperation(c45746851.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(c45746851.spcon2)
c:RegisterEffect(e3)
-- local e4=Effect.CreateEffect(c)
-- e4:SetDescription(aux.Stringid(45746851,0))
-- e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
-- e4:SetType(EFFECT_TYPE_IGNITION)
-- e4:SetRange(LOCATION_FZONE)
-- e4:SetCost(c45746851.thcost)
-- e4:SetTarget(c45746851.thtg1)
-- e4:SetOperation(c45746851.thop1)
-- c:RegisterEffect(e4)
end
function c45746851.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,45746905)
end
function c45746851.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,45746905)
end
--e3
function c45746851.thfilter(c)
return c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c45746851.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746851.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746851.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746851.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
--e4
--function c45746851.thcost(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
--end
--function c45746851.thfilter(c)
-- return c:IsCode(45746852) and c:IsAbleToHand()
--end
--function c45746851.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then return Duel.IsExistingMatchingCard(c45746851.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
-- Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
--end
--function c45746851.thop1(e,tp,eg,ep,ev,re,r,rp)
-- if not e:GetHandler():IsRelateToEffect(e) then return end
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
-- local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c45746851.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,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
--海滩
function c45746852.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746852+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c45746852.lkcon)
e2:SetTarget(c45746852.target)
e2:SetOperation(c45746852.activate)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_END_PHASE)
e3:SetCondition(c45746852.spcon2)
c:RegisterEffect(e3)
-- local e4=Effect.CreateEffect(c)
-- e4:SetDescription(aux.Stringid(45746852,0))
-- e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
-- e4:SetType(EFFECT_TYPE_IGNITION)
-- e4:SetRange(LOCATION_FZONE)
-- e4:SetCost(c45746852.thcost)
-- e4:SetTarget(c45746852.thtg)
-- e4:SetOperation(c45746852.thop)
-- c:RegisterEffect(e4)
end
--e3
function c45746852.lkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c45746852.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,45746905)
end
function c45746852.filter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c45746852.eqfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c45746852.eqfilter(c,tc,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(tc) and c:IsSetCard(0x88e) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c45746852.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746852.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c45746852.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c45746852.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
end
function c45746852.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c45746852.eqfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),tc)
end
end
end
--e4
--function c45746852.thcost(e,tp,eg,ep,ev,re,r,rp)
-- local c=e:GetHandler()
-- return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
--end
--function c45746852.thfilter(c)
-- return c:IsCode(45746851) and c:IsAbleToHand()
--end
--function c45746852.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
-- if chk==0 then return Duel.IsExistingMatchingCard(c45746852.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
-- Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
--end
--function c45746852.thop(e,tp,eg,ep,ev,re,r,rp)
-- if not e:GetHandler():IsRelateToEffect(e) then return end
-- Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
-- local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c45746852.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,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
--红皇后的魔盒
function c45746853.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746853,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,45746853)
e1:SetTarget(c45746853.thtg)
e1:SetOperation(c45746853.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746853,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,45746814)
e2:SetCost(c45746853.descost)
e2:SetTarget(c45746853.destg)
e2:SetOperation(c45746853.desop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCountLimit(1,45746882+EFFECT_COUNT_CODE_DUEL)
e3:SetTarget(c45746853.target)
e3:SetOperation(c45746853.operation)
c:RegisterEffect(e3)
end
--e1
function c45746853.thfilter(c)
return c:IsSetCard(0x88e) and c:IsType(TYPE_EQUIP) and c:IsAbleToHand()
end
function c45746853.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746853.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746853.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746853.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
--e2
function c45746853.descost(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.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function c45746853.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c45746853.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
if Duel.Destroy(g,REASON_EFFECT)>0 and tc:IsType(TYPE_EQUIP) then
if Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(45746853,1)) then
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
end
end
--e3
function c45746853.efilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER)
end
function c45746853.eqfilter(c,g)
return c:IsSetCard(0x88e) and c:IsType(TYPE_EQUIP) and g:IsExists(c45746853.eqcheck,1,nil,c)
end
function c45746853.eqcheck(c,ec)
return ec:CheckEquipTarget(c)
end
function c45746853.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c45746853.efilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c45746853.eqfilter,tp,LOCATION_GRAVE,0,1,nil,g)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
end
function c45746853.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(c45746853.efilter,tp,LOCATION_MZONE,0,nil)
local eq=Duel.GetMatchingGroup(c45746853.eqfilter,tp,LOCATION_GRAVE,0,nil,g)
if ft>eq:GetCount() then ft=eq:GetCount() end
if ft==0 then return end
for i=1,ft do
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(45746853,1))
local ec=eq:Select(tp,1,1,nil):GetFirst()
eq:RemoveCard(ec)
local tc=g:FilterSelect(tp,c45746853.eqcheck,1,1,nil,ec):GetFirst()
Duel.Equip(tp,ec,tc,true,true)
end
Duel.EquipComplete()
end
--红皇后的光明日记
function c45746854.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746854+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c45746854.target)
e1:SetOperation(c45746854.operation)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SUMMON)
e3:SetDescription(aux.Stringid(45746854,0))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c45746854.con)
e3:SetTarget(c45746854.sumtg)
e3:SetOperation(c45746854.sumop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetRange(LOCATION_GRAVE)
e4:SetTarget(c45746854.reptg)
e4:SetValue(c45746854.repval)
e4:SetOperation(c45746854.repop)
c:RegisterEffect(e4)
end
--e1
function c45746854.filter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45746854.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c45746854.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c45746854.filter,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 c45746854.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(c45746854.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c45746854.eqlimit(e,c)
return e:GetOwner()==c
end
--e3
function c45746854.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746854.filter3(c)
return c:IsSetCard(0x88e) and c:IsSummonable(true,nil)
end
function c45746854.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746854.filter3,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c45746854.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c45746854.filter3,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.Summon(tp,g:GetFirst(),true,nil)
end
end
--e4
function c45746854.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746854.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746854.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746854.repval(e,c)
return c45746854.repfilter(c,e:GetHandlerPlayer())
end
function c45746854.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
--红皇后的黑暗日记
function c45746855.initial_effect(c)
aux.AddCodeList(c,45746851,45746852)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746855+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetCondition(c45746855.condition)
e1:SetTarget(c45746855.target)
e1:SetOperation(c45746855.activate)
c:RegisterEffect(e1)
--equip limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EQUIP_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(c45746855.eqlimit)
c:RegisterEffect(e2)
--control
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_SET_CONTROL)
e3:SetValue(c45746855.cval)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746855,2))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetCountLimit(1,45746855)
e4:SetCondition(c45746855.con)
e4:SetTarget(c45746855.tgtg)
e4:SetOperation(c45746855.tgop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EFFECT_DESTROY_REPLACE)
e5:SetRange(LOCATION_GRAVE)
e5:SetTarget(c45746855.reptg)
e5:SetValue(c45746855.repval)
e5:SetOperation(c45746855.repop)
c:RegisterEffect(e5)
end
--e1-e3
function c45746855.cfilter(c)
return c:IsFaceup() and c:IsCode(45746851,45746852)
end
function c45746855.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c45746855.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c45746855.filter(c)
return c:IsFaceup()
end
function c45746855.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c45746855.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746855.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c45746855.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c45746855.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,c,tc)
end
end
function c45746855.eqlimit(e,c)
return e:GetHandlerPlayer()~=c:GetControler() or e:GetHandler():GetEquipTarget()==c
end
function c45746855.cval(e,c)
return e:GetHandlerPlayer()
end
--e4
function c45746855.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746855.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_MZONE)
end
function c45746855.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,1-tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.HintSelection(sg)
Duel.SendtoGrave(sg,REASON_RULE)
end
end
--e5
function c45746855.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746855.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746855.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746855.repval(e,c)
return c45746855.repfilter(c,e:GetHandlerPlayer())
end
function c45746855.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--红皇后的水枪
function c45746856.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c45746856.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746856+EFFECT_COUNT_CODE_OATH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e2:SetCondition(c45746856.con)
e2:SetTarget(c45746856.target)
e2:SetOperation(c45746856.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1500)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746856,0))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_SZONE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCondition(c45746856.rmcon)
e4:SetTarget(c45746856.rmtg)
e4:SetOperation(c45746856.rmop)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(45746856,2))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(c45746856.con1)
e6:SetTarget(c45746856.target1)
e6:SetOperation(c45746856.activate1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetRange(LOCATION_GRAVE)
e7:SetTarget(c45746856.reptg)
e7:SetValue(c45746856.repval)
e7:SetOperation(c45746856.repop)
c:RegisterEffect(e7)
end
--e1
function c45746856.eqlimit(e,c)
return c:IsSetCard(0x88e)
end
--e2
function c45746856.ffilter(c)
return c:IsFaceup() and c:IsCode(45746852)
end
function c45746856.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c45746856.ffilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c45746856.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746856.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746856.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746856.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c45746856.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c45746856.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--e4
function c45746856.rmcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
function c45746856.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=eg:GetFirst():GetBattleTarget()
e:SetLabelObject(bc)
if chk==0 then return bc:IsAbleToRemove()
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,bc) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,bc,1,bc:GetControler(),LOCATION_GRAVE)
end
function c45746856.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if bc:IsAbleToRemove() then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,bc)
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
Duel.HintSelection(sg)
sg:AddCard(bc)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
end
--e5
function c45746856.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c45746856.actcon(e)
local tc=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc
end
--e6
function c45746856.con1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746856.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,1,nil) end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c45746856.activate1(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(sg,REASON_EFFECT)
end
--e7
function c45746856.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746856.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746856.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746856.repval(e,c)
return c45746856.repfilter(c,e:GetHandlerPlayer())
end
function c45746856.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--红皇后的素描本
function c45746857.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c45746857.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746857+EFFECT_COUNT_CODE_OATH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e2:SetTarget(c45746857.target)
e2:SetOperation(c45746857.operation)
c:RegisterEffect(e2)
--Atk down
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(-1000)
c:RegisterEffect(e3)
--Direct Attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_DIRECT_ATTACK)
e4:SetCondition(c45746857.dircon)
c:RegisterEffect(e4)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(45746857,0))
e6:SetCategory(CATEGORY_DESTROY)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_BATTLED)
e6:SetRange(LOCATION_SZONE)
e6:SetCondition(c45746857.drcon)
e6:SetTarget(c45746857.target1)
e6:SetOperation(c45746857.activate1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(45746857,2))
e7:SetCategory(CATEGORY_REMOVE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetCondition(c45746857.con)
e7:SetTarget(c45746857.tg)
e7:SetOperation(c45746857.op)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetCode(EFFECT_DESTROY_REPLACE)
e8:SetRange(LOCATION_GRAVE)
e8:SetTarget(c45746857.reptg)
e8:SetValue(c45746857.repval)
e8:SetOperation(c45746857.repop)
c:RegisterEffect(e8)
end
--e1
function c45746857.eqlimit(e,c)
return c:IsSetCard(0x88e)
end
--e2
function c45746857.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746857.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746857.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746857.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c45746857.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c45746857.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--e3
function c45746857.dircon(e)
return e:GetHandler():GetEquipTarget():GetControler()==e:GetHandlerPlayer()
end
--e6
function c45746857.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget():IsRelateToBattle()
end
function c45746857.filter1(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsType(TYPE_FIELD)
end
function c45746857.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c45746857.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,c) end
local sg=Duel.GetMatchingGroup(c45746857.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end
function c45746857.activate1(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c45746857.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT)
end
--e7
function c45746857.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746857.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
end
function c45746857.op(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--e8
function c45746857.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746857.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746857.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746857.repval(e,c)
return c45746857.repfilter(c,e:GetHandlerPlayer())
end
function c45746857.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--红皇后的狼狗
function c45746858.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c45746858.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746858+EFFECT_COUNT_CODE_OATH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e2:SetTarget(c45746858.target)
e2:SetOperation(c45746858.operation)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_SET_ATTACK)
e4:SetValue(c45746858.value)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetValue(c45746858.efilter)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TOHAND)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(c45746858.con)
e6:SetTarget(c45746858.thtg)
e6:SetOperation(c45746858.thop)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetRange(LOCATION_GRAVE)
e7:SetTarget(c45746858.reptg)
e7:SetValue(c45746858.repval)
e7:SetOperation(c45746858.repop)
c:RegisterEffect(e7)
end
--e1
function c45746858.eqlimit(e,c)
return c:IsSetCard(0x88e)
end
--e2
function c45746858.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746858.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746858.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746858.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c45746858.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c45746858.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--e4
function c45746858.value(e,c)
return c:GetBaseAttack()*2
end
--e5
function c45746858.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
--e6
function c45746858.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746858.thfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsSetCard(0x88e) and c:IsAbleToHand() and not c:IsCode(45746858)
end
function c45746858.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746858.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function c45746858.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c45746858.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--e7
function c45746858.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746858.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746858.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746858.repval(e,c)
return c45746858.repfilter(c,e:GetHandlerPlayer())
end
function c45746858.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--完美先生的鲜花
function c45746859.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(c45746859.eqlimit)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,45746859+EFFECT_COUNT_CODE_OATH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CONTINUOUS_TARGET)
e2:SetTarget(c45746859.target)
e2:SetOperation(c45746859.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetValue(TYPE_TUNER)
c:RegisterEffect(e4)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_EQUIP)
e8:SetCode(EFFECT_ADD_ATTRIBUTE)
e8:SetValue(ATTRIBUTE_EARTH)
c:RegisterEffect(e8)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetValue(aux.tgoval)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_RECOVER)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_LEAVE_FIELD)
e6:SetCondition(c45746859.con)
e6:SetTarget(c45746859.tg)
e6:SetOperation(c45746859.op)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EFFECT_DESTROY_REPLACE)
e7:SetRange(LOCATION_GRAVE)
e7:SetTarget(c45746859.reptg)
e7:SetValue(c45746859.repval)
e7:SetOperation(c45746859.repop)
c:RegisterEffect(e7)
end
--e1
function c45746859.eqlimit(e,c)
return c:IsSetCard(0x88e)
end
--e2
function c45746859.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e)
end
function c45746859.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c45746859.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45746859.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c45746859.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c45746859.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if e:GetHandler():IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Equip(tp,e:GetHandler(),tc)
end
end
--e6
function c45746859.con(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_SZONE) or c:IsReason(REASON_LOST_TARGET)
end
function c45746859.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,2000)
end
function c45746859.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--e7
function c45746859.repfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) and c:IsCode(45746851,45746852)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c45746859.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c45746859.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c45746859.repval(e,c)
return c45746859.repfilter(c,e:GetHandlerPlayer())
end
function c45746859.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--
function c45746864.initial_effect(c)
--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,45746864+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c45746864.target)
e1:SetOperation(c45746864.activate)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(aux.exccon)
e2:SetCondition(c45746864.thcon)
e2:SetCountLimit(1,45750000+EFFECT_COUNT_CODE_DUEL)
e2:SetTarget(c45746864.thtg)
e2:SetOperation(c45746864.thop)
c:RegisterEffect(e2)
end
--e1
function c45746864.filter(c)
return c:IsSetCard(0x88e) and c:IsAbleToHand()
end
function c45746864.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746864.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746864.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746864.filter,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
--e2
function c45746864.offilter(c,e,tp)
return c:IsFaceup() and c:IsCode(45746832)
end
function c45746864.thfilter(c)
return c:IsCode(45746868) and c:IsAbleToHand()
end
function c45746864.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c45746864.offilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.GetLP(tp)<=4000
end
function c45746864.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746864.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
end
function c45746864.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746864.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,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
--徽章师的新品
function c45746865.initial_effect(c)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCondition(c45746865.actcon)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746865,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,45746865)
e1:SetCost(c45746865.cost)
e1:SetTarget(c45746865.target)
e1:SetOperation(c45746865.activate)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746865,1))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1,45746880)
e1:SetCost(c45746865.cost1)
e1:SetTarget(c45746865.shtg)
e1:SetOperation(c45746865.shop)
c:RegisterEffect(e1)
end
--launch
function c45746865.check()
return Duel.IsEnvironment(45746819)
end
function c45746865.actcon(e,tp,eg,ep,ev,re,r,rp)
return c45746865.check()
end
--e1
function c45746865.costfilter(c)
return c:IsSetCard(0x88f) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToGraveAsCost()
end
function c45746865.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746865.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746865.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c45746865.filter(c,e,tp)
return c:IsSetCard(0x88e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45746865.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c45746865.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c45746865.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746865.filter,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
--e2
function c45746865.costfilter1(c)
return c:IsSetCard(0x88e) and (c:IsFaceup() or not c:IsLocation(LOCATION_MZONE)) and c:IsAbleToRemoveAsCost()
end
function c45746865.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746865.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c45746865.costfilter1,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c45746865.filter1(c)
return c:IsSetCard(0x88f) and c:IsAbleToHand()
end
function c45746865.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746865.filter1,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c45746865.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746865.filter1,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
--愤怒的一掌
function c45746868.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746868+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c45746868.target)
e1:SetOperation(c45746868.activate)
c:RegisterEffect(e1)
end
function c45746868.filter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER) and c:GetFlagEffect(45746868)==0
end
function c45746868.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746868.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c45746868.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c45746868.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c45746868.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e4=Effect.CreateEffect(tc)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
if not tc:IsType(TYPE_EFFECT) then
local e4=Effect.CreateEffect(tc)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ADD_TYPE)
e4:SetValue(TYPE_EFFECT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e4)
end
tc:RegisterFlagEffect(45746868,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(45746868,0))
end
end
function c45746868.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
\ No newline at end of file
--红色的陷害
function c45746870.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1)
e1:SetTarget(c45746870.target)
e1:SetOperation(c45746870.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetDescription(aux.Stringid(45746870,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,45746870)
e2:SetCost(c45746870.cost)
e2:SetTarget(c45746870.tdtg)
e2:SetOperation(c45746870.tdop)
c:RegisterEffect(e2)
end
--e1
function c45746870.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c45746870.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c45746870.desfilter,tp,LOCATION_ONFIELD,0,1,c) end
local g1=Duel.GetMatchingGroup(c45746870.desfilter,tp,LOCATION_ONFIELD,0,c)
local ct1=g1:GetCount()
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,ct1,0,0)
end
function c45746870.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c45746870.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
Duel.Destroy(sg,REASON_EFFECT)
sg=Duel.GetOperatedGroup()
local d1=0
local d2=0
local tc=sg:GetFirst()
while tc do
if tc then
if tc:GetPreviousControler()==0 then d1=d1+1
else d2=d2+1 end
end
tc=sg:GetNext()
end
if d1>0 then Duel.Draw(0,d1,REASON_EFFECT) end
if d2>0 then Duel.Draw(1,d2,REASON_EFFECT) end
end
--e2
function c45746870.costfilter(c)
return c:IsSetCard(0x88e) and c:IsAbleToRemoveAsCost()
end
function c45746870.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746870.costfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c45746870.costfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c45746870.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToDeck() and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c45746870.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,0,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) then
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--红色的陷阱
function c45746871.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,45746871)
e1:SetCondition(c45746871.condition)
e1:SetTarget(c45746871.target)
e1:SetOperation(c45746871.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,45746871)
e2:SetCost(c45746871.thcost)
e2:SetTarget(c45746871.thtg)
e2:SetOperation(c45746871.thop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(45746871,ACTIVITY_SPSUMMON,c45746871.counterfilter)
end
function c45746871.counterfilter(c)
return c:IsSetCard(0x88e) or c:IsSetCard(0x88f)
end
function c45746871.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x88e) and c:IsType(TYPE_LINK)
end
function c45746871.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c45746871.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsChainNegatable(ev) and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end
function c45746871.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.nbcon(tp,re) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function c45746871.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
--e2
function c45746871.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(45746871,tp,ACTIVITY_SPSUMMON)==0
and aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
e1:SetTarget(c45746871.splimit)
Duel.RegisterEffect(e1,tp)
aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,1)
end
function c45746871.splimit(e,c)
return not (c:IsSetCard(0x88e) or c:IsSetCard(0x88f))
end
function c45746871.thfilter(c)
return (c:IsSetCard(0x88e) or c:IsSetCard(0x88f)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
and (not c:IsLocation(LOCATION_REMOVED) or c:IsFaceup())
end
function c45746871.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746871.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_REMOVED)
end
function c45746871.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c45746871.thfilter,tp,LOCATION_DECK+LOCATION_REMOVED,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
--营地女装の诱惑
function c45746873.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746873,0))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,45746873)
e2:SetCost(c45746873.cost)
e2:SetTarget(c45746873.target)
e2:SetOperation(c45746873.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746873,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCountLimit(1,45746879)
e3:SetCost(c45746873.cost1)
e3:SetTarget(c45746873.lktg)
e3:SetOperation(c45746873.lkop)
c:RegisterEffect(e3)
end
--e2
function c45746873.costfilter(c,tp)
return c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c,tp,LOCATION_REASON_CONTROL)>0
end
function c45746873.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.IsExistingMatchingCard(c45746873.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c45746873.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST)
end
function c45746873.filter3(c,check)
return c:IsControlerCanBeChanged(check) and c:IsFaceup()
end
function c45746873.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local check=e:GetLabel()==100
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c45746873.filter3,tp,0,LOCATION_MZONE,1,nil,check)
end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,1,0,0)
end
function c45746873.filter2(c)
return c:IsControlerCanBeChanged() and c:IsFaceup()
end
function c45746873.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectMatchingCard(tp,c45746873.filter2,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
--e3
function c45746873.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function c45746873.filter(c)
return c:IsSetCard(0x88e) and c:IsLinkSummonable(nil)
end
function c45746873.lktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746873.filter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c45746873.lkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c45746873.filter,tp,LOCATION_EXTRA,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.LinkSummon(tp,tc,nil)
end
end
\ No newline at end of file
--营地 地牢杀龙勇士
function c45746901.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c45746901.matfilter1,c45746901.matfilter2,true)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746901,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCountLimit(1,45746901)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e1:SetTarget(c45746901.destg)
e1:SetOperation(c45746901.desop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_POSITION)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c45746901.target)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(POS_FACEUP_DEFENSE)
c:RegisterEffect(e2)
--Prevent Activation
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1)
e3:SetValue(c45746901.aclimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(45746901,0))
e4:SetCategory(CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_DESTROYED)
e4:SetTarget(c45746901.damtg)
e4:SetOperation(c45746901.damop)
c:RegisterEffect(e4)
end
function c45746901.matfilter1(c,fc)
return c:IsType(TYPE_LINK)
end
function c45746901.matfilter2(c,fc)
return c:IsRace(RACE_PSYCHO) and c:IsAttribute(ATTRIBUTE_FIRE)
end
--e1
function c45746901.desfilter(c)
return c:IsFaceup()
end
function c45746901.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c45746901.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c45746901.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,nil,tp,0,LOCATION_ONFIELD,1,2,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function c45746901.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()>0 then
Duel.Destroy(tg,REASON_EFFECT)
end
end
--e2e3
function c45746901.aclimit(e,re,tp)
return re:GetHandler():IsRace(RACE_DRAGON) and re:IsActiveType(TYPE_MONSTER)
end
function c45746901.target(e,c)
return c:IsRace(RACE_DRAGON)
end
--e4
function c45746901.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local p=PLAYER_ALL
if not e:GetHandler():IsReason(REASON_BATTLE) then
p=1-tp
end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end
function c45746901.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if p==PLAYER_ALL then
Duel.Damage(0,d,REASON_EFFECT,true)
Duel.Damage(1,d,REASON_EFFECT,true)
Duel.RDComplete()
else
Duel.Damage(p,d,REASON_EFFECT)
end
end
\ No newline at end of file
--柴犬狼孩来叫你起床
function c45746902.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(45746902,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,45746902+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c45746902.settg)
e1:SetOperation(c45746902.setop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(45746902,1))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,45746998)
e2:SetCondition(aux.exccon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c45746902.drtg)
e2:SetOperation(c45746902.drop)
c:RegisterEffect(e2)
end
--e1
function c45746902.setfilter(c)
return c:IsSetCard(0x88e) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c45746902.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c45746902.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c45746902.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c45746902.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
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)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_QP_ACT_IN_SET_TURN)
tc:RegisterEffect(e2)
end
end
--e2
function c45746902.tdfilter(c)
return c:IsSetCard(0x88e) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c45746902.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsPlayerCanDraw(tp,1)
and Duel.IsExistingTarget(c45746902.tdfilter,tp,LOCATION_GRAVE,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c45746902.tdfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c45746902.drop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()<=0 then return end
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
local g=Duel.GetOperatedGroup()
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK) then Duel.ShuffleDeck(tp) end
if g:IsExists(Card.IsLocation,1,nil,LOCATION_DECK+LOCATION_EXTRA) then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
\ No newline at end of file
--营地少年 亦敌亦友
function c45746905.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,99,c45746905.lcheck)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c45746905.efilter)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(45746905)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(45746905,0))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1,45746905)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c45746905.discon)
e3:SetTarget(c45746905.distg)
e3:SetOperation(c45746905.disop)
c:RegisterEffect(e3)
end
--link
function c45746905.lcheck(g)
return g:IsExists(Card.IsLinkSetCard,1,nil,0x88e)
end
--e1
function c45746905.efilter(e,te)
return te:IsActiveType(TYPE_SPELL) and te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--e3
function c45746905.discon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c45746905.distg(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 c45746905.disop(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
\ No newline at end of file
......@@ -9,7 +9,6 @@ function c9910884.initial_effect(c)
--race
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9910884,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
......
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