Commit 34582072 authored by 伊蕾娜's avatar 伊蕾娜

咕咕:xx23 fix2.1缺失文件补漏

parent f948040a
Pipeline #21215 passed with stage
in 59 seconds
......@@ -30,67 +30,27 @@ function c20161.initial_effect(c)
c:RegisterEffect(e4)
end
function c20161.spfilter(c,e,tp)
return c:IsSetCard(0x123) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x123) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:IsLocation(LOCATION_DECK) and Duel.GetMZoneCount(tp)>0 or c:IsLocation(LOCATION_EXTRA) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0)
end
function c20161.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ((Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(c20161.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)) or (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c20161.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp))) end
if chk==0 then return Duel.IsExistingMatchingCard(c20161.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 c20161.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCountFromEx(tp)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c20161.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1620000)
e1:SetCondition(c20161.ccon)
e1:SetOperation(c20161.cop)
tc:RegisterEffect(e1)
end
else
if Duel.GetLocationCountFromEx(tp)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c20161.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1620000)
e1:SetCondition(c20161.ccon)
e1:SetOperation(c20161.cop)
tc:RegisterEffect(e1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c20161.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:CompleteProcedure()
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1620000)
e1:SetCondition(c20161.ccon)
e1:SetOperation(c20161.cop)
tc:RegisterEffect(e1)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c20161.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1620000)
e1:SetCondition(c20161.ccon)
e1:SetOperation(c20161.cop)
tc:RegisterEffect(e1)
end
end
function c20161.ccon(e,tp,eg,ep,ev,re,r,rp)
......
--月之剑士-九条可怜
function c4031107.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.ritlimit)
c:RegisterEffect(e1)
--negate attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4031107,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCost(c4031107.negcost)
e2:SetCondition(c4031107.negcon)
e2:SetTarget(c4031107.negtg)
e2:SetOperation(c4031107.negop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetCondition(c4031107.lvcon2)
e3:SetValue(2000)
c:RegisterEffect(e3)
--disable spsummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_REMOVE)
e4:SetDescription(aux.Stringid(4031107,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_SPSUMMON)
e4:SetCondition(c4031107.lvcon3)
e4:SetCost(c4031107.cost)
e4:SetTarget(c4031107.target)
e4:SetOperation(c4031107.operation)
c:RegisterEffect(e4)
--check
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_MATERIAL_CHECK)
e5:SetValue(c4031107.valcheck)
e5:SetLabelObject(e3)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetLabelObject(e4)
c:RegisterEffect(e6)
end
function c4031107.mat_filter(c)
return c:IsRace(RACE_FAIRY)
end
function c4031107.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c4031107.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp)
end
function c4031107.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local at=Duel.GetAttacker()
return at:IsAttackPos() and at:IsCanChangePosition()
end
end
function c4031107.negop(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
if at:IsAttackPos() and at:IsRelateToBattle() then
Duel.ChangePosition(at,POS_FACEUP_DEFENSE)
end
end
function c4031107.lvcon2(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel()
return flag>=2
end
function c4031107.lvcon3(e,tp,eg,ep,ev,re,r,rp)
local flag=e:GetLabel()
return flag>=3 and tp~=ep and Duel.GetCurrentChain()==0
end
function c4031107.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c4031107.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0)
end
function c4031107.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function c4031107.lvfilter(c)
return c:IsSetCard(0x403) and c:IsType(TYPE_MONSTER)
end
function c4031107.valcheck(e,c)
local g=c:GetMaterial()
local flag=0
if g:GetCount()>=0 then
local lg=g:Filter(c4031107.lvfilter,nil)
if lg then
flag=lg:GetCount()
end
end
e:GetLabelObject():SetLabel(flag)
end
--Hello!黄金拼图
function c4031202.initial_effect(c)
--Activate
local e1=aux.AddRitualProcEqual2Code(c,4031107,LOCATION_HAND+LOCATION_GRAVE,c4031202.filter,nil,true)
c:RegisterEffect(e1)
end
function c4031202.filter(c)
return c:GetLevel()>0 and c:IsRace(RACE_FAIRY) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
\ No newline at end of file
--请问您今天要来点爱丽丝吗?
function c4031203.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,4031203+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c4031203.condition)
e1:SetTarget(c4031203.target)
e1:SetOperation(c4031203.activate)
c:RegisterEffect(e1)
end
function c4031203.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and (c:IsSetCard(0x404) or c:IsSetCard(0x403))
end
function c4031203.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c4031203.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil)
end
function c4031203.filter3(c,e,tp)
return c:IsCode(4031103) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c4031203.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c4031203.filter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c4031203.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,c4031203.filter3,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(c4031203.drcon)
e2:SetTarget(c4031203.drtg)
e2:SetReset(RESET_EVENT+0xc020000)
e2:SetOperation(c4031203.drop)
tc:RegisterEffect(e2,true)
end
Duel.SpecialSummonComplete()
end
function c4031203.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c4031203.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c4031203.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,91400)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
--兔子与假面舞会
function c411407.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,411407+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c411407.spcost)
e1:SetTarget(c411407.target)
e1:SetOperation(c411407.activate)
c:RegisterEffect(e1)
end
function c411407.costfilter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x404) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c411407.filter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),e,tp)
end
function c411407.filter(c,att,e,tp)
return c:IsType(TYPE_MONSTER) and c:GetOriginalAttribute()~=att and c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c411407.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c411407.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c411407.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
e:SetValue(tc:GetAttribute())
Duel.Remove(tc,POS_FACEUP,REASON_COST)
end
function c411407.target(e,tp,eg,ep,ev,re,r,rp,chk)
local att=e:GetValue()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c411407.filter,tp,LOCATION_DECK,0,1,nil,att,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c411407.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local att=e:GetValue()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c411407.filter,tp,LOCATION_DECK,0,1,1,nil,att,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetReset(RESET_EVENT+0xfe0000)
e1:SetValue(1)
tc:RegisterEffect(e1,true)
end
Duel.SpecialSummonComplete()
end
--魂之契源-散华
function c4114208.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(4114208,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c4114208.tg1)
e1:SetOperation(c4114208.op1)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetRange(LOCATION_GRAVE)
e1_1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return Duel.IsPlayerAffectedByEffect(tp,4114224) and e:GetHandler():IsSetCard(0x6141) end)
c:RegisterEffect(e1_1)
--check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c4114208.regcon1)
e2:SetOperation(c4114208.regop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c4114208.regcon2)
c:RegisterEffect(e3)
--tograve
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(4114208,1))
e4:SetCategory(CATEGORY_CONTROL)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_CUSTOM+4114208)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetTarget(c4114208.tg2)
e4:SetOperation(c4114208.op2)
c:RegisterEffect(e4)
end
function c4114208.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,2,nil)
end
function c4114208.op1(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
if not tc:IsImmuneToEffect(e) then
tc:RegisterFlagEffect(4114208,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
tc=g:GetNext()
end
end
function c4114208.regcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_COST) and re:IsActivated()
end
function c4114208.regfilter2(c)
return c:IsReason(REASON_COST) and c:IsSetCard(0x6141)
end
function c4114208.regcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c4114208.regfilter2,1,e:GetHandler(),REASON_COST) and re:IsActivated()
end
function c4114208.regop1(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+4114208,e,0,tp,0,0)
end
function c4114208.filter2(c)
return c:IsFaceup() and c:GetFlagEffect(4114208)~=0
end
function c4114208.tg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c4114208.filter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c4114208.filter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c4114208.filter2,tp,0,LOCATION_MZONE,1,1,nil)
end
function c4114208.op2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local sel=1
local check1=c:IsLocation(LOCATION_SZONE) and c:IsCanTurnSet()
local check2=not c:IsLocation(LOCATION_SZONE) and c:IsSSetable() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if c:IsRelateToEffect(e) and Duel.CheckLPCost(1-tp,600) and (check1 or check2) then
sel=Duel.SelectOption(1-tp,1213,1214)
end
if sel==0 then
Duel.PayLPCost(1-tp,600)
if c:IsRelateToEffect(e) and (check1 or check2) then
if check1 then
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
elseif check2 then
Duel.SSet(tp,c)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
else
if tc:IsControler(1-tp) and tc:IsControlerCanBeChanged() and Duel.SelectYesNo(tp,aux.Stringid(4114208,2)) then
Duel.GetControl(tc,tp,PHASE_END,1)
end
end
end
end
\ No newline at end of file
--Rabbit House 保登心爱
function c421409.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(421409,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c421409.sptg)
e1:SetOperation(c421409.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,411409)
e2:SetCondition(c421409.thcon)
e2:SetCost(c421409.thcost)
e2:SetTarget(c421409.thtg)
e2:SetOperation(c421409.thop)
c:RegisterEffect(e2)
end
function c421409.filter2(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(3) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c421409.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.IsExistingMatchingCard(c421409.filter2,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c421409.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,c421409.filter2,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.BreakEffect()
Duel.DiscardDeck(tp,1,REASON_EFFECT)
end
end
function c421409.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c421409.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c421409.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c421409.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c421409.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c421409.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY) and c:IsAbleToHand() and not c:IsCode(421409)
end
function c421409.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c421409.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c421409.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c421409.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
--Rabbit House-香风智乃
function c421410.initial_effect(c)
--rabbit
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c421410.drcon)
e1:SetTarget(c421410.drtg)
e1:SetOperation(c421410.drop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,411410)
e2:SetCondition(c421410.thcon)
e2:SetCost(c421410.thcost)
e2:SetTarget(c421410.thtg)
e2:SetOperation(c421410.thop)
c:RegisterEffect(e2)
end
function c421410.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c421410.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c421410.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,91400)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c421410.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c421410.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c421410.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c421410.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c421410.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c421410.thfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x405) and c:IsAbleToHand()
end
function c421410.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c421410.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c421410.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c421410.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--Rabbit House 天天座理世
function c421411.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(421411,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c421411.condition)
e1:SetTarget(c421411.sptg)
e1:SetOperation(c421411.spop)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,411411)
e2:SetCondition(c421411.thcon)
e2:SetCost(c421411.thcost)
e2:SetTarget(c421411.thtg)
e2:SetOperation(c421411.thop)
c:RegisterEffect(e2)
end
function c421411.filter(c,atk)
return c:IsType(TYPE_MONSTER) and c:IsFaceup() and c:GetAttack()>atk
end
function c421411.condition(e,tp,eg,ep,ev,re,r,rp)
local atk=e:GetHandler():GetAttack()
return atk and not Duel.IsExistingMatchingCard(c421411.filter,tp,LOCATION_MZONE,0,1,nil,atk)
end
function c421411.filter3(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(421411)
end
function c421411.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c421411.filter3,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c421411.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c421411.filter3,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
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c421411.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c421411.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
function c421411.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c421411.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c421411.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c421411.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c421411.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c421411.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY) and c:IsAbleToGrave() and not c:IsCode(421411)
end
function c421411.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c421411.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c421411.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c421411.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--甘兔庵 宇治松千夜
function c421412.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(421412,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,421412)
e1:SetCost(c421412.spcost)
e1:SetTarget(c421412.sptg)
e1:SetOperation(c421412.spop)
c:RegisterEffect(e1)
end
function c421412.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c421412.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local sg=Duel.GetMatchingGroup(c421412.cfilter,tp,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,e:GetHandler())
if chk==0 then return sg:GetCount()>=3 and (ft>0 or sg:IsExists(Card.IsLocation,ct,nil,LOCATION_MZONE)) end
local g=nil
if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=sg:FilterSelect(tp,Card.IsLocation,ct,ct,nil,LOCATION_MZONE)
if ct<3 then
sg:Sub(g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=sg:Select(tp,3-ct,3-ct,nil)
g:Merge(g1)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g=sg:Select(tp,3,3,nil)
end
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c421412.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c421412.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--甘兔庵 桐间纱路
function c421413.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(421413,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(c421413.drcon)
e1:SetTarget(c421413.drtg)
e1:SetOperation(c421413.drop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,411413)
e2:SetCondition(c421413.thcon)
e2:SetCost(c421413.thcost)
e2:SetTarget(c421413.thtg)
e2:SetOperation(c421413.thop)
c:RegisterEffect(e2)
end
function c421413.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsAttack(500) and c:IsDefense(500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(421413)
end
function c421413.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c421413.drtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_REMOVED and c421413.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c421413.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c421413.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c421413.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
function c421413.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c421413.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_FAIRY) and c:IsAbleToRemoveAsCost()
end
function c421413.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c421413.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c421413.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
g:AddCard(e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c421413.thfilter(c)
return not c:IsCode(421413) and (c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)) or (c:IsSetCard(0x405) and c:IsType(TYPE_SPELL))
end
function c421413.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c421413.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c421413.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c421413.thfilter,tp,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 c421414.initial_effect(c)
--change name
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(431401)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,421414)
e2:SetCondition(c421414.thcon)
e2:SetTarget(c421414.thtg)
e2:SetOperation(c421414.thop)
c:RegisterEffect(e2)
end
function c421414.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE)
end
function c421414.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c421414.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--汉赛尔与格莱特-奈津惠
function c421415.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(431401)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,421415)
e2:SetTarget(c421415.thtg)
e2:SetOperation(c421415.thop)
c:RegisterEffect(e2)
end
function c421415.thfilter(c)
return c:IsAbleToGrave() and c:IsType(TYPE_MONSTER) and c:IsAttack(500) and c:IsDefense(500) and c:IsRace(RACE_FAIRY)
end
function c421415.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c421415.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,0,1,tp,LOCATION_DECK)
end
function c421415.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c421415.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--万圣节魔女-香风智乃
function c431404.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(913130,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c431404.spcost)
e1:SetTarget(c431404.shtg)
e1:SetOperation(c431404.shop)
c:RegisterEffect(e1)
end
function c431404.costfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsSetCard(0x405) and c:IsType(TYPE_SPELL)
end
function c431404.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c431404.costfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c431404.costfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c431404.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c431404.shop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,91400,0,0x4011,0,0,2,RACE_BEAST,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,91400)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--妬✿水桥帕露西
function c86379872.initial_effect(c)
--special summon
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--to field
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0x13)
e1:SetCondition(c86379872.spcon)
e1:SetOperation(c86379872.spop)
e1:SetDescription(aux.Stringid(86379872,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetTarget(c86379872.shtg)
e1:SetOperation(c86379872.shop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379872,0))
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,86379872)
e2:SetCondition(c86379872.shcon)
e2:SetTarget(c86379872.shtg)
e2:SetOperation(c86379872.shop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379872,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c86379872.tgcon)
e3:SetCost(c86379872.tgcost)
e3:SetTarget(c86379872.tgtg)
e3:SetOperation(c86379872.tgop)
c:RegisterEffect(e3)
end
--
function c86379872.spfilter(c)
return c:IsSetCard(0x412) and not c:IsCode(86379872)
end
function c86379872.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c86379872.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c86379872.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379872.spfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Release(g,nil,REASON_COST)
end
--
function c86379872.shcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c86379872.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 and (Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)-Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil))>0 end
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)*2
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
if ct3>0 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c86379872.shfilter(c)
return c:IsSetCard(0x836) and c:IsAbleToHand()
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 end
end
function c86379872.shop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct1=Duel.GetMatchingGroupCount(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
local ct2=Duel.GetMatchingGroupCount(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
local ct3=ct2-ct1
local ct4=ct2-(ct1*2)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then
local t={86379873,86379874,86379875,86379876}
local mytable={}
......@@ -79,29 +55,48 @@ function c86379872.shop(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(tsz,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
local fid=e:GetHandler():GetFieldID()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(86379872,2))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+EVENT_PHASE+PHASE_END,2)
e1:SetReset(RESET_EVENT+0x1fe0000+EVENT_PHASE+PHASE_END)
e1:SetOperation(c86379872.desop)
e1:SetLabel(0)
tsz:RegisterEffect(e1,true)
if Duel.IsExistingMatchingCard(c86379872.shfilter,tp,LOCATION_DECK,0,1,nil) and ct4>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379872.shfilter,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
tsz:RegisterEffect(e1,true)
end
end
function c86379872.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
--[[local ct=e:GetLabel()
e:GetHandler():SetTurnCounter(ct+1)
if ct==1 then
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
else e:SetLabel(1) end
else e:SetLabel(1) end]]--
end
--
function c86379872.tgcon(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
local ct=sg:GetCount()-Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)*2
return ct>0
end
function c86379872.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c86379872.tgfilter(c)
return c:IsSetCard(0x836) and c:IsAbleToHand()
end
function c86379872.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379872.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c86379872.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c86379872.tgfilter,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 c912208.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c912208.regcon)
e1:SetOperation(c912208.regop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c912208.condition)
e2:SetCost(c912208.cost)
e2:SetTarget(c912208.target)
e2:SetOperation(c912208.activate)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(912208,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_HAND)
e3:SetCondition(c912208.condition2)
e3:SetCost(c912208.spcost)
e3:SetTarget(c912208.target2)
e3:SetOperation(c912208.activate2)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetDescription(aux.Stringid(912208,2))
e4:SetCategory(CATEGORY_TOGRAVE)
e4:SetTarget(c912208.target3)
e4:SetOperation(c912208.activate3)
c:RegisterEffect(e4)
end
function c912208.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return Duel.GetCurrentPhase()==PHASE_DRAW and c:IsReason(REASON_DRAW) and c:IsReason(REASON_RULE)
end
function c912208.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.SelectYesNo(tp,aux.Stringid(912208,0)) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_MAIN1)
c:RegisterEffect(e1)
c:RegisterFlagEffect(912208,RESET_PHASE+PHASE_MAIN1,0,1)
end
end
function c912208.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c912208.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(912208)~=0 end
end
function c912208.filter(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(3) and c:IsRace(RACE_FAIRY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c912208.filter2(c,att)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(3) and c:IsRace(RACE_FAIRY) and not c:IsAttribute(att)
end
function c912208.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c912208.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c912208.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,c912208.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)
local att=g:GetFirst():GetAttribute()
local sg=Duel.GetMatchingGroup(c912208.filter2,tp,LOCATION_DECK,0,nil,att)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(912208,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,CATEGORY_TOGRAVE)
local dg=sg:Select(tp,1,1,nil)
Duel.SendtoGrave(dg,REASON_EFFECT)
end
end
end
function c912208.condition2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c912208.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c912208.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c912208.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c912208.activate2(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,c912208.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
function c912208.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,2)
end
function c912208.activate3(e,tp,eg,ep,ev,re,r,rp)
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,val,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment