Commit ee072422 authored by mercury233's avatar mercury233

fix

parent 6b785e61
...@@ -68,7 +68,7 @@ function c100200206.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -68,7 +68,7 @@ function c100200206.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c100200206.thcon(e,tp,eg,ep,ev,re,r,rp) function c100200206.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and c:IsPreviousLocation(LOCATION_MZONE) return c:IsPreviousLocation(LOCATION_MZONE)
end end
function c100200206.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100200206.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -92,7 +92,7 @@ function c100200206.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -92,7 +92,7 @@ function c100200206.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100200206.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv) local g=Duel.SelectMatchingCard(tp,c100200206.thfilter,tp,LOCATION_DECK,0,1,1,nil,lv)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
...@@ -5,7 +5,6 @@ function c100281062.initial_effect(c) ...@@ -5,7 +5,6 @@ function c100281062.initial_effect(c)
aux.AddCodeList(c,46986414,38033121) aux.AddCodeList(c,46986414,38033121)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100281062+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,100281062+EFFECT_COUNT_CODE_OATH)
...@@ -14,7 +13,7 @@ function c100281062.initial_effect(c) ...@@ -14,7 +13,7 @@ function c100281062.initial_effect(c)
--spsummon --spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100281062,1)) e2:SetDescription(aux.Stringid(100281062,1))
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
...@@ -42,15 +41,15 @@ end ...@@ -42,15 +41,15 @@ end
function c100281062.cfilter(c,tp) function c100281062.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(46986414,38033121) and c:IsSummonPlayer(tp) return c:IsFaceup() and c:IsCode(46986414,38033121) and c:IsSummonPlayer(tp)
end end
function c100281062.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100281062.cfilter,1,nil,tp)
end
function c100281062.tgfilter(c,e,tp,g) function c100281062.tgfilter(c,e,tp,g)
return g:IsContains(c) and Duel.IsExistingMatchingCard(c100281062.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode()) return g:IsContains(c) and Duel.IsExistingMatchingCard(c100281062.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,c:GetCode())
end end
function c100281062.spfilter(c,e,tp,code) function c100281062.spfilter(c,e,tp,code)
return c:IsCode(46986414,38033121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code) return c:IsCode(46986414,38033121) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end end
function c100281062.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100281062.cfilter,1,nil,tp)
end
function c100281062.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100281062.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=eg:Filter(c100281062.cfilter,nil,tp) local g=eg:Filter(c100281062.cfilter,nil,tp)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100281062.tgfilter(chkc,e,tp,g) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100281062.tgfilter(chkc,e,tp,g) end
...@@ -69,7 +68,7 @@ function c100281062.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +68,7 @@ function c100281062.spop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local code=tc:GetCode() local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100281062.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code) local g=Duel.SelectMatchingCard(tp,c100281062.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,code)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -13,7 +13,7 @@ function c100281063.initial_effect(c) ...@@ -13,7 +13,7 @@ function c100281063.initial_effect(c)
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100281063) e2:SetCountLimit(1,100281063)
e2:SetCondition(c100281063.drcon) e2:SetCondition(c100281063.drcon)
......
...@@ -20,7 +20,6 @@ function c100312001.initial_effect(c) ...@@ -20,7 +20,6 @@ function c100312001.initial_effect(c)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_FAIRY))
e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--banish --banish
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
......
...@@ -8,6 +8,7 @@ function c100312033.initial_effect(c) ...@@ -8,6 +8,7 @@ function c100312033.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,100312033+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,100312033+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c100312033.target) e1:SetTarget(c100312033.target)
e1:SetOperation(c100312033.activate) e1:SetOperation(c100312033.activate)
......
...@@ -22,7 +22,7 @@ function c100312040.initial_effect(c) ...@@ -22,7 +22,7 @@ function c100312040.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(TIMING_BATTLE_PHASE,TIMINGS_CHECK_MONSTER+TIMING_BATTLE_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCondition(c100312040.qkcon) e2:SetCondition(c100312040.qkcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
...@@ -37,14 +37,11 @@ function c100312040.initial_effect(c) ...@@ -37,14 +37,11 @@ function c100312040.initial_effect(c)
e3:SetOperation(c100312040.thop) e3:SetOperation(c100312040.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100312040.cfilter(c) function c100312040.qkcon(e,tp,eg,ep,ev,re,r,rp)
return c:IsCode(56433456) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) return Duel.IsEnvironment(56433456) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,56433456)
end end
function c100312040.noqkcon(e,tp,eg,ep,ev,re,r,rp) function c100312040.noqkcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c100312040.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) return not c100312040.qkcon(e,tp,eg,ep,ev,re,r,rp)
end
function c100312040.qkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100312040.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
end end
function c100312040.poscostfilter(c) function c100312040.poscostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER) return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
......
...@@ -9,7 +9,7 @@ function c100312052.initial_effect(c) ...@@ -9,7 +9,7 @@ function c100312052.initial_effect(c)
--to grave or to hand --to grave or to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100312052,0)) e1:SetDescription(aux.Stringid(100312052,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE+CATEGORY_DECKDES+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
...@@ -40,22 +40,18 @@ end ...@@ -40,22 +40,18 @@ end
function c100312052.thfilter(c) function c100312052.thfilter(c)
return c:IsCode(91188343) and c:IsAbleToHand() return c:IsCode(91188343) and c:IsAbleToHand()
end end
function c100312052.cfilter(c)
return c:IsCode(56433456) and (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE))
end
function c100312052.target(e,tp,eg,ep,ev,re,r,rp,chk) function c100312052.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.IsExistingMatchingCard(c100312052.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) local b=Duel.IsEnvironment(56433456) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,56433456)
if chk==0 then return Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil)
or b and Duel.IsExistingMatchingCard(c100312052.thfilter,tp,LOCATION_DECK,0,1,nil) end or b and Duel.IsExistingMatchingCard(c100312052.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c100312052.operation(e,tp,eg,ep,ev,re,r,rp) function c100312052.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil) local a=Duel.IsExistingMatchingCard(c100312052.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b=Duel.IsExistingMatchingCard(c100312052.cfilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) local b=Duel.IsEnvironment(56433456) or Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,56433456)
if b and Duel.IsExistingMatchingCard(c100312052.thfilter,tp,LOCATION_DECK,0,1,nil) and (not a or Duel.SelectYesNo(tp,aux.Stringid(100312052,2))) then local tg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100312052.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if b and #tg>0 and (not a or Duel.SelectYesNo(tp,aux.Stringid(100312052,2))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100312052.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=tg:Select(tp,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -68,12 +64,13 @@ function c100312052.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,12 +64,13 @@ function c100312052.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c100312052.costfilter(c) function c100312052.costfilter(c,tp)
return c:IsRace(RACE_FAIRY) return c:IsRace(RACE_FAIRY) and (c:IsFaceup() or c:IsControler(tp))
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,c)
end end
function c100312052.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c100312052.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100312052.costfilter,1,nil) end if chk==0 then return Duel.CheckReleaseGroup(tp,c100312052.costfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(tp,c100312052.costfilter,1,1,nil) local rg=Duel.SelectReleaseGroup(tp,c100312052.costfilter,1,1,nil,tp)
Duel.Release(rg,REASON_COST) Duel.Release(rg,REASON_COST)
end end
function c100312052.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100312052.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
...@@ -19,7 +19,7 @@ function c100417001.initial_effect(c) ...@@ -19,7 +19,7 @@ function c100417001.initial_effect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417001+100) e2:SetCountLimit(1,100417001+100)
e2:SetCondition(c100417001.sccon) e2:SetCondition(c100417001.sccon)
......
...@@ -19,6 +19,7 @@ function c100417002.initial_effect(c) ...@@ -19,6 +19,7 @@ function c100417002.initial_effect(c)
e2:SetCategory(CATEGORY_DRAW) e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET) e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417002+100) e2:SetCountLimit(1,100417002+100)
e2:SetCondition(c100417002.drcon1) e2:SetCondition(c100417002.drcon1)
......
...@@ -19,6 +19,7 @@ function c100417003.initial_effect(c) ...@@ -19,6 +19,7 @@ function c100417003.initial_effect(c)
e2:SetCategory(CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_BECOME_TARGET) e2:SetCode(EVENT_BECOME_TARGET)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,100417003+100) e2:SetCountLimit(1,100417003+100)
e2:SetCondition(c100417003.atkcon) e2:SetCondition(c100417003.atkcon)
...@@ -63,8 +64,8 @@ function c100417003.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,8 +64,8 @@ function c100417003.atkop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(math.floor(-tc:GetAttack()/2)) e1:SetValue(math.ceil(tc:GetAttack()/2))
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -3,41 +3,41 @@ ...@@ -3,41 +3,41 @@
--Script by REIKAI --Script by REIKAI
function c100417005.initial_effect(c) function c100417005.initial_effect(c)
--spsummon --spsummon
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(100417005,0))
e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_HAND)
e0:SetCountLimit(1,100417005)
e0:SetCost(c100417005.spcost)
e0:SetTarget(c100417005.sptg)
e0:SetOperation(c100417005.spop)
c:RegisterEffect(e0)
--Special Deck
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100417005,1)) e1:SetDescription(aux.Stringid(100417005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100417005+100) e1:SetCountLimit(1,100417005)
e1:SetCost(c100417005.spcost1) e1:SetCost(c100417005.spcost)
e1:SetTarget(c100417005.sptg1) e1:SetTarget(c100417005.sptg)
e1:SetOperation(c100417005.spop1) e1:SetOperation(c100417005.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--recover(battle) --Special Deck
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100417005,2)) e2:SetDescription(aux.Stringid(100417005,1))
e2:SetCategory(CATEGORY_RECOVER) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetRange(LOCATION_HAND+LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,100417005+100)
e2:SetCondition(aux.bdocon) e2:SetCost(c100417005.spcost1)
e2:SetTarget(c100417005.rctg) e2:SetTarget(c100417005.sptg1)
e2:SetOperation(c100417005.rcop) e2:SetOperation(c100417005.spop1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--recover(battle)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417005,2))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYING)
e3:SetCountLimit(1)
e3:SetCondition(aux.bdocon)
e3:SetTarget(c100417005.rctg)
e3:SetOperation(c100417005.rcop)
c:RegisterEffect(e3)
end end
function c100417005.rfilter(c,tp) function c100417005.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x26f) return Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x26f) and (c:IsFaceup() or c:IsControler(tp))
end end
function c100417005.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417005.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100417005.rfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c100417005.rfilter,1,nil,tp) end
...@@ -64,15 +64,16 @@ function c100417005.spfilter(c,e,tp) ...@@ -64,15 +64,16 @@ function c100417005.spfilter(c,e,tp)
end end
function c100417005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c100417005.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c100417005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,e:GetHandler()) end and Duel.IsExistingMatchingCard(c100417005.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) and Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c100417005.spop1(e,tp,eg,ep,ev,re,r,rp) function c100417005.spop1(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil) local tg=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_HAND,0,1,1,nil)
if tg:GetCount()>0 then if tg:GetCount()>0 then
if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then return end if Duel.SendtoGrave(tg,REASON_EFFECT)==0 then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c100417005.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -37,7 +37,7 @@ function c100417006.initial_effect(c) ...@@ -37,7 +37,7 @@ function c100417006.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100417006.spfilter(c,tp) function c100417006.spfilter(c,tp)
return c:IsSetCard(0x26f) and (c:IsControler(tp) or c:IsFaceup()) return Duel.GetMZoneCount(tp,c)>0 and c:IsSetCard(0x26f) and (c:IsControler(tp) or c:IsFaceup())
end end
function c100417006.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100417006.spfilter,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c100417006.spfilter,1,nil,tp) end
......
...@@ -66,12 +66,12 @@ end ...@@ -66,12 +66,12 @@ end
function c100417007.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100417007.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100417007.atkfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100417007.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100417007.atkfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c100417007.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100417007.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c100417007.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c100417007.atkop(e,tp,eg,ep,ev,re,r,rp) function c100417007.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -37,7 +37,8 @@ function c100417008.thfilter(c) ...@@ -37,7 +37,8 @@ function c100417008.thfilter(c)
end end
function c100417008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100417008.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingMatchingCard(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c100417008.thfilter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
......
...@@ -15,9 +15,9 @@ function c100417009.initial_effect(c) ...@@ -15,9 +15,9 @@ function c100417009.initial_effect(c)
e2:SetCode(EVENT_BATTLE_START) e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100417009) e2:SetCountLimit(1,100417009)
e2:SetCondition(c100417009.descon2) e2:SetCondition(c100417009.descon)
e2:SetTarget(c100417009.destg2) e2:SetTarget(c100417009.destg)
e2:SetOperation(c100417009.desop2) e2:SetOperation(c100417009.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Cannot Break --Cannot Break
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -29,19 +29,19 @@ function c100417009.initial_effect(c) ...@@ -29,19 +29,19 @@ function c100417009.initial_effect(c)
e3:SetOperation(c100417009.limop) e3:SetOperation(c100417009.limop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c100417009.descon2(e,tp,eg,ep,ev,re,r,rp) function c100417009.descon(e,tp,eg,ep,ev,re,r,rp)
local ac=Duel.GetAttacker() local ac=Duel.GetBattleMonster(tp)
if not ac:IsSetCard(0x26f) or not ac:IsControler(tp) then return false end if not (ac and ac:IsFaceup() and ac:IsSetCard(0x26f)) then return false end
local bc=ac:GetBattleTarget() local bc=ac:GetBattleTarget()
e:SetLabelObject(bc) e:SetLabelObject(bc)
return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() return bc and bc:IsControler(1-tp) and bc:IsRelateToBattle()
end end
function c100417009.destg2(e,tp,eg,ep,ev,re,r,rp,chk) function c100417009.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
if chk==0 then return bc end if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,bc,1,0,0)
end end
function c100417009.desop2(e,tp,eg,ep,ev,re,r,rp) function c100417009.desop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
if bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() then if bc and bc:IsControler(1-tp) and bc:IsRelateToBattle() then
Duel.Destroy(bc,REASON_EFFECT) Duel.Destroy(bc,REASON_EFFECT)
...@@ -59,12 +59,14 @@ function c100417009.limop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,12 +59,14 @@ function c100417009.limop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100417009.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c100417009.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetDescription(aux.Stringid(100417009,2))
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetValue(1) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
tc:RegisterEffect(e1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext() tc=g:GetNext()
end end
end end
\ No newline at end of file
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
function c100417010.initial_effect(c) function c100417010.initial_effect(c)
--ACT --ACT
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -35,13 +34,11 @@ function c100417010.acfilter(c,tp) ...@@ -35,13 +34,11 @@ function c100417010.acfilter(c,tp)
return c:IsSetCard(0x26f) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return c:IsSetCard(0x26f) and c:IsControler(tp) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
function c100417010.discon(e,tp,eg,ep,ev,re,r,rp) function c100417010.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not tg or not tg:IsExists(c100417010.acfilter,1,nil,tp) then return false end return rp==1-tp and tg and tg:IsExists(c100417010.acfilter,1,nil,tp)
return rp~=tp
end end
function c100417010.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417010.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
...@@ -59,30 +56,31 @@ function c100417010.cfilter(c) ...@@ -59,30 +56,31 @@ function c100417010.cfilter(c)
end end
function c100417010.limcon(e,tp,eg,ep,ev,re,r,rp) function c100417010.limcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE) and Duel.GetMatchingGroupCount(c100417010.cfilter,tp,LOCATION_MZONE,0,nil)>0 return rp==1-tp and c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_SZONE)
and Duel.GetMatchingGroupCount(c100417010.cfilter,tp,LOCATION_MZONE,0,nil)>0
end end
function c100417010.limop(e,tp,eg,ep,ev,re,r,rp) function c100417010.limop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c100417010.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c100417010.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c100417010.tgval) e1:SetValue(c100417010.tgval)
e1:SetOwnerPlayer(tp) e1:SetOwnerPlayer(tp)
tc:RegisterEffect(e1,true) tc:RegisterEffect(e1,true)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetDescription(aux.Stringid(100417010,2))
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetValue(c100417010.tgval) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetOwnerPlayer(tp) e2:SetValue(c100417010.tgval)
tc:RegisterEffect(e2,true) e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2,true)
tc=g:GetNext() tc=g:GetNext()
end end
end end
......
...@@ -40,8 +40,9 @@ function c100417011.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,8 +40,9 @@ function c100417011.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.AdjustInstantly(tc)
if Duel.IsExistingMatchingCard(c100417011.cfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.IsExistingMatchingCard(c100417011.cfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Recover(tp,tc:GetTextAttack(),REASON_EFFECT) Duel.Recover(tp,tc:GetBaseAttack(),REASON_EFFECT)
end end
end end
end end
\ No newline at end of file
...@@ -14,17 +14,18 @@ function c100417012.initial_effect(c) ...@@ -14,17 +14,18 @@ function c100417012.initial_effect(c)
e1:SetOperation(c100417012.desop) e1:SetOperation(c100417012.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c100417012.filter(c,tp) function c100417012.filter(c,check)
return c:IsFacedown() or (c:IsFaceup() and Duel.IsExistingMatchingCard(c100417012.cfilter,tp,LOCATION_MZONE,0,1,nil)) return c:IsFacedown() or c:IsFaceup() and check
end end
function c100417012.cfilter(c) function c100417012.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x26f) return c:IsFaceup() and c:IsSetCard(0x26f)
end end
function c100417012.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100417012.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100417012.filter(chkc,tp) end local check=Duel.IsExistingMatchingCard(c100417012.cfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return Duel.IsExistingTarget(c100417012.filter,tp,0,LOCATION_ONFIELD,1,nil,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c100417012.filter(chkc,check) end
if chk==0 then return Duel.IsExistingTarget(c100417012.filter,tp,0,LOCATION_ONFIELD,1,nil,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c100417012.filter,tp,0,LOCATION_ONFIELD,1,1,nil,tp) local g=Duel.SelectTarget(tp,c100417012.filter,tp,0,LOCATION_ONFIELD,1,1,nil,check)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c100417012.desop(e,tp,eg,ep,ev,re,r,rp) function c100417012.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -28,15 +28,9 @@ function c100417013.initial_effect(c) ...@@ -28,15 +28,9 @@ function c100417013.initial_effect(c)
e2:SetOperation(c100417013.spop) e2:SetOperation(c100417013.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100417013.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417013.cfilter(c) function c100417013.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x271) return c:IsFaceup() and c:IsSetCard(0x271)
end end
function c100417013.cfilter1(c)
return c:IsFaceup() and c:IsCode(100417014)
end
function c100417013.effcon(e,tp,eg,ep,ev,re,r,rp) function c100417013.effcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417013.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c100417013.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
...@@ -45,17 +39,22 @@ function c100417013.efftg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,17 +39,22 @@ function c100417013.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c100417013.cfilter1(c)
return c:IsFaceup() and c:IsCode(100417014)
end
function c100417013.effop(e,tp,eg,ep,ev,re,r,rp) function c100417013.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c100417013.cfilter1,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(c100417013.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT) Duel.Recover(tp,800,REASON_EFFECT)
end end
end end
function c100417013.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417013.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417013.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417013.filter,1,nil) return rp==1-tp and eg:IsExists(c100417013.filter,1,nil)
end end
function c100417013.spfilter(c,e,tp,mc) function c100417013.spfilter(c,e,tp,mc)
return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
......
...@@ -27,9 +27,6 @@ function c100417014.initial_effect(c) ...@@ -27,9 +27,6 @@ function c100417014.initial_effect(c)
e2:SetOperation(c100417014.spop) e2:SetOperation(c100417014.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100417014.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417014.effspfilter(c,e,tp) function c100417014.effspfilter(c,e,tp)
return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -46,13 +43,16 @@ function c100417014.effop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,13 +43,16 @@ function c100417014.effop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417014.effspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c100417014.effspfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(c100417014.cfilter,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(c100417014.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT) Duel.Recover(tp,800,REASON_EFFECT)
end end
end end
function c100417014.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417014.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417014.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417014.filter,1,nil) return rp==1-tp and eg:IsExists(c100417014.filter,1,nil)
end end
function c100417014.spfilter(c,e,tp,mc) function c100417014.spfilter(c,e,tp,mc)
return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
......
...@@ -35,6 +35,7 @@ function c100417015.effcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,6 +35,7 @@ function c100417015.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417015.costfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100417015.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100417015.costfilter,tp,LOCATION_HAND,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100417015.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.SendtoDeck(g,nil,1,REASON_COST) Duel.SendtoDeck(g,nil,1,REASON_COST)
end end
function c100417015.efftg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417015.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -49,16 +50,16 @@ end ...@@ -49,16 +50,16 @@ end
function c100417015.effop(e,tp,eg,ep,ev,re,r,rp) function c100417015.effop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 if Duel.Draw(p,d,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c100417015.cfilter,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(c100417015.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT) Duel.Recover(tp,800,REASON_EFFECT)
end end
end end
function c100417015.filter(c) function c100417015.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE) return c:IsPreviousLocation(LOCATION_GRAVE)
end end
function c100417015.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417015.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417015.filter,1,nil) return rp==1-tp and eg:IsExists(c100417015.filter,1,nil)
end end
function c100417015.spfilter(c,e,tp,mc) function c100417015.spfilter(c,e,tp,mc)
return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
......
...@@ -28,9 +28,6 @@ function c100417016.initial_effect(c) ...@@ -28,9 +28,6 @@ function c100417016.initial_effect(c)
e2:SetOperation(c100417016.spop) e2:SetOperation(c100417016.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c100417016.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417016.cfilter(c) function c100417016.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x271) return c:IsFaceup() and c:IsSetCard(0x271)
end end
...@@ -49,13 +46,16 @@ end ...@@ -49,13 +46,16 @@ end
function c100417016.effop(e,tp,eg,ep,ev,re,r,rp) function c100417016.effop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)>0 if Duel.Draw(p,d,REASON_EFFECT)>0
and Duel.IsExistingMatchingCard(c100417016.cfilter1,tp,LOCATION_MZONE,0,1,nil) then and Duel.IsExistingMatchingCard(c100417016.cfilter1,tp,LOCATION_ONFIELD,0,1,nil) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Recover(tp,800,REASON_EFFECT) Duel.Recover(tp,800,REASON_EFFECT)
end end
end end
function c100417016.filter(c)
return c:IsPreviousLocation(LOCATION_GRAVE)
end
function c100417016.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417016.spcon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c100417016.filter,1,nil) return rp==1-tp and eg:IsExists(c100417016.filter,1,nil)
end end
function c100417016.spfilter(c,e,tp,mc) function c100417016.spfilter(c,e,tp,mc)
return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) return c:IsSetCard(0x271) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
......
...@@ -77,9 +77,9 @@ end ...@@ -77,9 +77,9 @@ end
function c100417020.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100417020.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c100417020.thop(e,tp,eg,ep,ev,re,r,rp) function c100417020.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -9,7 +9,7 @@ function c100417021.initial_effect(c) ...@@ -9,7 +9,7 @@ function c100417021.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100417021+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,100417021+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_MAIN_END) e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCondition(c100417021.condition) e1:SetCondition(c100417021.condition)
e1:SetCost(c100417021.cost) e1:SetCost(c100417021.cost)
e1:SetTarget(c100417021.target) e1:SetTarget(c100417021.target)
......
...@@ -9,6 +9,7 @@ function c100417022.initial_effect(c) ...@@ -9,6 +9,7 @@ function c100417022.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,100417022+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,100417022+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c100417022.cost) e1:SetCost(c100417022.cost)
e1:SetCondition(c100417022.condition) e1:SetCondition(c100417022.condition)
e1:SetTarget(c100417022.target) e1:SetTarget(c100417022.target)
...@@ -23,7 +24,7 @@ function c100417022.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -23,7 +24,7 @@ function c100417022.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp
end end
function c100417022.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417022.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
end end
function c100417022.cfilter(c,code) function c100417022.cfilter(c,code)
...@@ -34,7 +35,7 @@ function c100417022.spfilter1(c,e,tp) ...@@ -34,7 +35,7 @@ function c100417022.spfilter1(c,e,tp)
and Duel.IsExistingMatchingCard(c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
function c100417022.spfilter2(c,e,tp,mc,att) function c100417022.spfilter2(c,e,tp,mc)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x271) and mc:IsCanBeXyzMaterial(c) return c:IsType(TYPE_XYZ) and c:IsSetCard(0x271) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
and not Duel.IsExistingMatchingCard(c100417022.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode()) and not Duel.IsExistingMatchingCard(c100417022.cfilter,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
...@@ -47,11 +48,10 @@ function c100417022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -47,11 +48,10 @@ function c100417022.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c100417022.activate(e,tp,eg,ep,ev,re,r,rp) function c100417022.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetAttribute()) local g=Duel.SelectMatchingCard(tp,c100417022.spfilter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
...@@ -11,7 +11,7 @@ function c100417023.initial_effect(c) ...@@ -11,7 +11,7 @@ function c100417023.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c100417023.eftg) e1:SetTarget(c100417023.eftg)
...@@ -49,11 +49,11 @@ end ...@@ -49,11 +49,11 @@ end
function c100417023.efilter(e,re,rp) function c100417023.efilter(e,re,rp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonLocation(LOCATION_GRAVE) and re:GetActivateLocation()==LOCATION_MZONE return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsSummonLocation(LOCATION_GRAVE) and re:GetActivateLocation()==LOCATION_MZONE
end end
function c100417023.cfilter(c,tp,sumt) function c100417023.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x271) and c:IsSummonType(sumt) and c:IsSummonPlayer(tp) return c:IsFaceup() and c:IsSetCard(0x271) and c:IsSummonType(SUMMON_TYPE_XYZ) and c:IsSummonPlayer(tp)
end end
function c100417023.bancon(e,tp,eg,ep,ev,re,r,rp) function c100417023.bancon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100417023.cfilter,1,nil,tp,SUMMON_TYPE_XYZ) return eg:IsExists(c100417023.cfilter,1,nil,tp)
end end
function c100417023.bantg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417023.bantg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
...@@ -15,16 +15,16 @@ function c100417024.initial_effect(c) ...@@ -15,16 +15,16 @@ function c100417024.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c100417024.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417024.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800) Duel.PayLPCost(tp,800)
end end
function c100417024.spfilter1(c,e,tp) function c100417024.spfilter1(c,e,tp)
return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c100417024.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode()) and Duel.IsExistingMatchingCard(c100417024.spfilter2,tp,LOCATION_DECK,0,1,c,e,tp,c)
end end
function c100417024.spfilter2(c,e,tp,code) function c100417024.spfilter2(c,e,tp,ec)
return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x271) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and aux.IsCodeListed(c,code) and aux.IsCodeListed(ec,c:GetCode())
end end
function c100417024.target(e,tp,eg,ep,ev,re,r,rp,chk) function c100417024.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
...@@ -38,7 +38,7 @@ function c100417024.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +38,7 @@ function c100417024.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectMatchingCard(tp,c100417024.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g1=Duel.SelectMatchingCard(tp,c100417024.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g1==0 then return end if #g1==0 then return end
local g2=Duel.SelectMatchingCard(tp,c100417024.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp,g1:GetFirst():GetCode()) local g2=Duel.SelectMatchingCard(tp,c100417024.spfilter2,tp,LOCATION_DECK,0,1,1,g1,e,tp,g1:GetFirst())
g1:Merge(g2) g1:Merge(g2)
local tc=g1:GetFirst() local tc=g1:GetFirst()
while tc do while tc do
......
...@@ -20,8 +20,11 @@ function c100417025.chainfilter(re,tp,cid) ...@@ -20,8 +20,11 @@ function c100417025.chainfilter(re,tp,cid)
local rc=re:GetHandler() local rc=re:GetHandler()
return not (re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE) and not rc:IsSummonType(SUMMON_TYPE_SPECIAL)) return not (re:IsActiveType(TYPE_MONSTER) and rc:IsLocation(LOCATION_MZONE) and not rc:IsSummonType(SUMMON_TYPE_SPECIAL))
end end
function c100417025.cfilter0(c)
return c:IsCode(100417125) and c:IsFaceup()
end
function c100417025.condition(e,tp,eg,ep,ev,re,r,rp) function c100417025.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_MZONE,0,1,nil,100417125) return not Duel.IsExistingMatchingCard(c100417025.cfilter0,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100417025.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100417025,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.GetCustomActivityCount(100417025,tp,ACTIVITY_CHAIN)==0 end
...@@ -29,7 +32,7 @@ function c100417025.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +32,7 @@ function c100417025.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTargetRange(1,0)
e1:SetValue(c100417025.aclimit) e1:SetValue(c100417025.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
...@@ -42,7 +45,7 @@ function c100417025.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +45,7 @@ function c100417025.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,100417125,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_FAIRY,ATTRIBUTE_EARTH) end Duel.IsPlayerCanSpecialSummonMonster(tp,100417125,0,TYPES_TOKEN_MONSTER,2000,2000,4,RACE_FAIRY,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end end
function c100417025.cfilter(c) function c100417025.cfilter(c)
return c:IsCode(100417029) and c:IsFaceup() return c:IsCode(100417029) and c:IsFaceup()
......
...@@ -25,7 +25,7 @@ function c100417026.initial_effect(c) ...@@ -25,7 +25,7 @@ function c100417026.initial_effect(c)
e2:SetTarget(c100417026.thtg) e2:SetTarget(c100417026.thtg)
e2:SetOperation(c100417026.thop) e2:SetOperation(c100417026.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--set --set
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100417026,2)) e3:SetDescription(aux.Stringid(100417026,2))
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
...@@ -40,7 +40,7 @@ function c100417026.cfilter(c) ...@@ -40,7 +40,7 @@ function c100417026.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup() return c:IsCode(100417125) and c:IsFaceup()
end end
function c100417026.condition(e,tp,eg,ep,ev,re,r,rp) function c100417026.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417026.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c100417026.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100417026.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417026.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -51,7 +51,7 @@ function c100417026.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function c100417026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c100417026.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100417026.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
...@@ -82,6 +82,11 @@ function c100417026.sop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,6 +82,11 @@ function c100417026.sop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc=Duel.SelectMatchingCard(tp,c100417026.stfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c100417026.stfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then if tc then
local fc=Duel.GetFieldCard(tp,LOCATION_SZONE,5)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end end
end end
...@@ -50,7 +50,7 @@ function c100417027.cfilter(c) ...@@ -50,7 +50,7 @@ function c100417027.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup() return c:IsCode(100417125) and c:IsFaceup()
end end
function c100417027.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417027.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417027.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c100417027.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100417027.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417027.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -64,7 +64,7 @@ function c100417027.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function c100417027.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100417027.atkcon(e) function c100417027.atkcon(e)
return not Duel.IsExistingMatchingCard(c100417027.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(c100417027.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end end
function c100417027.setcon(e,tp,eg,ep,ev,re,r,rp) function c100417027.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100417027)>0 return Duel.GetFlagEffect(tp,100417027)>0
...@@ -76,7 +76,6 @@ function c100417027.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,7 +76,6 @@ function c100417027.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100417027.setfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100417027.setfilter,tp,LOCATION_DECK,0,1,nil) end
end end
function c100417027.setop(e,tp,eg,ep,ev,re,r,rp) function c100417027.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c100417027.setfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100417027.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -36,7 +36,7 @@ end ...@@ -36,7 +36,7 @@ end
function c100417028.spcon(e,tp,eg,ep,ev,re,r,rp) function c100417028.spcon(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end if not (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) then return false end
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
or Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_MZONE,0,1,nil) or Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100417028.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417028.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -49,7 +49,7 @@ function c100417028.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function c100417028.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c100417028.negcon(e,tp,eg,ep,ev,re,r,rp) function c100417028.negcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c100417028.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev) return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end end
function c100417028.negtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100417028.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -57,6 +57,7 @@ function c100417029.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,6 +57,7 @@ function c100417029.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT)
......
...@@ -25,7 +25,6 @@ function c100417030.initial_effect(c) ...@@ -25,7 +25,6 @@ function c100417030.initial_effect(c)
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_EQUIP) e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE)
e3:SetValue(c100417030.atkval) e3:SetValue(c100417030.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--grave to equip --grave to equip
......
...@@ -21,7 +21,7 @@ function c100417035.cfilter(c) ...@@ -21,7 +21,7 @@ function c100417035.cfilter(c)
return c:IsCode(100417125) and c:IsFaceup() return c:IsCode(100417125) and c:IsFaceup()
end end
function c100417035.condition(e,tp,eg,ep,ev,re,r,rp) function c100417035.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100417035.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c100417035.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100417035.tgfilter(c,tp) function c100417035.tgfilter(c,tp)
return c:IsFaceup() and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(c100417035.cfilter2,1,nil) return c:IsFaceup() and c:GetEquipCount()>0 and c:GetEquipGroup():IsExists(c100417035.cfilter2,1,nil)
......
...@@ -48,7 +48,7 @@ function c101105084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -48,7 +48,7 @@ function c101105084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg,zone) end and Duel.IsExistingTarget(c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp,lg,zone) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg,zone) local g=Duel.SelectTarget(tp,c101105084.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp,lg,zone)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
e:SetLabel(g:GetFirst():GetRace()) e:SetLabel(g:GetFirst():GetRace())
end end
function c101105084.operation(e,tp,eg,ep,ev,re,r,rp) function c101105084.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -17,7 +17,7 @@ function c101105086.initial_effect(c) ...@@ -17,7 +17,7 @@ function c101105086.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--When a monster your opponent controls activates its effect (Quick Effect): You can Tribute 1 Insect monster; destroy it. --destroy chain
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
......
...@@ -39,7 +39,8 @@ end ...@@ -39,7 +39,8 @@ end
function c101105087.tdfilter2(c) function c101105087.tdfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck() return c:IsType(TYPE_MONSTER) and c:IsAbleToDeck()
end end
function c101105087.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101105087.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
and Duel.IsExistingTarget(c101105087.tdfilter1,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingTarget(c101105087.tdfilter1,tp,LOCATION_GRAVE,0,1,nil)
...@@ -49,7 +50,7 @@ function c101105087.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,7 +50,7 @@ function c101105087.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,c101105087.tdfilter2,tp,0,LOCATION_GRAVE,1,1,nil) local g2=Duel.SelectTarget(tp,c101105087.tdfilter2,tp,0,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c101105087.spop(e,tp,eg,ep,ev,re,r,rp) function c101105087.spop(e,tp,eg,ep,ev,re,r,rp)
...@@ -63,15 +64,13 @@ function c101105087.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,15 +64,13 @@ function c101105087.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101105087.schfilter(c) function c101105087.schfilter(c)
return c:IsSetCard(0x270) and c:IsType(TYPE_TRAP+TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0x270) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
function c101105087.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101105087.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c101105087.schfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101105087.schfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c101105087.thop(e,tp,eg,ep,ev,re,r,rp) function c101105087.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101105087.schfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101105087.schfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -34,7 +34,8 @@ function c101105090.filter(c,e,tp) ...@@ -34,7 +34,8 @@ function c101105090.filter(c,e,tp)
end end
function c101105090.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101105090.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101105090.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101105090.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101105090.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101105090.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101105090.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101105090.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
...@@ -53,7 +54,7 @@ function c101105090.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +54,7 @@ function c101105090.spop(e,tp,eg,ep,ev,re,r,rp)
end end
function c101105090.cfilter(c,tp) function c101105090.cfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:IsRace(RACE_INSECT) and c:IsPreviousControler(tp) and c:IsPreviousPosition(POS_FACEUP) and c:IsRace(RACE_INSECT)
end end
function c101105090.condition(e,tp,eg,ep,ev,re,r,rp) function c101105090.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101105090.cfilter,1,nil,tp) return eg:IsExists(c101105090.cfilter,1,nil,tp)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
function c101105091.initial_effect(c) function c101105091.initial_effect(c)
--negate --negate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW) e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101105091) e1:SetCountLimit(1,101105091)
......
...@@ -51,8 +51,7 @@ function c101107002.drfilter(c) ...@@ -51,8 +51,7 @@ function c101107002.drfilter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER)
end end
function c101107002.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101107002.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101107002.drfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c101107002.drfilter,tp,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end if chk==0 then return ct>0 and Duel.IsPlayerCanDraw(tp,ct) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct) Duel.SetTargetParam(ct)
...@@ -61,11 +60,11 @@ function c101107002.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,11 +60,11 @@ function c101107002.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101107002.drop(e,tp,eg,ep,ev,re,r,rp) function c101107002.drop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetMatchingGroup(c101107002.drfilter,p,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c101107002.drfilter,p,LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
if ct>0 and Duel.Draw(p,ct,REASON_EFFECT)==ct then if ct>0 and Duel.Draw(p,ct,REASON_EFFECT)==ct then
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil) local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,p,LOCATION_HAND,0,nil)
if tg:GetCount()==0 then return end if tg:GetCount()==0 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=tg:Select(p,ct,ct,nil) local sg=tg:Select(p,ct,ct,nil)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
......
...@@ -26,12 +26,11 @@ function c101107003.initial_effect(c) ...@@ -26,12 +26,11 @@ function c101107003.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101107003.cfilter(c,tp) function c101107003.cfilter(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and (c:IsRace(RACE_SPELLCASTER) or aux.IsCodeListed(c,46986414) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and Duel.GetMZoneCount(tp,c)>0 return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and (c:IsRace(RACE_SPELLCASTER) or aux.IsCodeListed(c,46986414) and c:IsType(TYPE_SPELL+TYPE_TRAP))
end end
function c101107003.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101107003.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return Duel.IsExistingMatchingCard(c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp) end
Duel.IsExistingMatchingCard(c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,c101107003.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil,tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
......
...@@ -73,7 +73,8 @@ function c101107034.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,7 +73,8 @@ function c101107034.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101107034.disop(e,tp,eg,ep,ev,re,r,rp) function c101107034.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND) then if c:IsRelateToEffect(e) and Duel.SendtoHand(c,nil,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_HAND)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101107034.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101107034.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
......
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