Commit 5af4f726 authored by mercury233's avatar mercury233

fix

parent 1c9f4a1a
Pipeline #13867 passed with stages
in 2 minutes and 15 seconds
......@@ -16,6 +16,7 @@ function c100200218.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetTarget(c100200218.indtg)
e2:SetOperation(c100200218.indop)
c:RegisterEffect(e2)
end
......@@ -38,6 +39,9 @@ function c100200218.setop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c100200218.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,100200218)==0 end
end
function c100200218.indop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
......@@ -47,4 +51,5 @@ function c100200218.indop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(aux.indoval)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,100200218,RESET_PHASE+PHASE_END,0,2)
end
......@@ -53,8 +53,8 @@ function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_HAND+LOCATION_DECK,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=tg:SelectSubGroup(tp,aux.dlvcheck,false,5,5)
if sg then
Duel.SendtoGrave(sg,REASON_EFFECT)
......
......@@ -8,6 +8,7 @@ function s.initial_effect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
......@@ -43,7 +44,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
LOCATION_HAND+LOCATION_DECK+LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil,e,tp,nil):GetFirst()
if tc then
Duel.BreakEffect()
local proc=tc:IsCode(100290001)
local proc=tc:IsCode(100290001) and e:GetHandler():IsCode(id)
Duel.SpecialSummon(tc,0,tp,tp,proc,proc,POS_FACEUP)
if proc then tc:CompleteProcedure() end
end
......
......@@ -68,16 +68,20 @@ function c100290003.spcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_LOST_TARGET) and ec:IsReason(REASON_BATTLE) and ec:IsPreviousControler(tp)
end
function c100290003.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetPreviousEquipTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and ec and ec:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local c=e:GetHandler()
local ec=c:GetPreviousEquipTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and ec and ec:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetTargetCard(ec)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function c100290003.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetHandler():GetPreviousEquipTarget()
if tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) and c:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
......
......@@ -40,10 +40,12 @@ end
function c100290008.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tc=Duel.SelectMatchingCard(tp,c100290008.tdfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
if not tc then return end
local code=tc:GetCode()
if Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100290008.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc:GetCode())
local g=Duel.SelectMatchingCard(tp,c100290008.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,code)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -62,6 +64,7 @@ function c100290008.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
return g:CheckSubGroup(c100290008.gcheck,1,2)
end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c100290008.drop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100290008.filter),tp,LOCATION_GRAVE,0,nil)
......
......@@ -8,6 +8,7 @@ function c100290009.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100290009+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c100290009.target)
e1:SetOperation(c100290009.activate)
c:RegisterEffect(e1)
......
......@@ -72,7 +72,7 @@ function s.cefilter(c,ct)
return Duel.CheckChainTarget(ct,c)
end
function s.cetg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and s.cefilter(chkc,ev) end
if chkc then return chkc:IsOnField() and s.cefilter(chkc,ev) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(s.cefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler(),ev) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.cefilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler(),ev)
......
......@@ -30,7 +30,7 @@ function c100290020.dfilter(c)
return c:IsSetCard(0x26) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end
function c100290020.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c100290020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100290020.filter(chkc) end
......@@ -38,13 +38,14 @@ function c100290020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingMatchingCard(c100290020.dfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100290020.filter,tp,0,LOCATION_ONFIELD,1,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g+1,tp,LOCATION_ONFIELD+LOCATION_HAND)
end
function c100290020.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sc=Duel.SelectMatchingCard(tp,c100290020.dfilter,tp,LOCATION_HAND,0,1,1,nil):GetFirst()
if sc and Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK) then
if not sc then return end
Duel.ConfirmCards(1-tp,sc)
if Duel.SendtoDeck(sc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and sc:IsLocation(LOCATION_DECK) then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end
......@@ -53,7 +54,8 @@ function c100290020.spfilter(c,e,tp)
return c:IsSetCard(0x26) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c100290020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c100290020.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and c100290020.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100290020.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -58,7 +58,7 @@ end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Damage(tp,1000,REASON_EFFECT)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
if c:IsRelateToEffect(e) and c:IsAttackPos() then
Duel.BreakEffect()
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
......
......@@ -57,10 +57,8 @@ end
function c100290025.sptg2(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)
and c:GetFlagEffect(100290025)==0 end
c:RegisterFlagEffect(100290025,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100290025.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -37,6 +37,7 @@ function s.lvop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(-1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
......@@ -49,7 +50,7 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -27,7 +27,7 @@ function c100290031.initial_effect(c)
c:RegisterEffect(e2)
--to extra or grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOGRAVE)
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOGRAVE+CATEGORY_DECKDES)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100290031+100)
......@@ -45,6 +45,7 @@ function c100290031.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100290031.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100290031.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......@@ -86,7 +87,6 @@ function c100290031.tgfilter(c)
end
function c100290031.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100290031.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end
function c100290031.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
......
......@@ -98,6 +98,7 @@ function c100290033.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
if e:GetLabel()==1 and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -40,6 +40,7 @@ function c100290034.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if tc then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local fid=e:GetHandler():GetFieldID()
tc:RegisterFlagEffect(100290034,RESET_EVENT+RESETS_STANDARD,0,1,fid)
......
......@@ -43,6 +43,7 @@ function c100290037.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100290037)
e1:SetRange(LOCATION_GRAVE)
e1:SetTarget(c100290037.sptg)
......@@ -56,7 +57,7 @@ function c100290037.filter(c,e,tp)
end
function c100290037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c100290037.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingTarget(c100290037.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -56,10 +56,10 @@ function c100290038.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100290038.rcfilter(c)
return c:IsSetCard(0x4) and c:IsFaceup()
return c:IsSetCard(0x4) and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c100290038.rccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100290038.rcfilter,tp,LOCATION_MZONE,0,1,nil)
return Duel.IsExistingMatchingCard(c100290038.rcfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100290038.tgfilter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsControler(1-tp)
......
......@@ -54,10 +54,10 @@ function c100290039.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100290039.cfilter(c)
return c:IsSetCard(0x4) and c:IsFaceup()
return c:IsSetCard(0x4) and c:IsFaceup() and c:GetOriginalType()&TYPE_MONSTER~=0
end
function c100290039.rccon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.IsExistingMatchingCard(c100290039.cfilter,tp,LOCATION_MZONE,0,1,nil)
return ep==tp and Duel.IsExistingMatchingCard(c100290039.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100290039.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -8,6 +8,7 @@ function c100290040.initial_effect(c)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100290040)
e1:SetCost(c100290040.lvcost)
e1:SetTarget(c100290040.lvtg)
e1:SetOperation(c100290040.lvop)
c:RegisterEffect(e1)
--special summon
......@@ -29,6 +30,9 @@ function c100290040.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100290040.lvcfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,c100290040.lvcfilter,1,1,REASON_DISCARD+REASON_COST,e:GetHandler())
end
function c100290040.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsLevelAbove(3) end
end
function c100290040.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
......
......@@ -18,7 +18,7 @@ function c100290041.initial_effect(c)
-- search
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100290041,1))
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_DECKDES)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
......
......@@ -8,7 +8,7 @@ function c100290042.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100290042,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
......
......@@ -9,7 +9,7 @@ function c100290043.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100290043)
e1:SetCondition(c100290043.spcon)
e1:SetTarget(c100290043.sptg)
......
......@@ -21,7 +21,6 @@ function c100290045.initial_effect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_CONFIRM)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100290045.atkcon)
e3:SetCost(c100290045.atkcost)
e3:SetOperation(c100290045.atkop)
......@@ -33,8 +32,8 @@ function c100290045.initial_effect(c)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(c100290045.discon)
e4:SetCountLimit(1,100290045)
e4:SetCondition(c100290045.discon)
e4:SetTarget(c100290045.distg)
e4:SetOperation(c100290045.disop)
c:RegisterEffect(e4)
......@@ -59,18 +58,18 @@ function c100290045.atkop(e,tp,eg,ep,ev,re,r,rp)
local bc=c:GetBattleTarget()
if bc:IsFaceup() and bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.NegateRelatedChain(bc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-200)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
bc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -7,7 +7,7 @@ function c100290046.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100290046+EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,100290046)
e1:SetTarget(c100290046.target)
e1:SetOperation(c100290046.activate)
c:RegisterEffect(e1)
......@@ -24,6 +24,7 @@ function c100290046.initial_effect(c)
end
function c100290046.spfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsCanBeEffectTarget(e)
end
function c100290046.fselect(g)
return g:GetClassCount(Card.GetCode)==1
......@@ -61,12 +62,12 @@ function c100290046.activate(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_SET_ATTACK)
e4:SetCode(EFFECT_SET_ATTACK_FINAL)
e4:SetValue(0)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_DEFENSE)
e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
tc:RegisterEffect(e5)
tc=g:GetNext()
end
......
......@@ -14,7 +14,8 @@ function c100313001.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100313001,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c100313001.condition)
e2:SetTarget(c100313001.target)
......@@ -47,7 +48,7 @@ end
function c100313001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100313001.filter1,tp,LOCATION_DECK,0,1,nil) end
if rp==1-tp and tp==e:GetLabel() then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
end
......
......@@ -4,7 +4,7 @@ function c100313025.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100313025,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -53,11 +53,13 @@ function c100313051.spcon(e,tp,eg,ep,ev,re,r,rp)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function c100313051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100313051.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100313051.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
end
function c100313051.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,aux.NecroValleyFilter(c100313051.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)>0 then
......
......@@ -31,6 +31,7 @@ end
function c100427001.tga(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,0)
end
function c100427001.spfilter(c,e,tp,dc)
return c:IsSetCard(0x26) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(dc)
......@@ -68,7 +69,7 @@ function c100427001.opd(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,1,1,nil)
Duel.DisableShuffleCheck()
Duel.SendtoGrave(sg,REASON_EFFECT)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_REVEAL)
ct=ct-1
end
local op=Duel.SelectOption(tp,aux.Stringid(100427001,4),aux.Stringid(100427001,5))
......
......@@ -38,7 +38,7 @@ function s.tnfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_TUNER)
end
function s.tntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.tnfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.tnfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.tnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.tnfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -80,7 +80,7 @@ function c100427005.pntg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c100427005.pnop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not (tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end
if not tc:IsRelateToEffect(e) then return end
local b1=tc:IsCanChangePosition()
local b2=aux.NegateMonsterFilter(tc)
local op=-1
......
......@@ -91,7 +91,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
function s.spcon(e)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_SZONE) and c:GetPreviousSequence()<5
end
......
......@@ -63,7 +63,7 @@ function c100427021.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=5
if not Duel.IsExistingMatchingCard(c100427021.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then ct=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,e:GetHandler())
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c100427021.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -45,6 +45,7 @@ end
function c100427022.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c100427022.stfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(100427022,0)) then
Duel.BreakEffect()
......@@ -62,7 +63,7 @@ function c100427022.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=5
if not Duel.IsExistingMatchingCard(c100427022.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) then ct=3 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,e:GetHandler())
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c100427022.tdop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,6 +19,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1)
--deckdes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
......@@ -76,7 +77,7 @@ function s.tgop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoGrave(g1,REASON_EFFECT)~=0 and g1:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,1,nil,17484499) then
local g=Duel.GetMatchingGroup(s.sfilter,tp,LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SelectEffectYesNo(tp,e:GetHandler()) then
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
......
......@@ -73,7 +73,7 @@ function c100427030.desop(e,tp,eg,ep,ev,re,r,rp)
end
function c100427030.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c100427030.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
......
......@@ -73,7 +73,7 @@ function c100427031.thop(e,tp,eg,ep,ev,re,r,rp)
end
function c100427031.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c100427031.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
......
......@@ -30,7 +30,7 @@ function c100427033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsControler(tp) and c100427033.filter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100427033.filter,tp,LOCATION_ONFIELD,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c100427033.filter,tp,LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
......
......@@ -16,9 +16,10 @@ function s.filter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and g:CheckSubGroup(aux.dncheck,2,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
if chk==0 then
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_HAND,0,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and g:CheckSubGroup(aux.dncheck,2,2) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,tp,LOCATION_HAND)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,6 +46,7 @@ function c101110001.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return clv>0 and lv>0 and g:CheckWithSumEqual(Card.GetLevel,lv,1,99)
and Duel.IsExistingMatchingCard(c101110001.sfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101110001.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -45,7 +45,7 @@ end
function c101110002.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101110002.tffilter),tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
local tc=Duel.SelectMatchingCard(tp,c101110002.tffilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
......
......@@ -5,7 +5,7 @@ function c101110003.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101110003,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE+LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -49,13 +49,14 @@ function c101110003.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingMatchingCard(c101110003.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101110003.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c101110003.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101110003.tgfilter,tp,LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:GetFirst():IsLocation(LOCATION_GRAVE)
and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
......
......@@ -14,7 +14,7 @@ function c101110004.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101110004,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101110004)
......@@ -67,6 +67,7 @@ function c101110004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSpecialSummonMonster(tp,101110104,0,TYPES_TOKEN_MONSTER,700,700,2,RACE_WINDBEAST,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,700)
end
function c101110004.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -27,7 +27,7 @@ function c101110005.initial_effect(c)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101110005,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,101110005)
......@@ -59,6 +59,7 @@ function c101110005.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101110005.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,0)
end
function c101110005.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -18,7 +18,7 @@ function c101110022.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101110022+100)
e2:SetCondition(c101110022.spcon)
e2:SetTarget(c101110022.sptg)
......
......@@ -7,7 +7,7 @@ function c101110023.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101110023,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101110023)
......@@ -63,6 +63,7 @@ function c101110023.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.GetFieldGroup(tp,LOCATION_PZONE,0):Select(tp,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
......@@ -111,6 +112,7 @@ function c101110023.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,c101110023.thfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,tc)
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_DISCARD+REASON_EFFECT,nil)
end
......
......@@ -19,7 +19,7 @@ function c101110024.initial_effect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_RELEASE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101110024+100)
e2:SetTarget(c101110024.thtg)
e2:SetOperation(c101110024.thop)
......
......@@ -17,8 +17,9 @@ function c101110039.initial_effect(c)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101110039,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101110039)
......
......@@ -25,7 +25,7 @@ function c101110057.initial_effect(c)
c:RegisterEffect(e2)
end
function c101110057.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToDeck()
end
function c101110057.cfilter(c)
return c:IsCode(56099748) and c:IsFaceup()
......
......@@ -12,17 +12,17 @@ function c101110059.initial_effect(c)
e1:SetOperation(c101110059.activate)
c:RegisterEffect(e1)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101110059,1))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,9603254)
e3:SetCondition(c101110059.thcon)
e3:SetCost(aux.bfgcost)
e3:SetTarget(c101110059.thtg)
e3:SetOperation(c101110059.thop)
c:RegisterEffect(e3)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101110059,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101110059)
e2:SetCondition(c101110059.thcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101110059.thtg)
e2:SetOperation(c101110059.thop)
c:RegisterEffect(e2)
end
function c101110059.filter(c)
return c:IsCode(56063182) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsAbleToHand()
......@@ -50,6 +50,7 @@ function c101110059.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c101110059.actfilter,tp,0,LOCATION_MZONE,1,1,nil)
if #g>0 then
Duel.BreakEffect()
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
end
......
......@@ -28,7 +28,7 @@ function c101110071.handcon(e)
end
function c101110071.tdfilter(c)
return c:IsSetCard(0x33) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
and (c:IsAbleToDeckAsCost() or c:IsAbleToExtraAsCost())
and c:IsAbleToDeckOrExtraAsCost()
and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c101110071.fselect(g,e,tp)
......
......@@ -62,6 +62,7 @@ function c101110072.setop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
......
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