Commit b00734c1 authored by POLYMER's avatar POLYMER

fix

parent b90afa62
...@@ -45,7 +45,7 @@ function cm.sscon(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function cm.sscon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(Card.IsType,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.GetTurnPlayer()~=tp and aux.dscon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(Card.IsType,1,nil,TYPE_SPELL+TYPE_TRAP) and Duel.GetTurnPlayer()~=tp and aux.dscon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.cfilter2(c,g) function cm.cfilter2(c,g)
return g:IsExists(Card.IsType,1,nil,c:GetType()&0x6) and c:IsFaceup() and c:IsAbleToGraveAsCost() return g:IsExists(Card.IsType,1,nil,c:GetType()&0x6) and (c:IsFaceup() or c:GetEquipTarget() or c:IsLocation(LOCATION_FZONE)) and c:IsAbleToGraveAsCost()
end end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter2,tp,0,LOCATION_SZONE,1,nil,eg) end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter2,tp,0,LOCATION_SZONE,1,nil,eg) end
......
...@@ -28,12 +28,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -28,12 +28,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
while codelist2==0 do while codelist2==0 do
local l=Duel.GetRandomNumber(1,999999999) local l=Duel.GetRandomNumber(1,999999999)
local mt=cm.load_metatable_load(l) local mt=cm.load_metatable_load(l)
if mt then if mt~=0 then
local token=Duel.CreateToken(tp,l) local token=Duel.CreateToken(tp,mt)
if token and token:IsType(TYPE_MONSTER) and token:IsType(TYPE_EFFECT) and not token:IsForbidden() and token:CheckUniqueOnField(tp) then if token and token:IsType(TYPE_MONSTER) and token:IsType(TYPE_EFFECT) and not token:IsForbidden() and token:CheckUniqueOnField(tp) then
c:SetHint(CHINT_CARD,l) c:SetHint(CHINT_CARD,mt)
Duel.Hint(HINT_CARD,1-tp,l) Duel.Hint(HINT_CARD,1-tp,mt)
local tcode=l local tcode=mt
c:SetEntityCode(tcode,true) c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
codelist2=codelist2+1 codelist2=codelist2+1
...@@ -42,8 +42,17 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -42,8 +42,17 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
end end
function cm.load_metatable_load(code) function cm.load_metatable_load(code)
local type=Duel.ReadCard(code,CARDDATA_TYPE) local cc,ca,ctype=Duel.ReadCard(code,CARDDATA_CODE,CARDDATA_ALIAS,CARDDATA_TYPE)
return type local real=0
if cc then
local dif=cc-ca
if dif>-10 and dif<10 then
real=ca
else
real=cc
end
end
return real
end end
function cm.load_metatable(code) function cm.load_metatable(code)
local m1=_G["c"..code] local m1=_G["c"..code]
......
...@@ -8,6 +8,7 @@ function c29052475.initial_effect(c) ...@@ -8,6 +8,7 @@ function c29052475.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29052475)
e1:SetCost(c29052475.thcost) e1:SetCost(c29052475.thcost)
e1:SetTarget(c29052475.thtg) e1:SetTarget(c29052475.thtg)
e1:SetOperation(c29052475.thop) e1:SetOperation(c29052475.thop)
......
...@@ -66,13 +66,14 @@ function cm.eftg(e,c) ...@@ -66,13 +66,14 @@ function cm.eftg(e,c)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ) return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ)
end end
function cm.xyzfilter(c,e) function cm.xyzfilter(c,e)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_MONSTER) and c:IsCanBeXyzMaterial(e:GetHandler()) and not c:IsCode(e:GetHandler():GetCode()) --and Duel.GetMZoneCount(tp,c,tp)>0 return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsType(TYPE_MONSTER) and c:IsCanBeXyzMaterial(e:GetHandler()) and not c:IsCode(e:GetHandler():GetCode())
end end
function cm.cfilter(c) function cm.cfilter(c)
return c:IsDiscardable() return c:IsDiscardable()
end end
function cm.xyzcon(e,c) function cm.xyzcon(e,c,tp)
if c==nil then return true end if c==nil then return true end
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil) return Duel.IsExistingMatchingCard(cm.xyzfilter,tp,LOCATION_MZONE,0,1,nil,e) and Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil)
end end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max) function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk,c,og,min,max)
......
...@@ -13,7 +13,7 @@ function c33700072.initial_effect(c) ...@@ -13,7 +13,7 @@ function c33700072.initial_effect(c)
--deck check --deck check
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4779823,0)) e2:SetDescription(aux.Stringid(4779823,0))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND)
......
...@@ -49,7 +49,7 @@ function c65010017.initial_effect(c) ...@@ -49,7 +49,7 @@ function c65010017.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c65010017.cfilter(c,tp) function c65010017.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK) return c:IsControler(tp) --and c:IsPreviousLocation(LOCATION_DECK)
end end
function c65010017.regcon(e,tp,eg,ep,ev,re,r,rp) function c65010017.regcon(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_DRAW then return false end if Duel.GetCurrentPhase()==PHASE_DRAW then return false 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