Commit fcf2beb8 authored by TanakaKotoha's avatar TanakaKotoha

wadashimo

parent ba37122a
Pipeline #631 passed with stages
in 39 minutes and 57 seconds
expansions/pics/81011027.jpg

91.6 KB | W: | H:

expansions/pics/81011027.jpg

168 KB | W: | H:

expansions/pics/81011027.jpg
expansions/pics/81011027.jpg
expansions/pics/81011027.jpg
expansions/pics/81011027.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81011134.jpg

64.8 KB | W: | H:

expansions/pics/81011134.jpg

147 KB | W: | H:

expansions/pics/81011134.jpg
expansions/pics/81011134.jpg
expansions/pics/81011134.jpg
expansions/pics/81011134.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81012020.jpg

84.3 KB | W: | H:

expansions/pics/81012020.jpg

128 KB | W: | H:

expansions/pics/81012020.jpg
expansions/pics/81012020.jpg
expansions/pics/81012020.jpg
expansions/pics/81012020.jpg
  • 2-up
  • Swipe
  • Onion skin
expansions/pics/81013014.jpg

66.1 KB | W: | H:

expansions/pics/81013014.jpg

167 KB | W: | H:

expansions/pics/81013014.jpg
expansions/pics/81013014.jpg
expansions/pics/81013014.jpg
expansions/pics/81013014.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -4,9 +4,9 @@ local cm=_G["c"..m]
function cm.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED)
e2:SetCode(EVENT_CUSTOM+m)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1)
......@@ -21,11 +21,32 @@ function cm.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(cm.desreptg)
e1:SetOperation(cm.desrepop)
c:RegisterEffect(e2)
c:RegisterEffect(e1)
if not cm.global_check then
cm.global_check=true
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_DESTROY)
ge2:SetCondition(cm.regcon)
ge2:SetOperation(cm.regop)
Duel.RegisterEffect(ge2,0)
end
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local v=0
if eg:IsExists(cm.spcfilter,1,nil,0) then v=v+1 end
if eg:IsExists(cm.spcfilter,1,nil,1) then v=v+2 end
if v==0 then return false end
e:SetLabel(({0,1,PLAYER_ALL})[v])
return true
end
function cm.regop(e,tp,eg,ep,ev,re,r,rp)
eg:KeepAlive()
Duel.RaiseEvent(eg:Filter(cm.spcfilter,nil,tp),EVENT_CUSTOM+m,re,r,rp,ep,e:GetLabel())
end
function cm.spcfilter(c,tp)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_ONFIELD) and c:GetCounter(0x1fb0)>0
and c:IsLocation(LOCATION_ONFIELD) and c:GetCounter(0x1fb0)>0
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.spcfilter,1,nil,tp)
......@@ -33,17 +54,17 @@ end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp)>0
and c:IsCanBeSpecialSummoned(e,0x348,tp,true,true) end
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
Debug.Message(eg:GetCount())
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
c:CompleteProcedure()
if rc:IsRelateToEffect(e) and rc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.SendtoHand(eg:Filter(Card.IsAbleToHand,nil),tp,REASON_EFFECT)
Duel.ConfirmCards(tp,eg)
end
end
function cm.repfilter(c,e)
......@@ -65,4 +86,4 @@ function cm.desrepop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end
\ No newline at end of file
end
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