Commit b753488d authored by 森野さくら's avatar 森野さくら 🐟

Replace c82000650.lua

parent c137b8de
--卡丘世界·令
function c82000640.initial_effect(c)
c:SetUniqueOnField(1,0,82000640)
function c82000650.initial_effect(c)
c:SetUniqueOnField(1,0,82000650)
c:SetCounterLimit(0x3f59,6)
aux.EnableDualAttribute(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(82000640,0))
e1:SetDescription(aux.Stringid(82000650,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,82000640+EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c82000640.seqcon)
e1:SetTarget(c82000640.seqtg)
e1:SetOperation(c82000640.seqop)
e1:SetCountLimit(1,82000650+EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(c82000650.seqcon)
e1:SetTarget(c82000650.seqtg)
e1:SetOperation(c82000650.seqop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -21,16 +21,16 @@ function c82000640.initial_effect(c)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(82000640,3))
e4:SetDescription(aux.Stringid(82000650,3))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_BE_BATTLE_TARGET)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,82000640+EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(c82000640.mvcon)
e4:SetTarget(c82000640.mvtg)
e4:SetOperation(c82000640.mvop)
e4:SetCountLimit(1,82000650+EFFECT_COUNT_CODE_CHAIN)
e4:SetCondition(c82000650.mvcon)
e4:SetTarget(c82000650.mvtg)
e4:SetOperation(c82000650.mvop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SUMMON_SUCCESS)
......@@ -42,25 +42,25 @@ function c82000640.initial_effect(c)
e7:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SUMMON)
e7:SetType(EFFECT_TYPE_IGNITION)
e7:SetRange(LOCATION_HAND)
e7:SetCountLimit(1,82000640)
e7:SetCondition(c82000640.spcon1)
e7:SetTarget(c82000640.sptg)
e7:SetOperation(c82000640.spop)
e7:SetCountLimit(1,82000650)
e7:SetCondition(c82000650.spcon1)
e7:SetTarget(c82000650.sptg)
e7:SetOperation(c82000650.spop)
c:RegisterEffect(e7)
local e8=e7:Clone()
e8:SetDescription(aux.Stringid(82000640,6))
e8:SetDescription(aux.Stringid(82000650,6))
e8:SetType(EFFECT_TYPE_QUICK_O)
e8:SetCode(EVENT_FREE_CHAIN)
e8:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e8:SetCondition(c82000640.spcon2)
e8:SetCondition(c82000650.spcon2)
c:RegisterEffect(e8)
Duel.AddCustomActivityCounter(82000640,ACTIVITY_CHAIN,c82000640.chainfilter)
Duel.AddCustomActivityCounter(82000650,ACTIVITY_CHAIN,c82000650.chainfilter)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e9:SetRange(LOCATION_MZONE)
e9:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e9:SetTarget(c82000640.target)
e9:SetTarget(c82000650.target)
e9:SetValue(1)
c:RegisterEffect(e9)
local e10=e9:Clone()
......@@ -69,26 +69,26 @@ function c82000640.initial_effect(c)
e10:SetValue(aux.tgoval)
c:RegisterEffect(e10)
end
function c82000640.target(e,c)
function c82000650.target(e,c)
return c:IsSetCard(0xf59)
end
function c82000640.chainfilter(re)
function c82000650.chainfilter(re)
return not (re:GetHandler():IsCode(82000635) and re:IsActiveType(TYPE_SPELL))
end
function c82000640.seqcon(e,tp,eg,ep,ev,re,r,rp)
function c82000650.seqcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and aux.IsDualState(e)
end
function c82000640.seqfilter(c)
return c:IsFaceup() and c:IsCode(82000640)
function c82000650.seqfilter(c)
return c:IsFaceup() and c:IsCode(82000650)
end
function c82000640.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c82000640.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c82000640.seqfilter,tp,LOCATION_MZONE,0,1,nil)
function c82000650.seqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c82000650.seqfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c82000650.seqfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82000640,1))
Duel.SelectTarget(tp,c82000640.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82000650,1))
Duel.SelectTarget(tp,c82000650.seqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c82000640.seqop(e,tp,eg,ep,ev,re,r,rp)
function c82000650.seqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOZONE)
......@@ -96,11 +96,11 @@ function c82000640.seqop(e,tp,eg,ep,ev,re,r,rp)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
Duel.BreakEffect()
if Duel.SelectYesNo(tp,aux.Stringid(82000640,2)) then
if Duel.SelectYesNo(tp,aux.Stringid(82000650,2)) then
local ac=Duel.GetFirstTarget()
if not (ac:IsRelateToEffect(e) and ac:IsControler(tp) and not ac:IsImmuneToEffect(e)) then return end
local zone=1<<ac:GetSequence()
local oc=Duel.GetMatchingGroup(c82000640.seqfilter1,tp,LOCATION_SZONE,0,nil,ac:GetSequence()):GetFirst()
local oc=Duel.GetMatchingGroup(c82000650.seqfilter1,tp,LOCATION_SZONE,0,nil,ac:GetSequence()):GetFirst()
if oc and Duel.Destroy(oc,REASON_RULE)>0 and oc:IsType(TYPE_SPELL+TYPE_TRAP) then
Duel.SendtoHand(oc,nil,REASON_RULE)
end
......@@ -115,26 +115,26 @@ function c82000640.seqop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c82000640.seqfilter1(c,seq)
function c82000650.seqfilter1(c,seq)
return c:GetSequence()==seq
end
function c82000640.mvcon(e,tp,eg,ep,ev,re,r,rp)
function c82000650.mvcon(e,tp,eg,ep,ev,re,r,rp)
local seq=e:GetHandler():GetSequence()
if seq>4 then return false end
return (seq>0 and Duel.CheckLocation(tp,LOCATION_SZONE,seq-1))
or (seq<4 and Duel.CheckLocation(tp,LOCATION_SZONE,seq+1))
and e:GetHandler():GetType()==TYPE_SPELL+TYPE_CONTINUOUS
end
function c82000640.mvfilter(c)
return c:IsCode(82000640)
function c82000650.mvfilter(c)
return c:IsCode(82000650)
end
function c82000640.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c82000640.mvfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c82000640.mvfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82000640,1))
Duel.SelectTarget(tp,c82000640.mvfilter,tp,LOCATION_SZONE,0,1,1,nil)
function c82000650.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c82000650.mvfilter(chkc) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(c82000650.mvfilter,tp,LOCATION_SZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(82000650,1))
Duel.SelectTarget(tp,c82000650.mvfilter,tp,LOCATION_SZONE,0,1,1,nil)
end
function c82000640.mvop(e,tp,eg,ep,ev,re,r,rp)
function c82000650.mvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) then return end
local seq=tc:GetSequence()
......@@ -155,7 +155,7 @@ function c82000640.mvop(e,tp,eg,ep,ev,re,r,rp)
else nseq=4 end
Duel.MoveSequence(tc,nseq)
Duel.BreakEffect()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) and Duel.SelectYesNo(tp,aux.Stringid(82000640,5)) then
if tc:IsRelateToEffect(e) and tc:IsControler(tp) and Duel.SelectYesNo(tp,aux.Stringid(82000650,5)) then
local ac=Duel.GetFirstTarget()
local zone=1<<ac:GetSequence()
if ac:IsRelateToEffect(e) and ac:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) then
......@@ -168,33 +168,33 @@ function c82000640.mvop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c82000640.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function c82000650.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)
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,0,0,0)
end
function c82000640.smfilter(c)
function c82000650.smfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSummonable(true,nil)
end
function c82000640.spop(e,tp,eg,ep,ev,re,r,rp)
function c82000650.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.IsExistingMatchingCard(Card.IsSummonable,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,true,nil)
and Duel.SelectYesNo(tp,aux.Stringid(82000640,4)) then
and Duel.SelectYesNo(tp,aux.Stringid(82000650,4)) then
Duel.BreakEffect()
Duel.ShuffleHand(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local sg=Duel.SelectMatchingCard(tp,c82000640.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil)
local sg=Duel.SelectMatchingCard(tp,c82000650.smfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,true,nil)
if sg:GetCount()>0 then
Duel.Summon(tp,sg:GetFirst(),true,nil)
end
end
end
function c82000640.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(82000640,tp,ACTIVITY_CHAIN)==0
function c82000650.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(82000650,tp,ACTIVITY_CHAIN)==0
end
function c82000640.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(82000640,tp,ACTIVITY_CHAIN)~=0
function c82000650.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(82000650,tp,ACTIVITY_CHAIN)~=0
end
\ No newline at end of file
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