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)
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
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
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
......
......@@ -28,12 +28,12 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
while codelist2==0 do
local l=Duel.GetRandomNumber(1,999999999)
local mt=cm.load_metatable_load(l)
if mt then
local token=Duel.CreateToken(tp,l)
if mt~=0 then
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
c:SetHint(CHINT_CARD,l)
Duel.Hint(HINT_CARD,1-tp,l)
local tcode=l
c:SetHint(CHINT_CARD,mt)
Duel.Hint(HINT_CARD,1-tp,mt)
local tcode=mt
c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0)
codelist2=codelist2+1
......@@ -42,8 +42,17 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
end
function cm.load_metatable_load(code)
local type=Duel.ReadCard(code,CARDDATA_TYPE)
return type
local cc,ca,ctype=Duel.ReadCard(code,CARDDATA_CODE,CARDDATA_ALIAS,CARDDATA_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
function cm.load_metatable(code)
local m1=_G["c"..code]
......
......@@ -8,6 +8,7 @@ function c29052475.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,29052475)
e1:SetCost(c29052475.thcost)
e1:SetTarget(c29052475.thtg)
e1:SetOperation(c29052475.thop)
......
......@@ -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)
end
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
function cm.cfilter(c)
return c:IsDiscardable()
end
function cm.xyzcon(e,c)
function cm.xyzcon(e,c,tp)
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)
end
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)
--deck check
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(4779823,0))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
......
......@@ -49,7 +49,7 @@ function c65010017.initial_effect(c)
c:RegisterEffect(e4)
end
function c65010017.cfilter(c,tp)
return c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
return c:IsControler(tp) --and c:IsPreviousLocation(LOCATION_DECK)
end
function c65010017.regcon(e,tp,eg,ep,ev,re,r,rp)
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