Commit 1ced43e0 authored by POLYMER's avatar POLYMER

fix

parent ad32e549
...@@ -49,36 +49,38 @@ function c11561014.addop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,36 +49,38 @@ function c11561014.addop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) then
c:AddCounter(0x1,x) c:AddCounter(0x1,x)
end end
end end
function c11561014.tkfil(c,e,tp)
local zone=e:GetHandler():GetLinkedZone()
return c:IsType(TYPE_MONSTER) Duel.IsPlayerCanSpecialSummonMonster(tp,11561015,0,TYPES_TOKEN_MONSTER,c:GetAttack(),2500,8,c:GetRace(),c:GetAttribute())
end
function c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,chk) function c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,0,0x1,3,REASON_COST) end
Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST) Duel.RemoveCounter(tp,1,0,0x1,3,REASON_COST)
end end
function c11561014.tkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c11561014.tkcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(function(c) return c:IsFaceup() and c:IsCode(11561015) end,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(function(c) return c:IsFaceup() and c:IsCode(11561015) end,tp,LOCATION_MZONE,0,nil)
if chk==0 then return (g:GetCount()==0 or not g:IsExists(function(c) return not c:IsReleasable() end,1,nil)) and c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,0) end if chk==0 then return (g:GetCount()==0 or not g:IsExists(function(c) return not c:IsReleasable() end,1,nil)) and c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,0) end
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,1) c11561014.ctcost(e,tp,eg,ep,ev,re,r,rp,1)
end end
function c11561014.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c11561014.tkfil(c,e,tp)
local zone=e:GetHandler():GetLinkedZone() local zone=bit.band(e:GetHandler():GetLinkedZone(tp),0x1f)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 and Duel.IsExistingTarget(c11561014.tkfil,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,e,tp) end return c:IsType(TYPE_MONSTER) and Duel.IsPlayerCanSpecialSummonMonster(tp,11561015,0,TYPES_TOKEN_MONSTER,c:GetAttack(),2500,8,c:GetRace(),c:GetAttribute(),POS_FACEUP,tp,0,zone)
end
function c11561014.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local zone=bit.band(c:GetLinkedZone(tp),0x1f)
if chk==0 then return zone~=0 and Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingTarget(c11561014.tkfil,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,e,tp) end
local g=Duel.SelectTarget(tp,c11561014.tkfil,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c11561014.tkfil,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,e,tp)
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,0,0)
end end
function c11561014.tkop(e,tp,eg,ep,ev,re,r,rp) function c11561014.tkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local zone=e:GetHandler():GetLinkedZone() local zone=bit.band(c:GetLinkedZone(tp),0x1f)
local ec=Duel.GetFirstTarget() local ec=Duel.GetFirstTarget()
if not ec:IsRelateToEffect(e) or ec:IsFacedown() then return end if not ec:IsRelateToEffect(e) or ec:IsFacedown() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,11561015,0,TYPES_TOKEN_MONSTER,ec:GetAttack(),2500,8,ec:GetRace(),ec:GetAttribute()) then return end if Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,11561015,0,TYPES_TOKEN_MONSTER,ec:GetAttack(),2500,8,ec:GetRace(),ec:GetAttribute(),POS_FACEUP,tp,0,zone) then return end
ec:RegisterFlagEffect(11561014,RESET_EVENT+0x17a0000,0,0) ec:RegisterFlagEffect(11561014,RESET_EVENT+0x17a0000,0,0)
local token=Duel.CreateToken(tp,11561015) local token=Duel.CreateToken(tp,11561015)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -33,13 +33,12 @@ function cm.initial_effect(c) ...@@ -33,13 +33,12 @@ function cm.initial_effect(c)
e3:SetTarget(c11561075.thtg) e3:SetTarget(c11561075.thtg)
e3:SetOperation(c11561075.thop) e3:SetOperation(c11561075.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c11561075.thfilter1(c) function c11561075.thfilter1(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelAbove(0) and Duel.IsExistingTarget(c11561075.thfilter2,tp,0,LOCATION_GRAVE,1,nil,c) return c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(c11561075.thfilter2,tp,LOCATION_DECK,0,1,nil,c)
end end
function c11561075.thfilter2(c,tc) function c11561075.thfilter2(c,tc)
return c:IsLevel(tc:GetLevel()) and not c:IsAttribute(tc:GetAttribute()) and c:IsAbleToHand() return c:IsAttribute(tc:GetAttribute()) and not c:IsRace(tc:GetRace()) and c:IsAbleToHand()
end end
function c11561075.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c11561075.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c11561075.thfilter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c11561075.thfilter1(chkc) end
...@@ -50,13 +49,13 @@ function c11561075.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,13 +49,13 @@ function c11561075.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c11561075.thop(e,tp,eg,ep,ev,re,r,rp) function c11561075.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11561075.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc) local g=Duel.SelectMatchingCard(tp,c11561075.thfilter2,tp,LOCATION_DECK,0,1,1,nil,tc)
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)
end end
end end
function c11561075.atkval(e,c) function c11561075.atkval(e,c)
return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,LOCATION_GRAVE)*e:GetHandler():GetCounter(0x1)*100 return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,LOCATION_GRAVE)*e:GetHandler():GetCounter(0x1)*100
......
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