Commit 34585ead authored by mercury233's avatar mercury233

fix

parent f4791658
......@@ -7,7 +7,7 @@ function c100270001.initial_effect(c)
e1:SetDescription(aux.Stringid(100270001,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,100270001)
e1:SetTarget(c100270001.sptg1)
......@@ -31,6 +31,7 @@ function c100270001.initial_effect(c)
e3:SetDescription(aux.Stringid(100270001,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,100270102)
......
......@@ -23,7 +23,7 @@ function c100270014.initial_effect(c)
c:RegisterEffect(e2)
--Negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100270014,0))
e3:SetDescription(aux.Stringid(100270014,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
......@@ -53,7 +53,7 @@ end
function c100270014.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270014.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.CheckReleaseGroupEx(tp,c100270014.filter,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100270014.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c100270014.tgfilter,tp,LOCATION_DECK,0,nil)
......@@ -63,7 +63,7 @@ function c100270014.tgop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
local rct=Duel.Release(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c100270014.tgfilter,tp,LOCATION_DECK,0,1,rct,nil)
local tg=Duel.SelectMatchingCard(tp,c100270014.tgfilter,tp,LOCATION_DECK,0,rct,rct,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
......
......@@ -24,8 +24,12 @@ function c100270018.initial_effect(c)
c:RegisterEffect(e2)
end
function c100270018.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>2 end
if chk==0 then
local g=Duel.GetDecktopGroup(tp,3)
return #g>=3 and g:IsExists(Card.IsAbleToHand,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,500)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c100270018.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(1-tp,500,REASON_EFFECT)~=0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=3 then
......
......@@ -31,9 +31,12 @@ function c100270019.initial_effect(c)
e4:SetCondition(c100270019.damcon)
c:RegisterEffect(e4)
end
function c100270019.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c100270019.nsfilter(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttack(1850) and not c:IsPublic() and c:IsSummonable(true,nil)
and not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,c:GetCode())
and not Duel.IsExistingMatchingCard(c100270019.cfilter,tp,LOCATION_MZONE,0,1,nil,c:GetCode())
end
function c100270019.nscost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
......@@ -53,7 +56,7 @@ function c100270019.nstg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetTargetCard(e:GetLabelObject())
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c100270019.nsop(e,tp,eg,ep,ev,re,r,rp,chk)
function c100270019.nsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
......
......@@ -87,14 +87,14 @@ function c100270024.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
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)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
......
......@@ -20,6 +20,7 @@ function c100270043.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100270043+100)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100270043.atktg)
......@@ -68,7 +69,7 @@ function c100270043.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,Duel.GetTurnPlayer()==tp and 2 or 1)
tc:RegisterEffect(e1)
end
end
......@@ -4,7 +4,7 @@
function c100270045.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100270045+EFFECT_COUNT_CODE_OATH)
......@@ -32,6 +32,7 @@ function c100270045.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
if Duel.IsExistingMatchingCard(c100270045.cfilter,tp,0,LOCATION_MZONE,1,nil) and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.IsExistingMatchingCard(c100270045.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(100270045,0)) then
......
......@@ -31,25 +31,25 @@ function c100270047.initial_effect(c)
e3:SetOperation(c100270047.spop)
c:RegisterEffect(e3)
end
function c100270047.filter1(c)
function c100270047.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsAbleToDeck() and not c:IsPublic()
end
function c100270047.filter2(c)
function c100270047.thfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(7) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c100270047.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270047.filter1,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c100270047.filter2,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c100270047.cfilter,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c100270047.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100270047.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g1=Duel.SelectMatchingCard(tp,c100270047.filter1,tp,LOCATION_HAND,0,1,1,nil)
local g1=Duel.SelectMatchingCard(tp,c100270047.cfilter,tp,LOCATION_HAND,0,1,1,nil)
if g1:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g2=Duel.SelectMatchingCard(tp,c100270047.filter2,tp,LOCATION_DECK,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,c100270047.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g2:GetCount()>0 and Duel.SendtoHand(g2,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g2)
Duel.ShuffleDeck(tp)
......
......@@ -41,7 +41,7 @@ function c100270048.condition(e,tp,eg,ep,ev,re,r,rp)
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100270048.thfilter(c)
return c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
return c:IsFaceup() and c:IsLevel(7) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_DRAGON) and c:IsAbleToHand()
end
function c100270048.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270048.thfilter(chkc) end
......
......@@ -57,7 +57,7 @@ function c100270201.actcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100270201.actfilter(c)
return c:IsFaceup() and (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c100270201.acttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100270201.actfilter(chkc) end
......
......@@ -15,7 +15,7 @@ function c100270202.initial_effect(c)
--SendtoGrave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270202,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
......@@ -34,7 +34,7 @@ end
function c100270202.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270202.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100270202.cfilter,tp,0,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c100270202.cfilter,tp,0,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
......@@ -53,15 +53,12 @@ end
function c100270202.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function c100270202.ctfilter(c)
return c:IsFaceup()
end
function c100270202.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroup(c100270202.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute)
local ct=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute)
if chk==0 then return ct>0 and Duel.IsPlayerCanDiscardDeck(tp,ct) end
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ct)
end
function c100270202.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroup(c100270202.ctfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute)
local ct=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetOriginalAttribute)
Duel.DiscardDeck(tp,ct,REASON_EFFECT)
end
......@@ -9,7 +9,6 @@ function c100270203.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270203,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c100270203.cost)
e1:SetOperation(c100270203.operation)
......@@ -61,24 +60,22 @@ end
function c100270203.filter(c)
return c:IsType(TYPE_XYZ) and c:IsRankBelow(9) and c:IsRace(RACE_DRAGON) and c:IsAbleToExtra()
end
function c100270203.xyzfilter(c,mc,e,tp)
return mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end
function c100270203.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100270203.filter,tp,LOCATION_GRAVE,0,1,nli) end
if chk==0 then return Duel.IsExistingMatchingCard(c100270203.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
end
function c100270203.op(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c100270203.filter,tp,LOCATION_GRAVE,0,1,nil) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100270203.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c100270203.filter,tp,LOCATION_GRAVE,0,1,1,nil)
if #g==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local c=e:GetHandler()
local g=Duel.GetOperatedGroup()
if not g then return end
local sc=g:GetFirst()
if sc and c:IsRelateToEffect(e) and c100270203.xyzfilter(sc,c,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(100270203,4)) then
if sc:IsLocation(LOCATION_EXTRA) and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp)
and c:IsCanBeXyzMaterial(sc) and sc:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,c,sc)>0
and Duel.SelectYesNo(tp,aux.Stringid(100270203,4)) then
Duel.BreakEffect()
local mg=c:GetOverlayGroup()
if mg:GetCount()~=0 then
Duel.Overlay(sc,mg)
......
......@@ -5,7 +5,7 @@ function c100270204.initial_effect(c)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270204,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c100270204.sumtg)
e1:SetOperation(c100270204.sumop)
......@@ -13,7 +13,7 @@ function c100270204.initial_effect(c)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100270204,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
......@@ -22,15 +22,12 @@ function c100270204.initial_effect(c)
e2:SetOperation(c100270204.spop)
c:RegisterEffect(e2)
end
function c100270204.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanSummon(tp) and Duel.IsPlayerCanAdditionalSummon(tp) and Duel.GetFlagEffect(tp,100270204)==0 end
end
function c100270204.sumop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,100270204)~=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(100270204,2))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetTargetRange(LOCATION_HAND,0)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x39))
e1:SetReset(RESET_PHASE+PHASE_END)
......@@ -38,31 +35,31 @@ function c100270204.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,100270204,RESET_PHASE+PHASE_END,0,1)
end
function c100270204.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE)
function c100270204.cfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_FIRE) and Duel.GetMZoneCount(tp,c)>0
end
function c100270204.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270204.cfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100270204.cfilter(chkc,tp) end
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c100270204.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100270204.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if chk==0 then return Duel.IsExistingTarget(c100270204.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100270204.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100270204.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0
and c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
c:RegisterEffect(e1,true)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
......
......@@ -22,7 +22,6 @@ function c100270205.initial_effect(c)
e2:SetDescription(aux.Stringid(100270205,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100270205.cost)
......@@ -34,24 +33,23 @@ function c100270205.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c100270205.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=2
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c100270205.tgfilter(g,tp)
function c100270205.tgcheck(g)
return g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_FIRE)
end
function c100270205.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
tg=g:SelectSubGroup(tp,c100270205.tgfilter,false,2,2,tp)
tg=g:SelectSubGroup(tp,c100270205.tgcheck,false,2,2)
if tg then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
......@@ -69,17 +67,21 @@ function c100270205.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,c100270205.refilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100270205.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x39)
end
function c100270205.posfilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function c100270205.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_MZONE,0,1,nil,0x39) and Duel.IsExistingMatchingCard(c100270205.posfilter,tp,0,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c100270205.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100270205.posfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c100270205.setop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsSetCard,tp,LOCATION_MZONE,0,nil,0x39)
if Duel.IsExistingMatchingCard(c100270205.posfilter,tp,0,LOCATION_MZONE,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c100270205.posfilter,tp,0,LOCATION_MZONE,1,ct,nil)
local ct=Duel.GetMatchingGroupCount(c100270205.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectMatchingCard(tp,c100270205.posfilter,tp,0,LOCATION_MZONE,1,ct,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end
......
......@@ -5,9 +5,8 @@ function c100270207.initial_effect(c)
--negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100270207,0))
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100270207)
......@@ -32,25 +31,21 @@ end
function c100270207.negcon(e,tp,eg,ep,ev,re,r,rp)
if not (rp==1-tp and re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c100270207.cfilter,1,nil,tp) and Duel.IsChainNegatable(ev)
return g and g:IsExists(c100270207.cfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c100270207.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100270207.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
if Duel.NegateActivation(ev) then
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
Duel.SendtoGrave(eg,REASON_EFFECT)
end
end
Duel.NegateEffect(ev)
end
end
function c100270207.tgtg(e,c)
return (c:IsSetCard(0x255) or c:IsSetCard(0x256)) and c:IsType(TYPE_SPELL+TYPE_TRAP)
return c:IsSetCard(0x255,0x256) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
......@@ -44,15 +44,15 @@ function c100270208.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100270208.tgfilter(c,e,tp)
return c:IsType(TYPE_LINK) and (c:IsSetCard(0x255) or c:IsSetCard(0x256)) and c:IsLinkBelow(2) and c:IsLinkState() and Duel.IsExistingMatchingCard(c100270208.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
return c:IsType(TYPE_LINK) and c:IsSetCard(0x255,0x256) and c:IsLinkBelow(2) and c:IsLinkState()
and Duel.IsExistingMatchingCard(c100270208.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetCode())
end
function c100270208.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270208.sptg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100270208.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingTarget(c100270208.tgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100270208.tgfilter,tp,LOCATION_MZONE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270208.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......@@ -60,7 +60,7 @@ end
function c100270208.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if tc and tc:IsRelateToEffect(e) then
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(c100270208.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp,code)
if #g>0 then
......
......@@ -39,7 +39,8 @@ function c100270209.filter(c,e,tp)
end
function c100270209.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100270209.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270209.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100270209.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100270209.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......@@ -62,8 +63,8 @@ function c100270209.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100270209.spfilter1(c,e,tp)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT)
and Duel.IsExistingMatchingCard(c100270209.spnfilter,tp,LOCATION_GRAVE,0,1,c,c:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c100270209.spnfilter,tp,LOCATION_GRAVE,0,1,c,c:GetCode())
end
function c100270209.spnfilter(c,code)
return c:IsType(TYPE_LINK) and c:IsRace(RACE_PLANT) and c:IsCode(code)
......
......@@ -43,8 +43,9 @@ function c100270211.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100270211.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100270211.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c100270211.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,ev)
end
function c100270211.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
......
......@@ -41,15 +41,16 @@ end
function c100270212.mfilter(c)
return c:IsLinkRace(RACE_PLANT)
end
function c100270212.spfilter(c,e,tp)
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270212.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function c100270212.spfilter(c,e,tp)
return c:IsSetCard(0x255) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100270212.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c100270212.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c100270212.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,1,tp,ev)
end
function c100270212.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Recover(tp,ev,REASON_EFFECT)~=0 then
......@@ -62,7 +63,7 @@ function c100270212.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c100270212.mvcon(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetAttackTarget()
return d and d:IsControler(tp) and d:IsFaceup() and e:GetHandler():GetLinkedGroup():IsContains(d)
return d and d:IsControler(tp) and e:GetHandler():GetLinkedGroup():IsContains(d)
end
function c100270212.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
......
......@@ -97,8 +97,10 @@ end
function c100270213.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetValue()
local sg=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=sg:Select(tp,1,ct,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -11,7 +11,7 @@ function c100270214.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270214.descon)
e1:SetTarget(c100270214.destg)
......@@ -30,7 +30,6 @@ function c100270214.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c100270214.con)
e3:SetOperation(c100270214.op)
c:RegisterEffect(e3)
end
......@@ -58,9 +57,9 @@ function c100270214.filter(c,ec)
return c:IsFaceup() and c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:GetLinkedGroup():IsContains(ec)
end
function c100270214.dmcon(e,tp,eg,ep,ev,re,r,rp)
local a,d,c=Duel.GetAttacker(),Duel.GetAttackTarget(),e:GetHandler()
local g=Duel.GetMatchingGroup(c100270214.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
return d and (a==c or d==c) and a:GetControler()~=d:GetControler() and #g>0
local a,d=Duel.GetBattleMonster(tp)
local c=e:GetHandler()
return d and a==c and Duel.IsExistingMatchingCard(c100270214.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c)
end
function c100270214.dmop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
......@@ -72,9 +71,15 @@ function c100270214.dmop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c100270214.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function c100270214.op(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c100270214.skipop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c100270214.skipop(e,tp,eg,ep,ev,re,r,rp)
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
\ No newline at end of file
end
......@@ -11,7 +11,7 @@ function c100270215.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270215.descon)
e1:SetTarget(c100270215.destg)
......@@ -32,6 +32,7 @@ function c100270215.initial_effect(c)
e3:SetDescription(aux.Stringid(100270215,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100270215.recon)
......@@ -63,10 +64,10 @@ function c100270215.recfilter(c)
return c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:IsLinkAbove(1)
end
function c100270215.rectg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100270215.recfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270215.recfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100270215.recfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270215.recfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270215.recfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c100270215.recfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetLink()*300)
end
function c100270215.recop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -11,7 +11,7 @@ function c100270216.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c100270216.descon)
e1:SetTarget(c100270216.destg)
......@@ -62,10 +62,10 @@ function c100270216.atkfilter(c)
return c:IsSetCard(0x256) and c:IsType(TYPE_LINK) and c:IsLinkAbove(1)
end
function c100270216.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c100270216.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270216.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100270216.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100270216.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100270216.atkfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectTarget(tp,c100270216.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c100270216.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
......@@ -73,8 +73,7 @@ function c100270216.atkop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(tc:GetLink()*800)
c:RegisterEffect(e1)
end
......
......@@ -79,11 +79,12 @@ function c100270217.setcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c100270217.setfilter(c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSSetable()
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_TRAP) and c:IsSSetable(true)
end
function c100270217.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100270217.setfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(c100270217.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>-1
and Duel.IsExistingTarget(c100270217.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=Duel.SelectTarget(tp,c100270217.setfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,sg,1,0,0)
......
......@@ -4,7 +4,7 @@
function c100270218.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCountLimit(1,100270218+EFFECT_COUNT_CODE_OATH)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -29,19 +29,18 @@ function c100270218.lkfilter(c)
end
function c100270218.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local lk=Duel.GetMatchingGroupCount(c100270218.lkfilter,tp,LOCATION_MZONE,0,nil)
if lk>0 then
if Duel.IsExistingMatchingCard(c100270218.lkfilter,tp,LOCATION_MZONE,0,1,nil) then
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
end
function c100270218.actop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lk=Duel.GetMatchingGroupCount(c100270218.lkfilter,tp,LOCATION_MZONE,0,nil)
if lk>0 then
if Duel.IsExistingMatchingCard(c100270218.lkfilter,tp,LOCATION_MZONE,0,1,nil) then
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)
......
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