Commit 5064ffc6 authored by mercury233's avatar mercury233

fix

parent fb3d8399
Pipeline #8371 passed with stages
in 26 seconds
......@@ -36,35 +36,42 @@ function c100200210.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectMatchingCard(tp,c100200210.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100200210.tdfilter(c)
return ((c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO) and c:IsLevel(8))
or (c:IsType(TYPE_XYZ) and c:IsRank(8))) and c:IsAbleToDeck()
function c100200210.tdfilter(c,tp)
return c:IsAbleToDeck()
and ((c:IsType(TYPE_RITUAL+TYPE_FUSION+TYPE_SYNCHRO) and c:IsLevel(8))
or (c:IsType(TYPE_XYZ) and c:IsRank(8)))
and (Duel.IsPlayerCanDraw(tp,1) or c:IsType(TYPE_SYNCHRO+TYPE_XYZ))
end
function c100200210.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200210.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200210.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200210.tdfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c100200210.tdfilter,tp,LOCATION_GRAVE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100200210.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
local g=Duel.SelectTarget(tp,c100200210.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
if g:GetFirst():IsType(TYPE_RITUAL+TYPE_FUSION) then
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c100200210.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and
((tc:IsType(TYPE_RITUAL) and tc:IsLocation(LOCATION_DECK)) or
(tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and tc:IsLocation(LOCATION_EXTRA))) then
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0
and ((tc:IsType(TYPE_RITUAL) and tc:IsLocation(LOCATION_DECK))
or (tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ) and tc:IsLocation(LOCATION_EXTRA))) then
if tc:IsType(TYPE_RITUAL+TYPE_FUSION) then
Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.Draw(tp,1,REASON_EFFECT)
end
if tc:IsType(TYPE_SYNCHRO+TYPE_XYZ) then
if tc:IsType(TYPE_SYNCHRO+TYPE_XYZ)
and c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e:GetHandler():RegisterEffect(e1)
c:RegisterEffect(e1)
end
end
end
......@@ -28,7 +28,7 @@ function c100285001.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100285001,2))
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_BATTLE_DESTROYED)
......
......@@ -6,6 +6,7 @@ function c100285004.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCountLimit(1,100285004)
e1:SetCost(c100285004.limcost)
e1:SetOperation(c100285004.limop)
......@@ -17,6 +18,7 @@ function c100285004.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,100285004)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100285004.tgtg)
......@@ -58,6 +60,6 @@ end
function c100285004.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end
end
......@@ -61,8 +61,7 @@ end
function c100286001.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100286001.thfilter2,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)>0 then
Duel.ConfirmCards(1-tp,g)
local og=Duel.GetMatchingGroup(c100286001.thfilter3,tp,0,LOCATION_DECK,nil,tp)
if og:GetCount()>0 and Duel.SelectYesNo(1-tp,aux.Stringid(100286001,2)) then
......
......@@ -23,6 +23,7 @@ function c100286002.initial_effect(c)
c:RegisterEffect(e3)
--castling
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -62,6 +63,7 @@ function c100286002.cltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c100286002.clfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100286002.clfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.GetAttacker():CreateEffectRelation(e)
end
......@@ -73,7 +75,7 @@ function c100286002.clop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if a:IsAttackable() and a:IsRelateToEffect(e) and not a:IsImmuneToEffect(e) then
Duel.BreakEffect()
Duel.CalculateDamage(a,tc)
Duel.ChangeAttackTarget(tc)
end
end
end
......@@ -37,11 +37,10 @@ function c100286004.initial_effect(c)
end
end
function c100286004.checkop(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(0)
if a and d then Duel.RegisterFlagEffect(tp,100286004,RESET_PHASE+PHASE_END,0,1) end
if Duel.GetAttackTarget() then Duel.RegisterFlagEffect(0,100286004,RESET_PHASE+PHASE_END,0,1) end
end
function c100286004.sscon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100286004)==0 and Duel.GetCurrentPhase()==PHASE_MAIN2
return Duel.GetFlagEffect(0,100286004)==0 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c100286004.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
......@@ -61,7 +60,7 @@ function c100286004.ssop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100286004.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,100286004)>0
return Duel.GetFlagEffect(0,100286004)>0
end
function c100286004.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -4,13 +4,12 @@ function c100286005.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100286005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100286005)
e1:SetCountLimit(1,100286005+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100286005.spcon)
e1:SetTarget(c100286005.sptg)
e1:SetOperation(c100286005.spop)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
......@@ -30,18 +29,11 @@ end
function c100286005.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end
function c100286005.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100286005.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100286005.sptg(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_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100286005.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
function c100286005.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100286005.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100286005.tgfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsAbleToGrave()
......@@ -59,12 +51,11 @@ function c100286005.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end
function c100286005.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100286005.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100286005.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
......
......@@ -4,7 +4,7 @@
function c100286006.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100286006,1))
e1:SetDescription(aux.Stringid(100286006,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
......@@ -19,7 +19,6 @@ function c100286006.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(c100286006.downtg)
e2:SetValue(-300)
c:RegisterEffect(e2)
local e3=Effect.Clone(e2)
......@@ -27,8 +26,8 @@ function c100286006.initial_effect(c)
c:RegisterEffect(e3)
--change
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100286006,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(100286006,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,100286006+100)
......@@ -39,15 +38,17 @@ function c100286006.initial_effect(c)
end
function c100286006.cfilter(c,tp)
return c:IsRace(RACE_REPTILE) and Duel.GetMZoneCount(tp,c)>0
and (c:IsControler(tp) or c:IsFaceup())
end
function c100286006.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100286006.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c100286006.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c100286006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) end
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100286006.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -56,40 +57,34 @@ function c100286006.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100286006.downtg(e,c)
return c:IsFaceup()
function c100286006.rfilter(c,tp)
return c:GetTextAttack()>0 and (c:IsControler(tp) or c:IsFaceup())
end
function c100286006.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
if chk==0 then return Duel.CheckReleaseGroup(tp,c100286006.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c100286006.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
local tc=g:GetFirst()
local atk=tc:GetBaseAttack()
e:SetLabel(atk)
end
function c100286006.rcheck(c)
return c:GetTextAttack()>0
function c100286006.adfilter(c)
return c:IsFaceup() and c:GetAttack()>0 or c:GetDefense()>0
end
function c100286006.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
if e:GetLabel()==1 then
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.CheckReleaseGroup(tp,c100286006.rcheck,1,nil)
else
return false
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(tp,c100286006.rcheck,1,1,nil,tp)
local tc=g:GetFirst()
local atk=tc:GetTextAttack()
Duel.SetTargetParam(atk)
Duel.Release(g,REASON_COST)
if chk==0 then return Duel.IsExistingMatchingCard(c100286006.adfilter,tp,0,LOCATION_MZONE,1,nil) end
end
function c100286006.thop(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local atk=e:GetLabel()
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
......
......@@ -22,13 +22,13 @@ function c100286007.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_REMOVE)
e3:SetCountLimit(1,100286107)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e3:SetTarget(c100286007.indtg)
e3:SetOperation(c100286007.indop)
c:RegisterEffect(e3)
end
function c100286007.thfilter(c)
return c:IsRace(RACE_REPTILE) and c:IsLevel(8) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsRace(RACE_REPTILE) and c:IsLevel(8) and c:IsAbleToHand()
end
function c100286007.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100286007.thfilter,tp,LOCATION_DECK,0,1,nil) end
......@@ -43,7 +43,7 @@ function c100286007.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100286007.filter(c)
return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsType(TYPE_MONSTER)
return c:IsFaceup() and c:IsRace(RACE_REPTILE)
end
function c100286007.indtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100286007.filter(chkc) end
......
......@@ -13,61 +13,63 @@ function c100286008.initial_effect(c)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c100286008.e1tg)
e1:SetTarget(c100286008.atktg)
c:RegisterEffect(e1)
local e1_1=e1:Clone()
e1_1:SetCode(EFFECT_CANNOT_TRIGGER)
c:RegisterEffect(e1_1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c100286008.regcon)
e2:SetOperation(c100286008.regop)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_TRIGGER)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c100286008.regcon2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetCondition(c100286008.regcon)
e3:SetOperation(c100286008.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100286008,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCode(EVENT_CUSTOM+100286008)
e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,100286008)
e4:SetTarget(c100286008.sptg)
e4:SetOperation(c100286008.spop)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCondition(c100286008.regcon2)
c:RegisterEffect(e4)
--special summon
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(100286008,2))
e5:SetDescription(aux.Stringid(100286008,1))
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCountLimit(1,100286108)
e5:SetCondition(c100286008.tgcon)
e5:SetTarget(c100286008.tgtg)
e5:SetOperation(c100286008.tgop)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_CUSTOM+100286008)
e5:SetRange(LOCATION_SZONE)
e5:SetCountLimit(1,100286008)
e5:SetTarget(c100286008.sptg)
e5:SetOperation(c100286008.spop)
c:RegisterEffect(e5)
--return to grave
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(100286008,2))
e6:SetCategory(CATEGORY_TOGRAVE)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetProperty(EFFECT_FLAG_DELAY)
e6:SetCode(EVENT_DESTROYED)
e6:SetCountLimit(1,100286108)
e6:SetCondition(c100286008.tgcon)
e6:SetTarget(c100286008.tgtg)
e6:SetOperation(c100286008.tgop)
c:RegisterEffect(e6)
end
function c100286008.e1tg(e,c)
function c100286008.atktg(e,c)
return not c:IsRace(RACE_REPTILE)
end
function c100286008.cfilter(c,tp,zone)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsRace(RACE_REPTILE) and c:IsPreviousPosition(POS_FACEUP)
function c100286008.cfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:GetPreviousRaceOnField()&RACE_REPTILE~=0 and c:IsPreviousPosition(POS_FACEUP)
end
function c100286008.regcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100286008.cfilter,1,nil,tp,e:GetHandler():GetLinkedZone())
return eg:IsExists(c100286008.cfilter,1,nil,tp)
end
function c100286008.cfilter2(c,tp,zone)
return not c:IsReason(REASON_BATTLE) and c100286008.cfilter(c,tp,zone)
function c100286008.cfilter2(c,tp)
return not c:IsReason(REASON_BATTLE) and c100286008.cfilter(c,tp)
end
function c100286008.regcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100286008.cfilter2,1,nil,tp,e:GetHandler():GetLinkedZone())
return eg:IsExists(c100286008.cfilter2,1,nil,tp)
end
function c100286008.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+100286008,e,0,tp,0,0)
......@@ -96,8 +98,10 @@ function c100286008.filter(c,e,tp)
end
function c100286008.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100286008.filter,tp,LOCATION_REMOVED,0,1,nil) end
local g=Duel.GetMatchingGroup(c100286008.filter,tp,LOCATION_REMOVED,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,0,0)
end
function c100286008.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100286008.filter,tp,LOCATION_REMOVED,0,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
\ No newline at end of file
end
......@@ -26,9 +26,10 @@ function c100286009.initial_effect(c)
end
function c100286009.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)>0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
local tp=c:GetControler()
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c100286009.indes(e,c)
return not c:IsSummonLocation(LOCATION_EXTRA)
......
......@@ -55,7 +55,7 @@ end
function c100286010.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100286010.filter0(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100286010.filter0,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c100286010.filter0,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......@@ -63,6 +63,5 @@ function c100286010.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
......@@ -4,7 +4,7 @@
function c100286011.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100286011,1))
e1:SetDescription(aux.Stringid(100286011,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -24,7 +24,7 @@ function c100286011.initial_effect(c)
e3:SetOperation(c100286011.regop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100286011,2))
e4:SetDescription(aux.Stringid(100286011,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
......@@ -63,8 +63,6 @@ end
function c100286011.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100286011.thcheck,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100286011.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
......
......@@ -4,7 +4,7 @@
function c100286012.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100286012+EFFECT_COUNT_CODE_OATH)
......@@ -59,7 +59,6 @@ function c100286012.target(e,tp,eg,ep,ev,re,r,rp,chk)
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE)
end
function c100286012.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
......
......@@ -28,7 +28,7 @@ end
function c100286013.spfilter(c,e,tp)
if not c100286013.nofilter(c) then return end
local g=Duel.GetMatchingGroup(c100286013.nofilter,tp,LOCATION_EXTRA,0,c)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
and g:CheckSubGroup(c100286013.fselect,4,4,c)
end
function c100286013.fselect(sg,c)
......@@ -36,8 +36,7 @@ function c100286013.fselect(sg,c)
and sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
end
function c100286013.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100286013.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
if chk==0 then return Duel.IsExistingMatchingCard(c100286013.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......@@ -48,10 +47,10 @@ end
function c100286013.spfilter2(c,sg,e,tp)
return sg:GetSum(c100286013.nofilter)==c.xyz_number and sg:GetClassCount(Card.GetRank)==4
and sg:Filter(Card.IsCanBeXyzMaterial,nil,c):GetCount()==4
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c100286013.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 or not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then return end
if not aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL) then return end
local g=Duel.GetMatchingGroup(c100286013.nofilter,tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:SelectSubGroup(tp,c100286013.gselect,false,4,4,e,tp)
......
......@@ -8,6 +8,7 @@ function c100286014.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c100286014.condition)
e1:SetTarget(c100286014.target)
e1:SetOperation(c100286014.activate)
c:RegisterEffect(e1)
end
......@@ -17,21 +18,27 @@ function c100286014.filter(c)
local no=m.xyz_number
return no and no>=101 and no<=107 and c:IsSetCard(0x48) and c:IsType(TYPE_XYZ)
end
function c100286014.cfilter(c)
if not c:IsType(TYPE_XYZ) then return false end
if c100286014.filter(c) then return true end
local g=c:GetOverlayGroup()
function c100286014.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetBattleMonster(tp)
if not tc then return false end
if not tc:IsType(TYPE_XYZ) then return false end
if c100286014.filter(tc) then return true end
local g=tc:GetOverlayGroup()
return g:IsExists(c100286014.filter,1,nil)
end
function c100286014.condition(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and c100286014.cfilter(a)
function c100286014.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetBattleMonster(tp)
local g=tc:GetOverlayGroup()
if chk==0 then return tc:IsAbleToRemove() and #g==g:FilterCount(Card.IsAbleToRemove,nil) end
Duel.SetTargetCard(tc)
g:AddCard(tc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function c100286014.activate(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
if a and c100286014.cfilter(a) then
local og=a:GetOverlayGroup()
if Duel.Remove(a,POS_FACEUP,REASON_EFFECT)>0 and a:IsLocation(LOCATION_REMOVED) and og:GetCount()>0 then
local tc=Duel.GetBattleMonster(tp)
if tc and tc:IsRelateToEffect(e) and tc:IsControler(tp) then
local og=tc:GetOverlayGroup()
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_REMOVED) and og:GetCount()>0 then
Duel.Remove(og,POS_FACEUP,REASON_EFFECT)
end
end
......@@ -46,7 +53,7 @@ function c100286014.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100286014.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_CARD,0,100286014)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c100286014.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then
......@@ -54,5 +61,6 @@ function c100286014.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100286014.spfilter(c,e,tp)
return not c.xyz_number and c:IsRankBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return not c:IsSetCard(0x48) and c:IsRankBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
\ No newline at end of file
......@@ -4,7 +4,7 @@
function c100286015.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -21,6 +21,7 @@ function c100286015.filter(c)
return c:IsReleasable() and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c100286015.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
local g=Duel.GetMatchingGroup(c100286015.costfilter,tp,LOCATION_MZONE,0,nil)
if chk==0 then return g:GetCount()>0 and g:FilterCount(c100286015.filter,nil)==g:GetCount() and Duel.GetMZoneCount(tp,g)>0 end
e:SetLabel(g:GetCount())
......@@ -31,19 +32,24 @@ function c100286015.spfilter(c,e,tp)
end
function c100286015.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100286015.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100286015.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
if chk==0 then
if e:GetLabel()==100 then
e:SetLabel(0)
return Duel.IsExistingTarget(c100286015.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
else
return false
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100286015.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c100286015.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100286015.ovfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
if tc:IsLocation(LOCATION_MZONE) and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100286015,0)) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100286015.ovfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,tc)
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100286015,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,e:GetLabel()+1,nil)
......@@ -66,6 +72,7 @@ function c100286015.ovfilter(c)
return no and no>=101 and no<=107 and c:IsType(TYPE_XYZ) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
end
function c100286015.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,100286015)
Duel.Damage(tp,Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)*300,REASON_EFFECT)
Duel.Damage(1-tp,Duel.GetFieldGroupCount(1-tp,LOCATION_HAND,0)*300,REASON_EFFECT)
end
\ No newline at end of file
......@@ -7,7 +7,7 @@ function c100286016.initial_effect(c)
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCondition(c100286016.ovcon)
e1:SetTarget(c100286016.ovtg)
e1:SetOperation(c100286016.ovop)
......@@ -39,7 +39,8 @@ function c100286016.ovfilter(c)
end
function c100286016.ovtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100286016.ovfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100286016.ovfilter,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c100286016.ovfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsType,tp,0,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100286016.ovfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,1-tp,LOCATION_GRAVE)
......
......@@ -6,7 +6,7 @@ function c100286017.initial_effect(c)
aux.EnablePendulumAttribute(c)
--negate attack
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_LEAVE_GRAVE)
e1:SetCategory(CATEGORY_TOEXTRA+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_PZONE)
......@@ -18,7 +18,7 @@ function c100286017.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100286017,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -44,7 +44,7 @@ function c100286017.negfilter(c)
end
function c100286017.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100286017.negfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c100286017.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100286017,0))
......@@ -65,8 +65,9 @@ function c100286017.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingTarget(c100286017.spfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,c100286017.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectTarget(tp,c100286017.spfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100286017.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
......@@ -72,7 +72,8 @@ function c100286018.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100286018.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE) then
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_GRAVE)
and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -6,7 +6,7 @@ function c100286019.initial_effect(c)
aux.EnablePendulumAttribute(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_PZONE)
......@@ -45,6 +45,7 @@ end
function c100286019.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100286019.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c100286019.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
......@@ -80,6 +80,7 @@ function c100286020.pencon(e,tp,eg,ep,ev,re,r,rp)
end
function c100286020.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100286020.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
......
......@@ -56,6 +56,7 @@ end
function c101108050.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101108050.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
function c101108050.spop(e,tp,eg,ep,ev,re,r,rp)
......@@ -71,18 +72,19 @@ function c101108050.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c101108050.rmfilter(c)
return c:IsFaceup() and c:IsAbleToRemove()
return c:IsAbleToRemove()
end
function c101108050.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101108050.rmfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101108050.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c101108050.rmfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c101108050.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local ct=Duel.GetCurrentPhase()==PHASE_STANDBY and 2 or 1
tc:RegisterFlagEffect(101108050,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,ct)
local e2=Effect.CreateEffect(e:GetHandler())
......
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