Commit 9e7438ed authored by TanakaKotoha's avatar TanakaKotoha

dededededededededededede

parent 34c9379b
......@@ -10,14 +10,11 @@ function c12005014.initial_effect(c)
--activate from hand
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_QP_ACT_IN_NTPHAND)
e1:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(c12005014.mfilter))
e1:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(12005014,1))
......@@ -43,25 +40,34 @@ end
function c12005014.desfilter(c,g)
return g:IsContains(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c12005014.thfilter(c,rc)
local se=rc:GetSequence()
if se ==5 then
se=1
elseif se==6 then
se=3
end
local seq=c:GetSequence()
if seq ==5 then
seq=1
elseif seq==6 then
seq=3
end
return math.abs(se-seq)==1--g:IsContains(c)
end
function c12005014.drop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=re:GetHandler()
local seq=e:GetHandler():GetSequence()
local g=rc:GetColumnGroup()
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,3-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,5-seq)
if tc then g:AddCard(tc) end
tc=Duel.GetFieldCard(1-tp,LOCATION_SZONE,5-seq)
if tc then g:AddCard(tc) end
local tg=Duel.GetMatchingGroup(c12005014.thfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,rc)
local cg=Duel.GetMatchingGroup(c12005014.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,g)
cg:Merge(tg)
if re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_COUNTER) and cg:GetCount()>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
sel=Duel.SelectOption(tp,aux.Stringid(12005014,3),aux.Stringid(12005014,4))+1
if sel==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local tc=Duel.SelectMatchingCard(tp,c12005014.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g)
local tc=cg:Select(tp,1,1,nil)
Duel.SendtoHand(tc,nil,REASON_COST)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -45,7 +45,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
function cm.aclimit(e,re,tp)
return re:GetHandler():IsFacedown()
return re:GetHandler():IsFacedown() and re:GetHandler():IsLocation(LOCATION_ONFIELD)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
......
......@@ -81,6 +81,12 @@ function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local g=Duel.SelectMatchingCard(tp,cm.repfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c,e)
Duel.Destroy(g,REASON_EFFECT+REASON_REPLACE)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(2000)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
......
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